You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Mirco Attocchi <am...@gmail.com> on 2008/01/11 15:40:03 UTC

[Trinidad] SaveState

Hi all,
I'm starting new test project using Trinidad.

With Tomahawk I usually save state of backbean List with t:savestate.
Now, with Trinidad, how is the correct mode to save tr:table's value
between postbak?

I'm working with JSF 1.2 RI + Trinidad 1.2.4 on Netbeans 6's tomcat

Thanks

-- 
Mirco Attocchi

Re: [Trinidad] tr:selectOneCheckbox and Boolean please help

Posted by Scott O'Bryan <da...@gmail.com>.
Are you using JDK1.5?  Autoboxing should take care of this...

Scott

Matthias Wessendorf wrote:
> I think it was
>
> get for Boolean
> is for boolean
> ??
>
> at least worth to try...
> -m
>
> On Jan 11, 2008 2:36 PM, VISTICOT FREDERIC
> <Fr...@alcatel-lucent.fr> wrote:
>   
>> It seems that mapping the selectOneCheckbox value attribute with a
>> Boolean does not work.
>> How to do this mapping ?
>>
>> Of course the solution is to use boolean instead of Boolean !!! But it
>> is not always possible !!
>> Is the solution to use a converter ??? It's not so user friendly !!!
>>
>> <tr:selectOneCheckbox value="#{myBean.value}"/>
>>
>> MyBean {
>> Private Boolean _value;
>>
>> Public Boolean isValue() {return _value;}
>> Public void setValue(Boolean value) {_value = value};
>>
>> }
>>
>>     
>
>
>
>   


Re: [Trinidad] tr:selectOneCheckbox and Boolean please help

Posted by Simon Lessard <si...@gmail.com>.
Hi Fred,

This is actually a JavaBean issue. isSomething is reserved for primitive
boolean only. Semantically it wouldn't make sense to have a method named
isOpen() returning null for example. So it's actually the class that isn't
respecting the standard, not an ELResolver implementation issue so there
isn't much we can do about it.


Sorry,

~ Simon

On Jan 12, 2008 4:36 PM, VISTICOT FREDERIC <
Frederic.Visticot@alcatel-lucent.fr> wrote:

> Matthias,
> I have made the test and it's OK with get<attributName> when using
> Boolean.
> I think that this implementation is not the best one...
> Is there an other way to do when the only method available is
> is<attName> ??
> Sometimes it's not possible to access the java code to modify the is to
> get method !!!
>
> Fred
>
> -----Original Message-----
> From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On Behalf Of
> Matthias Wessendorf
> Sent: vendredi 11 janvier 2008 23:46
> To: MyFaces Discussion
> Subject: Re: [Trinidad] tr:selectOneCheckbox and Boolean please help
>
> I think it was
>
> get for Boolean
> is for boolean
> ??
>
> at least worth to try...
> -m
>
> On Jan 11, 2008 2:36 PM, VISTICOT FREDERIC
> <Fr...@alcatel-lucent.fr> wrote:
> > It seems that mapping the selectOneCheckbox value attribute with a
> > Boolean does not work.
> > How to do this mapping ?
> >
> > Of course the solution is to use boolean instead of Boolean !!! But it
>
> > is not always possible !!
> > Is the solution to use a converter ??? It's not so user friendly !!!
> >
> > <tr:selectOneCheckbox value="#{myBean.value}"/>
> >
> > MyBean {
> > Private Boolean _value;
> >
> > Public Boolean isValue() {return _value;} Public void setValue(Boolean
>
> > value) {_value = value};
> >
> > }
> >
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>

RE: [Trinidad] tr:selectOneCheckbox and Boolean please help

Posted by VISTICOT FREDERIC <Fr...@alcatel-lucent.fr>.
Matthias, 
I have made the test and it's OK with get<attributName> when using
Boolean.
I think that this implementation is not the best one...
Is there an other way to do when the only method available is
is<attName> ??
Sometimes it's not possible to access the java code to modify the is to
get method !!!

