Re: Newbie question about WORepetitions and WORadioButtons
Re: Newbie question about WORepetitions and WORadioButtons
- Subject: Re: Newbie question about WORepetitions and WORadioButtons
- From: Jean-François Veillette <email@hidden>
- Date: Wed, 19 Jul 2006 13:34:22 -0400
Chip,
try to capture selected/unselected as part of 'takeValueFromRequest' of
your component. One way to do is to use a selection method like this :
Object myItem; // this is your item of your repetition
NSMutableDictionary itemSelected; // probably instantiated in your
constructor, cleard as needed.
public void setItemSelected(Boolean b) {
itemSelection.setObjectForKey(b, myItem);
}
public Boolean itemSelected() {
return (Boolean)objectForKey(myItem);
}
and in the binding of your wocheckbox, you use itemSelected as the
checked value.
On your action method, you know which item was checked by looking at
the itemSelected dictionary and looking for a true value.
- jfv
On Jul 19, 2006, at 11:38 AM, Chip Myers wrote:
I'm currently displaying a list of objects in a WORepetition, with
each object having a WORadioButton displayed beside it. Once the list
finishes generating, I display 2 hyperlinks, edit and delete, whose
operations can then be performed on any one object in the list.
Within the WORepetition, I've created two variables ObjectList for
list and ObjectItem for item.
o Object 1
o Object 2
.
.
.
o Object n
edit delete
TI'd like to perform an edit on one selected objectItem. Once the
edit and delete buttons are generated, however, the objectItem has
been populated with a value of null. How, is it possible to capture
the objectItem that has been selected with the radiobutton?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden