myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Songlin Wei" <Songlin....@taihootech.com>
Subject a4j:commandButton break orchetra conversation?
Date Thu, 04 Sep 2008 04:22:13 GMT
Hi:

I use richfaces 3.1.4, myfaces orchestra 1.2,myfaces 1.1.5,

To mask sure a a4j request will break orchestra conversation, I build a
demo project, here are the code segment.

Firstly, I create a conversation access scope bean:

       <bean

             name="helloWorldBacking"

             class="org.apache.myfaces.blank.HelloWorldBacking"

             scope="conversation.access"></bean>

Secondly, let's check the ui jsp code:

Page 1:the first page for input a name property of helloWorldBacking.

<h:inputText id="input1" value="#{helloWorldBacking.name}"
required="true"/>

              <h:commandButton id="button1" value="next"
action="#{helloWorldBacking.submitName}"/>

    Click "next" buton go to second page

Page 2:seconde page for input a age property of helloWorldBacking.

 <h:inputText id="input2" value="#{helloWorldBacking.age}"
required="true"/>

<a4j:commandButton value="set test string"
actionListener="#{helloWorldBacking.setTestStr}" reRender="test"/>

<!- click this button to set any string value to test property, then
show this value on this page-->

<h:outputText id="test" value="#{helloWorldBacking.test}"/>

<a4j:commandButton id="button2" value="next"
action="#{helloWorldBacking.submitAge}"/>

              Then click "next" button to go to a third page which
display name and age input before.

Page 3:third page for display name and age property.

<h:outputText value="Name: #{helloWorldBacking.name}. "/>

<h:outputText value="Age: #{helloWorldBacking.age}. "/>

Ok, all codes are shown as above.

 

The problem is:

       If I clicked "set test string" button at the second page, then I
will lost name value at page3, that means the name was output as an
empty string.

       If I did not click "set test string" button at the second page,
the "name" property was output properly at page3.

 

Any help is appreciated!

 

Regards

Solin


Mime
View raw message