[Design of JBoss jBPM] - Re: JSF setting default values
by woo37830
I've gotten the go to next screen working when the user can service the next task by creating my own version of <j4j:completeTask and adding an optional parameter nextId. It does some figuring out and sets the nextId to '0' if the user cannot service the next task, and to the id of the next task if servicable. If that variable is nid, then
In the <n:nav outcome="transition" url="task.jsf?id=${nid}" />
moves completely nicely to the next task!
However, if the nid from above is '0', then I get an exception that the task 0 can't be instantiated. In that case I'd like to redirect to "home.jsf"d which is where I have the task list.
Is there a way I can do that? I can't find a generic forward, redirect, or exception inside the console itself to have a default error page. In my case I'd make it "home.jsf" and not show the messages and be happy.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186107#4186107
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4186107
16 years, 1 month
[Design of JBoss jBPM] - Re: JSF setting default values
by woo37830
Written actionhandler but can't set value
I have code that writes out the following when used as a tag
<sj4j:updateVariable name="destination" trueValue="home.jsf" falseValue="task.jsf?id='#{nid}'" condition="#{nid == '0'}" />
nameValue = destination ( String.class )
trueValue = home.jsf (String.class)
falseValue = task.jsf?id='580' (..)
conditionValue = false (...)
NOW, I then do a
if( conditionValue.toString().equals("true") )
this.nameExpression.setValue(context, trueValue.toString() );
else
this.nameExpression.setValue(context, falseValue.toString() );
in my tag action listener.
I get the following error when the tag is executed.
Error updating variable: An exception of type "javax.el.PropertyNotWriteableException" was thrown ...name="destination: Illegal Syntax for Set Operation.
Question is how to set the variable destination in the action listener?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186080#4186080
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4186080
16 years, 1 month