When trying to change the jsf-sellitem example to fit my needs, so it will show other JSF components, like myfaces tree, I encounterd two major problems:
The first one is when I put the Tree component inside the form of the WebFlow:
(This is only a fragment of the real jsp code)
<f:view>
<h:form id="priceAndItemCountForm">
<h:inputText id="price" value="#{ flowScope.sale.price}"
required="true">
<f:validateDoubleRange minimum="0.01"/>
</h:inputText>
<h:message for="" style="color: red"/>
<h:inputText id="itemCount" value="#{flowScope.sale.itemCount}"
required="true">
<f:validateLongRange minimum="1"/>
</h:inputText>
<h:message for="" style="color: red"/>
<input type="hidden" name="_flowExecutionId" value="${flowExecutionId}"/>
<h:commandButton type="submit" value="Next" action="" immediate="false" /></td>
<t:tree id="tree" value="#{treeModel2}"
styleClass="tree" nodeClass="treenode"
selectedNodeClass="treenodeSelected" expandRoot="true">
</t:tree>
</h:form>
</f:view>
When trying to expand or collapse, I get the following exception:
java.lang.IllegalArgumentException: The event id is required: please set this event's id to a non-blank string identifier
org.springframework.util.Assert.hasText(Assert.java:168)
org.springframework.webflow.Event.setRequiredId(Event.java:101)
org.springframework.webflow.Event.<init>(Event.java:69)
org.springframework.webflow.execution.impl.FlowExecutionImpl.signalEvent (FlowExecutionImpl.java:240)
org.springframework.webflow.executor.jsf.FlowNavigationHandler.handleNavigation(FlowNavigationHandler.java:163)
org.springframework.webflow.executor.jsf.DecoratingNavigationHandler.handleNavigation (DecoratingNavigationHandler.java:67)
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:84)
javax.faces.component.UICommand.broadcast(UICommand.java:106)
javax.faces.component.UIViewRoot._broadcastForPhase (UIViewRoot.java:95)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:169)
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:335)
org.apache.myfaces.lifecycle.LifecycleImpl.execute (LifecycleImpl.java:86)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:108)
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:129)
The second problem happens when I try to use the Tree component in other form, like:
(This is only a fragment of the real jsp code)
<f:view>
<h:form id="priceAndItemCountForm">
<h:inputText id="price" value="#{flowScope.sale.price }"
required="true">
<f:validateDoubleRange minimum="0.01"/>
</h:inputText>
<h:message for="" style="color: red"/>
<h:inputText id="itemCount" value="#{flowScope.sale.itemCount}"
required="true">
<f:validateLongRange minimum="1"/>
</h:inputText>
<h:message for="" style="color: red"/>
<input type="hidden" name="_flowExecutionId" value="${flowExecutionId}"/>
<h:commandButton type="submit" value="Next" action="" immediate="false" />
</h:form>
<h:form>
<t:tree id="tree" value="#{treeModel2}"
styleClass="tree" nodeClass="treenode"
selectedNodeClass="treenodeSelected" expandRoot="true">
</t:tree>
</h:form>
</f:view>
Then, I get the following exception:
javax.faces.FacesException: Cannot get value for _expression_ '#{flowScope.sale.price }'
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:422)
org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java :233)
org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:219)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:372)
javax.faces.webapp.FacesServlet.service (FacesServlet.java:109)
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:129)
Am I doing something wrong?
Did you use Shale's Dialog Manager only or SWF as well?
Thanks,
Ronen.
On 2/21/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
you may take a look at Shale's Dialog Manager.
Works fine for me!
On 2/21/06, Ronen Naor <[EMAIL PROTECTED]> wrote:
> Has anybody tried to use SWF together with myfaces? I've tried it with some
> problems so if anyone has any experience with it, it would be nice to hear
> about it.
> Thanks.
>
>
--
Matthias Wessendorf
Zülpicher Wall 12, 239
50674 Köln
http://www.wessendorf.net
mwessendorf-at-gmail-dot-com

