Re: Radio button selection is not being saved on the front end

2024-03-12 Thread Lukasz Lenart
You can test 6.4.0-SNAPSHOT and confirm if this fixes the problem.
https://nightlies.apache.org/struts/snapshot/
https://struts.apache.org/builds.html#maven-snapshots


pon., 11 mar 2024 o 10:52 Mahabir Gupta  napisał(a):
>
> Dear Lukasz,
>
> My apologies yes I meant Struts 2.5 So this means I have to wait for Struts 
> 6.4 before the radio button will be able to display on the frontend?
> Kindly confirm. Thank you.
>
> Regards
> Mahabir
>
> On Mon, Mar 11, 2024 at 5:29 PM Lukasz Lenart  wrote:
>>
>> I assume you meant Struts 2.5 and I assume you have followed the migration 
>> guide
>> https://cwiki.apache.org/confluence/display/WW/Struts+2.5+to+6.0.0+migration
>>
>> And this can be related to what Nate is suggesting
>>
>> pon., 11 mar 2024 o 09:29 Mahabir Gupta  napisał(a):
>> >
>> > Dear Lukasz,
>> >
>> > I upgraded from Struts 2-6 to struts 6.3.0.2.
>> > Thank you.
>> >
>> > Regards
>> > Mahabir
>> >
>> > On Mon, Mar 11, 2024 at 4:05 PM Nate Kerkhofs  
>> > wrote:
>> >>
>> >> Łukasz,
>> >>
>> >> I think this might be related to the issue I reported in November last 
>> >> year which will be fixed in Struts 6.4 
>> >> (https://issues.apache.org/jira/browse/WW-5365). While it's not a Boolean 
>> >> radio button, it does sound like this is because the value is being 
>> >> processed as a string literal and not as an Ognl expression.
>> >>
>> >> Cheers,
>> >>
>> >> Nate
>> >>
>> >> -Original Message-
>> >> From: Lukasz Lenart 
>> >> Sent: Monday, 11 March 2024 07:23
>> >> To: Struts Users Mailing List 
>> >> Subject: Re: Radio button selection is not being saved on the front end
>> >>
>> >> pon., 11 mar 2024 o 04:54 Mahabir Gupta  napisał(a):
>> >> > The radio button is working perfectly when using Struts2. I only did an 
>> >> > upgrade the Struts6.3.0.2 without making any changes to the code. When 
>> >> > using Struts6.3.0.2 the radio button issue arises. There is no change 
>> >> > of code made.
>> >>
>> >> Could you provide more information from which version you have migrated 
>> >> as there is no such data in your first message?
>> >>
>> >>
>> >> Cheers
>> >> Łukasz
>> >>
>> >> -
>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >> For additional commands, e-mail: user-h...@struts.apache.org
>> >>
>>
>>
>> --
>> Łukasz
>> mobile +48 606 323 122 http://www.lenart.org.pl/
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>

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



Re: Radio button selection is not being saved on the front end

2024-03-11 Thread Lukasz Lenart
I assume you meant Struts 2.5 and I assume you have followed the migration guide
https://cwiki.apache.org/confluence/display/WW/Struts+2.5+to+6.0.0+migration

And this can be related to what Nate is suggesting

pon., 11 mar 2024 o 09:29 Mahabir Gupta  napisał(a):
>
> Dear Lukasz,
>
> I upgraded from Struts 2-6 to struts 6.3.0.2.
> Thank you.
>
> Regards
> Mahabir
>
> On Mon, Mar 11, 2024 at 4:05 PM Nate Kerkhofs  wrote:
>>
>> Łukasz,
>>
>> I think this might be related to the issue I reported in November last year 
>> which will be fixed in Struts 6.4 
>> (https://issues.apache.org/jira/browse/WW-5365). While it's not a Boolean 
>> radio button, it does sound like this is because the value is being 
>> processed as a string literal and not as an Ognl expression.
>>
>> Cheers,
>>
>> Nate
>>
>> -Original Message-----
>> From: Lukasz Lenart 
>> Sent: Monday, 11 March 2024 07:23
>> To: Struts Users Mailing List 
>> Subject: Re: Radio button selection is not being saved on the front end
>>
>> pon., 11 mar 2024 o 04:54 Mahabir Gupta  napisał(a):
>> > The radio button is working perfectly when using Struts2. I only did an 
>> > upgrade the Struts6.3.0.2 without making any changes to the code. When 
>> > using Struts6.3.0.2 the radio button issue arises. There is no change of 
>> > code made.
>>
>> Could you provide more information from which version you have migrated as 
>> there is no such data in your first message?
>>
>>
>> Cheers
>> Łukasz
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>


-- 
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/

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



Re: Radio button selection is not being saved on the front end

2024-03-11 Thread Mahabir Gupta
Dear Lukasz,

I upgraded from Struts 2-6 to struts 6.3.0.2.
Thank you.

Regards
Mahabir

On Mon, Mar 11, 2024 at 4:05 PM Nate Kerkhofs  wrote:

> Łukasz,
>
> I think this might be related to the issue I reported in November last
> year which will be fixed in Struts 6.4 (
> https://issues.apache.org/jira/browse/WW-5365). While it's not a Boolean
> radio button, it does sound like this is because the value is being
> processed as a string literal and not as an Ognl expression.
>
> Cheers,
>
> Nate
>
> -Original Message-
> From: Lukasz Lenart 
> Sent: Monday, 11 March 2024 07:23
> To: Struts Users Mailing List 
> Subject: Re: Radio button selection is not being saved on the front end
>
> pon., 11 mar 2024 o 04:54 Mahabir Gupta  napisał(a):
> > The radio button is working perfectly when using Struts2. I only did an
> upgrade the Struts6.3.0.2 without making any changes to the code. When
> using Struts6.3.0.2 the radio button issue arises. There is no change of
> code made.
>
> Could you provide more information from which version you have migrated as
> there is no such data in your first message?
>
>
> Cheers
> Łukasz
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


RE: Radio button selection is not being saved on the front end

2024-03-11 Thread Nate Kerkhofs
Łukasz,

I think this might be related to the issue I reported in November last year 
which will be fixed in Struts 6.4 
(https://issues.apache.org/jira/browse/WW-5365). While it's not a Boolean radio 
button, it does sound like this is because the value is being processed as a 
string literal and not as an Ognl expression.

Cheers,

Nate

-Original Message-
From: Lukasz Lenart  
Sent: Monday, 11 March 2024 07:23
To: Struts Users Mailing List 
Subject: Re: Radio button selection is not being saved on the front end

pon., 11 mar 2024 o 04:54 Mahabir Gupta  napisał(a):
> The radio button is working perfectly when using Struts2. I only did an 
> upgrade the Struts6.3.0.2 without making any changes to the code. When using 
> Struts6.3.0.2 the radio button issue arises. There is no change of code made.

Could you provide more information from which version you have migrated as 
there is no such data in your first message?


Cheers
Łukasz

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



Re: Radio button selection is not being saved on the front end

2024-03-10 Thread Lukasz Lenart
pon., 11 mar 2024 o 04:54 Mahabir Gupta  napisał(a):
> The radio button is working perfectly when using Struts2. I only did an 
> upgrade the Struts6.3.0.2 without making any changes to the code. When using 
> Struts6.3.0.2 the radio button issue arises. There is no change of code made.

Could you provide more information from which version you have
migrated as there is no such data in your first message?


Cheers
Łukasz

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



Re: Radio button selection is not being saved on the front end

2024-03-10 Thread Mahabir Gupta
Dear Lukasz,

The radio button is working perfectly when using Struts2. I only did an
upgrade the Struts6.3.0.2 without making any changes to the code. When
using Struts6.3.0.2 the radio button issue arises. There is no change of
code made.
Thank you.

Regards
Mahabir

On Sat, Mar 9, 2024 at 10:37 PM Lukasz Lenart 
wrote:

> śr., 6 mar 2024 o 08:08 Mahabir Gupta  napisał(a):
> > DotsCarRental dotsCarRental = new DotsCarRental();
> > dotsCarRental = (DotsCarRental)
> session.getAttribute(DBConstants.sessionCarId);
>
> You don't have to create an instance if in the next line you assign a
> value from session, this is enough:
>
> DotsCarRental dotsCarRental = (DotsCarRental)
> session.getAttribute(DBConstants.sessionCarId);
>
> > request.setAttribute("dotsCarRentalForm",frm);
> >  listKey="lookupTitle" listValue="lookupTitle" />
>
> You assign the form to the "dotsCarRentalForm" request attribute but
> in the value attribute you call "#frm.rentalReason" - maybe this is
> the problem.
>
>
> Cheers
> Łukasz
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Radio button selection is not being saved on the front end

2024-03-09 Thread Lukasz Lenart
śr., 6 mar 2024 o 08:08 Mahabir Gupta  napisał(a):
> DotsCarRental dotsCarRental = new DotsCarRental();
> dotsCarRental = (DotsCarRental) 
> session.getAttribute(DBConstants.sessionCarId);

You don't have to create an instance if in the next line you assign a
value from session, this is enough:

DotsCarRental dotsCarRental = (DotsCarRental)
session.getAttribute(DBConstants.sessionCarId);

> request.setAttribute("dotsCarRentalForm",frm);
>  listKey="lookupTitle" listValue="lookupTitle" />

You assign the form to the "dotsCarRentalForm" request attribute but
in the value attribute you call "#frm.rentalReason" - maybe this is
the problem.


Cheers
Łukasz

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



Re: Radio button selection is not being saved on the front end

2024-03-05 Thread Mahabir Gupta
Hi,

I have some radio button where I can select one radio button at a time and
safe it. It is being saved in the database but on the frontend it is not
being saved.

public class getDotsCarRentalAction extends GenericMappingDispatchAction{

public String saveCr(){
HttpSession session = request.getSession();
String result = null;
DotsCarRentalForm frm = null;
DotsCarRental dotsCarRental = new DotsCarRental();
dotsCarRental = (DotsCarRental)
session.getAttribute(DBConstants.sessionCarId);
frm = (DotsCarRentalForm) form;
dotsCarRental = frm.getFormData(dotsCarRental);
result = frm.getFctSelected().trim();

if(result == null || result.length() < 1) result = "CARRENTAL";
ActionErrors errors = frm.validate(getTextProvider(),request);
if(errors != null){
saveErrors(errors);
return "CARRENTAL";
}
session.setAttribute(DBConstants.sessionCarId,dotsCarRental);
return result;
}

public String getCr(){
HttpSession session = request.getSession();
DotsCarRental dotsCarRental = new DotsCarRental;
dotsCarRental = (DotsCarRental)
session.getAttribute(DBConstants.sessionCarId);
DotsCarRentalForm frm = new DotsCarRentalForm();
if(dotsCarRental !=null){
frm.setFormData(dotsCarRental);
}
frm.setFctSelected(null);
frm.setValSelected(null);
request.setAttribute("dotsCarRentalForm",frm);
return "success";

}
}

There is no error on the console and neither is there any error on the
developer tools on MS Edge



Staff








SAVE
AS DRAFT













Please assist.
Thank you.

Regards

Mahabir


Re: [ask] How to pass multiple radio button in struts2

2018-12-24 Thread M Huzaifah
Hi Yasser,

i tried, it will exception.

 i use this code bellow to get that value, instead for loop:
request.getParameterValues("viewAccess["+i+"]")[0]
this work for me. i’ll update if i got the proper way about this

Thank you


> On 22 Dec 2018, at 15.31, Yasser Zamani  wrote:
> 
> Hi,
> 
> As different values are setting into same viewAccess[0], I guess instead 
> `private String viewAccess[][];` (array of array) would work.
> 
> Regards. 
> 
>> -Original Message-
>> From: M Huzaifah 
>> Sent: Friday, December 21, 2018 11:44 AM
>> To: Struts Users Mailing List 
>> Subject: [ask] How to pass multiple radio button in struts2
>> 
>> Hi Members,
>> 
>> i would like to ask something about radio button in strtus2.
>> 
>> i have radio button in jsp like this:
>> 
>> 
>> 
>>   All
>>   Self
>>   Custom
>> 
>> 
>> 
>>   All
>>   Self
>>   Custom
>> 
>> 
>> and in my JavaAction class i add property " private String viewAccess[]; “ 
>> also with
>> setter and getter.
>> 
>> the problem is, i am not able to get value of radio button in Java Action. i 
>> use
>> struts 2.3.35
>> 
>> someone could help?
>> 
>> Thank you
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org



RE: [ask] How to pass multiple radio button in struts2

2018-12-22 Thread Yasser Zamani
Hi,

As different values are setting into same viewAccess[0], I guess instead 
`private String viewAccess[][];` (array of array) would work.

Regards. 

>-Original Message-
>From: M Huzaifah 
>Sent: Friday, December 21, 2018 11:44 AM
>To: Struts Users Mailing List 
>Subject: [ask] How to pass multiple radio button in struts2
>
>Hi Members,
>
>i would like to ask something about radio button in strtus2.
>
>i have radio button in jsp like this:
>
>
>
>All
>Self
>Custom
>
>
>
>All
>Self
>Custom
>
>
>and in my JavaAction class i add property " private String viewAccess[]; “ 
>also with
>setter and getter.
>
>the problem is, i am not able to get value of radio button in Java Action. i 
>use
>struts 2.3.35
>
>someone could help?
>
>Thank you



[ask] How to pass multiple radio button in struts2

2018-12-21 Thread M Huzaifah
Hi Members,

i would like to ask something about radio button in strtus2.

i have radio button in jsp like this:



All
Self
Custom



All
Self
Custom


and in my JavaAction class i add property " private String viewAccess[]; “ also 
with setter and getter.

the problem is, i am not able to get value of radio button in Java Action. i 
use struts 2.3.35

someone could help?

Thank you



Re: Tooltip not getting updated when radio button is changed

2013-03-15 Thread Lukasz Lenart
2013/3/15  :
> if (whichANM == "2") {

Maybe try === instead and whichANM is what kind of type? Did you try
to use JavaScript debugger? Did you check the source code of the
generated page? Is it related to Struts?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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



Re: Struts 2 Radio Button for show and hide fields

2010-12-30 Thread Kushan Jayathilake
That's totally relates to java scripts, use on click event to call a java
script function and apply "style = display: none;" & "style = display:
block;" (retrieve the element before you apply this, hope you know how to do
that)
On 30 Dec 2010 20:48,  wrote:
> Hi,
> I want to create two struts 2 radio button one for delegate,one for pull,
> if i click delegate and submit only some of the fields i will show and
some of the
> fileds i will hide same like pull also. any body help my problem.
>
> Thanks and Regards,
> Karthick G
> Mobile:8971318927
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s) and
may contain proprietary, confidential or privileged information. If you are
not the intended recipient, you should not disseminate, distribute or copy
this e-mail. Please notify the sender immediately and destroy all copies of
this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.
>
> www.wipro.com


Re: Struts 2 Radio Button for show and hide fields

2010-12-30 Thread tito
do you want to selectively show/hide certain fields on the page while
selecting the radio button ? In tat case you can use a div tag and use
display/block styles.The solution is not at all related to struts
though and is purely javascript.

As you work in Wipro,which is a software giant,guess it has an inhouse
tech help team :)

On 12/31/10, Dave Newton  wrote:
> While I'm not entirely sure what you're asking, it sounds like trivial
> JavaScript, and unrelated to Struts.
>
> Dave
>
> On Thu, Dec 30, 2010 at 10:17 AM,  wrote:
>
>> Hi,
>> I want to create two struts 2 radio button one for delegate,one for pull,
>> if i click delegate and submit only some of the fields i will show and
>> some
>> of the
>> fileds i will hide same like pull also. any body help my problem.
>>
>> Thanks and Regards,
>> Karthick G
>> Mobile:8971318927
>>
>> Please do not print this email unless it is absolutely necessary.
>>
>> The information contained in this electronic message and any attachments
>> to
>> this message are intended for the exclusive use of the addressee(s) and
>> may
>> contain proprietary, confidential or privileged information. If you are
>> not
>> the intended recipient, you should not disseminate, distribute or copy
>> this
>> e-mail. Please notify the sender immediately and destroy all copies of
>> this
>> message and any attachments.
>>
>> WARNING: Computer viruses can be transmitted via email. The recipient
>> should check this email and any attachments for the presence of viruses.
>> The
>> company accepts no liability for any damage caused by any virus
>> transmitted
>> by this email.
>>
>> www.wipro.com
>>
>

-- 
Sent from my mobile device

regards,
Tito Cheriachan
http://www.titocheriachan.com


___
Automate Twittering using AutoTweeter
http://www.autotweeter.in
<http://www.autotweeter.in>Follow twitter users automatically with
AutoFollower
http://www.twitterautofollower.com



10 litres of water is required to produce a sheet of paper.
--

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



Re: Struts 2 Radio Button for show and hide fields

2010-12-30 Thread Dave Newton
While I'm not entirely sure what you're asking, it sounds like trivial
JavaScript, and unrelated to Struts.

Dave

On Thu, Dec 30, 2010 at 10:17 AM,  wrote:

> Hi,
> I want to create two struts 2 radio button one for delegate,one for pull,
> if i click delegate and submit only some of the fields i will show and some
> of the
> fileds i will hide same like pull also. any body help my problem.
>
> Thanks and Regards,
> Karthick G
> Mobile:8971318927
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to
> this message are intended for the exclusive use of the addressee(s) and may
> contain proprietary, confidential or privileged information. If you are not
> the intended recipient, you should not disseminate, distribute or copy this
> e-mail. Please notify the sender immediately and destroy all copies of this
> message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> www.wipro.com
>


Struts 2 Radio Button for show and hide fields

2010-12-30 Thread karthick.gunasekaran
Hi,
I want to create two struts 2 radio button one for delegate,one for pull,
if i click delegate and submit only some of the fields i will show and some of 
the
fileds i will hide same like pull also. any body help my problem.

Thanks and Regards,
Karthick G
Mobile:8971318927

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com


Re: Validation xml for Radio button

2010-11-15 Thread Li Ying
What data type of the property [yourAnswer] is ?

If it is an int property, try delete the double-quotation surrounding
the value 1.



2010/11/15 Prabhubalaji Ragavan :
> Hi
> I am using a radio option in my code. when i try to validate that thru the
> validator.xml, the validation is not happening.
>
> this is my jsp content.
>
> 
>
> this is my validator.xml content
>
> 
>       
>            
>            enter gen1
>    
>    
>
>
> Please help, am new to struts2.
>
> Thanks
> Prabhu Ragavan
>

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



Validation xml for Radio button

2010-11-15 Thread Prabhubalaji Ragavan
Hi
I am using a radio option in my code. when i try to validate that thru the
validator.xml, the validation is not happening.

this is my jsp content.



this is my validator.xml content


   

enter gen1




Please help, am new to struts2.

Thanks
Prabhu Ragavan


Retrieving random radio button value

2010-07-07 Thread oneofthelions

jsp page
[code]
  
  
   
<%String upId = request.getParameter("upId"); %> //This "upId", is
the primary id from the table. So in the loop, the upId, upholidayDate &
upholidayDesc iterate accordingly  
 //here I need to set that same value
to that radio button selected.   
  
  
  
  
  
  
  
  
  
[/code]

My action class
[code]
public ActionForward doDel(ActionMapping mapping, ActionForm theForm,  
HttpServletRequest request, HttpServletResponse response) throws
IOException,  
ServletException  
{  
Connection conn = null;  
HolidayService hdServ = new HolidayService();  
List updList = new ArrayList();  
ActionErrors errors = new ActionErrors();  
HolidayForm delForm = (HolidayForm) theForm;  
String upId = request.getParameter("upId"); //Will I get the selected radio
button with this ?  
hdServ.delete(upId,conn); //Calling my delete service and dao to delete the
radio button selected id  
  
[/code]

How do I retrieve the random radio button value into my action?
-- 
View this message in context: 
http://old.nabble.com/Retrieving-random-radio-button-value-tp29094349p29094349.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



s2: validation of checkbox a radio button

2009-11-18 Thread Ignacio de Córdoba

Hello,
I am trying to use client side validations through ...-validation.xml in
struts2
I have it working but only for text and file input fields. I need to
validate if a checkbox is checked. using "required" or "requiredstring"
validators always validates as the field as a value even if you don't
checkit. I guess the same happens with a group of radio buttons. (all with
the same field name). They have a value.

I have not found a OGNL expression that might work.

Anybody know how to solve this? I'd like to use simple client side
validation.

Thanks,
Ignacio
-- 
View this message in context: 
http://old.nabble.com/s2%3A-validation-of-checkbox-a-radio-button-tp26418892p26418892.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: Radio button issue with list, map, collection, localisation and action class.

2009-11-04 Thread Qunhuan Mei
My understanding was wrong - thought it has to be "List". Also did not think
about LinkedHashMap. 

Tried also  and working fine. Guess 
should also work.

Cheers!

-Original Message-
From: Samuel Robert [mailto:samuelrobert@gmail.com] 
Sent: 04 November 2009 16:52
To: Struts Users Mailing List
Subject: Re: Radio button issue with list, map, collection, localisation and
action class.

At least with String keys, it works fine:

Code in your action:
private Map myMap = new LinkedHashMap();
..
myMap .put("key1", "Yes");// or getText(..)
myMap .put("key2", "No");
..
public Map getMyMap() {
return myMap;
}


JSP:




2009/11/4 Qunhuan Mei 

> Greg and Samuel,
>
> Thank you very much indeed for your quick response. Your suggestions are
> indeed working!
>
> Just out from my curiosity, would it be possible to achieve the same
effect
> by the code from the action class (I have got no more clue since all my
> effort failed)?
>
> The documentation (2.1.8, radio) said "If the list is a Map (key, value),
> the Map key will become the option 'value' parameter and the Map value
will
> become the option body."
>
> But when I tried my "map" list, the "key=value" were shown together rather
> than value were shown and the key were sent to the server after choice is
> made.
>
> Cheers, Q
>
> -Original Message-
> From: Samuel Robert [mailto:samuelrobert@gmail.com]
> Sent: 04 November 2009 16:07
> To: Struts Users Mailing List
> Subject: Re: Radio button issue with list, map, collection, localisation
> and
> action class.
>
> This should also work:
>
> 
> 
> 
>
>
> 2009/11/4 Greg Lindholm 
>
> > You can't nest struts tags so you can't put a   inside of
> 
> > tag but you should be able to call getText().
> > I would try this:
> >
> >  > value="true" />
> >
> >
> > On Wed, Nov 4, 2009 at 10:44 AM, Qunhuan Mei 
> > wrote:
> >
> > > Hi,
> > >
> > >
> > >
> > > For a single pair of radio buttons, e.g. "Yes" or "No" without
> > > localisation,
> > > the following jsp code seems to be straight forward and will always
> come
> > > out
> > > with true/false returned to the server (localised Yes or No can be
> > received
> > > on the server after user have made choice, but this is not the optimal
> > > solution I want. I want always true/false or 1/0):
> > >
> > >
> > >
> > >  />
> > >
> > >
> > >
> > >
> > >
> > > But:
> > >
> > >
> > >
> > > 1. I wan to localise the Yes and No with still true/false to
> come
> > > out, I failed. I have tried:
> > >
> > >
> > >
> > > list="#{true:'', false:''}"
> > >
> > >
> > >
> > > or
> > >
> > >
> > >
> > > list="#{true:'${yes}', false:'${no}'}"
> > >
> > > list="#{true:%{#yes}, false:%{#no} }}"etc
> > >
> > >
> > >
> > > hoping to access the following getter in the action class:
> > >
> > >
> > >
> > >public String getYes(){
> > >
> > >return getText("yes");
> > >
> > >}
> > >
> > >public String getNo(){
> > >
> > >return getText("no");
> > >
> > >}
> > >
> > >
> > >
> > > (Can a Struts tag embedded in another Struts tag?)
> > >
> > >
> > >
> > > 2. I also failed to set the list value from action class for
> the
> > > given jsp code. This is what I have tried:
> > >
> > >
> > >
> > > Jsp code:
> > >
> > >
> > >
> > > 
> > >
> > >
> > >
> > > a. getter method returns a (array) list:
> > >
> > >
> > >
> > > public List getYesOrNoList() {
> > >
> > >String[] yesOrNoArray =
> > {getText("yes"),
> > > getText("no")};
> > >
> > >return Arrays.asList(yesOrNoArray);
> > >
> > > }
> > >
> > >
> > >
> > > b. getter meth

Re: Radio button issue with list, map, collection, localisation and action class.

2009-11-04 Thread Samuel Robert
At least with String keys, it works fine:

Code in your action:
private Map myMap = new LinkedHashMap();
..
myMap .put("key1", "Yes");// or getText(..)
myMap .put("key2", "No");
..
public Map getMyMap() {
return myMap;
}


JSP:




2009/11/4 Qunhuan Mei 

> Greg and Samuel,
>
> Thank you very much indeed for your quick response. Your suggestions are
> indeed working!
>
> Just out from my curiosity, would it be possible to achieve the same effect
> by the code from the action class (I have got no more clue since all my
> effort failed)?
>
> The documentation (2.1.8, radio) said "If the list is a Map (key, value),
> the Map key will become the option 'value' parameter and the Map value will
> become the option body."
>
> But when I tried my "map" list, the "key=value" were shown together rather
> than value were shown and the key were sent to the server after choice is
> made.
>
> Cheers, Q
>
> -Original Message-----
> From: Samuel Robert [mailto:samuelrobert@gmail.com]
> Sent: 04 November 2009 16:07
> To: Struts Users Mailing List
> Subject: Re: Radio button issue with list, map, collection, localisation
> and
> action class.
>
> This should also work:
>
> 
> 
> 
>
>
> 2009/11/4 Greg Lindholm 
>
> > You can't nest struts tags so you can't put a   inside of
> 
> > tag but you should be able to call getText().
> > I would try this:
> >
> >  > value="true" />
> >
> >
> > On Wed, Nov 4, 2009 at 10:44 AM, Qunhuan Mei 
> > wrote:
> >
> > > Hi,
> > >
> > >
> > >
> > > For a single pair of radio buttons, e.g. "Yes" or "No" without
> > > localisation,
> > > the following jsp code seems to be straight forward and will always
> come
> > > out
> > > with true/false returned to the server (localised Yes or No can be
> > received
> > > on the server after user have made choice, but this is not the optimal
> > > solution I want. I want always true/false or 1/0):
> > >
> > >
> > >
> > >  />
> > >
> > >
> > >
> > >
> > >
> > > But:
> > >
> > >
> > >
> > > 1. I wan to localise the Yes and No with still true/false to
> come
> > > out, I failed. I have tried:
> > >
> > >
> > >
> > > list="#{true:'', false:''}"
> > >
> > >
> > >
> > > or
> > >
> > >
> > >
> > > list="#{true:'${yes}', false:'${no}'}"
> > >
> > > list="#{true:%{#yes}, false:%{#no} }}"etc
> > >
> > >
> > >
> > > hoping to access the following getter in the action class:
> > >
> > >
> > >
> > >public String getYes(){
> > >
> > >return getText("yes");
> > >
> > >}
> > >
> > >public String getNo(){
> > >
> > >return getText("no");
> > >
> > >}
> > >
> > >
> > >
> > > (Can a Struts tag embedded in another Struts tag?)
> > >
> > >
> > >
> > > 2. I also failed to set the list value from action class for
> the
> > > given jsp code. This is what I have tried:
> > >
> > >
> > >
> > > Jsp code:
> > >
> > >
> > >
> > > 
> > >
> > >
> > >
> > > a. getter method returns a (array) list:
> > >
> > >
> > >
> > > public List getYesOrNoList() {
> > >
> > >String[] yesOrNoArray =
> > {getText("yes"),
> > > getText("no")};
> > >
> > >return Arrays.asList(yesOrNoArray);
> > >
> > > }
> > >
> > >
> > >
> > > b. getter method returns a (map) list:
> > >
> > >
> > >
> > > public List getYesOrNoList() {
> > >
> > > Map[] yesOrNoArray = {new HashMap(), new HashMap()};
> > >
> > >yesOrNoArray[0].put(true, getText("yes"));
> > >
> > >yesOrNoArray[1].put(false, getText("no"));
> > >
> > >   return Arrays.asList(translateYesOrNoArray);
> > >
> > > }
> > >
> > >
> > >
> > > c. getter method returns a collection:
> > >
> > >
> > >
> > > public Collection getYesOrNoList() {
> > >
> > >Map yesOrNoArray = new HashMap();//, new HashMap()};
> > >
> > > yesOrNoArray.put(true, getText("yes"));
> > >
> > >yesOrNoArray.put(false, getText("no"));
> > >
> > >return yesOrNoArray.values();
> > >
> > > }
> > >
> > >
> > >
> > >
> > >
> > > None of them produced the ideal result for me.
> > >
> > >
> > >
> > > Could any one help please? Much appreciated.
> > >
> > >
> > >
> > > Qunhuan
> > >
> > >
> >
>
>
>
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


RE: Radio button issue with list, map, collection, localisation and action class.

2009-11-04 Thread Qunhuan Mei
Greg and Samuel,

Thank you very much indeed for your quick response. Your suggestions are
indeed working!

Just out from my curiosity, would it be possible to achieve the same effect
by the code from the action class (I have got no more clue since all my
effort failed)? 

The documentation (2.1.8, radio) said "If the list is a Map (key, value),
the Map key will become the option 'value' parameter and the Map value will
become the option body."

But when I tried my "map" list, the "key=value" were shown together rather
than value were shown and the key were sent to the server after choice is
made. 

Cheers, Q

-Original Message-
From: Samuel Robert [mailto:samuelrobert@gmail.com] 
Sent: 04 November 2009 16:07
To: Struts Users Mailing List
Subject: Re: Radio button issue with list, map, collection, localisation and
action class.

This should also work:






2009/11/4 Greg Lindholm 

> You can't nest struts tags so you can't put a   inside of

> tag but you should be able to call getText().
> I would try this:
>
>  value="true" />
>
>
> On Wed, Nov 4, 2009 at 10:44 AM, Qunhuan Mei 
> wrote:
>
> > Hi,
> >
> >
> >
> > For a single pair of radio buttons, e.g. "Yes" or "No" without
> > localisation,
> > the following jsp code seems to be straight forward and will always come
> > out
> > with true/false returned to the server (localised Yes or No can be
> received
> > on the server after user have made choice, but this is not the optimal
> > solution I want. I want always true/false or 1/0):
> >
> >
> >
> > 
> >
> >
> >
> >
> >
> > But:
> >
> >
> >
> > 1. I wan to localise the Yes and No with still true/false to
come
> > out, I failed. I have tried:
> >
> >
> >
> > list="#{true:'', false:''}"
> >
> >
> >
> > or
> >
> >
> >
> > list="#{true:'${yes}', false:'${no}'}"
> >
> > list="#{true:%{#yes}, false:%{#no} }}"etc
> >
> >
> >
> > hoping to access the following getter in the action class:
> >
> >
> >
> >public String getYes(){
> >
> >return getText("yes");
> >
> >}
> >
> >public String getNo(){
> >
> >return getText("no");
> >
> >}
> >
> >
> >
> > (Can a Struts tag embedded in another Struts tag?)
> >
> >
> >
> > 2. I also failed to set the list value from action class for the
> > given jsp code. This is what I have tried:
> >
> >
> >
> > Jsp code:
> >
> >
> >
> > 
> >
> >
> >
> > a. getter method returns a (array) list:
> >
> >
> >
> > public List getYesOrNoList() {
> >
> >String[] yesOrNoArray =
> {getText("yes"),
> > getText("no")};
> >
> >return Arrays.asList(yesOrNoArray);
> >
> > }
> >
> >
> >
> > b. getter method returns a (map) list:
> >
> >
> >
> > public List getYesOrNoList() {
> >
> > Map[] yesOrNoArray = {new HashMap(), new HashMap()};
> >
> >yesOrNoArray[0].put(true, getText("yes"));
> >
> >yesOrNoArray[1].put(false, getText("no"));
> >
> >   return Arrays.asList(translateYesOrNoArray);
> >
> > }
> >
> >
> >
> > c. getter method returns a collection:
> >
> >
> >
> > public Collection getYesOrNoList() {
> >
> >Map yesOrNoArray = new HashMap();//, new HashMap()};
> >
> > yesOrNoArray.put(true, getText("yes"));
> >
> >yesOrNoArray.put(false, getText("no"));
> >
> >return yesOrNoArray.values();
> >
> > }
> >
> >
> >
> >
> >
> > None of them produced the ideal result for me.
> >
> >
> >
> > Could any one help please? Much appreciated.
> >
> >
> >
> > Qunhuan
> >
> >
>





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



Re: Radio button issue with list, map, collection, localisation and action class.

2009-11-04 Thread Samuel Robert
This should also work:






2009/11/4 Greg Lindholm 

> You can't nest struts tags so you can't put a   inside of 
> tag but you should be able to call getText().
> I would try this:
>
>  value="true" />
>
>
> On Wed, Nov 4, 2009 at 10:44 AM, Qunhuan Mei 
> wrote:
>
> > Hi,
> >
> >
> >
> > For a single pair of radio buttons, e.g. "Yes" or "No" without
> > localisation,
> > the following jsp code seems to be straight forward and will always come
> > out
> > with true/false returned to the server (localised Yes or No can be
> received
> > on the server after user have made choice, but this is not the optimal
> > solution I want. I want always true/false or 1/0):
> >
> >
> >
> > 
> >
> >
> >
> >
> >
> > But:
> >
> >
> >
> > 1. I wan to localise the Yes and No with still true/false to come
> > out, I failed. I have tried:
> >
> >
> >
> > list="#{true:'', false:''}"
> >
> >
> >
> > or
> >
> >
> >
> > list="#{true:'${yes}', false:'${no}'}"
> >
> > list="#{true:%{#yes}, false:%{#no} }}"etc
> >
> >
> >
> > hoping to access the following getter in the action class:
> >
> >
> >
> >public String getYes(){
> >
> >return getText("yes");
> >
> >}
> >
> >public String getNo(){
> >
> >return getText("no");
> >
> >}
> >
> >
> >
> > (Can a Struts tag embedded in another Struts tag?)
> >
> >
> >
> > 2. I also failed to set the list value from action class for the
> > given jsp code. This is what I have tried:
> >
> >
> >
> > Jsp code:
> >
> >
> >
> > 
> >
> >
> >
> > a. getter method returns a (array) list:
> >
> >
> >
> > public List getYesOrNoList() {
> >
> >String[] yesOrNoArray =
> {getText("yes"),
> > getText("no")};
> >
> >return Arrays.asList(yesOrNoArray);
> >
> > }
> >
> >
> >
> > b. getter method returns a (map) list:
> >
> >
> >
> > public List getYesOrNoList() {
> >
> > Map[] yesOrNoArray = {new HashMap(), new HashMap()};
> >
> >yesOrNoArray[0].put(true, getText("yes"));
> >
> >yesOrNoArray[1].put(false, getText("no"));
> >
> >   return Arrays.asList(translateYesOrNoArray);
> >
> > }
> >
> >
> >
> > c. getter method returns a collection:
> >
> >
> >
> > public Collection getYesOrNoList() {
> >
> >Map yesOrNoArray = new HashMap();//, new HashMap()};
> >
> > yesOrNoArray.put(true, getText("yes"));
> >
> >yesOrNoArray.put(false, getText("no"));
> >
> >return yesOrNoArray.values();
> >
> > }
> >
> >
> >
> >
> >
> > None of them produced the ideal result for me.
> >
> >
> >
> > Could any one help please? Much appreciated.
> >
> >
> >
> > Qunhuan
> >
> >
>


Re: Radio button issue with list, map, collection, localisation and action class.

2009-11-04 Thread Greg Lindholm
You can't nest struts tags so you can't put a   inside of 
tag but you should be able to call getText().
I would try this:




On Wed, Nov 4, 2009 at 10:44 AM, Qunhuan Mei  wrote:

> Hi,
>
>
>
> For a single pair of radio buttons, e.g. "Yes" or "No" without
> localisation,
> the following jsp code seems to be straight forward and will always come
> out
> with true/false returned to the server (localised Yes or No can be received
> on the server after user have made choice, but this is not the optimal
> solution I want. I want always true/false or 1/0):
>
>
>
> 
>
>
>
>
>
> But:
>
>
>
> 1. I wan to localise the Yes and No with still true/false to come
> out, I failed. I have tried:
>
>
>
> list="#{true:'', false:''}"
>
>
>
> or
>
>
>
> list="#{true:'${yes}', false:'${no}'}"
>
> list="#{true:%{#yes}, false:%{#no} }}"etc
>
>
>
> hoping to access the following getter in the action class:
>
>
>
>public String getYes(){
>
>return getText("yes");
>
>}
>
>public String getNo(){
>
>return getText("no");
>
>}
>
>
>
> (Can a Struts tag embedded in another Struts tag?)
>
>
>
> 2. I also failed to set the list value from action class for the
> given jsp code. This is what I have tried:
>
>
>
> Jsp code:
>
>
>
> 
>
>
>
> a. getter method returns a (array) list:
>
>
>
> public List getYesOrNoList() {
>
>String[] yesOrNoArray = {getText("yes"),
> getText("no")};
>
>return Arrays.asList(yesOrNoArray);
>
> }
>
>
>
> b. getter method returns a (map) list:
>
>
>
> public List getYesOrNoList() {
>
> Map[] yesOrNoArray = {new HashMap(), new HashMap()};
>
>yesOrNoArray[0].put(true, getText("yes"));
>
>yesOrNoArray[1].put(false, getText("no"));
>
>   return Arrays.asList(translateYesOrNoArray);
>
> }
>
>
>
> c. getter method returns a collection:
>
>
>
> public Collection getYesOrNoList() {
>
>Map yesOrNoArray = new HashMap();//, new HashMap()};
>
> yesOrNoArray.put(true, getText("yes"));
>
>yesOrNoArray.put(false, getText("no"));
>
>return yesOrNoArray.values();
>
> }
>
>
>
>
>
> None of them produced the ideal result for me.
>
>
>
> Could any one help please? Much appreciated.
>
>
>
> Qunhuan
>
>


Radio button issue with list, map, collection, localisation and action class.

2009-11-04 Thread Qunhuan Mei
Hi, 

 

For a single pair of radio buttons, e.g. "Yes" or "No" without localisation,
the following jsp code seems to be straight forward and will always come out
with true/false returned to the server (localised Yes or No can be received
on the server after user have made choice, but this is not the optimal
solution I want. I want always true/false or 1/0): 

 



 

 

But: 

 

1. I wan to localise the Yes and No with still true/false to come
out, I failed. I have tried: 

 

list="#{true:'', false:''}"

 

or 

 

list="#{true:'${yes}', false:'${no}'}"

list="#{true:%{#yes}, false:%{#no} }}"etc

 

hoping to access the following getter in the action class:

 

public String getYes(){

return getText("yes"); 

}

public String getNo(){

return getText("no"); 

}  

 

(Can a Struts tag embedded in another Struts tag?)

 

2. I also failed to set the list value from action class for the
given jsp code. This is what I have tried: 

 

Jsp code: 

 



 

a. getter method returns a (array) list:

 

public List getYesOrNoList() { 

String[] yesOrNoArray = {getText("yes"),
getText("no")};

return Arrays.asList(yesOrNoArray);

}

 

b. getter method returns a (map) list:

 

public List getYesOrNoList() {  

Map[] yesOrNoArray = {new HashMap(), new HashMap()};

yesOrNoArray[0].put(true, getText("yes"));  

yesOrNoArray[1].put(false, getText("no"));   

   return Arrays.asList(translateYesOrNoArray);

}

 

c. getter method returns a collection:

 

public Collection getYesOrNoList() { 

Map yesOrNoArray = new HashMap();//, new HashMap()};

yesOrNoArray.put(true, getText("yes"));   

yesOrNoArray.put(false, getText("no"));

return yesOrNoArray.values();

}

 

 

None of them produced the ideal result for me. 

 

Could any one help please? Much appreciated. 

 

Qunhuan



Re: Generating Dynamic radio button list

2009-06-25 Thread BlackKnight

Jim Kiley ??:

You need to provide Struts with an actual List (or Set or the like).  It
looks like you are providing a single String.  You will need to parse that
String out into a List of Strings in order for  to treat it as a
List.
jk

2009/6/24 BlackKnight 

  

Hi,

I am trying to generate a dynamic raido buttom list using



where optionvalue is stored in database equal

#{'Faculty':'Faculty','Staff':'Staff','Resident':'Resident','Intern':'Intern'}

however struts2 doesn't generate the radio button list intead he
generate only 1 radio button with value equals

#{'Faculty':'Faculty','Staff':'Staff','Resident':'Resident','Intern':'Intern'}

Any help?


Thanks!


Frank

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






  

Hi, JK,

Thanks for your help ,

The problem is I am trying to generate a form from the DB. So the number 
of radio button list could vary. That could make the parsing method 
quite complex.(Actually I am not sure how to do that yet), any suggestions?




Frank


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



Re: Generating Dynamic radio button list

2009-06-24 Thread Jim Kiley
You need to provide Struts with an actual List (or Set or the like).  It
looks like you are providing a single String.  You will need to parse that
String out into a List of Strings in order for  to treat it as a
List.
jk

2009/6/24 BlackKnight 

> Hi,
>
> I am trying to generate a dynamic raido buttom list using
>
> 
>
> where optionvalue is stored in database equal
>
> #{'Faculty':'Faculty','Staff':'Staff','Resident':'Resident','Intern':'Intern'}
>
> however struts2 doesn't generate the radio button list intead he
> generate only 1 radio button with value equals
>
> #{'Faculty':'Faculty','Staff':'Staff','Resident':'Resident','Intern':'Intern'}
>
> Any help?
>
>
> Thanks!
>
>
> Frank
>
> -
> 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


Generating Dynamic radio button list

2009-06-24 Thread BlackKnight
Hi,

I am trying to generate a dynamic raido buttom list using



where optionvalue is stored in database equal
#{'Faculty':'Faculty','Staff':'Staff','Resident':'Resident','Intern':'Intern'}

however struts2 doesn't generate the radio button list intead he
generate only 1 radio button with value equals
#{'Faculty':'Faculty','Staff':'Staff','Resident':'Resident','Intern':'Intern'}

Any help?


Thanks!


Frank

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



RE: Radio button grouping in Struts 2

2009-05-18 Thread Martin Gainty

the only suggestion i can think of is rework existing List to a Map e.g. 
possibleAnswersMap so 
value is the value part of entry from possibleAnswersMap
key is key part of entry from possibleAnswersMap

otherwise looks good
Martin Gainty 
__ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Mon, 18 May 2009 02:22:06 -0700
> From: nataraja...@cognizant.com
> To: user@struts.apache.org
> Subject: RE: Radio button grouping in Struts 2
> 
> 
> Hi,
> 
> Can you please attach the sample source code for this? even I am facing
> the same problem. I am new to Struts, so need some detailed example.
> 
> 
> Thanks in advance,
> 
> 
> ===
> 
> jdt.me.uk wrote:
> > 
> > 
> > Hi Radu. Many thanks for your reply, and sorry for not responding sooner
> > as I've only just got around to looking at your link.
> > 
> > It definitely helped and I've got it working now. It's slightly different
> > and doesn't rely on Preparable:
> > 
> > class Question
> > {
> > long id;
> > String name;
> > }
> > 
> > public class ViewQuestionsAction
> > {
> > // NOTE - getters required for all these properties
> > List questions;
> > List answersList;  
> > Map answersMap;
> > }
> > 
> > jsp:
> > 
> > 
> >   
> > 
> >  > list="#answersList" />
> > 
> > 
> > public class SaveAnswersAction
> > {
> > // NOTE - getter AND setter required for this map
> > private Map answersMap;
> > }
> > 
> > In the ViewQuestionsAction (which sources the JSP):
> > 1) loads the questions from the DB;
> > 2) populates all the possible answers into the answersList
> > 3) populates the map with the current answers, keyed by question id
> > 
> > When the page loads, the current answer is selected in the radio (due to
> > value selecting the answer from the answersMap), and the radios are unique
> > by question because the name is unique by question (due to the map keyed
> > by question). 
> > 
> > When you click save, the SaveAnswersAction.answersMap map is populated
> > with the selected answers, keyed by the question's id (no prepareable
> > method needed). You can then do all the validation you need and update the
> > DB as appropriate.
> > 
> > I believe this is a really nice solution as loading entities from the DB
> > in a prepare() method seems wrong to me. I'd be interested to hear what
> > other people think. 
> > 
> > Many thanks
> > James
> > 
> > 
> > 
> > Rubbinio wrote:
> >> 
> >> You need to use Map backed properties if you want to get this to work.
> >> 
> >> Take a look at this example and you should be able to adapt it.
> >> 
> >> http://www.vitarara.org/cms/struts_2_cookbook/updating_a_list_of_domain_entities
> >> 
> >> Basically your properties are a map with id and Question objects and then
> >> struts can repopulate your answers in the correct question object in the
> >> map. It works very nice. I used it for a page that had a random number of
>

