[JBoss Seam] - Re: Seam jBPM: use annotation or pages.xml to get next task?
by petemuir
oic, sorry, I misread what you are doing.
You should be able to wrap all this up on a page action - something like
TaskFinder
public String autoStart() {
| TaskInstance taskInstance = getSingleTaskInstance();
| if (taskInstance != null) {
| // Associate the task and process
| BusinessProcess.instance().resumeTask(taskInstance.getId());
| // As long as you have an Actor set up, call this to actually mark the task started
| BusinessProcess.instance().startTask();
| return taskInstance.getName();
| }
| return null;
| }
Then wire it up
<page view-id="/assignTask.xhtml" action="#{taskFinder.autoStart()}">
| <navigation>
| ...
| </navigation>
| </page>
And then in assignTask.xhtml you would have a manual task selector which would be reached if the autoStart returned null; if it didn't you would start the task and get redirected. Make the @CreateProcess method navigate you to assignTask.xhtml
In fact, can you create a JIRA issue for both a task selector and a way of auto-starting tasks - we can probably wrap it up in @CreateProcess / create-process in pages.xml
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030577#4030577
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030577
19Â years, 1Â month
[JBoss Seam] - s:selectItems noSelectionLabel issue w/JSF 1.2
by stu2
Just upgraded to JSF 1.2, and am running latest-from-cvs Seam with Facelets.
I have a simple selectOneMenu populated by a s:selectItems:
| <h:selectOneMenu value="#{criteria.operation}">
| <s:selectItems value="#{itemSearch.operations}" var="operation"
| label="#{operation.description}"
| noSelectionLabel="Select operation..."
| hideNoSelectionLabel="false" />
| <s:convertEnum />
| </h:selectOneMenu>
|
This worked fine before I upgraded to JSF 1.2 (tonight) - though I also upgraded to the latest Seam at the same time.
The problem is that the noSelectionLabel is being interpreted as a legitimate selection, rather than being, well, an indicator nothing was selected. And so here's what I see:
| Caused by: java.lang.IllegalArgumentException: No enum const class com.fb.core.model.cdm.CdmField.Select search field...
| at java.lang.Enum.valueOf(Enum.java:192)
| at org.jboss.seam.ui.EnumConverter.getAsObject(EnumConverter.java:16)
| at org.jboss.seam.ui.PrioritizableConverter.getAsObject(PrioritizableConverter.java:61)
| at org.jboss.seam.ui.ConverterChain.getAsObject(ConverterChain.java:103)
| at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:152)
| at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectOneValue(MenuRenderer.java:197)
| at com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:359)
| at javax.faces.component.UIInput.getConvertedValue(UIInput.java:934)
|
The converter is being asked to convert the noSelection value back into an enum.
Is this a bug or am I missing something? I'll file a bug report but wanted to get feedback first.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030564#4030564
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030564
19Â years, 1Â month