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 11:38:10 GMT
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 {
  SomeBean = new SomeBean();
  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
>
>

Mime
View raw message