RE: Radio button grouping in Struts 2

2009-05-18 Thread NR031

Hi,

Can you please attach the sample source code for this? even I am facing
the same problem. I am new to Struts, so need some detailed example.


Thanks in advance,


===

jdt.me.uk wrote:
> 
> 
> Hi Radu. Many thanks for your reply, and sorry for not responding sooner
> as I've only just got around to looking at your link.
> 
> It definitely helped and I've got it working now. It's slightly different
> and doesn't rely on Preparable:
> 
> class Question
> {
> long id;
> String name;
> }
> 
> public class ViewQuestionsAction
> {
> // NOTE - getters required for all these properties
> List questions;
> List answersList;  
> Map answersMap;
> }
> 
> jsp:
> 
> 
>   
> 
>  list="#answersList" />
> 
> 
> public class SaveAnswersAction
> {
> // NOTE - getter AND setter required for this map
> private Map answersMap;
> }
> 
> In the ViewQuestionsAction (which sources the JSP):
> 1) loads the questions from the DB;
> 2) populates all the possible answers into the answersList
> 3) populates the map with the current answers, keyed by question id
> 
> When the page loads, the current answer is selected in the radio (due to
> value selecting the answer from the answersMap), and the radios are unique
> by question because the name is unique by question (due to the map keyed
> by question). 
> 
> When you click save, the SaveAnswersAction.answersMap map is populated
> with the selected answers, keyed by the question's id (no prepareable
> method needed). You can then do all the validation you need and update the
> DB as appropriate.
> 
> I believe this is a really nice solution as loading entities from the DB
> in a prepare() method seems wrong to me. I'd be interested to hear what
> other people think. 
> 
> Many thanks
> James
> 
> 
> 
> Rubbinio wrote:
>> 
>> You need to use Map backed properties if you want to get this to work.
>> 
>> Take a look at this example and you should be able to adapt it.
>> 
>> http://www.vitarara.org/cms/struts_2_cookbook/updating_a_list_of_domain_entities
>> 
>> Basically your properties are a map with id and Question objects and then
>> struts can repopulate your answers in the correct question object in the
>> map. It works very nice. I used it for a page that had a random number of
>> file uploads.
>> 
>> HTH
>> Radu
>> 
>> -Original Message-
>> From: Jon Pearson [mailto:jon.pear...@sixnet.com]
>> Sent: May 4, 2009 8:18 AM
>> To: Struts Users Mailing List
>> Subject: RE: Radio button grouping in Struts 2
>> 
>>> Hi all,
>>>
>>> I have a page which iterates over a collection of questions,
>>> with each question having a number of radio buttons which can
>>> be used to select the answer to that question. For example:
>>>
>>> Question 1:   Unanswered O  Yes O  No O
>>> Question 2:   Unanswered O  Yes O  No O
>>> etc..
>>>
>>> If the question has already been answered previously when the
>>> pages loads then the appropriate Yes/No is selected;
>>> otherwise Unanswered is selected.
>>> I've got this working fine using the following:
>>>
>>> class Question {
>>>   long id;
>>>   String name;
>>>   String answer;
>>> }
>>>
>>> class ViewQuestionsAction {
>>>   List questions;
>>>   Map answersMap; // key == value at the
>>> moment because didn't seem to work with int keys
>>>
>>>  >> value="questions">
>>>   
>>>   >> list="#answersMap"/> 
>>>
>>> I need the name=%{id} bit so that I can group the radio
>>> buttons per question. And this is the problem, because then I
>>> can't find a way for when you submit the form to receive an
>>> array of the selected buttons into the target action. The
>>> above works on page load (grouped nicely), but on submit I
>>> get all kinds of OGNL errors complaining about long id
>>> invalid expressions (understandable I guess). But when I
>>> choose a sensible name, for example:
>>>
>>>   
>>>
>>> I get an array of selected buttons in the target action's
>>> responses property on submit but the radio grouping isn't
>>> working - you can only select on radio button from the whole
>>> page because they all sha

RE: Radio button grouping in Struts 2

2009-05-11 Thread jdt.me.uk


Hi Radu. Many thanks for your reply, and sorry for not responding sooner as
I've only just got around to looking at your link.

It definitely helped and I've got it working now. It's slightly different
and doesn't rely on Preparable:

class Question
{
long id;
String name;
}

public class ViewQuestionsAction
{
// NOTE - getters required for all these properties
List questions;
List answersList;  
Map answersMap;
}

jsp:


  




public class SaveAnswersAction
{
// NOTE - getter AND setter required for this map
private Map answersMap;
}

In the ViewQuestionsAction (which sources the JSP):
1) loads the questions from the DB;
2) populates all the possible answers into the answersList
3) populates the map with the current answers, keyed by question id

