myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Luis Cetina <maxtorz...@gmail.com>
Subject Re: CODI
Date Mon, 02 Apr 2012 19:41:25 GMT
Hi Gerhard i use your suggestion, extends from a base clase but im getting
this error:

Severe: Exception while loading the app : WELD-000047 Specializing bean
must extend another bean:  Managed Bean [class
org.apache.myfaces.extensions.cdi.jsf2.impl.request.DefaultRequestTypeResolver]
with qualifiers [@Any @Default]

@Named
@ViewAccessScoped
@View(Home.LoginMobile.class)
public class LoginMobileMBean extends LoginMBean implements Serializable{
}


@Named
@ViewAccessScoped
@View(Home.Login.class)
public class LoginDesktopMBean extends LoginMBean implements Serializable{

}

//HERE I DONT HAVE @NAMED and nothing else, only a class
public class LoginMBean implements Serializable{
}


El 2 de abril de 2012 13:29, José Luis Cetina <maxtorzito@gmail.com>escribió:

> Ok, thanks a lot!!!
>
>
> 2012/4/2 Gerhard Petracek <gerhard.petracek@gmail.com>
>
>> 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 <maxtorzito@gmail.com>
>>
>> > 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 <gerhard.petracek@gmail.com>
>> >
>> > > 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 <maxtorzito@gmail.com>
>> > >
>> > > > Thanks Gerhard, but is there a way to do this but with: @View ??
>> > > >
>> > > > I like more use @View
>> > > >
>> > > >
>> > > > 2012/4/2 Gerhard Petracek <gerhard.petracek@gmail.com>
>> > > >
>> > > > > 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 <maxtorzito@gmail.com>
>> > > > >
>> > > > > > 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*
>> > -------------------------------------------------------------------
>> >
>>
>
>
>
> --
> -------------------------------------------------------------------
> *SCJA. José Luis Cetina*
> -------------------------------------------------------------------
>
>


-- 
-------------------------------------------------------------------
*SCJA. José Luis Cetina*
-------------------------------------------------------------------

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message