hi ludovic,

the add-on is for: codi 1.0.5 -> deltaspike 0.5 (that's the reason for:
1.0.5_0.5_01)
please don't use it with 0.6 (currently only @ViewAccessScoped is missing
in ds)

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2014-02-12 14:38 GMT+01:00 l.pe...@senat.fr <l.pe...@senat.fr>:

> On 12/02/2014 10:37, l.pe...@senat.fr wrote:
>
>> On 12/02/2014 10:22, Gerhard Petracek wrote:
>>
>>> hi ludovic,
>>>
>>> @ProjectStageActivated is called @Exclude in deltaspike and you can just
>>> drop @Advanced.
>>>
>>
>> ok, thank you.
>>
>> I still had the same situation with deltaspike (0.5 + your
>> os890-cdi-ext-jsf2-module-api and os890-cdi-ext-jsf2-module-impl or
>> 0.6-SNAPSHOT).
>>
>> So, I digged the clientwindow topic... I read in
>> https://weblogs.java.net/blog/edburns/archive/2013/10/07/
>> jsf-22-clientwindow-links-and-open-new-tab
>>
>> that
>>
>>     « Because the Faces Flows feature entirely depends on|ClientWindow|,
>> the usage of Faces Flows will automatically enable|ClientWindow|if it is
>> not enabled already»
>>
>> However, it is not in my case.
>>
>> So I explicitly enabled this with adding
>>
>>   <context-param>
>> <param-name>javax.faces.CLIENT_WINDOW_MODE</param-name>
>>    <param-value>url</param-value>
>>  </context-param>
>>
>> in web.xml.
>>
>>
>> It there some other required config that I should check ?
>>
> ok, so with:
> * deltaspike 0.6-SNAPSHOT
> * org.os890.cdi.ext.scope.modules:os890-cdi-ext-jsf2-module-{api,impl}
> :1.0.5_0.5_01}
> * javax.faces.CLIENT_WINDOW_MODE = url
>
> ... it is starting to work.
>
> In fact, I could trigger flow transitions only using a h:link for now.
>
> So neither
> * <p:menuitem value="Let's test" outcome="flow1" />  in a PF p:menubar
> * <p:commandButton value="Let's test 2" action="flow1" />
> * <h:commandButton value="Let's test 3" action="flow1" />
> * <h:commandButton value="Let's test 4" action="/flow1" />
> * <h:commandButton value="Let's test 5" action="/flow1/flow1" />
> * a direct transition to /flow1/flow1.xhtml (by typing the URL in the
> brower url bar)
>
> work.
>
> But
> * <h:link outcome="flow1">Test 6</h:link>
> * <h:link outcome="/flow1/flow1.xhtml">Test 7</h:link>
>
> do "work".
>
> By  working, I mean that the FlowHandler.FLOW_ID_REQUEST_PARAM_NAME
> (jffi) is defined, a transition is detected and FlowHandlerImpl processes
> it.
>
> I found only one place defining it in myfaces 2.2 impl source,
> myfaces-impl-2.2.0/org/apache/myfaces/shared/renderkit/html/
> util/OutcomeTargetUtils.java:145 , in
> OutcomeTargetUtils.getOutcomeTargetHref .
>
>
> Either I missed something big, either it does not fit my requirements.
>
> When I read «Java EE 7 tutorial - 16.3 Using Faces Flows»
> http://docs.oracle.com/javaee/7/tutorial/doc/jsf-configure003.htm
>
> syntaxes such as
>
> <h:commandButton value="Exit Flow" action="returnFromCheckoutFlow"/>
>
> seemed supported.
>
> Moreover, I state that it "works" because I see a flow transition taking
> place. But I could not figure how to make it finally work (without "").
>
> When I try to use an empty flow1-flow.xml, or to use a flow1-flow.xml such
> as
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <faces-config
>     xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
>     xmlns='http://xmlns.jcp.org/xml/ns/javaee'
>     xsi:schemaLocation='http://xmlns.jcp.org/xml/ns/javaee
> http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd'
>     version='2.2' >
>     <flow-definition id="flow1">
>         <display-name>Test display name</display-name>
>         <description>Test description</description>
>         <flow-return id="success">
>             <from-outcome>/accueil.xhtml</from-outcome>
>         </flow-return>
>         <flow-return id="error">
>             <from-outcome>/versions.xhtml</from-outcome>
>         </flow-return>
>     </flow-definition>
> </faces-config>
>
> (dummy test returns...)
>
> there is a problem at the outcome computation step.
>
> When I use a configuration class such as
>
> public class Flow1 implements Serializable {
>
>     @Produces
>     @FlowDefinition
>     public Flow defineFlow(@FlowBuilderParameter FlowBuilder flowBuilder)
> {
>             String flowId = "flow1";
>         flowBuilder.id("", flowId);
>         flowBuilder.viewNode(flowId,
>                 "/" + flowId + "/" + flowId + ".xhtml").
>                 markAsStartNode();
>         return flowBuilder.getFlow();
>     }
> }
>
> there is a first transition from <no flow> (being on /accueil.xhtml) to
> "flow1" (going to /flow1/flow1.xhtml). flow1 is correctly stacked at this
> step.
>
> But then, another transition from /flow1/flow1.xhtml to /flow1/flow1.xhtml
> is immediatly triggered by an automatically generated (I think) navigation
> case.  During this transition, flow1 is popped from stack and a null
> pointer exception occurs.
>
> Any help welcomed... I would be glad to have a look at simple test cases
> using MyFaces 2.2.
>
> But I might switch back to good old @ViewAccessScoped for the time being -
> spent some days on this Faces Flows stuff already.
>
> Thanks for the help and work anyway. It is quite normal to me to have this
> kind of troubleshooting on new stuff...
>
> Best regards,
>
>
> Ludovic
>
> |
> | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
> |
>

Reply via email to