Re: s:checkboxlist help

2010-05-05 Thread Upasana Sharma
thanks for the response
the issue is solved as





On Wed, May 5, 2010 at 2:41 PM, Sébastien Domergue <
sebastien.domer...@c-s.fr> wrote:

> Hi,
>
> the label attribute is only used to render the label of the group of
> checkboxes. It is not used in an iterative way. In order to access to your
> .properties file, you have to build your list in your action then give it in
> list attribute.
>
> Regards
>
> Sébastien
>
> Le 05/05/2010 10:56, Upasana Sharma a écrit :
>
>  > label="%{getText('com.upasana.type.'+toString())}">
>>
>> But the key value is not passed to getText()
>>
>> The idea is to just initialize the keys in the checkboxlist and fetch the
>> corresponding display text from .properties file
>>
>> Thanks in advance
>>
>>
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Thanks and Regards
Upasana Sharma


Re: s:checkboxlist help

2010-05-05 Thread Sébastien Domergue

Hi,

the label attribute is only used to render the label of the group of 
checkboxes. It is not used in an iterative way. In order to access to 
your .properties file, you have to build your list in your action then 
give it in list attribute.


Regards

Sébastien

Le 05/05/2010 10:56, Upasana Sharma a écrit :



But the key value is not passed to getText()

The idea is to just initialize the keys in the checkboxlist and fetch the
corresponding display text from .properties file

Thanks in advance

   


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



s:checkboxlist help

2010-05-05 Thread Upasana Sharma


But the key value is not passed to getText()

The idea is to just initialize the keys in the checkboxlist and fetch the
corresponding display text from .properties file

Thanks in advance


Re: s:checkboxlist is there a way to do checked/unchecked

2009-03-21 Thread sajidbigler

i resolved this senario by replacing JSP as


>




-- 
View this message in context: 
http://www.nabble.com/s%3Acheckboxlist-is-there-a-way-to-do-checked-unchecked-tp22633750p22635748.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: s:checkboxlist is there a way to do checked/unchecked

2009-03-21 Thread sajidbigler

i resolved this senario by replacing JSP as


>




-- 
View this message in context: 
http://www.nabble.com/s%3Acheckboxlist-is-there-a-way-to-do-checked-unchecked-tp22633750p22635745.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: s:checkboxlist is there a way to do checked/unchecked

2009-03-21 Thread sajidbigler

i resolved this senario by replacing JSP as


>




-- 
View this message in context: 
http://www.nabble.com/s%3Acheckboxlist-is-there-a-way-to-do-checked-unchecked-tp22633750p22635741.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: s:radio and s:checkboxlist - how to customize listValue property.

2009-03-11 Thread boraldo

>> It isn't ideal if you want to keep your model carefully isolated from your
UI 
Unfortunately it is the case, so I need another solution.


Jim Kiley wrote:
> 
> The easiest (I'm not going to say "best") solution is to make a "fake"
> getter on your bean.  Make a "getListLabel()" method that composes a
> String
> from the values that you want to display in the list label, and then set
> the
> listValue to be "listLabel".  This is the way I've done this in the past
> and
> it works OK.  It isn't ideal if you want to keep your model carefully
> isolated from your UI but my own designs are a little less pure than that.
> jk
> 
> On Wed, Mar 11, 2009 at 10:05 AM, boraldo  wrote:
> 
>>
>> When I use that 2 components in my form I need to set attributes
>> listValue
>> and listKey.
>> That attributes as I understand require a field of a bean that is a
>> member
>> of collection represented by list attribute.
>>
>> Example:
>>
>>> listKey="id" />
>>
>> That means:
>> 1) there will be one radiobutton for each element of collection
>> getTypes().
>> 2) Each html radiobutton will have value = getId()  and label = getName()
>> .
>>
>> I want to compose label from several fields of my bean. So I can't write
>>
>>
>>
>> because that class doesn't have getSomeField() method.
>>
>> How can I do this ?
>> --
>> View this message in context:
>> http://www.nabble.com/s%3Aradio-and-s%3Acheckboxlist---how-to-customize-listValue-property.-tp22455829p22455829.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
> 
> 
> -- 
> Jim Kiley
> Senior Technical Consultant | Summa
> [p] 412.258.3346
> http://www.summa-tech.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/s%3Aradio-and-s%3Acheckboxlist---how-to-customize-listValue-property.-tp22455829p22458070.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: s:radio and s:checkboxlist - how to customize listValue property.

2009-03-11 Thread Jim Kiley
The easiest (I'm not going to say "best") solution is to make a "fake"
getter on your bean.  Make a "getListLabel()" method that composes a String
from the values that you want to display in the list label, and then set the
listValue to be "listLabel".  This is the way I've done this in the past and
it works OK.  It isn't ideal if you want to keep your model carefully
isolated from your UI but my own designs are a little less pure than that.
jk

On Wed, Mar 11, 2009 at 10:05 AM, boraldo  wrote:

>
> When I use that 2 components in my form I need to set attributes listValue
> and listKey.
> That attributes as I understand require a field of a bean that is a member
> of collection represented by list attribute.
>
> Example:
>
> listKey="id" />
>
> That means:
> 1) there will be one radiobutton for each element of collection getTypes().
> 2) Each html radiobutton will have value = getId()  and label = getName() .
>
> I want to compose label from several fields of my bean. So I can't write
>
>
>
> because that class doesn't have getSomeField() method.
>
> How can I do this ?
> --
> View this message in context:
> http://www.nabble.com/s%3Aradio-and-s%3Acheckboxlist---how-to-customize-listValue-property.-tp22455829p22455829.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Jim Kiley
Senior Technical Consultant | Summa
[p] 412.258.3346
http://www.summa-tech.com