Fred

-----Original Message-----
From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On Behalf Of
Matthias Wessendorf
Sent: vendredi 11 janvier 2008 23:46
To: MyFaces Discussion
Subject: Re: [Trinidad] tr:selectOneCheckbox and Boolean please help

I think it was

get for Boolean
is for boolean
??

at least worth to try...
-m

On Jan 11, 2008 2:36 PM, VISTICOT FREDERIC
<Fr...@alcatel-lucent.fr> wrote:
> It seems that mapping the selectOneCheckbox value attribute with a 
> Boolean does not work.
> How to do this mapping ?
>
> Of course the solution is to use boolean instead of Boolean !!! But it

> is not always possible !!
> Is the solution to use a converter ??? It's not so user friendly !!!
>
> <tr:selectOneCheckbox value="#{myBean.value}"/>
>
> MyBean {
> Private Boolean _value;
>
> Public Boolean isValue() {return _value;} Public void setValue(Boolean

> value) {_value = value};
>
> }
>



--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

RE: [Trinidad] tr: Posted by VISTICOT FREDERIC <Fr...@alcatel-lucent.fr>.
Of course it could be possible but if i have 10 classes, i would like to
avoid writing 10 wrappers..
I think the current implementation should be improved to take into
account Autoboxing feature. 

-----Original Message-----
From: Richard Yee [mailto:ryee@cruzio.com] 
Sent: samedi 12 janvier 2008 23:18
To: MyFaces Discussion
Subject: Re: [Trinidad] tr:<tr:selectOneChoice with value mapped to an
Integer

Can you write an adapter class to wrap you bean and do the necessary
conversion?

-R

VISTICOT FREDERIC wrote:
> I'm using <tr:selectOneChoice with value mapped to an attribute att1 
> of type Integer.
> The combo box is not rendered correctly. Only the value is displayed.
>
> The solution is to use setAtt1(int att1).
> But the pb is that my POJO containing the att1 attribute can not be 
> modified !!!
> What can i do ? Of course i'm using JDK1.5
>
> Method is:
> Int getAtt1()
>
> And setAtt1(Integer att1)
>
> Fred
>
>
>
>   


Re: [Trinidad] tr: Posted by Richard Yee <ry...@cruzio.com>.
Can you write an adapter class to wrap you bean and do the necessary 
conversion?

-R

VISTICOT FREDERIC wrote:
> I'm using <tr:selectOneChoice with value mapped to an attribute att1 of
> type Integer.
> The combo box is not rendered correctly. Only the value is displayed.
>
> The solution is to use setAtt1(int att1).
> But the pb is that my POJO containing the att1 attribute can not be
> modified !!!
> What can i do ? Of course i'm using JDK1.5
>
> Method is:
> Int getAtt1()
>
> And setAtt1(Integer att1)
>
> Fred
>
>
>
>   


RE: [Trinidad] tr: Posted by VISTICOT FREDERIC <Fr...@alcatel-lucent.fr>.
I'm using <tr:selectOneChoice with value mapped to an attribute att1 of
type Integer.
The combo box is not rendered correctly. Only the value is displayed.

The solution is to use setAtt1(int att1).
But the pb is that my POJO containing the att1 attribute can not be
modified !!!
What can i do ? Of course i'm using JDK1.5

Method is:
Int getAtt1()

And setAtt1(Integer att1)

Fred


Re: [Trinidad] tr:selectOneCheckbox and Boolean please help

Posted by Matthias Wessendorf <ma...@apache.org>.
I think it was

get for Boolean
is for boolean
??

at least worth to try...
-m

