You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Stephane Grenier <in...@landlordmax.com> on 2005/07/20 17:40:16 UTC

re-using the same component in multiple pages

Hi everyone,

Let's say I have a table with it's own backend bean that I want to 
re-use at several places in our web application, basically add that 
table with other different components on several pages. Is the best 
method to just use jsp includes for the common jsp code (ie. the code 
generating the table)?

Regards,
Stephane

Re: re-using the same component in multiple pages

Posted by Mike Kienenberger <mk...@gmail.com>.
Facelets (https://facelets.dev.java.net/) will also make building
composite components a lot easier.

On 7/20/05, Mike Kienenberger <mk...@gmail.com> wrote:
> On 7/20/05, Stephane Grenier <in...@landlordmax.com> wrote:
> > Let's say I have a table with it's own backend bean that I want to
> > re-use at several places in our web application, basically add that
> > table with other different components on several pages. Is the best
> > method to just use jsp includes for the common jsp code (ie. the code
> > generating the table)?
> 
> Probably.   I went the other route of building a custom composite
> component and using that instead, but it's a lot of work that wouldn't
> be required if you're using static component structures.
> 
> Take a look at using x:aliasBean as well with your includes.
>

Re: re-using the same component in multiple pages

Posted by Mike Kienenberger <mk...@gmail.com>.
On 7/20/05, Stephane Grenier <in...@landlordmax.com> wrote:
> Let's say I have a table with it's own backend bean that I want to
> re-use at several places in our web application, basically add that
> table with other different components on several pages. Is the best
> method to just use jsp includes for the common jsp code (ie. the code
> generating the table)?

Probably.   I went the other route of building a custom composite
component and using that instead, but it's a lot of work that wouldn't
be required if you're using static component structures.

Take a look at using x:aliasBean as well with your includes.

Re: re-using the same component in multiple pages

Posted by Stephane Grenier <in...@landlordmax.com>.
Hi everyone,

Thanks for all the great feedback. Based on all the emails I received, I 
believe I'll go with an includes solution. It seems the most light 
weight and effective answer for what we need today.

Regards,
Stephane



Werner Punz wrote:

> check out x:aliasBean.. as long as you do not pass different controllers
> you probably are set with that one...
>
>
> Stephane Grenier wrote:
>
>> Hi everyone,
>>
>> Let's say I have a table with it's own backend bean that I want to 
>> re-use at several places in our web application, basically add that 
>> table with other different components on several pages. Is the best 
>> method to just use jsp includes for the common jsp code (ie. the code 
>> generating the table)?
>>
>> Regards,
>> Stephane
>>
>
>

Re: re-using the same component in multiple pages

Posted by Werner Punz <we...@gmx.at>.
check out x:aliasBean.. as long as you do not pass different controllers
you probably are set with that one...


Stephane Grenier wrote:
> Hi everyone,
> 
> Let's say I have a table with it's own backend bean that I want to 
> re-use at several places in our web application, basically add that 
> table with other different components on several pages. Is the best 
> method to just use jsp includes for the common jsp code (ie. the code 
> generating the table)?
> 
> Regards,
> Stephane
>