When the page loads, the current answer is selected in the radio (due to
value selecting the answer from the answersMap), and the radios are unique
by question because the name is unique by question (due to the map keyed by
question). 

When you click save, the SaveAnswersAction.answersMap map is populated with
the selected answers, keyed by the question's id (no prepareable method
needed). You can then do all the validation you need and update the DB as
appropriate.

I believe this is a really nice solution as loading entities from the DB in
a prepare() method seems wrong to me. I'd be interested to hear what other
people think. 

Many thanks
James



Rubbinio wrote:
> 
> You need to use Map backed properties if you want to get this to work.
> 
> Take a look at this example and you should be able to adapt it.
> 
> http://www.vitarara.org/cms/struts_2_cookbook/updating_a_list_of_domain_entities
> 
> Basically your properties are a map with id and Question objects and then
> struts can repopulate your answers in the correct question object in the
> map. It works very nice. I used it for a page that had a random number of
> file uploads.
> 
> HTH
> Radu
> 
> -Original Message-
> From: Jon Pearson [mailto:jon.pear...@sixnet.com]
> Sent: May 4, 2009 8:18 AM
> To: Struts Users Mailing List
> Subject: RE: Radio button grouping in Struts 2
> 
>> Hi all,
>>
>> I have a page which iterates over a collection of questions,
>> with each question having a number of radio buttons which can
>> be used to select the answer to that question. For example:
>>
>> Question 1:   Unanswered O  Yes O  No O
>> Question 2:   Unanswered O  Yes O  No O
>> etc..
>>
>> If the question has already been answered previously when the
>> pages loads then the appropriate Yes/No is selected;
>> otherwise Unanswered is selected.
>> I've got this working fine using the following:
>>
>> class Question {
>>   long id;
>>   String name;
>>   String answer;
>> }
>>
>> class ViewQuestionsAction {
>>   List questions;
>>   Map answersMap; // key == value at the
>> moment because didn't seem to work with int keys
>>
>>  > value="questions">
>>   
>>   > list="#answersMap"/> 
>>
>> I need the name=%{id} bit so that I can group the radio
>> buttons per question. And this is the problem, because then I
>> can't find a way for when you submit the form to receive an
>> array of the selected buttons into the target action. The
>> above works on page load (grouped nicely), but on submit I
>> get all kinds of OGNL errors complaining about long id
>> invalid expressions (understandable I guess). But when I
>> choose a sensible name, for example:
>>
>>   
>>
>> I get an array of selected buttons in the target action's
>> responses property on submit but the radio grouping isn't
>> working - you can only select on radio button from the whole
>> page because they all share the same name element in the
>> HTML. I then tried:
>>
>>   > list="#answersMap"/>
>>
>> To try and force struts to set the responses property, but it
>> still tries to set the property from the name. Which makes me
>> think: if struts always uses the name to set the property,
>> and the browser always groups the radio buttons based on the
>> same name, is what I'm trying to do even possible?!?!
>>
>> Any help gratefully received :)
>>
>> Many thanks
>> James
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Radio-button-grouping-in-Struts-2-tp2336
>> 5502p23365502.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> --

