Forums Register Login

update datatable,tree via different different pages

+Pie Number of slices to send: Send
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.?


+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
???
can you explain it with example?
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
hmmm good... !
thnks ..!
i just solved my problem ....!
hurreeeyyyyy.....!
My previous laptop never exploded like that. Read this tiny ad while I sweep up the shards.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1224 times.
Similar Threads
portlet and servlet
inserting values from arraylist to the database
inter portlet application issue
How to display the results of one portlet in another portlet(JSR 168 )?
How to implement database call on simultaneous click..
Thread Boost feature
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:50:37.