You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by john lee <sh...@yahoo.com> on 2013/07/30 04:46:25 UTC
s:property display INTERGER
I have class Part
class Part {
String pid,
Integer qty;
}
how can I display object/convert inside JSP?
/* if define/set (Part detailpart) before return */
<s:property value="detailpart.pid"/> /* this is no problem */
how about qty?
I tried the following, but show null
<s:property value="detailpart.qty"/>
I tried the following, but nothing either
<s:property value="getText('{0,number,#,##0.00}',{detailpart.qty})"/>
so, how to display/convert object inside value ?
thanks in advance
john
Re: s:property display INTERGER
Posted by Chris Pratt <th...@gmail.com>.
Short, Self Contained, Correct Example. In other words, cut your example
down to the bare bones that still shows the problem.
(*Chris*)
On Mon, Jul 29, 2013 at 8:06 PM, john lee <sh...@yahoo.com> wrote:
> SSCCE ? what u refer to?
>
>
> ________________________________
> From: Dave Newton <da...@gmail.com>
> To: john lee <sh...@yahoo.com>
> Cc: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Monday, July 29, 2013 10:04 PM
> Subject: Re: s:property display INTERGER
>
>
>
> Please put an SSCCE on github/equivalent; I'm very skeptical.
>
>
>
>
> On Mon, Jul 29, 2013 at 11:02 PM, john lee <sh...@yahoo.com>
> wrote:
>
> No, inside the action, before the return, I do
> >
> > detailpart.getQty().intValue(), return is 1, /* have value inside */
> >
> >thanks for reply, any other thoughts?
> >
> >john
> >
> >
> > From: Dave Newton <da...@gmail.com>
> >To: Struts Users Mailing List <us...@struts.apache.org>; john lee <
> sh_thorn_bird@yahoo.com>
> >Sent: Monday, July 29, 2013 9:59 PM
> >Subject: Re: s:property display INTERGER
> >
> >
> >
> >If it's null, it's null. If there's a value, it will display.
> >
> >
> >
> >
> >On Mon, Jul 29, 2013 at 10:46 PM, john lee <sh...@yahoo.com>
> wrote:
> >
> >
> >>I have class Part
> >>
> >> class Part {
> >> String pid,
> >> Integer qty;
> >>}
> >>
> >>how can I display object/convert inside JSP?
> >>
> >>/* if define/set (Part detailpart) before return */
> >>
> >><s:property value="detailpart.pid"/> /* this is no problem */
> >>
> >>how about qty?
> >>
> >>I tried the following, but show null
> >> <s:property value="detailpart.qty"/>
> >>
> >>I tried the following, but nothing either
> >> <s:property value="getText('{0,number,#,##0.00}',{detailpart.qty})"/>
> >>
> >>so, how to display/convert object inside value ?
> >>
> >>thanks in advance
> >>
> >>john
> >
> >
> >--
> >
> >e: davelnewton@gmail.com
> >m: 908-380-8699
> >s: davelnewton_skype
> >t: @dave_newton
> >b: Bucky Bits
> >g: davelnewton
> >so: Dave Newton
> >
> >
> >
> >
>
>
> --
>
> e: davelnewton@gmail.com
> m: 908-380-8699
> s: davelnewton_skype
> t: @dave_newton
> b: Bucky Bits
> g: davelnewton
> so: Dave Newton
>
Re: s:property display INTERGER
Posted by john lee <sh...@yahoo.com>.
SSCCE ? what u refer to?
________________________________
From: Dave Newton <da...@gmail.com>
To: john lee <sh...@yahoo.com>
Cc: Struts Users Mailing List <us...@struts.apache.org>
Sent: Monday, July 29, 2013 10:04 PM
Subject: Re: s:property display INTERGER
Please put an SSCCE on github/equivalent; I'm very skeptical.
On Mon, Jul 29, 2013 at 11:02 PM, john lee <sh...@yahoo.com> wrote:
No, inside the action, before the return, I do
>
> detailpart.getQty().intValue(), return is 1, /* have value inside */
>
>thanks for reply, any other thoughts?
>
>john
>
>
> From: Dave Newton <da...@gmail.com>
>To: Struts Users Mailing List <us...@struts.apache.org>; john lee <sh...@yahoo.com>
>Sent: Monday, July 29, 2013 9:59 PM
>Subject: Re: s:property display INTERGER
>
>
>
>If it's null, it's null. If there's a value, it will display.
>
>
>
>
>On Mon, Jul 29, 2013 at 10:46 PM, john lee <sh...@yahoo.com> wrote:
>
>
>>I have class Part
>>
>> class Part {
>> String pid,
>> Integer qty;
>>}
>>
>>how can I display object/convert inside JSP?
>>
>>/* if define/set (Part detailpart) before return */
>>
>><s:property value="detailpart.pid"/> /* this is no problem */
>>
>>how about qty?
>>
>>I tried the following, but show null
>> <s:property value="detailpart.qty"/>
>>
>>I tried the following, but nothing either
>> <s:property value="getText('{0,number,#,##0.00}',{detailpart.qty})"/>
>>
>>so, how to display/convert object inside value ?
>>
>>thanks in advance
>>
>>john
>
>
>--
>
>e: davelnewton@gmail.com
>m: 908-380-8699
>s: davelnewton_skype
>t: @dave_newton
>b: Bucky Bits
>g: davelnewton
>so: Dave Newton
>
>
>
>
--
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton
b: Bucky Bits
g: davelnewton
so: Dave Newton
Re: s:property display INTERGER
Posted by Dave Newton <da...@gmail.com>.
Please put an SSCCE on github/equivalent; I'm very skeptical.
On Mon, Jul 29, 2013 at 11:02 PM, john lee <sh...@yahoo.com> wrote:
> No, inside the action, before the return, I do
>
> detailpart.getQty().intValue(), return is 1, /* have value inside */
>
> thanks for reply, any other thoughts?
>
> john
>
> *From:* Dave Newton <da...@gmail.com>
> *To:* Struts Users Mailing List <us...@struts.apache.org>; john lee <
> sh_thorn_bird@yahoo.com>
> *Sent:* Monday, July 29, 2013 9:59 PM
> *Subject:* Re: s:property display INTERGER
>
> If it's null, it's null. If there's a value, it will display.
>
>
> On Mon, Jul 29, 2013 at 10:46 PM, john lee <sh...@yahoo.com>wrote:
>
>
> I have class Part
>
> class Part {
> String pid,
> Integer qty;
> }
>
> how can I display object/convert inside JSP?
>
> /* if define/set (Part detailpart) before return */
>
> <s:property value="detailpart.pid"/> /* this is no problem */
>
> how about qty?
>
> I tried the following, but show null
> <s:property value="detailpart.qty"/>
>
> I tried the following, but nothing either
> <s:property value="getText('{0,number,#,##0.00}',{detailpart.qty})"/>
>
> so, how to display/convert object inside value ?
>
> thanks in advance
>
> john
>
>
>
>
> --
> e: davelnewton@gmail.com
> m: 908-380-8699
> s: davelnewton_skype
> t: @dave_newton <https://twitter.com/dave_newton>
> b: Bucky Bits <http://buckybits.blogspot.com/>
> g: davelnewton <https://github.com/davelnewton>
> so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
>
>
>
>
--
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>
g: davelnewton <https://github.com/davelnewton>
so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
Re: s:property display INTERGER
Posted by john lee <sh...@yahoo.com>.
No, inside the action, before the return, I do
detailpart.getQty().intValue(), return is 1, /* have value inside */
thanks for reply, any other thoughts?
john
________________________________
From: Dave Newton <da...@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>; john lee <sh...@yahoo.com>
Sent: Monday, July 29, 2013 9:59 PM
Subject: Re: s:property display INTERGER
If it's null, it's null. If there's a value, it will display.
On Mon, Jul 29, 2013 at 10:46 PM, john lee <sh...@yahoo.com> wrote:
>I have class Part
>
> class Part {
> String pid,
> Integer qty;
>}
>
>how can I display object/convert inside JSP?
>
>/* if define/set (Part detailpart) before return */
>
><s:property value="detailpart.pid"/> /* this is no problem */
>
>how about qty?
>
>I tried the following, but show null
> <s:property value="detailpart.qty"/>
>
>I tried the following, but nothing either
> <s:property value="getText('{0,number,#,##0.00}',{detailpart.qty})"/>
>
>so, how to display/convert object inside value ?
>
>thanks in advance
>
>john
--
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton
b: Bucky Bits
g: davelnewton
so: Dave Newton
Re: s:property display INTERGER
Posted by Dave Newton <da...@gmail.com>.
If it's null, it's null. If there's a value, it will display.
On Mon, Jul 29, 2013 at 10:46 PM, john lee <sh...@yahoo.com> wrote:
>
> I have class Part
>
> class Part {
> String pid,
> Integer qty;
> }
>
> how can I display object/convert inside JSP?
>
> /* if define/set (Part detailpart) before return */
>
> <s:property value="detailpart.pid"/> /* this is no problem */
>
> how about qty?
>
> I tried the following, but show null
> <s:property value="detailpart.qty"/>
>
> I tried the following, but nothing either
> <s:property value="getText('{0,number,#,##0.00}',{detailpart.qty})"/>
>
> so, how to display/convert object inside value ?
>
> thanks in advance
>
> john
--
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>
g: davelnewton <https://github.com/davelnewton>
so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>