s:radio and s:checkboxlist - how to customize listValue property.

2009-03-11 Thread boraldo

When I use that 2 components in my form I need to set attributes listValue
and listKey.
That attributes as I understand require a field of a bean that is a member
of collection represented by list attribute.

Example:



That means: 
1) there will be one radiobutton for each element of collection getTypes().
2) Each html radiobutton will have value = getId()  and label = getName() .

I want to compose label from several fields of my bean. So I can't write



because that class doesn't have getSomeField() method.

How can I do this ?
-- 
View this message in context: 
http://www.nabble.com/s%3Aradio-and-s%3Acheckboxlist---how-to-customize-listValue-property.-tp22455829p22455829.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: s:checkboxlist

2009-02-26 Thread Jiří Chaloupka

Hallo Jim,
perfect, thank you

Jiri

Jim Kiley napsal(a):
The way I solved this was to add my own theme, and change the xhtml 
theme's "checkboxlist" template to match what I wanted 'my' 
checkboxlist to do.


Under the root of your web app, add a directory named "template". 
 Under "template" add a directory called "myapp".  Then copy 
checkboxlist.ftl out of the Struts jar into template/myapp, and modify 
it as you wish.  Finally, in your JSP, do theme="myapp" .../>


This comes up fairly often -- I am happy to add it to the FAQ if 
someone can tell me how I do that.


jk

On Thu, Feb 26, 2009 at 5:46 AM, <mailto:k...@chalu.cz>> wrote:


 BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
}Hallo,
 is there any way to set that all items (checkboxes) in
s:checkboxlist are in their own line, one checkbox under other.
 Defaultly they are all on the same line and I cannot find the way
how to set that each one checkbox has to have their own line :-(
 Thanks, Jiri




--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: s:checkboxlist

2009-02-26 Thread Jim Kiley
The way I solved this was to add my own theme, and change the xhtml theme's
"checkboxlist" template to match what I wanted 'my' checkboxlist to do.
Under the root of your web app, add a directory named "template".  Under
"template" add a directory called "myapp".  Then copy checkboxlist.ftl out
of the Struts jar into template/myapp, and modify it as you wish.  Finally,
in your JSP, do 

This comes up fairly often -- I am happy to add it to the FAQ if someone can
tell me how I do that.
jk

On Thu, Feb 26, 2009 at 5:46 AM,  wrote:

>  BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
> }Hallo,
>  is there any way to set that all items (checkboxes) in
> s:checkboxlist are in their own line, one checkbox under other.
>  Defaultly they are all on the same line and I cannot find the way
> how to set that each one checkbox has to have their own line :-(
>  Thanks, Jiri
>



-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com


s:checkboxlist

2009-02-26 Thread konf
  BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px;
}Hallo,
 is there any way to set that all items (checkboxes) in
s:checkboxlist are in their own line, one checkbox under other.
 Defaultly they are all on the same line and I cannot find the way
how to set that each one checkbox has to have their own line :-(
 Thanks, Jiri


Re: [S2] s:iterator and s:checkboxlist inside (using 2.0.2 trunk)

2006-12-22 Thread Dariusz Wojtas

I have found a solution after lots of experiments.
I am still not sure what caused the problems (I tried tons of variants
in the JSP) but finally it started to work. No changes in the action
code, only in the JSP block.
It started to work after I added jstl into the game and dropped the
s:iterate tag.



${group.desc}



Can somebody say what caused problems in the previous code I have sent?
Why did it work on the 1st invocation and failed on all other calls?

Dariusz Wojtas


On 12/22/06, Dariusz Wojtas <[EMAIL PROTECTED]> wrote:

Hi,

I have such properties in my action:

private ArrayList extensionGroups = null;
private HashMap> groupedExtensions = null;

The 1st list contains only some 'Extension' elements.
The 2nd map contains other lists of extensions (values) with some
property (treeNo) from the parent used as the key.
Then I have a JSP page with such construct somewhere in it:


${desc}



And here is a strange thing:
When I start the app and run the action for the 1st time I get nice
result AS EXPECTED:

 GROUP1
chk: extension1
chk: extension2
chk: extension3
 GROUP2
chk: extension4
chk: extension5

But after reloading the page (no extra params in the url, just plain
GET), the result is:

chk: GROUP1
chk: GROUP2

Looks like the context of the data beaing displayed is different.
But it's the same page! The same code and the same data.
After restarting the app it is again  the same behaviour.
My debugs in the actions (getters) show that the same data is returned
in all cases.

What am I doing wrong?

Dariusz Wojtas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] s:iterator and s:checkboxlist inside (using 2.0.2 trunk)

2006-12-22 Thread Dariusz Wojtas

Hi,

I have such properties in my action:

private ArrayList extensionGroups = null;
private HashMap> groupedExtensions = null;

The 1st list contains only some 'Extension' elements.
The 2nd map contains other lists of extensions (values) with some
property (treeNo) from the parent used as the key.
Then I have a JSP page with such construct somewhere in it:


${desc}
   


And here is a strange thing:
When I start the app and run the action for the 1st time I get nice
result AS EXPECTED:

GROUP1
   chk: extension1
   chk: extension2
   chk: extension3
GROUP2
   chk: extension4
   chk: extension5

But after reloading the page (no extra params in the url, just plain
GET), the result is:

   chk: GROUP1
   chk: GROUP2

Looks like the context of the data beaing displayed is different.
But it's the same page! The same code and the same data.
After restarting the app it is again  the same behaviour.
My debugs in the actions (getters) show that the same data is returned
in all cases.

What am I doing wrong?

Dariusz Wojtas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]