RE: Radio button grouping in Struts 2

2009-05-04 Thread Radu Solomon
You need to use Map backed properties if you want to get this to work.

Take a look at this example and you should be able to adapt it.

http://www.vitarara.org/cms/struts_2_cookbook/updating_a_list_of_domain_entities

Basically your properties are a map with id and Question objects and then 
struts can repopulate your answers in the correct question object in the map. 
It works very nice. I used it for a page that had a random number of file 
uploads.

HTH
Radu

-Original Message-
From: Jon Pearson [mailto:jon.pear...@sixnet.com]
Sent: May 4, 2009 8:18 AM
To: Struts Users Mailing List
Subject: RE: Radio button grouping in Struts 2

> Hi all,
>
> I have a page which iterates over a collection of questions,
> with each question having a number of radio buttons which can
> be used to select the answer to that question. For example:
>
> Question 1:   Unanswered O  Yes O  No O
> Question 2:   Unanswered O  Yes O  No O
> etc..
>
> If the question has already been answered previously when the
> pages loads then the appropriate Yes/No is selected;
> otherwise Unanswered is selected.
> I've got this working fine using the following:
>
> class Question {
>   long id;
>   String name;
>   String answer;
> }
>
> class ViewQuestionsAction {
>   List questions;
>   Map answersMap; // key == value at the
> moment because didn't seem to work with int keys
>
>   value="questions">
>   
>list="#answersMap"/> 
>
> I need the name=%{id} bit so that I can group the radio
> buttons per question. And this is the problem, because then I
> can't find a way for when you submit the form to receive an
> array of the selected buttons into the target action. The
> above works on page load (grouped nicely), but on submit I
> get all kinds of OGNL errors complaining about long id
> invalid expressions (understandable I guess). But when I
> choose a sensible name, for example:
>
>   
>
> I get an array of selected buttons in the target action's
> responses property on submit but the radio grouping isn't
> working - you can only select on radio button from the whole
> page because they all share the same name element in the
> HTML. I then tried:
>
>list="#answersMap"/>
>
> To try and force struts to set the responses property, but it
> still tries to set the property from the name. Which makes me
> think: if struts always uses the name to set the property,
> and the browser always groups the radio buttons based on the
> same name, is what I'm trying to do even possible?!?!
>
> Any help gratefully received :)
>
> Many thanks
> James
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Radio-button-grouping-in-Struts-2-tp2336
> 5502p23365502.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
>

You could, instead of relying on Struts2 to automatically call the
proper set* routines on submit, implement Preparable and manually parse
the results in the prepare() function, which is called BEFORE any set*
functions.

~Jonathan

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


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



RE: Radio button grouping in Struts 2

2009-05-04 Thread Jon Pearson
> Hi all,
> 
> I have a page which iterates over a collection of questions, 
> with each question having a number of radio buttons which can 
> be used to select the answer to that question. For example:
> 
> Question 1:   Unanswered O  Yes O  No O
> Question 2:   Unanswered O  Yes O  No O
> etc..
> 
> If the question has already been answered previously when the 
> pages loads then the appropriate Yes/No is selected; 
> otherwise Unanswered is selected.
> I've got this working fine using the following:
> 
> class Question {
>   long id;
>   String name;
>   String answer;
> }
> 
> class ViewQuestionsAction {
>   List questions;
>   Map answersMap; // key == value at the 
> moment because didn't seem to work with int keys
> 
>   value="questions">
>   
>list="#answersMap"/>  
> 
> I need the name=%{id} bit so that I can group the radio 
> buttons per question. And this is the problem, because then I 
> can't find a way for when you submit the form to receive an 
> array of the selected buttons into the target action. The 
> above works on page load (grouped nicely), but on submit I 
> get all kinds of OGNL errors complaining about long id 
> invalid expressions (understandable I guess). But when I 
> choose a sensible name, for example:
> 
>   
> 
> I get an array of selected buttons in the target action's 
> responses property on submit but the radio grouping isn't 
> working - you can only select on radio button from the whole 
> page because they all share the same name element in the 
> HTML. I then tried:
> 
>list="#answersMap"/>
> 
> To try and force struts to set the responses property, but it 
> still tries to set the property from the name. Which makes me 
> think: if struts always uses the name to set the property, 
> and the browser always groups the radio buttons based on the 
> same name, is what I'm trying to do even possible?!?!
> 
> Any help gratefully received :)
> 
> Many thanks
> James
> 
> 
> 
> 
> --
> View this message in context: 
> http://www.nabble.com/Radio-button-grouping-in-Struts-2-tp2336
> 5502p23365502.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
> 

You could, instead of relying on Struts2 to automatically call the
proper set* routines on submit, implement Preparable and manually parse
the results in the prepare() function, which is called BEFORE any set*
functions.

~Jonathan

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



Radio button grouping in Struts 2

2009-05-04 Thread jdt.me.uk


Hi all,

I have a page which iterates over a collection of questions, with each
question having a number of radio buttons which can be used to select the
answer to that question. For example:

Question 1:   Unanswered O  Yes O  No O
Question 2:   Unanswered O  Yes O  No O
etc..

If the question has already been answered previously when the pages loads
then the appropriate Yes/No is selected; otherwise Unanswered is selected.
I've got this working fine using the following:

class Question {
  long id;
  String name;
  String answer;
}

class ViewQuestionsAction {
  List questions;
  Map answersMap; // key == value at the moment because
didn't seem to work with int keys


  
  
  
 

I need the name=%{id} bit so that I can group the radio buttons per
question. And this is the problem, because then I can't find a way for when
you submit the form to receive an array of the selected buttons into the
target action. The above works on page load (grouped nicely), but on submit
I get all kinds of OGNL errors complaining about long id invalid expressions
(understandable I guess). But when I choose a sensible name, for example:

  

I get an array of selected buttons in the target action's responses property
on submit but the radio grouping isn't working - you can only select on
radio button from the whole page because they all share the same name
element in the HTML. I then tried:

  

To try and force struts to set the responses property, but it still tries to
set the property from the name. Which makes me think: if struts always uses
the name to set the property, and the browser always groups the radio
buttons based on the same name, is what I'm trying to do even possible?!?!

Any help gratefully received :)

Many thanks
James




-- 
View this message in context: 
http://www.nabble.com/Radio-button-grouping-in-Struts-2-tp23365502p23365502.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



Radio button

2009-01-27 Thread elyes sallem
Hello,
i display a liste of row that i get back from a database
among the attribute, there one that i wanna display in a radio button
if it is checked , i wanna save one value "PERM", else, i.e unchecked, an
other value "revers"


-- other attributes

   
in this case , if i check it one time, i can't uncheck it after

any one has an idea how develop this?

Regards
Elyes.


Radio button default checked with Indexed properties

2008-11-14 Thread danipruebas
Hi, 

How can I get a radio button checked by default using indexed properties?

I read in forums to do it in the reset method of the ActionForm, but dont know 
exactly how to do it...
In my jsp I render X radio buttons,  where X is the number of questions saved 
in the request Bean "choices" in My action class, I dont render them as 
separated radio buttons, here the code:


   
 --> (X radio buttons)


In the action form I only have get and set methods for variable control:
getControl(), setControl()

Everything workd fine, but need to get the radio checked by default to avoid a 
java error/exception if the user clicks the form
Which code or what should I do?

Thanks in advance guys ;)


help with radio button array

2008-08-06 Thread cpanon
Hello
I am trying to construct a model that has multiple radio buttons per object but 
keep them distinct, therefore they need a different name.  I almost have it by 
creating a array of objects and using nested iterate, with the code below.  
However, of course it does not increment the index on the second and successive 
iterations.  Is this possible?  I have tried all permutations of attributes and 
all I want is it to automatically increment, radioOptions[n] for each record.  
Any help appreciated.

this struts    

   
   

    
    

    

generates this for all records
 

    
    




Struts2 tags radio button default select

2008-08-04 Thread dynamicd

Hey
I am trying to create a radio button and I want one of the values selected
by default,



I thought I could use the value  to select by default. However Its not
working.
Any help is appreciated.

-- 
View this message in context: 
http://www.nabble.com/Struts2-tags-radio-button-default-select-tp18817609p18817609.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Ajax based implementation for Radio Button in Struts 2.0

2008-07-08 Thread Jeromy Evans

AjaySrini wrote:

Hi,

Currently i'm developing a web application which consists of 4 radio buttons
using Struts 2.0 written in div tag. Based on the selection of the radio
buttons i need to display the other struts tags such as
, , , etc...  using ajax
implementation.

Looking forward to ur reply...

Thanks,
Srini.
  


Simple solution (no ajax):
 include the s:optiontransferselect etc in hidden divs in the page.  
use javascript to show/hide the divs on radio button events.


Ajax solution:
Attach an event listener to the radio button (eg. with the onchange ).
Have the listener publish a topic. 
Struts2 will make the ajax request and insert the response into your 
target div.

Your response contains the s:optiontransferselect etc tags.

Topics are discussed here: 
http://struts.apache.org/2.0.11/docs/ajax-tags.html


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



Ajax based implementation for Radio Button in Struts 2.0

2008-07-08 Thread AjaySrini

Hi,

Currently i'm developing a web application which consists of 4 radio buttons
using Struts 2.0 written in div tag. Based on the selection of the radio
buttons i need to display the other struts tags such as
, , , etc...  using ajax
implementation.

Looking forward to ur reply...

Thanks,
Srini.
-- 
View this message in context: 
http://www.nabble.com/Ajax-based-implementation-for-Radio-Button-in-Struts-2.0-tp18338979p18338979.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Radio button in Iterator

2008-06-11 Thread ashley_in

I want to display the information in following format:

user name   add to group  address
jack  O   blah blah
jimO   some address 
-- 
View this message in context: 
http://www.nabble.com/Radio-button-in-Iterator-tp17776089p1138.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Radio button in Iterator

2008-06-11 Thread ashley_in

My entries in the iterator are value objects and I need to display all
information in my value object with radio on each row of table on my html
page.

-- 
View this message in context: 
http://www.nabble.com/Radio-button-in-Iterator-tp17776089p17776917.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Radio button in Iterator

2008-06-11 Thread Jim Kiley
You don't need to use the  tag to accomplish this; you can use
the  tag.  Just put the list of options in the "list" attribute of
 (http://cwiki.apache.org/WW/radio.html has more details).

If you don't want the label displayed against the radio button, consider
changing the theme from "simple" to "xhtml."  If you don't like the way that
one works, it is remarkably easy to customize tags for your own use.  See
http://cwiki.apache.org/WW/extending-themes.html for details on that.

jk

On Wed, Jun 11, 2008 at 8:13 AM, ashley_in <[EMAIL PROTECTED]> wrote:

>
> I am newbie and need to display radio button for per entry in the iterator.
> Also, I need one of the option selected based on the attribute value in the
> entry of the iterator and I don't want the label displayed against radio
> button. How can I accomplish this using Struts2 tags? Please help
> --
> View this message in context:
> http://www.nabble.com/Radio-button-in-Iterator-tp17776089p17776089.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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


Radio button in Iterator

2008-06-11 Thread ashley_in

I am newbie and need to display radio button for per entry in the iterator.
Also, I need one of the option selected based on the attribute value in the
entry of the iterator and I don't want the label displayed against radio
button. How can I accomplish this using Struts2 tags? Please help
-- 
View this message in context: 
http://www.nabble.com/Radio-button-in-Iterator-tp17776089p17776089.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Radio button with two boolean choices

2008-02-28 Thread Paranoid_Fabio

ok.No matter. Thank you


Paranoid_Fabio wrote:
> 
> Hello. I know it's really simple but I cannot make it works.
> What I want to do is to put a radio button with two options, in a form.
> The attribute that will be set by selecting one of the two options is a
> boolean. That's it, simpy a true/false choice.
> 1) Is it possible to declare a static list directly in the JSP without the
> callback to the action to get a Map with such boolean values?
> 
> 2)If it is not possible, how can I do that. I tried to put a
> Map called options in my Action 
> and put that in the jsp:
> 
>  name="c_sub"  list="options"> 
> 
> where c_sub is a the boolean variable I want to set by choosing an option.
> It does not work. 
> In the log I get:
> 
> tag 'radio', field 'list', id 'subChoice', name 'c_sub': The requested
> list key 'options' could not be resolved as a
> collection/array/map/enumeration/iterator type. Example: people or
> people.{name} - [unknown location]
> 
> Please help. Thano you very much.
> 

