Forcing page reload from Vaadin portlet - portlet

Is there an easy way to force the entire page to reload from Vaadin? I have a portlet which affects the header value displayed which is pulled from IBM WebSphere's dynamic cache in a separate JSP.
I am porting over an old JSF portlet to Vaadin which depending on page reloads between actions to reflect the new value in the header template. So now I need to force the entire page (not just the portlet) to reload to make it appear that the action took effect.

You can reload the hosting web page with JavaScript:
getMainWindow().executeJavaScript("window.location.reload();");
I think this should also do the trick in a portal.

Related

New Relic Data gives Wrong page views URL after New Relic script added via DTM

We have added a new relic script via DTM,
and New Relic Data shows wrong Page URL, it shows Page views as DTM URL, not actual page views,
this happening because DTM will compile all scripts and executes the script with in a iFrame. so New Relic is considering iframe url as request URL.
any one have idea how to fix this using DTM ?
Thanks
From the documentation, there are 4 types of Javascript / 3rd Party Tag containers.
It sounds like you chose Non-Sequential HTML container type, which appends a DTM hosted iframe to the page, with your code in it. To append your code to the parent page, you must change the tag type to either Sequential HTML, or convert the tag to pure javascript and use Sequential Javascript or Non-Sequential Javascript type.
Side note: make sure to read the document page I provided above to ensure the type you choose is compatible with when you have it set to output (top of page, bottom of page, dom ready, window load)

How to call web service method from Web content display in Liferay 6.2?

I am creating a page using Liferay 6.2 where i need to display html contents sent as response from web service method. After seeing the customization and features available in web content display, i am planning to use them. As i am new to VM and FTL, i am not sure how to call web service method from web content display content. Please help me.
You can create a custom velocity tool as explained in this post.

How to create a new psml page?

I've encountered a .psml page in a portlet app and I don't know how it was created. There exists no physical file for the .psml page. In jetspeed is it possible to create a page via portlet UI, if so how is this achieved ?
Yes you can create a page in JetSpeed through the UI. To do this
Log in using your administrator account.
Click 'edit' (the little pencil icon that shows on each page)
You will see the Page, Folder and Layout configuration on that page.
My understanding is that .psml files are supposed to live inside the pages folder in your Jetspeed home.
Interestingly though, you say your .psml page is inside your app. I am not sure why this would be. If this is the case, perhaps the page was put there by accident?

Spring 3 MVC multi page form with session attributes, cannot go back

I wrote relatively simple web app in Spring MVC. I have following multipage forms:
Fill in
Check preview and eventually go back to 1. by form button or back button in your browser
Confirm
I used annotation #SessionAttributes and everything goes well, besides of going back to edit form after preview.
Then I have an information that document has expired in browser and I have to renew my POST request hence creating new objects. I resolved this problem by creating another method which loads view with form and loads there information from session, but still I can't use 'back button' in my browser. I would like to avoid javascript in this problem. Any ideas?
EDIT: I can see when session is active header is always set to 'no cache no store', maybe there is a way to configure Spring Session to enable cache and store? I searched but didn't find anything helpful.

Events triggering loading content on Facebook's timeline

I am working on Apache Nutch modification project. We already swapped Nutch's original module with ours built using HtmlUnit. I need to download whole Facebook user site (ex. http://www.facebook.com/profile.php?id=100002517096832), which is going to be parsed using our own parser. Unfortunately Facebook is using mechanism called BigPipe (http://www.facebook.com/note.php?note_id=389414033919). That's why most of current website is hidden in <.!-- --> tags.
Usually when we scroll down Facebook page, new content is being unpacked every time we are about to hit bottom of the page. I have tried to use Javascript that scroll my htmlPage (HtmlPage object from HtmlUnit project), but finally I realized that scrolling is not triggering loading new content on Facebook user site.
How can I check, what event on page triggers loading content on current Facebook page? Maybe I should approach problem from different side, for example try to extract BigPipe "things" on my own? Have you ever did that?
Before dealing to your question … what kind of project are you trying to build there?
Since Apache Nutch is an open source web-search software, I think you are trying to build some kind of search engine, that scrapes Facebook user profiles/feeds to get data and make it searchable on some third-party website?
Well, that would be a violoation of Facebook Platform Policies:
I. Features and Functionality
12. You must not include data obtained from us in any search engine or directory without our written permission.
So, do you have that written permission?