Hi,

Can anyone confirm if this is a problem with the myfaces implementation?

Regards,

Mark.


-----Original Message-----
From: Mark [mailto:m...@piggybankrupt.co.uk] 
Sent: 19 May 2014 22:22
To: users@myfaces.apache.org
Subject: Declaring a node that is not type 'view' as the start node.

Declaring a node that is not type 'view' as the start node.

 

Upon using flows within myfaces I can successfully enter and move within the
flow provided the start node is a 'view' type. 

However, upon using a 'method-call' type or a 'switch' type I receive the
errors below. My intention is to use a method-type node as a start-node to

determine the first page in the flow, which is returned as an outcome. I
found https://java.net/jira/browse/JAVASERVERFACES-3110, which  presents the
same problem in jsf.

 

 

##using method-call##

java.lang.NullPointerException

 

viewId=/index.xhtml

location=C:\Users\Mark\Documents\Dev\login\ui\target\login-1.0-SNAPSHOT\inde
x.xhtml

phaseId=INVOKE_APPLICATION(5)

 

Caused by:

java.lang.NullPointerException

at
javax.faces.application.NavigationCaseWrapper.isRedirect(NavigationCaseWrapp
er.java:111)

<HtmlCommandButton action="registration" actionExpression="registration"
class="class javax.faces.component.html.HtmlCommandButton"
clientId="j_id_f:j_id_n" disabled="false" id="j_id_n" immediate="false"
inView="true" readonly="false" rendered="true" transient="false"
type="submit" value="submit" location="/index.xhtml at line 26 and column
71"/> - State size:0 bytes

 

##using switch##

WebBeans context with scope type annotation @FlowScoped does not exist
within current thread

 

viewId=/index.xhtml

location=C:\Users\Mark\Documents\Dev\login\ui\target\login-1.0-SNAPSHOT\inde
x.xhtml

phaseId=INVOKE_APPLICATION(5)

 

Caused by:

javax.enterprise.context.ContextNotActiveException - WebBeans context with
scope type annotation @FlowScoped does not exist within current thread

at
org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.jav
a:299)<HtmlCommandButton action="registration"
actionExpression="registration" class="class
javax.faces.component.html.HtmlCommandButton" clientId="j_id_f:j_id_n"
disabled="false" id="j_id_n" immediate="false" inView="true"
readonly="false" rendered="true" transient="false" type="submit"
value="submit" location="/index.xhtml at line 26 and column 71"/> - State
size:0 bytes

 

##setup -flow.xml##

<faces-config version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee";

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

              xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd";>

 

    <flow-definition id="registration">

 

        <start-node>startIt</start-node>

            <!--<switch id="startIt">

                <case>

                    <if>#{register.startPage()=="register"}</if>

                    <from-outcome>register</from-outcome>

                </case>

                <case></case>

                <default-outcome>welcomePage</default-outcome>

            </switch>-->

 

        <method-call>

            <method id="startIt">#{register.startPage()}</method>

           <default-outcome>register</default-outcome>

        </method-call>

 

 

        <view id="register">

            <vdl-document>/registration/welcome.xhtml</vdl-document>

        </view>

 

        <view id="welcomePage">

            <vdl-document>/registration/registration1.xhtml</vdl-document>

        </view>

 

        <flow-return id="return-index">

            <from-outcome>/index.xhtml</from-outcome>

        </flow-return>

    </flow-definition>

</faces-config>

 

##environment##

Tommee+ 1.6

myfaces-api-2.2.2 & myfaces-impl-2.2.2 replacing the tomee shipped 2.1.3

 

Any ideas?

 

Regards,

 

 

Mark Davis

 

This email and any associated file contains confidential information and is
intended solely for the person(s) named. If you are not the intended
recipient, please do not read, print, store, disclose, re-distribute or act
upon any information contained. Instead, please return to the sender and
delete the message and / or files from your PC.

 



Reply via email to