-- 
View this message in context: 
http://www.nabble.com/Radio-button-with-two-boolean-choices-tp15741338p15742181.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Radio button with two boolean choices

2008-02-28 Thread Dave Newton
--- Paranoid_Fabio <[EMAIL PROTECTED]> wrote:
> Now it's ok. Only a question... your advice works but the jsp editor says
> me: Syntax Error in EL. Do you know why?

Probably because the "#" character is used by other ELs and most JSP editors
don't parse OGNL as its own EL, let alone its anonymous list creation syntax.
Most likely it's attempting to parse it as JSF or UEL.

Dave


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



Re: Radio button with two boolean choices

2008-02-28 Thread Paranoid_Fabio

Thank you very much. It works now. I tried it before, but instead of what you
suggested me I was trying with:

and it didn't work.

Now it's ok. Only a question... your advice works but the jsp editor says
me: Syntax Error in EL. Do you know why?



(the part in Bold is what the editor highlight as syntax error...)

Thank you


Paranoid_Fabio wrote:
> 
> Hello. I know it's really simple but I cannot make it works.
> What I want to do is to put a radio button with two options, in a form.
> The attribute that will be set by selecting one of the two options is a
> boolean. That's it, simpy a true/false choice.
> 1) Is it possible to declare a static list directly in the JSP without the
> callback to the action to get a Map with such boolean values?
> 
> 2)If it is not possible, how can I do that. I tried to put a
> Map called options in my Action 
> and put that in the jsp:
> 
>  name="c_sub"  list="options"> 
> 
> where c_sub is a the boolean variable I want to set by choosing an option.
> It does not work. 
> In the log I get:
> 
> tag 'radio', field 'list', id 'subChoice', name 'c_sub': The requested
> list key 'options' could not be resolved as a
> collection/array/map/enumeration/iterator type. Example: people or
> people.{name} - [unknown location]
> 
> Please help. Thano you very much.
> 

-- 
View this message in context: 
http://www.nabble.com/Radio-button-with-two-boolean-choices-tp15741338p15741802.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Radio button with two boolean choices

2008-02-28 Thread Randy Burgess
Yes it is. Have you tried something like this:
?

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Paranoid_Fabio <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List 
> Date: Thu, 28 Feb 2008 09:17:45 -0800 (PST)
> To: 
> Subject: Radio button with two boolean choices
> 
> 
> Hello. I know it's really simple but I cannot make it works.
> What I want to do is to put a radio button with two options, in a form. The
> attribute that will be set by selecting one of the two options is a boolean.
> That's it, simpy a true/false choice.
> 1) Is it possible to declare a static list directly in the JSP without the
> callback to the action to get a Map with such boolean values?
> 
> 2)If it is not possible, how can I do that. I tried to put a
> Map called options in my Action
> and put that in the jsp:
> 
>  name="c_sub"  list="options">
> 
> where c_sub is a the boolean variable I want to set by choosing an option.
> It does not work.
> In the log I get:
> 
> tag 'radio', field 'list', id 'subChoice', name 'c_sub': The requested list
> key 'options' could not be resolved as a
> collection/array/map/enumeration/iterator type. Example: people or
> people.{name} - [unknown location]
> 
> Please help. Thano you very much.
> -- 
> View this message in context:
> http://www.nabble.com/Radio-button-with-two-boolean-choices-tp15741338p1574133
> 8.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.

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



Radio button with two boolean choices

2008-02-28 Thread Paranoid_Fabio

Hello. I know it's really simple but I cannot make it works.
What I want to do is to put a radio button with two options, in a form. The
attribute that will be set by selecting one of the two options is a boolean.
That's it, simpy a true/false choice.
1) Is it possible to declare a static list directly in the JSP without the
callback to the action to get a Map with such boolean values?

2)If it is not possible, how can I do that. I tried to put a
Map called options in my Action 
and put that in the jsp:

 

where c_sub is a the boolean variable I want to set by choosing an option.
It does not work. 
In the log I get:

tag 'radio', field 'list', id 'subChoice', name 'c_sub': The requested list
key 'options' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]

Please help. Thano you very much.
-- 
View this message in context: 
http://www.nabble.com/Radio-button-with-two-boolean-choices-tp15741338p15741338.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Fwd: How to preselect a radio button in Struts 2

2007-11-20 Thread Pankaj Gupta
Hey,
I tried it  out
  
     
   

But it didn't worked.
I tried
 name="users(${u_rowNum})
.access_lvl_types_id"/>
But this was also of not much  help. Sic eit didn't selected a  radio button
by default

I want by default a value of radio button to be pre selected when a jsp page
comes up.
If somebody has a solution to it.

Regards,
Pankaj










On Nov 15, 2000 8:40 PM, <[EMAIL PROTECTED] > wrote:

> the classic example sets a Map on VS referencable via var
> 
> and then obtains its list of genders by getGenders() from GenderMap
> and sets the default selection will be determined (in this case) by the
> getMale()
> 
>
> so in your case
> 
> where the name is the name of the element and
> the value getList is the the iterable source to populate the list from
> and sets the default selection will be determined (in this case) by the
> getId()
> 
>
> http://struts.apache.org/2.0.11/docs/radio.html
> M--
> - Original Message -
> Wrom: IPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQ
> To: "Struts Users Mailing List" 
> Sent: Thursday, November 15, 2007 9:01 AM
> Subject: Re: How to preselect a radio button in Struts 2
>
>
> > Here is a working example.
> >
> >  > name="users(${u_rowNum}).access_lvl_types_id"/>
> >
> > The value coming from the bean is always 1 or 2.
> >
> > HTH
> >
> > Regards,
> > Randy Burgess
> > Web Applications Developer
> > Nuvox Communications
> >
> >
> >
> > > Wrom: HYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTT
> > > Reply-To: Struts Users Mailing List < user@struts.apache.org>
> > > Date: Thu, 15 Nov 2007 11:53:53 +0530
> > > To: Struts Users Mailing List 
> > > Subject: Re: How to preselect a radio button in Struts 2
> > >
> > > Hi,
> > > I tried the same. But it didn't worked
> > >  > > list="{'Yes','No'}" value="No" required="true" />
> > > Regards,
> > > Pankaj
> > >
> > >
> > > On 11/14/07, Randy Burgess < [EMAIL PROTECTED]> wrote:
> > >>
> > >> Use the value attribute and the radio button with that value will be
> > >> selected.
> > >>
> > >> 
> > >>
> > >> Regards,
> > >> Randy Burgess
> > >> Web Applications Developer
> > >> Nuvox Communications
> > >>
> > >>
> > >>
> > >>> Wrom: ZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRT
> > >>> Reply-To: Struts Users Mailing List < user@struts.apache.org>
> > >>> Date: Wed, 14 Nov 2007 10:42:20 +0530
> > >>> To: 
> > >>> Subject: How to preselect a radio button in Struts 2
> > >>>
> > >>> Hi,
> > >>> I am working on Struts 2 and I want to preselect  a radio button.
> > >>> If somebody can let me know how to go about it.
> > >>> Regards,
> > >>> Pankaj
> > >>
> > >>
> > >>
> > >> This email and any attachments ("Message") may contain legally
> privileged
> > >> and/or confidential information.  If you are not the addressee, or if
>
> this
> > >> Message has been addressed to you in error, you are not authorized to
> read,
> > >> copy, or distribute it, and we ask that you please delete it
> (including
> all
> > >> copies) and notify the sender by return email.  Delivery of this
> Message to
> > >> any person other than the intended recipient(s) shall not be deemed a
> waiver
> > >> of confidentiality and/or a privilege.
> > >>
> > >> -
>
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > >>
> > >>
> >
> >
> >
> > This email and any attachments ("Message") may contain legally
> privileged
> and/or confidential information.  If you are not the addressee, or if this
>
> Message has been addressed to you in error, you are not authorized to
> read,
> copy, or distribute it, and we ask that you please delete it (including
> all
> copies) and notify the sender by return email.  Delivery of this Message
> to
> any person other than the intended recipient(s) shall not be deemed a
> waiver
> of confidentiality and/or a privilege.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>


Re: How to preselect a radio button in Struts 2

2007-11-20 Thread Pankaj Gupta
Hey,
I tried it  out
  
     
   

But it didn't worked.
I tried
 name="users(${u_rowNum}).access_lvl_types_id"/>
But this was also of not much  help. Sic eit didn't selected a  radio button
by default

I want by default a value of radio button to be pre selected when a jsp page
comes up.
If somebody has a working solution to it.

Regards,
Pankaj









On Nov 15, 2000 8:40 PM, <[EMAIL PROTECTED]> wrote:

> the classic example sets a Map on VS referencable via var
> 
> and then obtains its list of genders by getGenders() from GenderMap
> and sets the default selection will be determined (in this case) by the
> getMale()
> 
>
> so in your case
> 
> where the name is the name of the element and
> the value getList is the the iterable source to populate the list from
> and sets the default selection will be determined (in this case) by the
> getId()
> 
>
> http://struts.apache.org/2.0.11/docs/radio.html
> M--
> - Original Message -
> Wrom: IPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQ
> To: "Struts Users Mailing List" 
> Sent: Thursday, November 15, 2007 9:01 AM
> Subject: Re: How to preselect a radio button in Struts 2
>
>
> > Here is a working example.
> >
> >  > name="users(${u_rowNum}).access_lvl_types_id"/>
> >
> > The value coming from the bean is always 1 or 2.
> >
> > HTH
> >
> > Regards,
> > Randy Burgess
> > Web Applications Developer
> > Nuvox Communications
> >
> >
> >
> > > Wrom: HYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTT
> > > Reply-To: Struts Users Mailing List 
> > > Date: Thu, 15 Nov 2007 11:53:53 +0530
> > > To: Struts Users Mailing List 
> > > Subject: Re: How to preselect a radio button in Struts 2
> > >
> > > Hi,
> > > I tried the same. But it didn't worked
> > >  > > list="{'Yes','No'}" value="No" required="true" />
> > > Regards,
> > > Pankaj
> > >
> > >
> > > On 11/14/07, Randy Burgess <[EMAIL PROTECTED]> wrote:
> > >>
> > >> Use the value attribute and the radio button with that value will be
> > >> selected.
> > >>
> > >> 
> > >>
> > >> Regards,
> > >> Randy Burgess
> > >> Web Applications Developer
> > >> Nuvox Communications
> > >>
> > >>
> > >>
> > >>> Wrom: ZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRT
> > >>> Reply-To: Struts Users Mailing List 
> > >>> Date: Wed, 14 Nov 2007 10:42:20 +0530
> > >>> To: 
> > >>> Subject: How to preselect a radio button in Struts 2
> > >>>
> > >>> Hi,
> > >>> I am working on Struts 2 and I want to preselect  a radio button.
> > >>> If somebody can let me know how to go about it.
> > >>> Regards,
> > >>> Pankaj
> > >>
> > >>
> > >>
> > >> This email and any attachments ("Message") may contain legally
> privileged
> > >> and/or confidential information.  If you are not the addressee, or if
> this
> > >> Message has been addressed to you in error, you are not authorized to
> read,
> > >> copy, or distribute it, and we ask that you please delete it
> (including
> all
> > >> copies) and notify the sender by return email.  Delivery of this
> Message to
> > >> any person other than the intended recipient(s) shall not be deemed a
> waiver
> > >> of confidentiality and/or a privilege.
> > >>
> > >> -
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > >>
> > >>
> >
> >
> >
> > This email and any attachments ("Message") may contain legally
> privileged
> and/or confidential information.  If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to
> read,
> copy, or distribute it, and we ask that you please delete it (including
> all
> copies) and notify the sender by return email.  Delivery of this Message
> to
> any person other than the intended recipient(s) shall not be deemed a
> waiver
> of confidentiality and/or a privilege.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>


Re: How to preselect a radio button in Struts 2

2007-11-15 Thread Randy Burgess
Here is a working example.



The value coming from the bean is always 1 or 2.

HTH

Regards,
Randy Burgess
Web Applications Developer
Nuvox Communications



> From: Pankaj Gupta <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List 
> Date: Thu, 15 Nov 2007 11:53:53 +0530
> To: Struts Users Mailing List 
> Subject: Re: How to preselect a radio button in Struts 2
> 
> Hi,
> I tried the same. But it didn't worked
>  list="{'Yes','No'}" value="No" required="true" />
> Regards,
> Pankaj
> 
> 
> On 11/14/07, Randy Burgess <[EMAIL PROTECTED]> wrote:
>> 
>> Use the value attribute and the radio button with that value will be
>> selected.
>> 
>> 
>> 
>> Regards,
>> Randy Burgess
>> Web Applications Developer
>> Nuvox Communications
>> 
>> 
>> 
>>> From: Pankaj Gupta <[EMAIL PROTECTED]>
>>> Reply-To: Struts Users Mailing List 
>>> Date: Wed, 14 Nov 2007 10:42:20 +0530
>>> To: 
>>> Subject: How to preselect a radio button in Struts 2
>>> 
>>> Hi,
>>> I am working on Struts 2 and I want to preselect  a radio button.
>>> If somebody can let me know how to go about it.
>>> Regards,
>>> Pankaj
>> 
>> 
>> 
>> This email and any attachments ("Message") may contain legally privileged
>> and/or confidential information.  If you are not the addressee, or if this
>> Message has been addressed to you in error, you are not authorized to read,
>> copy, or distribute it, and we ask that you please delete it (including all
>> copies) and notify the sender by return email.  Delivery of this Message to
>> any person other than the intended recipient(s) shall not be deemed a waiver
>> of confidentiality and/or a privilege.
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 



This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.

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



Re: How to preselect a radio button in Struts 2

2007-11-14 Thread Pankaj Gupta
Hi,
I tried the same. But it didn't worked

Regards,
Pankaj


On 11/14/07, Randy Burgess <[EMAIL PROTECTED]> wrote:
>
> Use the value attribute and the radio button with that value will be
> selected.
>
> 
>
> Regards,
> Randy Burgess
> Web Applications Developer
> Nuvox Communications
>
>
>
> > From: Pankaj Gupta <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List 
> > Date: Wed, 14 Nov 2007 10:42:20 +0530
> > To: 
> > Subject: How to preselect a radio button in Struts 2
> >
> > Hi,
> > I am working on Struts 2 and I want to preselect  a radio button.
> > If somebody can let me know how to go about it.
> > Regards,
> > Pankaj
>
>
>
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information.  If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email.  Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: How to preselect a radio button in Struts 2

2007-11-14 Thread Martin Gainty
XWork expression too-
http://struts.apache.org/2.0.11/docs/radio.html

M--
- Original Message -
From: "Randy Burgess" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Wednesday, November 14, 2007 9:05 AM
Subject: Re: How to preselect a radio button in Struts 2


> Use the value attribute and the radio button with that value will be
> selected.
>
> 
>
> Regards,
> Randy Burgess
> Web Applications Developer
> Nuvox Communications
>
>
>
> > From: Pankaj Gupta <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List 
> > Date: Wed, 14 Nov 2007 10:42:20 +0530
> > To: 
> > Subject: How to preselect a radio button in Struts 2
> >
> > Hi,
> > I am working on Struts 2 and I want to preselect  a radio button.
> > If somebody can let me know how to go about it.
> > Regards,
> > Pankaj
>
>
>
> This email and any attachments ("Message") may contain legally privileged
and/or confidential information.  If you are not the addressee, or if this
Message has been addressed to you in error, you are not authorized to read,
copy, or distribute it, and we ask that you please delete it (including all
copies) and notify the sender by return email.  Delivery of this Message to
any person other than the intended recipient(s) shall not be deemed a waiver
of confidentiality and/or a privilege.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



Re: How to preselect a radio button in Struts 2

2007-11-14 Thread Randy Burgess
Use the value attribute and the radio button with that value will be
selected.



Regards,
Randy Burgess
Web Applications Developer
Nuvox Communications



> From: Pankaj Gupta <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List 
> Date: Wed, 14 Nov 2007 10:42:20 +0530
> To: 
> Subject: How to preselect a radio button in Struts 2
> 
> Hi,
> I am working on Struts 2 and I want to preselect  a radio button.
> If somebody can let me know how to go about it.
> Regards,
> Pankaj



