| Author |
Invoking bean from included JSF page
|
Naveen Sampra
Ranch Hand
Joined: Jun 11, 2003
Posts: 70
|
|
I have a common toolbar which I want to include on any JSF page when needed. However I need a way to pass my pageBean to toolbar and access properties/methods on the passed pageBean.
The pageBean is in request scope.
Below is the code. I want to include common_toolbar.xhtml into page1.xhtml
common_form.xhtml is where my template is defined and I have not listed, since it is not needed to show my example.
page1.xhtml:
/pages/common_toolbar.xhtml
The page renders fine but when i click on save link I get following error:
On the save, why is JSF framework not creating and setting 'myPage1Bean' in request scope ?
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14480
|
|
|
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Naveen Sampra
Ranch Hand
Joined: Jun 11, 2003
Posts: 70
|
|
How would I reference myPage1Bean that is passed to the include file?
I need to reference both a property(say idValue and action listener(say myListener).
I need to use idvalue on a <h:selectOneListbox ...> component and myListener on a <h:commandLink ...> component.
Appreciate if you can help with correct usage since I'm getting errors when I tried value="#{pageBeanName).idValue" or binding="#{pageBeanName).idValue" etc.
|
 |
Naveen Sampra
Ranch Hand
Joined: Jun 11, 2003
Posts: 70
|
|
I figured this one out.
|
 |
 |
|
|
subject: Invoking bean from included JSF page
|
|
|