You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by st...@outerthought.org on 2004/04/27 18:00:11 UTC

[WIKI-UPDATE] WoodyRefactoring SitemapPathModule People AkKu WidgetStates Andreshurtado NicoVerwer GlauberRibeiro InputModules Tue Apr 27 18:00:11 2004

Page: http://wiki.cocoondev.org/Wiki.jsp?page=WoodyRefactoring , version: 8 on Mon Apr 27 15:29:20 2004 by TimLarson

- 
+ * [WidgetStates] on the various states of a widget (e.g. input, output, hidden)


Page: http://wiki.cocoondev.org/Wiki.jsp?page=SitemapPathModule , version: 2 on Mon Apr 27 15:25:56 2004 by NicoVerwer

- For example, if the sitemap from which this module is used is located in {{/here/is/my/sitemap.xmap}}, the following results are returned
+ For example, if the sitemap from which this module is used is located in {{/here/is/my/sitemap.xmap}}, the following results are returned:
?                                                                                                                                          +

+ | {sitemap-path:input.xml} | {{/here/is/my/input.xml}}
+ | {sitemap-path:../something.xsl} | {{/here/is/something.xsl}}
+ This module is useful in situations where you cannot use the standard source-resolving mechanism on generators and transformers.
+ It was written to access an XML-catalog in a sitemap-relative directory from a serializer, and probably has other uses as well.
+ 
+ The SitemapPathModule must be configured in {{cocoon.xconf}}:
+ 
+ {{{
+ <component-instance
+   class="org.apache.cocoon.components.modules.input.SitemapPathModule"
+   logger="core.modules.input" name="sitemap-path"/>
+ }}}
+ 
+ The SitemapPathModule is not in the Cocoon distribution.
+ It was donated to the Cocoon community by [Nico Verwer], in the hope that it might be useful to others.
+ 
+ The relevant part of the code is:
+ 
+ {{{
+ package org.apache.cocoon.components.modules.input;
+ 
+ import java.util.*;
+ import org.apache.avalon.framework.configuration.Configuration;
+ import org.apache.avalon.framework.configuration.ConfigurationException;
+ import org.apache.avalon.framework.thread.ThreadSafe;
+ import org.apache.cocoon.components.CocoonComponentManager;
+ import org.apache.cocoon.components.modules.input.AbstractInputModule;
+ import org.apache.cocoon.environment.ObjectModelHelper;
+ import org.apache.excalibur.source.Source;
+ import org.apache.excalibur.source.SourceResolver;
+ import org.apache.excalibur.source.impl.FileSource;
+ 
+ public class SitemapPathModule extends AbstractInputModule implements ThreadSafe {
+ 
+   public Object getAttribute(String name, Configuration modeConf, Map objectModel)
+     throws ConfigurationException {
+     SourceResolver resolver = CocoonComponentManager.getCurrentEnvironment();
+     FileSource source;
+     try {
+       source = (FileSource) resolver.resolveURI(name);
+       return source.getFile().getCanonicalPath();
+     } catch (Exception e) {
+       throw new ConfigurationException(e.toString());
+     }
+   }
+ 
+   public Iterator getAttributeNames(Configuration modeConf, Map objectModel)
+     throws ConfigurationException {
+     return (new java.util.ArrayList()).iterator();
+   }
+ 
+   public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)
+     throws ConfigurationException {
+     List values = new LinkedList();
+     values.add( this.getAttribute(name, modeConf, objectModel) );
+     return values.toArray();
+   }
+ 
+ }
+ }}}
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=People , version: 298 on Mon Apr 27 15:17:30 2004 by GlauberRibeiro

+ * [Glauber Ribeiro|GlauberRibeiro] -- perl/java/rubi/tcl developer, novice Cocoon user.


Page: http://wiki.cocoondev.org/Wiki.jsp?page=AkKu , version: 10 on Mon Apr 27 15:22:39 2004 by AkKu