This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.

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



How to preselect a radio button in Struts 2

2007-11-13 Thread Pankaj Gupta
Hi,
I am working on Struts 2 and I want to preselect  a radio button.
If somebody can let me know how to go about it.
Regards,
Pankaj


Radio Button Validation - Struts 2

2007-10-17 Thread Cory D. Wiles
How does one use server-side validation (requiredstring) for radio buttons?

Thanks,
Cory


RE: Client side validation for radio button

2007-10-12 Thread Mitch Claborn
In this case it is the xhtml theme.  (Isn't specified in the mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 11, 2000 5:52 PM
To: Struts Users Mailing List
Subject: Re: Client side validation for radio button


in your jsp head tag..

what value have you assigned to theme?

M-
- Original Message -
From: "Mitch Claborn" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" 
Sent: Thursday, October 11, 2007 5:38 PM
Subject: Client side validation for radio button


Using the xhtml theme, client-side validation for radio button is not
working.  I've tried both "required" and "requiredstring" but I suspect that
none will work.  The javascript code (from form-close-validation.ftl) does
this:


function validateForm_Question() {
form = document.getElementById("Question");

if (form.elements['q1']) {
field = form.elements['q1'];
var error = "Please answer q1";
if (field.value == "") {
addError(field, error);
errors = true;
}
}

Which doesn't get the actual value of the selected radio.  I can code a
workaround in form-close-validation.ftl but it seems like this would have
been solved already?




Mitch Claborn
[EMAIL PROTECTED]



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



Re: Client side validation for radio button

2007-10-11 Thread Martin Gainty
in your jsp head tag..

what value have you assigned to theme?

M-
- Original Message -
From: "Mitch Claborn" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" 
Sent: Thursday, October 11, 2007 5:38 PM
Subject: Client side validation for radio button


Using the xhtml theme, client-side validation for radio button is not
working.  I've tried both "required" and "requiredstring" but I suspect that
none will work.  The javascript code (from form-close-validation.ftl) does
this:


function validateForm_Question() {
form = document.getElementById("Question");

if (form.elements['q1']) {
field = form.elements['q1'];
var error = "Please answer q1";
if (field.value == "") {
addError(field, error);
errors = true;
}
}

Which doesn't get the actual value of the selected radio.  I can code a
workaround in form-close-validation.ftl but it seems like this would have
been solved already?




Mitch Claborn
[EMAIL PROTECTED]


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



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



Client side validation for radio button

2007-10-11 Thread Mitch Claborn
Using the xhtml theme, client-side validation for radio button is not
working.  I've tried both "required" and "requiredstring" but I suspect that
none will work.  The javascript code (from form-close-validation.ftl) does
this:


function validateForm_Question() {
form = document.getElementById("Question");

if (form.elements['q1']) {
field = form.elements['q1'];
var error = "Please answer q1";
if (field.value == "") {
addError(field, error);
errors = true;
}
}

Which doesn't get the actual value of the selected radio.  I can code a
workaround in form-close-validation.ftl but it seems like this would have
been solved already?




Mitch Claborn
[EMAIL PROTECTED]


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



RE: Struts 2 Radio button - seperate value/label

2007-08-30 Thread Dean Pullen
Well as usual, although I spent a couple of hours trying to get it work,
as soon as I post to a mailing list I discover the answer
So here is how I got it to work for future reference.

Created an Object like so:

public class RadioModel
{
private int name;
private String answer;

public RadioModel()
{
}

public RadioModel(int name, String answer)
{
this.name = name;
this.answer = answer;
}

public int getName()
{
return name;
}

public void setName(int name)
{
this.name = name;
}

public String getAnswer()
{
return answer;
}

public void setAnswer(String answer)
{
this.answer = answer;
}
}

Created a list of these:
List options = new ArrayList();
(then added the relevant values)

Then used this in the JSP:



Et voila.

-Original Message-
From: Dean Pullen [mailto:[EMAIL PROTECTED] 
Sent: 30 August 2007 16:48
To: user@struts.apache.org
Subject: Struts 2 Radio button - seperate value/label

Hi guys.

 

I can't work out via the Struts 2 documentation how to make a radio
button have a separate value and label from a given Map.

 

I'm trying:



 

Where 'options' is a HashMap

 

What I get out on the JSP is one radio button only, with the following
text as the label:

{1=Yes, 2=No, 3=Maybe}

 

What I want is three radio buttons each with 1,2,3 as their values
respectively, and yes,no,maybe as their labels - retrieved from a Map.

 

How do I do this?

 

Thanks in advance.

 

 



Scanned by MailDefender - managed email security from intY -
www.maildefender.net

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



Struts 2 Radio button - seperate value/label

2007-08-30 Thread Dean Pullen
Hi guys.

 

I can't work out via the Struts 2 documentation how to make a radio
button have a separate value and label from a given Map.

 

I'm trying:



 

Where 'options' is a HashMap

 

What I get out on the JSP is one radio button only, with the following
text as the label:

{1=Yes, 2=No, 3=Maybe}

 

What I want is three radio buttons each with 1,2,3 as their values
respectively, and yes,no,maybe as their labels - retrieved from a Map.

 

How do I do this?

 

Thanks in advance.

 

 



Re: S1-1.3.8 Validation using 'validwhen' for radio button

2007-08-11 Thread Paul Benedict
I do not believe validwhen generates Javascript validation. It is only on
the server-side.

On 8/10/07, Vivek Chauhan <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> I am trying to do a conditional validation using 'validwhen'.
> There is group of two radio buttons (values 'Yes' and 'No') and on
> selecting
> any one of them either a drop down box is displayed or a text box is
> displayed.
>
> I want to validate the text box or drop down box based on which radio
> button
> is selected
>
> I have added the following entry in validation.xml:
> 
> 
> 
> 
> 
>
> 
> 
> 
> test
> 
> ((someStatus != 'Yes') or (*this*
> != null))
> 
> 
> 
> 
>
> The javascript validation is not generated for this case.
>
> Similar questions remain unanswered on this mailing list
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/S1-1.3.8-Validation-using-%27validwhen%27-for-radio-button-tf4248440.html#a12090493
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


S1-1.3.8 Validation using 'validwhen' for radio button

2007-08-10 Thread Vivek Chauhan

Hi,

I am trying to do a conditional validation using 'validwhen'.
There is group of two radio buttons (values 'Yes' and 'No') and on selecting
any one of them either a drop down box is displayed or a text box is
displayed.

I want to validate the text box or drop down box based on which radio button
is selected

I have added the following entry in validation.xml:



 





test

((someStatus != 'Yes') or (*this* != 
null))





The javascript validation is not generated for this case.

Similar questions remain unanswered on this mailing list

Thanks
-- 
View this message in context: 
http://www.nabble.com/S1-1.3.8-Validation-using-%27validwhen%27-for-radio-button-tf4248440.html#a12090493
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Problem with radio button for one default selection

2007-07-25 Thread yitzle

On 7/25/07, Vamsi <[EMAIL PROTECTED]> wrote:

Hi all,

 I have some requirement like this I need to display a group of
radio buttons where one them is defautly checked.

 Struts 2 ui componant display all the radio buttons without any
difficulty but my problem is I am not able to make the default selection.

 is there anything to make one of the radio button deafultly
selected.

 I found strange that for a checkbox there are two componants
like checkbox and checkboxlist
why can't we have something simillar to this for radio button,so that it
will more flexible for users when some has the same kind of requirement.

  if I am missing anything in my learning please refer some
links regarding radio button only to solve the above specified problem.

  thanks for all responses
regards
Vamsi krishna


Which radio is 'checked' is set by the "value". If the value matches
one of the keys, the radio with that key will be checked.

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



Problem with radio button for one default selection

2007-07-25 Thread Vamsi



Hi all,

 I have some requirement like this I need to display a group of
radio buttons where one them is defautly checked.

 Struts 2 ui componant display all the radio buttons without any
difficulty but my problem is I am not able to make the default selection.

 is there anything to make one of the radio button deafultly
selected.

 I found strange that for a checkbox there are two componants
like checkbox and checkboxlist
why can't we have something simillar to this for radio button,so that it
will more flexible for users when some has the same kind of requirement.
  
  if I am missing anything in my learning please refer some
links regarding radio button only to solve the above specified problem.
   
  thanks for all responses 
regards
Vamsi krishna

 




-- 
View this message in context: 
http://www.nabble.com/Problem-with-radio-button-for-one-default-selection-tf4142369.html#a11783193
Sent from the Struts - User mailing list archive at Nabble.com.


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



SV: Radio Button - setting a to 'checked'

2007-07-23 Thread anine.louise.medhus-dale
I figured it out just after posting the message :)

The mistake was that I had put '' around the boolean values. When I removed 
them it worked. I also changed from 0 and 1 to true and false which is what 
 gives as output.

Example: 


Hope this helps you :)

ALM


-Opprinnelig melding-
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne av yitzle
Sendt: 23. juli 2007 17:04
Til: Struts Users Mailing List
Emne: Re: Radio Button - setting a  to 'checked'

On 7/23/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I also experience this problem with the radio button.
> Could you please give me an example of how this is done?
>
> My code:
>
>  value="%{cv.active}" name="cv.active" />
>
>  gives a 'true' output.
>
> If I change from radio to select it works ok, strange...
>
> Thanks in advance for your help :)
>
> ALM

I still did not manage to figure out how to set the radio buttons. I
tried hardcoding the list and value in the JSP with no success.

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


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



Re: Radio Button - setting a to 'checked'

2007-07-23 Thread yitzle

On 7/23/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:

Hi,

I also experience this problem with the radio button.
Could you please give me an example of how this is done?

My code:



 gives a 'true' output.

If I change from radio to select it works ok, strange...

Thanks in advance for your help :)

ALM


I still did not manage to figure out how to set the radio buttons. I
tried hardcoding the list and value in the JSP with no success.

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



SV: Radio Button - setting a to 'checked'

2007-07-23 Thread anine.louise.medhus-dale
Hi,

I also experience this problem with the radio button.
Could you please give me an example of how this is done?

My code:



 gives a 'true' output.

If I change from radio to select it works ok, strange...

Thanks in advance for your help :)

ALM


