getting outputText value from getViewRoot

Hi guys,

well I am on page2 and I m trying to retrieve the value of a outputText component(of page1) using function which takes arguments

FacesContext.getCurrentInstance().getViewRoot(), "componentName"

As I m on a different page therefore it is giving null pointer exception. Does anybody know that how I can get the value of outputText component(using its ID) from different page.

Anyother workarounds would also be appreciated.

Regards,

Arsalan

[491 byte] By [Arsalan_Siddiquia] at [2007-11-26 18:44:15]
# 1
You should store the value in session. Then you can access it from any page in the same session. Or acces it by the backing bean. Check http://balusc.xs4all.nl/srv/dev-jep-com.html for some insights and examples.
BalusCa at 2007-7-9 6:18:10 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Thanks Balus! the given site is really good in that regard.

but I have still a little issue that I want to open a new tab using outputLink. I have tried '_blank' and '_new' in the target but a new window is opening not a new tab in the same window

Any idea about how to open just a new tab?

Arsalan_Siddiquia at 2007-7-9 6:18:10 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
You're talking about tabs in FF and IE7? This is a pure browser setting.
BalusCa at 2007-7-9 6:18:10 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
well preferably IE and its good to know about FF tooI searched on internet but I didnt find the options. Can you let me know or just send me any related linkRegards,Arsalan
Arsalan_Siddiquia at 2007-7-9 6:18:10 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
This is a browser setting. You cannot change it from server as well as client side stuff.
BalusCa at 2007-7-9 6:18:10 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
Thanks Balus, I got itdo you have any idea regarding my this issue http://forum.java.sun.com/thread.jspa?threadID=5139037Regards,Arsalan
Arsalan_Siddiquia at 2007-7-9 6:18:10 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...