atom feed43 messages in org.apache.incubator.adffaces-issues[jira] Updated: (ADFFACES-15) Added X...
FromSent OnAttachments
Gary Kind (JIRA)May 25, 2006 4:42 pm 
Gary Kind (JIRA)May 25, 2006 4:44 pm 
Gary Kind (JIRA)May 25, 2006 4:44 pm 
Gary Kind (JIRA)May 25, 2006 4:46 pm 
Gary Kind (JIRA)May 25, 2006 5:45 pm 
Gary Kind (JIRA)May 25, 2006 5:50 pm 
Gary Kind (JIRA)May 25, 2006 5:50 pm 
Adam Winer (JIRA)May 31, 2006 11:12 pm 
Adam Winer (JIRA)May 31, 2006 11:12 pm 
Gary Kind (JIRA)Jun 13, 2006 2:13 pm 
Gary Kind (JIRA)Jun 13, 2006 2:13 pm 
Gary Kind (JIRA)Jun 13, 2006 2:16 pm 
Gary Kind (JIRA)Jun 14, 2006 4:41 pm 
Gary Kind (JIRA)Jun 14, 2006 4:47 pm 
Gary Kind (JIRA)Jun 14, 2006 4:47 pm 
Gary Kind (JIRA)Jun 15, 2006 11:32 am 
Gary Kind (JIRA)Jun 15, 2006 11:32 am 
Adam WinerJun 15, 2006 2:46 pm 
Gary Kind (JIRA)Jun 16, 2006 9:55 am 
Gary Kind (JIRA)Jun 16, 2006 2:47 pm 
Gary Kind (JIRA)Jun 16, 2006 2:47 pm 
Gary Kind (JIRA)Jun 23, 2006 5:22 pm 
Gary Kind (JIRA)Jun 23, 2006 5:24 pm 
Adam Winer (JIRA)Jun 24, 2006 8:45 am 
Gary KindJun 29, 2006 5:52 pm 
Adam WinerJun 30, 2006 11:19 am 
Gary Kind (JIRA)Jul 6, 2006 5:30 pm 
Gary Kind (JIRA)Jul 6, 2006 5:30 pm 
Gary Kind (JIRA)Jul 11, 2006 2:08 pm 
Gary Kind (JIRA)Jul 11, 2006 2:08 pm 
Gary Kind (JIRA)Jul 18, 2006 5:01 pm 
Gary Kind (JIRA)Jul 18, 2006 5:03 pm 
Simon Lessard (JIRA)Jul 25, 2006 1:42 pm 
Simon Lessard (JIRA)Jul 26, 2006 6:18 am 
Simon Lessard (JIRA)Jul 27, 2006 8:59 am 
Adam Winer (JIRA)Aug 1, 2006 2:03 pm 
Adam Winer (JIRA)Aug 1, 2006 2:04 pm 
Gary Kind (JIRA)Aug 14, 2006 1:22 pm 
Gary Kind (JIRA)Aug 14, 2006 1:22 pm 
Gary Kind (JIRA)Aug 14, 2006 1:24 pm 
Gary Kind (JIRA)Aug 14, 2006 2:22 pm 
Adam Winer (JIRA)Dec 4, 2006 5:20 pm 
Matthias Weßendorf (JIRA)Mar 16, 2007 1:36 am 
Subject:[jira] Updated: (ADFFACES-15) Added XMLMenuModel
From:Simon Lessard (JIRA) (adff@incubator.apache.org)
Date:Jul 25, 2006 1:42:53 pm
List:org.apache.incubator.adffaces-issues

