aspose file tools*
The moose likes JSF and the fly likes update datatable,tree via different different pages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "update datatable,tree via different different pages" Watch "update datatable,tree via different different pages" New topic
Author

update datatable,tree via different different pages

prashant rathod
Greenhorn

Joined: Apr 05, 2012
Posts: 11
hi,
i am using liferay 6.1 and jsf 2.2 and primefaces 3.3
i have two lists displayed using tree component in two different portlets and both portlets are on different pages.
and both lists are coming from the database from the same table.
when i add something to the table using third portlet it gets added to the table in the database.
so i want other two lists(Tree structure) on different portlets should get updated with the new data.
how it is possible.?


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16222
    
  21

Ah, this is what I call jolly good fun!

First, realize that regardless of whether a portlet is on the same page or a different page, each portlet instance is operating on its own classpath. And that therefore, they cannot share data models.

Secondly, you have the constraint that HTTP is purely a request/response cycle processor. So the only way to update any webpage at all, whether in part or in full is to send a request to the server and render from its response. Fortunately these days we have AJAX support for partial page rendering at timed intervals. Otherwise the entire portal page would have to be re-rendered. At the cost of making requests to each and every portlet on the page, irrespective of whether or not it was part of the problem set.

Thirdly, you have the problem of getting the portlet UI models up to date. Which, in turn, depends on getting their domain models up to date, if you are using an ORM. Since a change in one app's domain model does not automatically reflect in the domain models of any related apps, you'll need a mechanism to either poll for or be notified of any changes to the data domain attached to each portlet's domain model. For best performance, that means that you also should have a good cache mechanism backing the ORM.

One you have all those items covered, then you'll probably want to optimize the refreshing mechanisms to improve response and reduce overhead. But don't do that until AFTER you have the brute-force mechanisms working, or it will be murder to debug.


Customer surveys are for companies who didn't pay proper attention to begin with.
prashant rathod
Greenhorn

Joined: Apr 05, 2012
Posts: 11
???
can you explain it with example?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16222
    
  21

This is some heavy-duty stuff. Actual details are too complicated - and too specialized - to present in an online forum like this. Plus I charge $$$$ for that kind of work.
prashant rathod
Greenhorn

Joined: Apr 05, 2012
Posts: 11
hmmm good... !
thnks ..!
i just solved my problem ....!
hurreeeyyyyy.....!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: update datatable,tree via different different pages