Re: How to add RadioGroup column to DataTable?

2007-09-21 Thread Kent Tong



igor.vaynberg wrote:
 
 heh, there is something wrong doesnt really give me any context to help
 you :)
 
 i would guess you need to put the radiogroup around the entire datatable.
 

At least make sure there is a form component enclosing the RadioGroup.

-- 
View this message in context: 
http://www.nabble.com/How-to-add-RadioGroup-column-to-DataTable--tf4485992.html#a12814262
Sent from the Wicket - User mailing list archive at Nabble.com.


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



How to add RadioGroup column to DataTable?

2007-09-20 Thread Kevin Liu
Hi!
   
  Could you tell me how to add RadioGroup column to DataTable ?
   
  Thank you very much!


-Kevin Liu
   
-
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. 

Re: How to add RadioGroup column to DataTable?

2007-09-20 Thread Kevin Liu
Hi! Igor 
  There is something wrong with The Radios:
   
  RadioPanel.java:
  import org.apache.wicket.markup.html.form.Radio;
import org.apache.wicket.markup.html.form.RadioGroup;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
  public class RadioPanel extends Panel {
 
 private static final long serialVersionUID = 4309638869668046608L;
   public RadioPanel(String id, IModel model){
  super(id);
  RadioGroup radioGroup = new RadioGroup(radioGroup);
  Radio radio = new Radio(radio, model);
  radioGroup.add(radio);
  this.add(radioGroup);
 }
}
   
  Html:
  wicket:panel
 span wicket:id=radioGroup
  input type=radio wicket:id=radio/
 /span
/wicket:panel

   
  and I use it in this way:
  private AbstractColumn makeChioceColumn() {
  return new AbstractColumn(new Model(Choice))){
   private static final long serialVersionUID = -8344906560719618814L;
 public void populateItem(Item cellItem, String componentId, IModel model){
RadioPanel radioPanel = new RadioPanel(componentId, model);

cellItem.add(radioPanel);

   }
  };
 }
   
  Thank you!
Igor Vaynberg [EMAIL PROTECTED] wrote:
  create a panel, and put the radiogroup in to it. then extend abstractcolumn
and in populatecolumn create the instance of your panel and add it.

-igor


On 9/20/07, Kevin Liu wrote:

 Hi!

 Could you tell me how to add RadioGroup column to DataTable ?

 Thank you very much!


 -Kevin Liu

 -
 Be a better Heartthrob. Get better relationship answers from someone who
 knows.
 Yahoo! Answers - Check it out.



-Kevin Liu
   
-
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links.