How to SET the value for a parameter in PageFlow scope and how to READ the same value in the PageFlow scope.

To set the parameter value (USER_NAME) in the PageFlow scope we need use the setPropertyListener component as shown below –

<amx:commandLink text=”#{bindings.submittedBy.inputValue}” id=”cl1″

inlineStyle=”text-align:justify; width:95%; color:Fuchsia;”>

<amx:setPropertyListener id=”spl1″ from=”#{bindings.userName.inputValue}” type=”action”  to=”#{pageFlowScope.USER_NAME}”/>

</amx:commandLink>

Here we are storing the Customer name (#{bindings.userName.inputValue}) into the parameter (USER_NAME).

Note: Whenever you add the setPropertyListener component and if it gives the error saying the component cannot be added, then you need to enclose the setPropertyListener component with commandLink component.

To read the value from the PageFlow scope –

ValueExpression strVE = AdfmfJavaUtilities.getValueExpression(“#{pageFlowScope.USER_NAME}”, String.class);

Object obj2 = strVE.getValue(AdfmfJavaUtilities.getAdfELContext());

String strCustomerName = obj2.toString();

Now we have the USER_NAME value in the  strCustomerName  variable.

 

Advertisements
This entry was posted in ADF Mobile and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s