[Design of JBoss jBPM] - Changes and new tags for the task forms designer
by david.lloyd@jboss.com
EL variables
Task forms should use the following EL variables to access form data:
#{comment}
This variable will be checked for a new comment to add to a task instance when a transition or save action is taken.
#{var['name']}
This is where all the process variables will be kept.
#{taskName}
Read-only variable; name of the current task.
Layout changes
Currently the task forms are formatted something like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| ...>
| <head>
| <title>userForm</title>
| <link rel="stylesheet" type="text/css" href="../css/jbpm.css" />
| </head>
| <body>
| <ui:composition>
| <h:form id="taskform">
| <h:inputHidden id="taskInstanceId" value="#{taskInstanceBean.id}" />
| ...content here...
| </h:form>
| </ui:composition>
|
| </body>
| </html>
|
This should be simplified to exclude the head, body, ui:composition, h:form, and h:inputHidden tags, to look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| ...
| xmlns:tf="http://jbpm.org/jsf/tf"
| xmlns:jbpm="http://jbpm.org/jsf">
|
| ...content here...
|
| </html>
|
The "nuts and bolts" tags will be generated by the task form renderer.
New tags
I'm specifying a prefix of "tf" for tags that are specific to task forms, assuming you will have the following attribute in your html element:
xmlns:tf="http://jbpm.org/jsf/tf"
Here's the tf tags:
<tf:transitionButton>
Save the task form and take a transition. Accepts all attributes that "h:commandButton" does, with the exception of the "action" attribute. Also, there is a new optional attribute called "to", whose value is the name of the transition to take. If no value is given, take the only transition available.
<tf:saveButton>
Save the task form, but do not take a transition. Accepts all attributes that "h:commandButton" does, with the exception of the "action" attribute.
<tf:cancelButton>
Cancel the task form without saving anything. The user doesn't really have to click on this button to cancel though; (s)he can just choose a different menu item. Accepts all attributes that "h:commandButton" does, with the exception of the "action" attribute.
This tag is not really a tf tag but it's one that you can use nonetheless:
<jbpm:dataform> / <jbpm:datacell>
This tag allows a nice way to lay out form data. Definitely not required to use it, especially if the form is used outside of the console. Here's an example of a task form that might use these tags:
<jbpm:dataform>
| <f:facet name="header">
| <h:outputText value="#{taskName}"/>
| </f:facet>
| <jbpm:datacell>
| <f:facet name="header">
| <h:outputText value="Item"/>
| </f:facet>
| <h:inputText value="#{var['item']}"/>
| </jbpm:datacell>
| <jbpm:datacell>
| <f:facet name="header">
| <h:outputText value="Quantity"/>
| </f:facet>
| <h:inputText value="#{var['quantity']}"/>
| </jbpm:datacell>
| <jbpm:datacell>
| <f:facet name="header">
| <h:outputText value="Address"/>
| </f:facet>
| <h:inputText value="#{var['address']}"/>
| </jbpm:datacell>
| <jbpm:datacell>
| <f:facet name="header">
| <h:outputText value="Actions"/>
| </f:facet>
| <tf:transitionButton value="Save and Close"/>
| <tf:saveButton value="Save"/>
| <tf:cancelButton value="Cancel"/>
| </jbpm:datacell>
| </jbpm:dataform>
Let me know if something doesn't make sense, or if you have more ideas to simplify task forms.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985485#3985485
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985485
19 years, 5 months
[Design of JBoss jBPM] - Re: improving the build
by david.lloyd@jboss.com
"tom.baeyens(a)jboss.com" wrote :
| 1) add build profiles
| I'm going to factor out all the library version properties to a separate properties file. Many of these files can go into the profile directory. E.g. for each version of jboss, we can create a set of properties that match these of jboss. Also jbpm internal dependencies will be included in the profile property files.
|
Maybe it would be a good idea to have a "common" file, and then a specific file for each version that overrides anything that's different, to avoid lots of duplication?
anonymous wrote :
| 2) improve versioned dependencies
| For each top level subproject, you'll be able to specify wether the sources are used (using version 'snapshot'). Or wether a specific version from the repository is being used.
|
Just an FYI, I'd like to not be using any snapshot versions by the time we do a final release. Apart from that, everything sounds good.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985456#3985456
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985456
19 years, 5 months