I am using WebSphere Portal 8 and I am facing one issue related to session clearing on Portal Page link click. I have a portal page with one single portlet (Search Portlet) and it is working fine. Then after some search I navigate to another unrelated page and again click on the link to Search Portlet. The problem is previously selected values are still present in UI.
I want to know is there any way I will know which Page Link is clicked so that I can clear session in Portlet Class. Or is there anyway to pass some parameters once a Page Link is clicked.
Thanks in Advance!
Pradeep
Portal maintains the state of the portlet, redirecting to page with clean URL will do the trick.
Related
I have a home page url http://localhost:3443/home1
In the index action of home1 I am having a session["Home"]=Home1.
I am having another home page url http://localhost:3443/home2
There i have a session session["Home"]=Home2.
Now the context is for some user the landing page is home1. So if they click on home button on the menu or or do any such activity they should land into home1.
For another set of users they should land into home 2 for whatever activity they do which leads to the home page.
Now the menu.it is a ascx control
Here we are checking the session value is home1 or home2.
Based on that we are redirecting the user to the desired landing page.
Now the problem that I am facing is when we copy
http://localhost:3443/home1 to another tab e.g. tab2 and from there we change it into home2 and then do some activity. And then come back to tab1, what happens the value gets overridden it taken the home2 session. Which leads to the wrong landing page on click of home link in the menu. Do you have any solutions for this problem?
I hope i have correctly explained the problem if not please let me know,I will explain further.
Session is for the connection which will include both tabs (for example why you can login to stackoverflow on one tab and then if you open a second tab you are still logged in)
As #Skuld mentioned, the session is for user connection to the site so if the user goes to another page he or she is allowed to go they can open this in a new tab keeping the original tab open, if these are form pages you might want to look at 14 AntiForgeryToken. also i noticed you said this happens in IE does this also happen in Chrome? if so you might want to look to see if IE is excepting cookies. you can add roles to the session and then authorize those roles to home1 or home 2 from your controller, you should be authorizing users and roles to pages in your code not within your session. its hard to help any more without any code to look at.
Hope this gets you on the right track.
I find in the Default.jsp the portlets are displayed by the tag "portal-core:screenRender"; but I want to add an extra portlet to the Default.jsp, is there any way to render a specific portlet?
I have to assume you just want to a portlet to a page rather than embed a portlet in the theme itself. Adding portlet to the Default.jsp should be avoided at all costs. Not only would that be a bad place to start customizing theme to edit the theme to embed a portlet but also just the idea of trying to embed a portlet in the theme makes me shudder a bit.
If you're just trying to add a portlet to a page, first login in as a Portal Administrator. You can then either a) navigate to the page you want to change and use the Edit Mode of the page to add a portlet from the page itself or b) go the Administration page, click "Manage Pages", find your page and edit the page there.
I have built the MVC application with WCF service. The major problem I have experienced with refreshing page.
I have created a login page with session (username and password). But when you refresh the home page by pressing F5, it would automatically log out.
That is my problem. I need to stay the home page after refresh. I have been googling around to find a solution but it seems not helpful.
Any idea? Your advise or code example much appreciated.
I am creating dynamically loading tabs using jquery Ui tabs in my ASP.NET mvc3 project.
Here i have a product page. The product page contains left menus like Customer,Address,Contact,etc..
Here my process is when i click one my left menus, the tab created dynamically with Grid records.
And,
I'm creating a custom role provider and I set a Authorize attribute specifying a role in my controller and it's working just fine, like this:
[Authorize(Roles="SuperAdmin")]
public class SuperAdminController : Controller
...
If one user doens't have access to this controller, And click one of my left menu means,
he's redirected to login page. Its also working fine.
The problem is after the user logged in it didn't redirect the proper page in tab content area.
If my problem not understandable means please let me know..
Thanks Advance...
If you carefully check the URL in the browser, you will see that the URL does not change when you load something by Ajax. That is the point of Ajax actually, you do not load the whole page, right?
Now as the state is not saved when you try to load the content using Ajax, your redirect URL is only the page you loaded initially. That is why you cannot go back to the tab you wanted to load.
I have a very strict requirement to use POST to pass in request parameters to my application upon entry. Once entering the application (page1), entering form information and continuing to the next page (page2) via a commandButton, the expectation is that the data will be posted and later read from a session scoped manage bean. All works well except when using browser back on page2 to navigate back to page1.
I have tried adding a redirect tag on the navigation rule that navigates from page1 to page2 to no avail. I have also tried this implementation of the Post-Get-Redirect pattern (http://balusc.blogspot.com/2007/03/post-redirect-get-pattern.html). Am I missing something obvious here?
Abel, the scope of page1 is request.
The solution we came up with which is no means ideal is to disable browser caching on the previous page. What this means is that whenever you refresh the page using the browser refresh button or click the browser back button, the browser will indicate that the page is expired and prompt a warning asking whether you want to re-submit the request.
We do have a work around which is to provide navigation buttons within the webpage but the idea was to support browser back. This would be easy using GET parameters, but POST provides additional complexity which we have decided to mitigate by by providing our in-house navigation buttons.