Sharing a public render parameter value across pages - portlet

I am using a Public Render Parameter in WebSphere Portal.
http://www-01.ibm.com/support/knowledgecenter/SSHRKX_8.5.0/mp/dev-portlet/pltcom_pubrndrprm.dita
Using the Web Content Viewer portlet.
I've created 2 separate pages on Portal, each one containing a Web Content Viewer portlet.
Each page reads the value of CUSTOM_CONTEXT and displays it if a value has been set.
If a value has not been set yet, it displays a textfield and submit button, allowing user to provide a string.
When I set the value of CUSTOM_CONTEXT to the string TEST on page 1, the page reloads and TEST is displayed back to me.
However, when I navigate to page 2, I still see the textfield?
As though the value has not been set for that page.
How can I have the value shared across all pages?
If I navigate back to page 1, the value is still store as TEST.

http://www-304.ibm.com/support/knowledgecenter/SSHRKX_8.5.0/mp/dev-portlet/pltcom_pubrndrprm.dita
"For some use cases, it can be required to limit parameter sharing. For example, this case can occur if you have two pairs of navigator or viewer portlets on two different pages, where each pair must be coordinated. However, the pairs must not interfere across pages so that the navigator on the first page does not influence the viewer on the second page. For such cases, the portal makes it possible to limit the sharing scope for public render parameters on a page basis. The parameter sharing scope for a page is controlled by a page parameter param.sharing.scope. You can set it from the Page Properties view under Advanced options > I want to set parameters. If you set a value for this parameter, portlets on the page share their public render parameters only with other portlets on the same page or on pages with the same scope."

Related

Prevent Component reloading - AEM

I have 2 pages in my web application. Lets say an home page and news feed page. When user clicks a hyperlink on home page then she/ he gets redirected to News feed page. I have 2 separate components in each page like
Home Page --- Header Component & Home Page Details Component.
News Feed Page --- Header Component & News Feed Details Component.
Both the pages has a common component Header. Can I prevent component reloading for the header component when users reaches the second page by clicking link on the first page.
By component reloading I mean the HTML code (HTL) code in the component should not be updated again with updated data instead for the second page, I just want to show the same data associated with header component in the first page.
A new page will always be loaded as a whole, because of just how [HTML] page loads work. What you are looking for is a single page application. They are possible with AEM but are a pain to design, especially the authoring mode behaviour.
This is a very common HTML pattern and possible duplicate of related questions such as: How to auto refresh a section of a page
There are two general approaches, the first being far preferred and supported in various frameworks, all based on JavaScript (AJAX):
Break page into different DIV tags that are independently updated (header separate from body sections, each loaded via AJAX such that only part of the page that has changed is updated).
Use iFrames such that effectively there are different pages - each loaded separately from the other.

How to retain form values while navigating between different jsp in a struts application

I am developing a struts2 application , which includes user to input multiple data on different page.
For different page, i am using different JSP and for capturing data from each page, i have one formbean class.
I can see values are getting set in setters in formbean class when i navigate to another page. however, if enter data on page 1 , go to page 2 and again come back to page 1, the entered values are lost.
How to store values while navigating between different page. Number of fields on my page are many.
Thanks,
Josh

xPages-Notes-redirection-pagination : how to redirect to a certain page number of a paginated view?

I have a classical xPage with view panel (in a custom control) linked to a paginated view, which displays records.
I have more than one page to display. Each one has a key column defined as a link which sends the document to a form edition page.
Then in this page I update the record clicking a 'Save button' which redirects the user to the original view page (which URL has been stored in the sessionScope).
The problem is that it redirects to the first page and not the one which contained the record.
How can I specify the page number to display when coming back to the view page ?
I had to do something similar for one of my applications and instead of using the simple action to redirect to the XPage I used the context.redirectToPage which allowed me to pass the sessionScope variable I had stored with the below code.
var url:XSPUrl;
URL = context.getUrl();
sessionScope.put('your scope name',#RightBack(url.getPath().toString(),"/"));

passing variables into new page tab installations

I would like to build a customized Facebook page tab for other page owners to instal onto their Facebook pages. Each page tab will need to have its own ID in the links that lead out of the page tab in order for us to track that page activity.
For example each page tab will have a list of products that link to the relevant product pages on an external website. Each of those links will have a unique ID parameter to we can track clicks and purchases. [e.g http://www.mydomain.com/products/product123.aspx?userid=12345]
So I need to create the userid variable in the link. Possibly using GET (or Request.QueryString for asp) to receive from the initial page tab installation.
From what i can see I might be able to use the app_data parameter to pass data over to the page, but when i tried it, it didn't work.
This is what i am using to install the page tabs
[https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&app_data=12345]
I thought that this will pass the userid over to the new page tab, but it doesnt seem to work.
If anyone could point me in the right direction i would be very grateful.
Cheers
From what i can see I might be able to use the app_data parameter to pass data over to the page, but when i tried it, it didn't work.
This is what i am using to install the page tabs [https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&app_data=12345]
But you are aware, that appending &app_data=12345 does not mean you will get a GET parameter by the name 'app_data', right …?
The app_data will be passed as a property inside the signed_request parameter – so you’ll have to decode that one, and inside you’ll find your app_data value.
Why does 'each page tab' need to have an ID?
The Page ID should be enough for you to determine which content to show (and it's passed to your app on each page load via the signed_request, and the page ID is also passed back to your app in the callback to the pagetab dialog
You could also request manage_pages Permission from the user to determine the list of pages they administer and if your app is installed on each

change form action from aspx page to master page behind it

i have a master page and a child aspx page, coneected to each other. the master page has the form in it. Now the child page has checkboxes, whose value i would like to pass to another child page with same master page behind it.
Can i change the action=abc.aspx and method=post?
How can i send all the checkbox values (checkbox.text = abc#oke.com) to the next page?
there are lots of these values that need to pass to nex tpage.
Use Button.PostBackUrl to change the page which the button posts to, and then on the target page, use Page.PreviousPage to get a reference to the source page (and therefore its controls).
By default you can use Page.PreviousPage.FindControl(...) to find a control on the source page by ID, then cast it to a checkbox and retrieve its values. You can also specify the type of the previous page with a <%# PreviousPageType %> directive, and then access the previous page's public properties.
See Cross-Page Posting for details.