aspose file tools*
The moose likes JSF and the fly likes updating value in bean 2 from bean 1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "updating value in bean 2 from bean 1" Watch "updating value in bean 2 from bean 1" New topic
Author

updating value in bean 2 from bean 1

ekansh singh
Greenhorn

Joined: Mar 05, 2009
Posts: 5
Hi
I am very new in JSF.
I am facing one problem. a page that is rendered in the browser is composed of three beans.
For more understandability I have attached the Image with this post.

OVer view: We have bean3.xhtml(central page which willl update the menu label) file which has some input field that takes the
value and update the same in data base.

in bean3.xhtml we have included bean2.xhtml(the left side , is actually a navigation bar which contains the menu labels). The value which we just updated is displayed in the same browser page but bean2.xhtml is responsible to render it.

Scenario: when we update the value in bean3.xhtml and click submit. every things happens properly. value get updated in database
but its updated value is not immediately rendered.
If i visit some other page (that means i click on some other link from navigation bar.. the one in the left Bean2.xhtml)
its updated value gets reflected.

Can you please give the solution to fix this.
requirement is as soon as we click Save its value should get updated immediately.

what i am thinking is if i reload Bean 2.
or when save button is clicked and control gows inside the respective method.. i give some instruction to click the link
If my langauge was confusing
Example:
Take case of Gmail:
Suppose the navigation area where inbox ,sent, drafts are displayed is navigation area and is bean 2 and the central area is bean 3.
in bean 3 i have functionality to change navigation link value to any thing.
like I can change name of "Inbox " to "my inbox"
but on clicking save button "inbox" doesn't immediately gets changed to "my inbox".
I have to click some other link like 'Drafts' to see the updated value that is My inbox .
Please help will be highly appreciated


[Thumbnail for JSF-problem.JPG]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: updating value in bean 2 from bean 1