- Some projects I have to adopt still using this architecture and using a jsp framework (I think it is cocoon). \\
?                                                                      ------            ^     --- ^^^

+ Some projects I have to adopt still using this architecture and also using frameworks. (this is the time  where I contact cocoon). \\
?                                                                 +++++               ++  ^^^^^^^   +++ ++++++++++++++  ^^^



Page: http://wiki.cocoondev.org/Wiki.jsp?page=WidgetStates , version: 1 on Mon Apr 27 15:27:06 2004 by TimLarson

New page created:
+ Here is an attempt to list the possibly desired widget states.
+ Please help with refining the list, selecting which states we
+ should support in Cocoon Forms, and deciding how to mark these
+ selected state.
+ 
+ Please also consider how should we handle displaying the same
+ data in different states in two or more places on the form, such
+ as simultaneously in an editable input box and as inline output?
+ Some options:
+ * Keep the "output" styling
+ * Make for form designer use ValueChangedEvent's to mirror the value to multiple widgets
+ * Others?
+ 
+ Key to tables below:
+ ||Column||Values||...||
+ |Output to client|O=Output|_=Do not output|
+ |Read from request|R=Read|_=Do not read|
+ |Show to user|S=Show|H=Hide|
+ |Field or inline data|F=Field|I=Inline|
+ |Enable user input|E=Enable|D=Disable|
+ 
+ Displayed data:
+ ||Output||Read||Show||Field||Enable||Example usecase||
+ |O|_|S|I|N/A|Read-only inline data, like "output" widget|
+ |O|R|S|F|E  |Normal "enabled" field|
+ |O|_|S|F|D  |Securely "disabled" field|
+ |_|R|S|F|E  |Password without echo from server|
+ |_|R|S|F|D  |"Disabled" field set by client-side js|
+ 
+ Hidden data:
+ ||Output||Read||Show||Field||Enable||Example usecase||
+ |O|R|H|F|N/A|Data to communicate with client-side js|
+ |O|_|H|F|N/A|Data to drive client-side js|
+ |_|R|H|F|N/A|Data generated by client-side js|
+ 
+ Weak options: (might be useful, but harder to justify if they require extra coding)
+ ||Output||Read||Show||Field||Enable||Example usecase||
+ |O|_|S|F|E  |Ignored "enabled" field for demo/preview|
+ |_|_|S|F|E  |Blank "enabled" field for demo/preview|
+ |_|_|H|F|N/A|Stub for use only by client-side js?|
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=Andreshurtado , version: 17 on Mon Apr 27 15:39:58 2004 by Andreshurtado

- [comments?|mailto:wahurtadoh@unal.edu.co]
?                   ^ ^^^^^^ ^

+ [comments?|mailto:proinde_fabog@unal.edu.co]
?                   ^^^^^^^^^ ^ ^



Page: http://wiki.cocoondev.org/Wiki.jsp?page=NicoVerwer , version: 2 on Mon Apr 27 15:27:05 2004 by NicoVerwer

+ See also:
+ * [SitemapPathModule]
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=GlauberRibeiro , version: 5 on Mon Apr 27 15:28:30 2004 by GlauberRibeiro

- Here's  a picture of my daughter Laura and me:
+ Here's  [a picture of my daughter Laura and me|http://images.snapfish.com/33%3A62%3A%3A323232fp47%3Dot%3E232%3A%3D765%3D95%3C%3DXROQDF%3E2323455756987ot1lsi].
- [http://images.snapfish.com/33%3A62%3A%3A323232fp47%3Dot%3E232%3A%3D765%3D95%3C%3DXROQDF%3E2323455756987ot1lsi]
- 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=InputModules , version: 46 on Mon Apr 27 15:12:45 2004 by NicoVerwer

+ The real path is relative to the webapp-context, not to the sitemap.
+ Sometimes, you would rather have a path relative to the sitemap.
+ This is taken care of in the non-standard [SitemapPathModule].