On Jan 11, 2008 2:36 PM, VISTICOT FREDERIC
<Fr...@alcatel-lucent.fr> wrote:
> It seems that mapping the selectOneCheckbox value attribute with a
> Boolean does not work.
> How to do this mapping ?
>
> Of course the solution is to use boolean instead of Boolean !!! But it
> is not always possible !!
> Is the solution to use a converter ??? It's not so user friendly !!!
>
> <tr:selectOneCheckbox value="#{myBean.value}"/>
>
> MyBean {
> Private Boolean _value;
>
> Public Boolean isValue() {return _value;}
> Public void setValue(Boolean value) {_value = value};
>
> }
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

[Trinidad] tr:selectOneCheckbox and Boolean please help

Posted by VISTICOT FREDERIC <Fr...@alcatel-lucent.fr>.
It seems that mapping the selectOneCheckbox value attribute with a
Boolean does not work.
How to do this mapping ?

Of course the solution is to use boolean instead of Boolean !!! But it
is not always possible !!
Is the solution to use a converter ??? It's not so user friendly !!!

<tr:selectOneCheckbox value="#{myBean.value}"/>

MyBean {
Private Boolean _value;

Public Boolean isValue() {return _value;}
Public void setValue(Boolean value) {_value = value};

}

Re: [Trinidad] SaveState

Posted by Matthias Wessendorf <ma...@apache.org>.
keep in mind that with this cfg the performance will be a little slower
-M

On Jan 11, 2008 9:38 AM, Gerhard Petracek <ge...@gmail.com> wrote:
> hello,
>
> please don't forget to deactivate
> org.apache.myfaces.trinidad.CACHE_VIEW_ROOT
> when using t:saveState with trinidad.
>
> alternatives:
>
> http://www.nabble.com/Re%3A-Dependant-selectOne*-and-input*-components-in-PPR-Trinidad-p14687423.html
>
> regards,
> gerhard
>
>
>
> 2008/1/11, Andrew Robinson < andrew.rw.robinson@gmail.com>:
>
> > The tomahawk saveState should work fine with Trinidad.
> >
> > If I am not mistaken, there are plans to move the saveState component into
> the MyFaces commons library.
> >
> >
> >
> > On Jan 11, 2008 9:46 AM, Mirco Attocchi < amirco@gmail.com> wrote:
> >
> > > Trinidad hasn't it's own savestate and I suppose that I don't know the
> > > right/better way to work with Trinidad and postback.
> > >
> > > Mirco
> > >
> > >
> > >
> > >
> > > On Jan 11, 2008 5:39 PM, Andrew Robinson < andrew.rw.robinson@gmail.com
> > wrote:
> > > > Why not continue to use t:saveState?
> > > >
> > > >
> > > >
> > > > On Jan 11, 2008 7:40 AM, Mirco Attocchi < amirco@gmail.com> wrote:
> > > > > Hi all,
> > > > > I'm starting new test project using Trinidad.
> > > > >
> > > > > With Tomahawk I usually save state of backbean List with
> t:savestate.
> > > > > Now, with Trinidad, how is the correct mode to save tr:table's value
> > > > > between postbak?
> > > > >
> > > > > I'm working with JSF 1.2 RI + Trinidad 1.2.4 on Netbeans 6's tomcat
> > > > >
> > > > > Thanks
> > > > >
> > > > > --
> > > > > Mirco Attocchi
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Mirco Attocchi
> > >
> >
> >
>
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [Trinidad] SaveState

Posted by Gerhard Petracek <ge...@gmail.com>.
hello,

please don't forget to deactivate
org.apache.myfaces.trinidad.CACHE_VIEW_ROOT
when using t:saveState with trinidad.

alternatives:
http://www.nabble.com/Re%3A-Dependant-selectOne*-and-input*-components-in-PPR-Trinidad-p14687423.html

regards,
gerhard



