myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Gavazuk" <antongava...@gmail.com>
Subject Re: Composite view from several "request" managed beans
Date Wed, 20 Aug 2008 12:29:03 GMT
Hi Volker,

I'm already using this approach (by the way, its deprecated in 1.2)
I'm just interested if someone faces with the same situation and how
to solve it.

2008/8/20 Volker Weber <v.weber@inexso.de>:
> Hi Anton,
>
> 2008/8/20 Anton Gavazuk <antongavazuk@gmail.com>:
>> Hi Guy,
>>
>> thanks for answer
>>
>>>>All necessary beans will be instantiated automatically by JSF as long as you
>>>>define them in your faces-config.xml file.
>> its clear,
>> but I want to put some business related info in bean before showing them.
>> like following
>> JSF method {
>
> if you do here:
>  SomeBean  = facesContext.getApplication().getVariableResolver().resolveVariable(facesContext,
> "someBean");
> instead of
>> SomeBean = new SomeBean();
>
> it should work if you have "someBean" configured in faces-config.xml
>
>>  SomeBean.value1 =     Service.getSomething();
>>  SomeBean.value2 =     Service.getSomething();
>>
>>  SomeBean2 = new SomeBean2();
>> .....
>>  //now I can add these beans to faces context of course, but maybe
>> there is another way?
>> }
>>
>> I dont want to call business functions inside getters of managed beans.
>>
>>
>> 2008/8/20 Guy Bashan <guy.bashan@gmail.com>:
>>> Hi,
>>>
>>> You can simply call all the beans directly from your JSP file.
>>> For example:
>>>
>>> <h:dataTable value="myFirstBean.someData" .../>
>>> <h:dataTable value="mySecondBean.someOtherData" .../>
>>>
>>> And so on...
>>>
>>> All necessary beans will be instantiated automatically by JSF as long as you
>>> define them in your faces-config.xml file.
>>>
>>> Guy.
>>>
>>> -----Original Message-----
>>> From: Anton Gavazuk [mailto:antongavazuk@gmail.com]
>>> Sent: Wednesday, August 20, 2008 11:33 AM
>>> To: MyFaces Discussion
>>> Subject: Composite view from several "request" managed beans
>>>
>>> Hi all,
>>>
>>> have maybe a silly question
>>>
>>> if I need to show a page which consists from several parts (modules)
>>> with different info, and this info cannot be stored in session beans,
>>> it should be refreshed on every request, so there is need for several
>>> managed beans with request scope.
>>>
>>> So if request forwards on such "composite"  page, should I create and
>>> put this beans in context manually in an JSF method or there is
>>> another way how to achieve this?
>>>
>>> Many thanks,
>>> Anton
>>>
>>>
>>
>
>
>
> --
> inexso - information exchange solutions GmbH
> Bismarckstra├če 13 | 26122 Oldenburg
> Tel.: +49 441 4082 356 |
> FAX: +49 441 4082 355 | www.inexso.de
>

Mime
View raw message