[
https://issues.apache.org/jira/browse/TRINIDAD-1564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12750825#action_12750825
]
Vijay Ramalingam commented on TRINIDAD-1564:
--------------------------------------------
Hi Andrew,
This might not be a bug.
But I have set the pageFlowScope value in the constructor, because this xhtml
URL(http://<domain>/mytestpageFS/xhtml/testPageFlowScope.xhtml) will be
accessed from an legacy system(a struts application). say like there will a
hyperlink in the legacy system, the user will click the link and the link will
point to above URL. ( hence no action method )
I have a series of xhtml pages from there, hence i tried to set the
pageFlowScope value in the constructor. My testPageFlowScope.xhtml is
referencing pageFlowScope. it doesn't work.
I shall try the other alternative suggested by you.
Thanks
-vijay
> pageFlowScope values set in the constructor of a managedbean is not getting
> retained
> ------------------------------------------------------------------------------------
>
> Key: TRINIDAD-1564
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1564
> Project: MyFaces Trinidad
> Issue Type: Bug
> Environment: windows xp
> Reporter: Vijay Ramalingam
>
> Hi
> I have a xhtml as below. In the constructor of the managedbean, i set a value
> in the pageFlowScope. But after the form is submiited, i do not find the
> value in the pageFlowScope. Please help or advise.
> My XHTML
> --------------------------------------------------------------------------------
> <f:view>
> <h:form id="testPageFlowScope">
> <br></br>
> <h:inputText id="selectState" value="#{pageFlowScope.state}" required="true"
> requiredMessage="State is mandatory" >
> </h:inputText>
> <br></br>
> <h:commandButton id="testPageFlowScope" value="Test PFS"
> action="#{amaConfig.testPageFlowScope}">
> </h:commandButton>
> <h:outputText value="#{testPFS.country}"/>
> </h:form>
> </f:view>
> My managed-bean declaration in faces-config
> --------------------------------------------------------------------------------
> <managed-bean>
> <managed-bean-name>testPFS</managed-bean-name>
> <managed-bean-class>xyz.TestPageFlowScope</managed-bean-class>
> <managed-bean-scope>request</managed-bean-scope>
> </managed-bean>
> My Bean
> --------------------------------------------------------------------------------
> public class TestPageFlowScope extends ManagedBase {
> public TestPageFlowScope() {
> super();
> RequestContext requestContext = RequestContext.getCurrentInstance();
> Map pageFlowScope = requestContext.getPageFlowScope();
> pageFlowScope.put("state", "India");
> }
> public String getCountry(){
> return "India";
> }
> }
> Once i submit the form, i check the pageFlowScope map....but it doesn't have
> any values. Please help
> PageFlowScope : pageflowscope...@6298797[_map={}, _token=null,_children=null]
> Thanks
> -vijay
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.