-Opprinnelig melding-
Fra: Nuwan Chandrasoma [mailto:[EMAIL PROTECTED] 
Sendt: 7. juli 2007 03:25
Til: Struts Users Mailing List
Emne: Re: Radio Button - setting a  to 'checked'

Hi,

Set the property that is associated with the  tag to with the
value 
you want to be checked.

Thanks,

Nuwan


- Original Message - 
From: "yitzle" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Friday, July 06, 2007 4:14 PM
Subject: Radio Button - setting a  to 'checked'


> How to I make a radio button get rendered as checked?
>
> I'm making several radio buttons, one per  and they all
> render unchecked.
> Even when I generate several with one radio tag and a map, I can't
> figure out how to set one to checked.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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


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



Re: Radio Button - setting a to 'checked'

2007-07-06 Thread Nuwan Chandrasoma

Hi,

Set the property that is associated with the  tag to with the value 
you want to be checked.


Thanks,

Nuwan


- Original Message - 
From: "yitzle" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Friday, July 06, 2007 4:14 PM
Subject: Radio Button - setting a  to 'checked'



How to I make a radio button get rendered as checked?

I'm making several radio buttons, one per  and they all
render unchecked.
Even when I generate several with one radio tag and a map, I can't
figure out how to set one to checked.

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




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



Radio Button - setting a to 'checked'

2007-07-06 Thread yitzle

How to I make a radio button get rendered as checked?

I'm making several radio buttons, one per  and they all
render unchecked.
Even when I generate several with one radio tag and a map, I can't
figure out how to set one to checked.

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



RE: Regarding dynamic radio button..

2007-02-20 Thread Vijay Prajapati
Hi Tim,
   Could you please send me your code with nested tag so I can get
something from it.

Thank you,
Vijay Prajapati

-Original Message-
From: Tim Williams [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 20, 2007 8:39 PM
To: Struts Users Mailing List
Subject: Re: Regarding dynamic radio button..

On 2/20/07, Vijay Prajapati <[EMAIL PROTECTED]> wrote:
>
>
>
>
> I am using Struts2.0.1.
>
> I have created groups of 3 dynamic radiobuttons through iterator(Array
List) tag. But I have to give different names to these groups. I am here
giving code which I have been written in my jsp.
>
>
>
> 
>
>  
>
> 
>
> 
>
> 
>
>  
>
> 
>
>
>
> Here "groupname" is collection(ArrayList which store
groupname(String)) in Action class. So can I user name as value of
collection so every radio button would have different name as per
collection value?
>
>
>
> So Help me to assign different names for each radio button group.

I'm doing something similiar using the nested tags.  It provides the
unique naming for you. I explicitly create the radio buttons with the
nested:radio tag though.  I use nested:iterate in the same way you use
s:iterate.  Since you have to pass the list into the radio tags, I
reckon it wouldn't hurt for you to also explicitly list out the
buttons.  Anyway, if you have any flexibility, you may want to take a
look at the nested tags before trying to do it yourself.

--tim

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


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



Re: Regarding dynamic radio button..

2007-02-20 Thread Tim Williams

On 2/20/07, Vijay Prajapati <[EMAIL PROTECTED]> wrote:





I am using Struts2.0.1.

I have created groups of 3 dynamic radiobuttons through iterator(Array List) 
tag. But I have to give different names to these groups. I am here giving code 
which I have been written in my jsp.





 







 





Here "groupname" is collection(ArrayList which store groupname(String)) in 
Action class. So can I user name as value of collection so every radio button would have 
different name as per collection value?



So Help me to assign different names for each radio button group.


I'm doing something similiar using the nested tags.  It provides the
unique naming for you. I explicitly create the radio buttons with the
nested:radio tag though.  I use nested:iterate in the same way you use
s:iterate.  Since you have to pass the list into the radio tags, I
reckon it wouldn't hurt for you to also explicitly list out the
buttons.  Anyway, if you have any flexibility, you may want to take a
look at the nested tags before trying to do it yourself.

--tim

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



Regarding dynamic radio button..

2007-02-20 Thread Vijay Prajapati
I am using Struts2.0.1.
I have created groups of 3 dynamic radiobuttons through iterator(Array
List) tag. But I have to give different names to these groups. I am here
giving code which I have been written in my jsp.
 

 



 

 
Here “groupname” is collection(ArrayList which store groupname(String))
in Action class. So can I user name as value of collection so every
radio button would have different name as per collection value?
 
So Help me to assign different names for each radio button group.
 
With Regards,

| Vijay Prajapati |  
| Sr. Software Engineer |  
| Real Soft (Intl) Pvt. Ltd, Vadodara  | 
| SEI-CMM Level IV & ISO 9001:2000 Company  |  
|  Phone: (0265) 5563097, 5598758, 5598626, 5598630  |  
Cell No: +91 9898149407
 <mailto:[EMAIL PROTECTED] >
[EMAIL PROTECTED] 

 


Re: Struts 1.3.5 - Radio Button validation

2007-01-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Laurie,

Laurie Harper wrote:
> Actually, assuming it's a radio button group that maps to a single
> property, you probably just need the 'required' validation to ensure
> that property has a value. You should only need 'validwhen' if there are
> multiple properties involved, or if you need to express complex
> constraints on a single property.

Sorry, you're right. The OP's question threw me off by saying that he
wanted to ensure that at least one of the choices was picked. I didn't
realize he was talking about radio buttons where you either get /one/
thing or nothing.

If he's got checkboxes (which is what I was thinking, even though he
clearly said radio buttons) or multiple unrelated radio buttons,
validwhen may be necessary. But probably not in this case.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFv+wp9CaO5/Lv0PARAqcrAKCWIwsRrhj/CYjhF291BYGv4NjjIACgpYL8
EdGlL713saF+yNQrt6AyeaE=
=OJQI
-END PGP SIGNATURE-

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



Re: Struts 1.3.5 - Radio Button validation

2007-01-30 Thread Laurie Harper

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pushkar,

[EMAIL PROTECTED] wrote:

Can you please tell me whether I can validate a set of radio buttons so that
atleast one of them is checked, using the struts validation.xml? Is there a
pre-defined validator method (like required) defined for that or will I have
to write a custom validator method?


You want to look into using the "validwhen" validator, which requires
some reading. Check out this page
(http://struts.apache.org/1.3.5/faqs/validator.html) and read the
section titled "Designing Complex Validations with validwhen"

You'll want a field set up with a "validwhen" test like:

((*this* != null) or (otherField != null)) or (anotherField != null) ...


Actually, assuming it's a radion button group that maps to a single 
property, you probably just need the 'required' validation to ensure 
that property has a value. You should only need 'validwhen' if there are 
multiple properties involved, or if you need to express complex 
constraints on a single property.


L.


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



Re: Struts 1.3.5 - Radio Button validation

2007-01-30 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pushkar,

[EMAIL PROTECTED] wrote:
> Can you please tell me whether I can validate a set of radio buttons so that
> atleast one of them is checked, using the struts validation.xml? Is there a
> pre-defined validator method (like required) defined for that or will I have
> to write a custom validator method?

You want to look into using the "validwhen" validator, which requires
some reading. Check out this page
(http://struts.apache.org/1.3.5/faqs/validator.html) and read the
section titled "Designing Complex Validations with validwhen"

You'll want a field set up with a "validwhen" test like:

((*this* != null) or (otherField != null)) or (anotherField != null) ...

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFv4KH9CaO5/Lv0PARAuo3AKCN+yenAN3RTWjjkmt2bkxeQ/A34wCcCOXA
/nMAgdUEnqEbrzw1/Ako6cs=
=ciOF
-END PGP SIGNATURE-

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



Struts 1.3.5 - Radio Button validation

2007-01-30 Thread pushkar . p
Hi all,

Can you please tell me whether I can validate a set of radio buttons so that
atleast one of them is checked, using the struts validation.xml? Is there a
pre-defined validator method (like required) defined for that or will I have
to write a custom validator method?

Thanks.

-Pushkar


Re: Struts Dynamic Radio Button Query

2007-01-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Priya,

Priya Khanna wrote:
> My problem is that both the questions and the number of radio buttons
> needs to be dynamic (based on what is currently in the database). I can
> iterate through the questions and display them in the table but I am
> unsure how to 'marry' up the radio buttons, and then retrieve the data
> from the form when the user submits.
>  Has anyone done anything similar to this?

My company has several years of experience delivering online
questionnaires via web applications (and our most recent version uses
Struts). If you'd like to contact me off-list, I'd be happy to discuss
this with you.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFpPqO9CaO5/Lv0PARAkG6AJwN761BsI3WgxLQEh+9p9rucj3rqACgmOdQ
jBpeUUSvekipdrHyfc3jjj8=
=ewlf
-END PGP SIGNATURE-

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



RE: Struts Dynamic Radio Button Query

2007-01-10 Thread Barun Kumar Yadav
 
Is your problem in retrieving the options from the DB or is it with
displaying it on the JSP.

_barun 


-Original Message-
From: Priya Khanna [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 10, 2007 1:22 PM
To: user@struts.apache.org
Subject: Struts Dynamic Radio Button Query


Hi All,


I am attempting to create a (fairly) simple web app using struts.I need
to create a table of questions with each question having radio
buttons (a range of numeric values) so the user can input and submit
their answers:


 question1o o o o o o o o
 question2o o o o o o o o
 ...
 My problem is that both the questions and the number of radio buttons
needs to be dynamic (based on what is currently in the database). I can
iterate through the questions and display them in the table but I am
unsure how to 'marry' up the radio buttons, and then retrieve the data
from the form when the user submits.
 Has anyone done anything similar to this ? Any example code or
suggestions would be gratefully recieved.




Regds

Priya



 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
solely for the use of the addressee(s). If you are not the intended
recipient, please notify the sender by e-mail and delete the original
message. Further, you are not to copy, disclose, or distribute this
e-mail or its contents to any other person and any such actions are
unlawful. This e-mail may contain viruses. Infosys has taken every
reasonable precaution to minimize this risk, but is not liable for any
damage you may sustain as a result of any virus in this e-mail. You
should carry out your own virus checks before opening the e-mail or
attachment. Infosys reserves the right to monitor and review the content
of all messages sent to or from this e-mail address. Messages sent to or
from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

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



RE: Struts Dynamic Radio Button Query

2007-01-10 Thread Anjishnu Bandyopadhyay
Hi Priya,

 

You can use a  for each Question row. For each question,
you can have another inner  for each answer radio
button.

 





<%-- Question comes here --%>





<%-- Radio comes here
--%>









 

Corrspondingly, you need a Lazy List in the ActionForm for retrieving
the values back.

 

With best regards,

Anjishnu.

 

 

-Original Message-
From: Priya Khanna [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 10, 2007 1:22 PM
To: user@struts.apache.org
Subject: Struts Dynamic Radio Button Query

 

 

Hi All,

 

 

I am attempting to create a (fairly) simple web app using struts.I need

to create a table of questions with each question having radio

buttons (a range of numeric values) so the user can input and submit

their answers:

 

 

 question1o o o o o o o o

 question2o o o o o o o o

 ...

 My problem is that both the questions and the number of radio buttons

needs to be dynamic (based on what is currently in the database). I can

iterate through the questions and display them in the table but I am

unsure how to 'marry' up the radio buttons, and then retrieve the data

from the form when the user submits.

 Has anyone done anything similar to this ? Any example code or

suggestions would be gratefully recieved.

 

 

 

 

Regds

 

Priya

 

 

 

 CAUTION - Disclaimer *

This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
solely for the use of the addressee(s). If you are not the intended
recipient, please notify the sender by e-mail and delete the original
message. Further, you are not to copy, disclose, or distribute this
e-mail or its contents to any other person and any such actions are
unlawful. This e-mail may contain viruses. Infosys has taken every
reasonable precaution to minimize this risk, but is not liable for any
damage you may sustain as a result of any virus in this e-mail. You
should carry out your own virus checks before opening the e-mail or
attachment. Infosys reserves the right to monitor and review the content
of all messages sent to or from this e-mail address. Messages sent to or
from this e-mail address may be stored on the Infosys e-mail system.

***INFOSYS End of Disclaimer INFOSYS***



Struts Dynamic Radio Button Query

2007-01-09 Thread Priya Khanna

Hi All,

I am attempting to create a (fairly) simple web app using struts.I need
to create a table of questions with each question having radio
buttons (a range of numeric values) so the user can input and submit
their answers:

 question1o o o o o o o o
 question2o o o o o o o o
 ...
 My problem is that both the questions and the number of radio buttons
needs to be dynamic (based on what is currently in the database). I can
iterate through the questions and display them in the table but I am
unsure how to 'marry' up the radio buttons, and then retrieve the data
from the form when the user submits.
 Has anyone done anything similar to this ? Any example code or
suggestions would be gratefully recieved.


Regds

Priya



 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

Re: Multiple radio button groups

2006-09-27 Thread yamilka vallejo ramos

Hi, look I work with that and the way that I do it, its asking in the
actionForm by the value of the radioButton

I mean:

In my case in the JSP I put this:





And in the ActionForm:

if(gestionarEdicionFarmacoMedicacionForm.
getAnestesico().matches("farmacoA")){ ... }
thats because I just have to radioGroup.

enjoy ;)


2006/9/26, Uday Chandra Karrothi <[EMAIL PROTECTED]>:


Hi there,

I have a problem. I am using groups of radio buttons.





..

Pri.

Adj.

..


How can get the value of the selected radio buttons in the action
form. Is there something
like a multibox for a radio group?
if it is just one radio button group, i can get it from the property
of the form bean. But when i  there are multiple radio button groups,
then how do i get the value of each of the button groups.


I already spent a day of my time on this. Please advice me on this.
Please direct me to the right resource

Thank you,
Uday Karrothi

--
Never explain--your friends do not need it and your enemies will not
believe you anyway--Elbert Hubbard

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




Re: Multiple radio button groups

2006-09-26 Thread Chris Pratt

I think I see the problem, it was with my example, it should have been:

var value = 
radioValue(document.formName.elements["apprEntry[0].primary_or_adjunct"]);


where "formName" is the value of the name attribute of the form tag.
 (*Chris*)


On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]> wrote:


Thanks Chris,

The request.getParameter works. I think i am going to go with that.
the javascript was throwing soem errors. I will figure that out later.

Thanks for the help once again.

Later
Uday Chandra


On 9/26/06, Chris Pratt <[EMAIL PROTECTED]> wrote:
> Wow, those are some ugly field names, but you should be able to access
it
> from either.  In JavaScript I would probably use a helper function
something
> like:
>
> function radioValue (fld) {
>   for(var i = 0; i < fld.length;i++) {
> if(fld[i].checked) {
>   return fld[i].value;
> }
>   }
>   return fld[0].value;
> } //radioValue
>
> Then you could access the value as:
>
> var value = radioValue(document.forms
["apprEntry[0].primary_or_adjunct"]);
>
> In Java you could just use:
>
> String value = request.getParameter("apprEntry[0].primary_or_adjunct");
>
>   (*Chris*)
>
> On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]> wrote:
> >
> > Thanks Chris for the response.
> >
> > But here is the problem.
> >  > indexId="userIndex">
> > ..
> >  > indexed="true" onclick="">Pri.
> >  > indexed="true" onclick="">Adj.
> > ..
> >
> > The resultant html code is
> > ...
> >> name="apprEntry[0].primary_or_adjunct"
> > value="A" checked="checked" onclick="">Pri.
> >> name="apprEntry[0].primary_or_adjunct"
> > value="B" onclick="">Adj.
> > ...
> >
> >> name="apprEntry[1].primary_or_adjunct"
> > value="A" checked="checked" onclick="">Pri.
> >> name="apprEntry[1].primary_or_adjunct"
> > value="B" onclick="">Adj.
> > ...
> >
> > You are right to say that the all the radio with the same name are
> > considered in one group .
> >
> > Now how do i obtain the value or which radio button is checked. Can I
> > access in Javascript or in the action class.?
> >
> > Please do let me know. Thank you for your response once again.
> >
> > Uday Karrothi
> >
> > On 9/26/06, Chris Pratt <[EMAIL PROTECTED]> wrote:
> > > All the radio buttons (or checkboxes) with the same name are in a
> > "button
> > > group".  The value of the selected radio button (or list of selected
> > > checkboxes) is returned from request.getParameter() (or
> > > request.getParameterValues()).
> > >   (*Chris*)
> > >
> > > On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi there,
> > > >
> > > > I have a problem. I am using groups of radio buttons.
> > > >
> > > >
> > > >
> > > >  > > > indexId="userIndex">
> > > >
> > > > ..
> > > >
> > > >  > > > indexed="true" onclick="">Pri.
> > > >
> > > >  > > > indexed="true" onclick="">Adj.
> > > >
> > > > ..
> > > >
> > > >
> > > > How can get the value of the selected radio buttons in the action
> > > > form. Is there something
> > > > like a multibox for a radio group?
> > > > if it is just one radio button group, i can get it from the
property
> > > > of the form bean. But when i  there are multiple radio button
groups,
> > > > then how do i get the value of each of the button groups.
> > > >
> > > >
> > > > I already spent a day of my time on this. Please advice me on
this.
> > > > Please direct me to the right resource
> > > >
> > > > Thank you,
> > > > Uday Karrothi
> > > >
> > > > --
> > > > Never explain--your friends do not need it and your enemies will
not
> > > > believe you anyway--Elbert Hubbard
> > > >
> > > >
-
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> > Never explain--your friends do not need it and your enemies will not
> > believe you anyway--Elbert Hubbard
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>


--
Never explain--your friends do not need it and your enemies will not
believe you anyway--Elbert Hubbard

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




Re: Multiple radio button groups

2006-09-26 Thread Uday Chandra Karrothi

Thanks Chris,

The request.getParameter works. I think i am going to go with that.
the javascript was throwing soem errors. I will figure that out later.

Thanks for the help once again.

Later
Uday Chandra


On 9/26/06, Chris Pratt <[EMAIL PROTECTED]> wrote:

Wow, those are some ugly field names, but you should be able to access it
from either.  In JavaScript I would probably use a helper function something
like:

function radioValue (fld) {
  for(var i = 0; i < fld.length;i++) {
if(fld[i].checked) {
  return fld[i].value;
}
  }
  return fld[0].value;
} //radioValue

Then you could access the value as:

var value = radioValue(document.forms["apprEntry[0].primary_or_adjunct"]);

In Java you could just use:

String value = request.getParameter("apprEntry[0].primary_or_adjunct");

  (*Chris*)

On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]> wrote:
>
> Thanks Chris for the response.
>
> But here is the problem.
>  indexId="userIndex">
> ..
>  indexed="true" onclick="">Pri.
>  indexed="true" onclick="">Adj.
> ..
>
> The resultant html code is
> ...
>name="apprEntry[0].primary_or_adjunct"
> value="A" checked="checked" onclick="">Pri.
>name="apprEntry[0].primary_or_adjunct"
> value="B" onclick="">Adj.
> ...
>
>name="apprEntry[1].primary_or_adjunct"
> value="A" checked="checked" onclick="">Pri.
>name="apprEntry[1].primary_or_adjunct"
> value="B" onclick="">Adj.
> ...
>
> You are right to say that the all the radio with the same name are
> considered in one group .
>
> Now how do i obtain the value or which radio button is checked. Can I
> access in Javascript or in the action class.?
>
> Please do let me know. Thank you for your response once again.
>
> Uday Karrothi
>
> On 9/26/06, Chris Pratt <[EMAIL PROTECTED]> wrote:
> > All the radio buttons (or checkboxes) with the same name are in a
> "button
> > group".  The value of the selected radio button (or list of selected
> > checkboxes) is returned from request.getParameter() (or
> > request.getParameterValues()).
> >   (*Chris*)
> >
> > On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi there,
> > >
> > > I have a problem. I am using groups of radio buttons.
> > >
> > >
> > >
> > >  > > indexId="userIndex">
> > >
> > > ..
> > >
> > >  > > indexed="true" onclick="">Pri.
> > >
> > >  > > indexed="true" onclick="">Adj.
> > >
> > > ..
> > >
> > >
> > > How can get the value of the selected radio buttons in the action
> > > form. Is there something
> > > like a multibox for a radio group?
> > > if it is just one radio button group, i can get it from the property
> > > of the form bean. But when i  there are multiple radio button groups,
> > > then how do i get the value of each of the button groups.
> > >
> > >
> > > I already spent a day of my time on this. Please advice me on this.
> > > Please direct me to the right resource
> > >
> > > Thank you,
> > > Uday Karrothi
> > >
> > > --
> > > Never explain--your friends do not need it and your enemies will not
> > > believe you anyway--Elbert Hubbard
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
>
>
> --
> Never explain--your friends do not need it and your enemies will not
> believe you anyway--Elbert Hubbard
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>





--
Never explain--your friends do not need it and your enemies will not
believe you anyway--Elbert Hubbard

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



Re: Multiple radio button groups

2006-09-26 Thread Chris Pratt

Wow, those are some ugly field names, but you should be able to access it
from either.  In JavaScript I would probably use a helper function something
like:

function radioValue (fld) {
 for(var i = 0; i < fld.length;i++) {
   if(fld[i].checked) {
 return fld[i].value;
   }
 }
 return fld[0].value;
} //radioValue

Then you could access the value as:

var value = radioValue(document.forms["apprEntry[0].primary_or_adjunct"]);

In Java you could just use:

String value = request.getParameter("apprEntry[0].primary_or_adjunct");

 (*Chris*)

On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]> wrote:


Thanks Chris for the response.

But here is the problem.

..
Pri.
Adj.
..

The resultant html code is
...
  Pri.
  Adj.
...

  Pri.
  Adj.
...

You are right to say that the all the radio with the same name are
considered in one group .

Now how do i obtain the value or which radio button is checked. Can I
access in Javascript or in the action class.?

Please do let me know. Thank you for your response once again.

Uday Karrothi

On 9/26/06, Chris Pratt <[EMAIL PROTECTED]> wrote:
> All the radio buttons (or checkboxes) with the same name are in a
"button
> group".  The value of the selected radio button (or list of selected
> checkboxes) is returned from request.getParameter() (or
> request.getParameterValues()).
>   (*Chris*)
>
> On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]> wrote:
> >
> > Hi there,
> >
> > I have a problem. I am using groups of radio buttons.
> >
> >
> >
> >  > indexId="userIndex">
> >
> > ..
> >
> >  > indexed="true" onclick="">Pri.
> >
> >  > indexed="true" onclick="">Adj.
> >
> > ..
> >
> >
> > How can get the value of the selected radio buttons in the action
> > form. Is there something
> > like a multibox for a radio group?
> > if it is just one radio button group, i can get it from the property
> > of the form bean. But when i  there are multiple radio button groups,
> > then how do i get the value of each of the button groups.
> >
> >
> > I already spent a day of my time on this. Please advice me on this.
> > Please direct me to the right resource
> >
> > Thank you,
> > Uday Karrothi
> >
> > --
> > Never explain--your friends do not need it and your enemies will not
> > believe you anyway--Elbert Hubbard
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>