[ http://issues.apache.org/jira/browse/ADFFACES-15?page=all ]

Simon Lessard updated ADFFACES-15: ----------------------------------

Attachment: menu-process.zip menu-process-demo.zip

I added one model of my own. It was used mainly for demo and some part of it was
used in a true project.

I could not create a .patch because the source files are in a new folder and SVN
would not let me create a patch under those conditions. I did not grant Apache
license for now since I would like to know if you're interested in it first. For
the same reason, I didn't put English comments in yet.

The library provides models for both mnus and processes

The semantic is:

<menuNode> ::= <menu> | <menuItem> <menu> ::= <menuNode>* <menuItem> ::= viewId+ (more or less)

<processNode> ::= <process> | <processStep> <process> ::= <processNode>* <processStep> ::= viewId+ (more or less)

A menu can be defined as a managed bean with managed properties, for example:

<managed-bean> <managed-bean-name>menuRoot</managed-bean-name>
<managed-bean-class>org.apache.myfaces.adf.model.impl.menu.Menu</managed-bean-class> <managed-bean-scope>application</managed-bean-scope> <managed-property> <property-name>items</property-name> <property-class>java.util.List</property-class> <list-entries> <value-class>org.apache.myfaces.adf.model.impl.menu.MenuNode</value-class> <value>#{menuItem1}</value> <value>#{menuItem2}</value> </list-entries> </managed-property> </managed-bean>

<managed-bean> <managed-bean-name>menuItem1</managed-bean-name>
<managed-bean-class>org.apache.myfaces.adf.model.impl.menu.MenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <property-class>java.lang.String</property-class> <value>Item 1</value> </managed-property> <managed-property> <property-name>viewId</property-name> <property-class>java.lang.String</property-class> <value>/pages/menus/menuItem1.jspx</value> </managed-property> </managed-bean>

Inside an <af:page> one only have to use:

<af:page value="#{menuRoot.model}" var="item"> <f:facet name="nodeStamp"> <af:commandNavigationItem text="#{item.label}" action="#{item.execute}" actionListener="#{item.processAction}" disabled="#{item.disabled}" icon="#{item.icon}" immediate="#{item.immediate}" rendered="#{item.rendered}"/> </f:facet> </af:page>

#{item.execute} will, in order: 1) Check if there was an outcome specified, if so return it 2) Check if there was a method binding specified, if so call it and returns its
return value 3) Check if a viewId was specified, if so navigate to it 4) Return null.

Also, menu nodes allow most properties, except JavaScript for now, in 3
different modes: 1) static value, for example: <managed-property> <property-name>label</property-name> <property-class>java.lang.String</property-class> <value>Item 1</value> </managed-property>

2) dynamic value evaluated once at bean creation, for example: <managed-property> <property-name>label</property-name> <property-class>java.lang.String</property-class> <value>#{bundle['item.1.label']}</value> </managed-property>

3) dynamic value evaluated everytime the property is read, more than often
during render response phase, for example: <managed-property> <property-name>labelExpression</property-name> <property-class>java.lang.String</property-class> <value>bundle['item.1.label']</value> </managed-property>

3rd mode require a modified property name with the "Expression" suffix. Also,
the expression is not an EL one, it does not have the #{} delimiter. Another
reason why I did not put the comments in yet is also this point. I was wondering
if it would not be better to make the 3rd mode use the same property name as the
other two, but with a different EL synthax, like %{} for example, to bypass JSF
automatic EL evaluation.

Processes work pretty much the same way, but they also have some additional
flags, among them are: - activeDisabled: if true, the current step will be disabled, preventing the
user to launch validations that way for example. High end users requested that
in a past project.

- visitedImmediate: if true, the already visited steps will be marked immediate
and thus won't launch valid nor save the data already filled.

- mode: supports 8 modes defined by an Enum: BACKTRACK : Allows the user to navigate backward only using the train BACKTRACK_PLUS_NEXT : Allows the user to navigate backward as well as toward the
next step using the train MAX_VISITED : Allows the user to navigate to any step he already visited using
the train MAX_VISITED_PLUS_NEXT : Allows the user to navigate to any step he already
visited using the train as well as the next step NEXT_ONLY : Allows the user to navigate to the next step only using the train NO_NAVIGATION : Prevent the user from navigating by using the train (train
become only a graphical display of advancement) PREVIOUS : Allows the user to navigate to the previous step only using the train PREVIOUS_PLUS_NEXT : Allows the user to navigate to the previous step and next
step using the train

Any comments/ideas?

Regards

Added XMLMenuModel ------------------

Key: ADFFACES-15 URL: http://issues.apache.org/jira/browse/ADFFACES-15 Project: MyFaces ADF-Faces Issue Type: New Feature Environment: software platform Reporter: Gary Kind Attachments: menu-process-demo.zip, menu-process.zip, trunk.patch

Additions to MyFaces ADF-Faces to allow easy creation of menus (navigation and
tabbed navigation) for .jspx pages using ADF-Faces UI components. Menus are
specified in XML Metadata files. In the .jspx page menu items are
af:commandNavigationItems nodestamped inside of location-specific facets that
are children of af:panelPage. The Menu Model managed bean that processes the
metadata files, along with the navigation-rules/cases are specified in the
faces-config.xml file.