2008/1/11, Andrew Robinson <an...@gmail.com>:
>
> The tomahawk saveState should work fine with Trinidad.
>
> If I am not mistaken, there are plans to move the saveState component into
> the MyFaces commons library.
>
> On Jan 11, 2008 9:46 AM, Mirco Attocchi < amirco@gmail.com> wrote:
>
> > Trinidad hasn't it's own savestate and I suppose that I don't know the
> > right/better way to work with Trinidad and postback.
> >
> > Mirco
> >
> > On Jan 11, 2008 5:39 PM, Andrew Robinson <andrew.rw.robinson@gmail.com >
> > wrote:
> > > Why not continue to use t:saveState?
> > >
> > >
> > >
> > > On Jan 11, 2008 7:40 AM, Mirco Attocchi <am...@gmail.com> wrote:
> > > > Hi all,
> > > > I'm starting new test project using Trinidad.
> > > >
> > > > With Tomahawk I usually save state of backbean List with
> > t:savestate.
> > > > Now, with Trinidad, how is the correct mode to save tr:table's value
> >
> > > > between postbak?
> > > >
> > > > I'm working with JSF 1.2 RI + Trinidad 1.2.4 on Netbeans 6's tomcat
> > > >
> > > > Thanks
> > > >
> > > > --
> > > > Mirco Attocchi
> > > >
> > >
> > >
> >
> >
> >
> > --
> > Mirco Attocchi
> >
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: [Trinidad] SaveState

Posted by Andrew Robinson <an...@gmail.com>.
The tomahawk saveState should work fine with Trinidad.

If I am not mistaken, there are plans to move the saveState component into
the MyFaces commons library.

On Jan 11, 2008 9:46 AM, Mirco Attocchi <am...@gmail.com> wrote:

> Trinidad hasn't it's own savestate and I suppose that I don't know the
> right/better way to work with Trinidad and postback.
>
> Mirco
>
> On Jan 11, 2008 5:39 PM, Andrew Robinson <an...@gmail.com>
> wrote:
> > Why not continue to use t:saveState?
> >
> >
> >
> > On Jan 11, 2008 7:40 AM, Mirco Attocchi <am...@gmail.com> wrote:
> > > Hi all,
> > > I'm starting new test project using Trinidad.
> > >
> > > With Tomahawk I usually save state of backbean List with t:savestate.
> > > Now, with Trinidad, how is the correct mode to save tr:table's value
> > > between postbak?
> > >
> > > I'm working with JSF 1.2 RI + Trinidad 1.2.4 on Netbeans 6's tomcat
> > >
> > > Thanks
> > >
> > > --
> > > Mirco Attocchi
> > >
> >
> >
>
>
>
> --
> Mirco Attocchi
>

Re: [Trinidad] SaveState

Posted by Mirco Attocchi <am...@gmail.com>.
Trinidad hasn't it's own savestate and I suppose that I don't know the
right/better way to work with Trinidad and postback.

Mirco

On Jan 11, 2008 5:39 PM, Andrew Robinson <an...@gmail.com> wrote:
> Why not continue to use t:saveState?
>
>
>
> On Jan 11, 2008 7:40 AM, Mirco Attocchi <am...@gmail.com> wrote:
> > Hi all,
> > I'm starting new test project using Trinidad.
> >
> > With Tomahawk I usually save state of backbean List with t:savestate.
> > Now, with Trinidad, how is the correct mode to save tr:table's value
> > between postbak?
> >
> > I'm working with JSF 1.2 RI + Trinidad 1.2.4 on Netbeans 6's tomcat
> >
> > Thanks
> >
> > --
> > Mirco Attocchi
> >
>
>



-- 
Mirco Attocchi

Re: [Trinidad] SaveState

Posted by Andrew Robinson <an...@gmail.com>.
Why not continue to use t:saveState?

On Jan 11, 2008 7:40 AM, Mirco Attocchi <am...@gmail.com> wrote:

> Hi all,
> I'm starting new test project using Trinidad.
>
> With Tomahawk I usually save state of backbean List with t:savestate.
> Now, with Trinidad, how is the correct mode to save tr:table's value
> between postbak?
>
> I'm working with JSF 1.2 RI + Trinidad 1.2.4 on Netbeans 6's tomcat
>
> Thanks
>
> --
> Mirco Attocchi
>