--
Never explain--your friends do not need it and your enemies will not
believe you anyway--Elbert Hubbard

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




Re: Multiple radio button groups

2006-09-26 Thread Uday Chandra Karrothi

Thanks Chris for the response.

But here is the problem.

..
Pri.
Adj.
..

The resultant html code is
...
  Pri.
  Adj.
...

  Pri.
  Adj.
...

You are right to say that the all the radio with the same name are
considered in one group .

Now how do i obtain the value or which radio button is checked. Can I
access in Javascript or in the action class.?

Please do let me know. Thank you for your response once again.

Uday Karrothi

On 9/26/06, Chris Pratt <[EMAIL PROTECTED]> wrote:

All the radio buttons (or checkboxes) with the same name are in a "button
group".  The value of the selected radio button (or list of selected
checkboxes) is returned from request.getParameter() (or
request.getParameterValues()).
  (*Chris*)

On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> I have a problem. I am using groups of radio buttons.
>
>
>
>  indexId="userIndex">
>
> ..
>
>  indexed="true" onclick="">Pri.
>
>  indexed="true" onclick="">Adj.
>
> ..
>
>
> How can get the value of the selected radio buttons in the action
> form. Is there something
> like a multibox for a radio group?
> if it is just one radio button group, i can get it from the property
> of the form bean. But when i  there are multiple radio button groups,
> then how do i get the value of each of the button groups.
>
>
> I already spent a day of my time on this. Please advice me on this.
> Please direct me to the right resource
>
> Thank you,
> Uday Karrothi
>
> --
> Never explain--your friends do not need it and your enemies will not
> believe you anyway--Elbert Hubbard
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>





--
Never explain--your friends do not need it and your enemies will not
believe you anyway--Elbert Hubbard

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



Re: Multiple radio button groups

2006-09-26 Thread Chris Pratt

All the radio buttons (or checkboxes) with the same name are in a "button
group".  The value of the selected radio button (or list of selected
checkboxes) is returned from request.getParameter() (or
request.getParameterValues()).
 (*Chris*)

On 9/26/06, Uday Chandra Karrothi <[EMAIL PROTECTED]> wrote:


Hi there,

I have a problem. I am using groups of radio buttons.





..

Pri.

Adj.

..


How can get the value of the selected radio buttons in the action
form. Is there something
like a multibox for a radio group?
if it is just one radio button group, i can get it from the property
of the form bean. But when i  there are multiple radio button groups,
then how do i get the value of each of the button groups.


I already spent a day of my time on this. Please advice me on this.
Please direct me to the right resource

Thank you,
Uday Karrothi

--
Never explain--your friends do not need it and your enemies will not
believe you anyway--Elbert Hubbard

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




Multiple radio button groups

2006-09-26 Thread Uday Chandra Karrothi

Hi there,

I have a problem. I am using groups of radio buttons.





..

Pri.

Adj.

..


How can get the value of the selected radio buttons in the action
form. Is there something
like a multibox for a radio group?
if it is just one radio button group, i can get it from the property
of the form bean. But when i  there are multiple radio button groups,
then how do i get the value of each of the button groups.


I already spent a day of my time on this. Please advice me on this.
Please direct me to the right resource

Thank you,
Uday Karrothi

--
Never explain--your friends do not need it and your enemies will not
believe you anyway--Elbert Hubbard

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



Re: Radio Button

2006-08-25 Thread krishan rathi
use the code given below
  
  

   
  cheers
   
  krishan rathi.

sheetal <[EMAIL PROTECTED]> wrote:
  Hi,

To prepopulate, list box , I had attached LabelValueBean, with the 
select's collection ,attribute


">property="value" labelProperty="label" /> 



But Does anybody knows how to associate labelvaluebean with radio button }
(As per my knowledge we do not have a collection attrib. for radio).

Regards,
Sheetal



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




-
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.

Radio Button

2006-08-24 Thread sheetal

Hi,

To prepopulate, list box , I had attached  LabelValueBean, with the 
select's collection ,attribute



  property="value" labelProperty="label" /> 
  



But Does anybody knows how to associate labelvaluebean with radio button }
(As per my knowledge we do not have a collection attrib. for radio).

Regards,
Sheetal



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



Re: check box should behaves as radio button

2006-08-16 Thread Aladin Alaily
The problem with checkboxes doesn't rest with struts but with the http
protocol.  See, when a checkbox is checked, data is sent to the
application.  When the checkbox is unchecked, nothing is sent to the
app... but the original value is retained (since it was checked earlier).

A possible solution, manually check if the checkbox data appears in the
POST parameters.  If not, then you know that the checkbox is not checked
and you can do a actionForm.checkboxname = null OR you set that up in your
ActionForm's reset method.

Hope this helps.
Aladin



> Hi,
>
> Thanks to all for helping me in Struts problem
> here now i got stucked in one problem
>
> Here i need to show check box in UI but this must behaves like Radio
> button
> so how to do that i wrote java script to do that but it is not working
> perfectly
>
> please help me out
> Thanks in advance
>
> Shakti Singh
>


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



check box should behaves as radio button

2006-08-16 Thread Parvat Singh Ranawat

Hi,

Thanks to all for helping me in Struts problem
here now i got stucked in one problem

Here i need to show check box in UI but this must behaves like Radio button
so how to do that i wrote java script to do that but it is not working
perfectly

please help me out
Thanks in advance

Shakti Singh


Radio Button Issue

2006-08-10 Thread Krishna, Hari
Hi all,
I am displaying a list of Radio buttons using  inside a 
 which is displaying the radio buttons properly.But when the 
selected value is submitted to the action i am unable to show the selected one 
in jsp.How to deal with Radio buttons more effectively (while passing values to 
action )and how to show the selected radio button in jsp?

With Best Regards,
I.Hari krishna.

Franklin Templeton Investments
+91- 44 - 24407000 Extn:17123
--
Notice:  All email and instant messages (including attachments) sent to
or from Franklin Templeton Investments (FTI) personnel may be retained,
monitored and/or reviewed by FTI and its agents, or authorized
law enforcement personnel, without further notice or consent.

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



RE: Radio button group

2006-04-18 Thread Vidya \(Suvarna\) Mahavadi
Thanks Vijay!

-Original Message-
From: vijay venkataraman [mailto:[EMAIL PROTECTED] 
Sent: Tuesday 18 April 2006 09:23
To: Struts Users Mailing List
Subject: Re: Radio button group

Vidya,

Here is the basic concept and hope you can build on from that.
To make a radio button group, you have to have the names of  radio 
buttons in the group the same.
Say for row one on the table you have to render radio buttons of the
form
 Accept
  Reject
Ignore
So above acts as a radio group. Note 'name' of all the input elements 
are the same(userChoice[0]).

So for the second row it will  have to be
 Accept
  Reject
Ignore

In JSP file it would look like




You will have to take care to render the appropriate value of "A", "R", 
"I" from the bean. So when the user selects the values will be populated

in to the String[] userChoice

See indexed property usage of struts doc. 
http://struts.apache.org/struts-doc-1.2.x/faqs/indexedprops.html. This 
will give you a idea of how to setup your form bean.

Thanks,
Vijay Venkataraman



Vidya (Suvarna) Mahavadi wrote:

>Guys,
>
>I am still struggling to find a way out.. Any ideas how to get this
>right!
>
>Regards
>
>-Original Message-
>From: Vidya (Suvarna) Mahavadi [mailto:[EMAIL PROTECTED] 
>Sent: Thursday 13 April 2006 16:37
>To: Struts Users Mailing List
>Subject: Radio button group
>
>Hi,
>
> 
>
>I have a jsp with a table showing few records of data where each record
>corresponds to an object of a bean. Beside the bean data I need to have
>a radio button group with (Approve, Reject and Ignore).
>
>Can any one help me to put the bean object and the radio button group
>together.. in Jsp and action form.
>
>
>Any help is much appreciated.
>
>
>Thanks,
>Vidya
>
>  
>


--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.

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

This message and any attachments are confidential and intended solely for the 
addressee. If you have received this message in error, please notify Discovery 
immediately, telephone number +27 11 529 2888. Any unauthorised use; alteration 
or dissemination of the contents of this email is strictly prohibited. In no 
event will Discovery or the sender be liable in any manner whatsoever to any 
person for any loss or any direct, indirect, special or consequential damages 
arising from use of this email or any linked website, including, without 
limitation, from any lost profits, business interruption, loss of programmes or 
other data that may be stored on any information handling system or otherwise 
from any assurance that this email is virus free even if Discovery is expressly 
advised of the possibility of such damages. Discovery is an Authorised 
Financial Services Provider.

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



Re: Radio button group

2006-04-18 Thread vijay venkataraman

Vidya,

Here is the basic concept and hope you can build on from that.
To make a radio button group, you have to have the names of  radio 
buttons in the group the same.

Say for row one on the table you have to render radio buttons of the form
 Accept
  Reject
Ignore
So above acts as a radio group. Note 'name' of all the input elements 
are the same(userChoice[0]).


So for the second row it will  have to be
 Accept
  Reject
Ignore

In JSP file it would look like




You will have to take care to render the appropriate value of "A", "R", 
"I" from the bean. So when the user selects the values will be populated 
in to the String[] userChoice


See indexed property usage of struts doc. 
http://struts.apache.org/struts-doc-1.2.x/faqs/indexedprops.html. This 
will give you a idea of how to setup your form bean.


Thanks,
Vijay Venkataraman



Vidya (Suvarna) Mahavadi wrote:


Guys,

I am still struggling to find a way out.. Any ideas how to get this
right!

Regards

-Original Message-
From: Vidya (Suvarna) Mahavadi [mailto:[EMAIL PROTECTED] 
Sent: Thursday 13 April 2006 16:37

To: Struts Users Mailing List
Subject: Radio button group

Hi,



I have a jsp with a table showing few records of data where each record
corresponds to an object of a bean. Beside the bean data I need to have
a radio button group with (Approve, Reject and Ignore).

Can any one help me to put the bean object and the radio button group
together.. in Jsp and action form.


Any help is much appreciated.


Thanks,
Vidya

 




--DISCLAIMER--
This message is for the named person's use only. It may contain 
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. 

If you receive this message in error, please immediately delete it and 
all copies of it from your system, destroy any hard copies of it and 
notify the sender. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. 

Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its 
networks. 

Any views expressed in this message are those of the 
individual sender, except where the message states otherwise and the 
sender is authorized to state them to be the views of any such entity.


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



Re: Radio button group

2006-04-17 Thread manivannan84
do you want to map the radio button to a bean ? 
 
 
--
Manivannan Palanichamy
http://geocities.com/manivannan57



 
 
 
-Original Message-
From: Vidya (Suvarna) Mahavadi <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Tue, 18 Apr 2006 08:28:28 +0200
Subject: RE: Radio button group


Guys,

I am still struggling to find a way out.. Any ideas how to get this
right!

Regards

-Original Message-
From: Vidya (Suvarna) Mahavadi [mailto:[EMAIL PROTECTED] 
Sent: Thursday 13 April 2006 16:37
To: Struts Users Mailing List
Subject: Radio button group

Hi,

 

I have a jsp with a table showing few records of data where each record
corresponds to an object of a bean. Beside the bean data I need to have
a radio button group with (Approve, Reject and Ignore).

Can any one help me to put the bean object and the radio button group
together.. in Jsp and action form.


Any help is much appreciated.


Thanks,
Vidya

 


This message and any attachments are confidential and intended solely
for the addressee. If you have received this message in error, please
notify Discovery immediately, telephone number +27 11 529 2888. Any
unauthorised use; alteration or dissemination of the contents of this
email is strictly prohibited. In no event will Discovery or the sender
be liable in any manner whatsoever to any person for any loss or any
direct, indirect, special or consequential damages arising from use of
this email or any linked website, including, without limitation, from
any lost profits, business interruption, loss of programmes or other
data that may be stored on any information handling system or otherwise
from any assurance that this email is virus free even if Discovery is
expressly advised of the possibility of such damages. Discovery is an
Authorised Financial Services Provider.
This message and any attachments are confidential and intended solely for the 
addressee. If you have received this message in error, please notify Discovery 
immediately, telephone number +27 11 529 2888. Any unauthorised use; alteration 
or dissemination of the contents of this email is strictly prohibited. In no 
event will Discovery or the sender be liable in any manner whatsoever to any 
person for any loss or any direct, indirect, special or consequential damages 
arising from use of this email or any linked website, including, without 
limitation, from any lost profits, business interruption, loss of programmes or 
other data that may be stored on any information handling system or otherwise 
from any assurance that this email is virus free even if Discovery is expressly 
advised of the possibility of such damages. Discovery is an Authorised 
Financial 
Services Provider.

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

Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam 
and email virus protection.


RE: Radio button group

2006-04-17 Thread Vidya \(Suvarna\) Mahavadi
Guys,

I am still struggling to find a way out.. Any ideas how to get this
right!

Regards

-Original Message-
From: Vidya (Suvarna) Mahavadi [mailto:[EMAIL PROTECTED] 
Sent: Thursday 13 April 2006 16:37
To: Struts Users Mailing List
Subject: Radio button group

Hi,

 

I have a jsp with a table showing few records of data where each record
corresponds to an object of a bean. Beside the bean data I need to have
a radio button group with (Approve, Reject and Ignore).

Can any one help me to put the bean object and the radio button group
together.. in Jsp and action form.


Any help is much appreciated.


Thanks,
Vidya

 


This message and any attachments are confidential and intended solely
for the addressee. If you have received this message in error, please
notify Discovery immediately, telephone number +27 11 529 2888. Any
unauthorised use; alteration or dissemination of the contents of this
email is strictly prohibited. In no event will Discovery or the sender
be liable in any manner whatsoever to any person for any loss or any
direct, indirect, special or consequential damages arising from use of
this email or any linked website, including, without limitation, from
any lost profits, business interruption, loss of programmes or other
data that may be stored on any information handling system or otherwise
from any assurance that this email is virus free even if Discovery is
expressly advised of the possibility of such damages. Discovery is an
Authorised Financial Services Provider.
This message and any attachments are confidential and intended solely for the 
addressee. If you have received this message in error, please notify Discovery 
immediately, telephone number +27 11 529 2888. Any unauthorised use; alteration 
or dissemination of the contents of this email is strictly prohibited. In no 
event will Discovery or the sender be liable in any manner whatsoever to any 
person for any loss or any direct, indirect, special or consequential damages 
arising from use of this email or any linked website, including, without 
limitation, from any lost profits, business interruption, loss of programmes or 
other data that may be stored on any information handling system or otherwise 
from any assurance that this email is virus free even if Discovery is expressly 
advised of the possibility of such damages. Discovery is an Authorised 
Financial Services Provider.

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



Radio button group

2006-04-13 Thread Vidya \(Suvarna\) Mahavadi
Hi,

 

I have a jsp with a table showing few records of data where each record
corresponds to an object of a bean. Beside the bean data I need to have
a radio button group with (Approve, Reject and Ignore).

Can any one help me to put the bean object and the radio button group
together.. in Jsp and action form.


Any help is much appreciated.


Thanks,
Vidya

 


This message and any attachments are confidential and intended solely for the 
addressee. If you have received this message in error, please notify Discovery 
immediately, telephone number +27 11 529 2888. Any unauthorised use; alteration 
or dissemination of the contents of this email is strictly prohibited. In no 
event will Discovery or the sender be liable in any manner whatsoever to any 
person for any loss or any direct, indirect, special or consequential damages 
arising from use of this email or any linked website, including, without 
limitation, from any lost profits, business interruption, loss of programmes or 
other data that may be stored on any information handling system or otherwise 
from any assurance that this email is virus free even if Discovery is expressly 
advised of the possibility of such damages. Discovery is an Authorised 
Financial Services Provider.


  1   2   >