hi jose,
if you would like to use the same name, you can use:
//...
@Named
@View( {Page1.class, Page2.class} )
public class CustomPageBean
{
//...
}
that works as well.
regards,
gerhard
http://www.irian.at
Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
2012/4/2 José Luis Cetina <[email protected]>
> OK, Gerhard thanks, if its possible to add this as a new feature, something
> like:
>
> @View(DesktopPage.class,MobilePage.class)
>
> Thanks.
>
> 2012/4/2 Gerhard Petracek <[email protected]>
>
> > hi jose,
> >
> > right now you just can create a base class and in the 2 concrete
> page-beans
> > you just provide different names.
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/4/2 José Luis Cetina <[email protected]>
> >
> > > Thanks Gerhard, but is there a way to do this but with: @View ??
> > >
> > > I like more use @View
> > >
> > >
> > > 2012/4/2 Gerhard Petracek <[email protected]>
> > >
> > > > hi jose,
> > > >
> > > > just use @PageBean [1] and ref. the same page-bean at both
> > view-configs.
> > > >
> > > > regards,
> > > > gerhard
> > > >
> > > > [1]
> > > >
> > > >
> > >
> >
> https://cwiki.apache.org/confluence/display/EXTCDI/JSF+Usage#JSFUsage-PageBeans
> > > >
> > > >
> > > >
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF/JavaEE powerhouse -
> > > > JavaEE Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > > >
> > > > 2012/4/2 José Luis Cetina <[email protected]>
> > > >
> > > > > Hello, someone who can guide me?
> > > > > I want to use the same managed bean with 2 different pages, since a
> > > page
> > > > is
> > > > > for mobile and other "normal" but both use the same managed bean.
> > > > >
> > > > > I used the TYPE-SAFE navigation but managed bean per page
> > > > >
> > > > >
> > > > > -------------------------------------------------------------------
> > > > > *SCJA. José Luis Cetina*
> > > > > -------------------------------------------------------------------
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > -------------------------------------------------------------------
> > > *SCJA. José Luis Cetina*
> > > -------------------------------------------------------------------
> > >
> >
>
>
>
> --
> -------------------------------------------------------------------
> *SCJA. José Luis Cetina*
> -------------------------------------------------------------------
>