Re: Making entire row editable in a DataTable

2008-05-06 Thread Sathish Gopal

If i need to adopt to this API, then i need to rewrite the entire Page class.
Is there any other solution.

How do i get hold of the rowModel(org.apache.wicket.markup.repeater.Item) in
the DataView when one of the columns is selected. There must be way to get
the rowModel for some event trigger in a column...


Jonathan Locke wrote:
> 
> 
> don't know the answer, but just thought you should know about this FYI:
> 
> http://inmethod.com/
> 
> 
> Sathish Gopal wrote:
>> 
>> Hi all,
>> 
>> I've built a DataTable(AjaxFallbackDataTable) to display list of values.
>> My requirement is that by clicking (Link) one of the coloumns in any
>> given row should make the row (all the columns) editable.
>> I've used AjaxEditlabel as cell renderer for all the columns. How to
>> change the underlying editor of all the column in a specific row?
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Making-entire-row-editable-in-a-DataTable-tp17071597p17078462.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Making entire row editable in a DataTable

2008-05-05 Thread Sathish Gopal

Hi all,

I've built a DataTable(AjaxFallbackDataTable) to display list of values. My
requirement is that by clicking (Link) one of the coloumns in any given row
should make the row (all the columns) editable.
I've used AjaxEditlabel as cell renderer for all the columns. How to change
the underlying editor of all the column in a specific row?
-- 
View this message in context: 
http://www.nabble.com/Making-entire-row-editable-in-a-DataTable-tp17071597p17071597.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: RadioButton inside DataTable

2008-04-07 Thread Sathish Gopal

Hi all,

Let me explain my requirement properly.

I have created a table using wickets component DefaultTableModel. Number of
rows in the table is dynamic. One of the column is radio button. This radio
button is used to select that particular row.

I used wickets fragment feature to implement this.  My html has something
like this...

 




 




My Fragment is like this...

public class FlightSelectionFragment extends Fragment {

public FlightSelectionFragment(String id, String markupId,
MarkupContainer markupProvider, RadioGroup 
radioGroup) {
super(id, markupId, markupProvider);
radioGroup.add(new Radio("selected", new Model("")));
add(radioGroup);
}
}

The exception that i get is 

WicketMessage: Error attaching this container for rendering:
[MarkupContainer [Component id = table, page =
com.emirates.poc.web.flight.page.SearchPage, path =
0:table.DefaultDataTable, isVisible = true, isVersioned = true]]Root
cause:java.lang.IllegalArgumentException: A child with id 'selected' already
exists:.

It means i can only add one Radio button to the RadioGroup. As the Radio
component get's created at runtime, i cannot specify it's name in the java
and html.  There must be a way to add multiple radio button to the
RadioGroup using fragment.  The same thing works if i replace Radio with
checkbox component.

How to solve this issue?



Sathish Gopal wrote:
> 
> Hi,
> 
> I was actually looking for integrating RadioButton with DefaultDataTable
> component available in Wicket.
> 
> My requirement is,  i need to show a row of data's with one column being a
> RadioButton. I use DataTable component for showing list of Data's. The
> number of columns is known only at runtime.  This radioButton is used to
> select that particular row of Data. How do i specify the name of the
> component in my html. i.e 
> 
> 
>  
>   
>   
> 
> 
> The name of the above radio button is selected. This same named (id
> =selected) radio button cannot be added again to the RadioGroup has i loop
> thro... Is there a way to dynamicaly name component at runtime. I think
> this is just a problem of naming the Radiobutton as the records are know
> only at runtime. 
> 
> 
> Hoover, William wrote:
>> 
>> see http://cwiki.apache.org/WICKET/using-radiogroups.html
>> 
>> -Original Message-
>> From: Sathish Gopal [mailto:[EMAIL PROTECTED]
>> Sent: Sunday, April 06, 2008 6:07 AM
>> To: users@wicket.apache.org
>> Subject: RadioButton inside DataTable
>> 
>> 
>> 
>> Hi all,
>> 
>> I'm trying to build DataTable using the Wickets DefaultDataTable
>> component.
>> One of the column in the list is a RadioButton component, which is used
>> to
>> select a particular row.
>> 
>> I'm using wicket fragment feature. 
>> 
>> My html looks like this...
>> 
>>  
>> 
>> 
>> 
>> 
>>  
>>  
>>  
>> 
>> 
>> My fragment looks like this..
>> 
>>  public class FlightSelectionFragment extends Fragment {
>>  private RadioGroup radioGroup;
>> 
>>  public FlightSelectionFragment(String id, String markupId,
>>  MarkupContainer markupProvider) {
>>  super(id, markupId, markupProvider);
>>  radioGroup.add(new Radio("selected", new Model("")) {
>>   });
>>  }
>> 
>> How do i add the same Radio button component (id=selected) to RadioGroup
>> (id=radioChoicegroup) for multiple rows. i.e Assuming there are three
>> rows
>> in table. So i need 3 radio buttons which will be added to the same radio
>> group (id=radioChoicegroup). But the component id (id=selected) cannot be
>> the same for all the three rows. This gives Runtime Exception. How to
>> handle
>> this issue?
>> 
>> 
>> 
>> 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/RadioButton-inside-DataTable-tp16522717p16522717.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>> 
>> 
>> -
>> 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]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/RadioButton-inside-DataTable-tp16522717p16537404.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: RadioButton inside DataTable

2008-04-06 Thread Sathish Gopal

Hi,

I was actually looking for integrating RadioButton with DefaultDataTable
component available in Wicket.

My requirement is,  i need to show a row of data's with one column being a
RadioButton. I use DataTable component for showing list of Data's. The
number of columns is known only at runtime.  This radioButton is used to
select that particular row of Data. How do i specify the name of the
component in my html. i.e 


 




The name of the above radio button is selected. This same named (id
=selected) radio button cannot be added again to the RadioGroup has i loop
thro... Is there a way to dynamicaly name component at runtime. I think this
is just a problem of naming the Radiobutton as the records are know only at
runtime. 


Hoover, William wrote:
> 
> see http://cwiki.apache.org/WICKET/using-radiogroups.html
> 
> -Original Message-
> From: Sathish Gopal [mailto:[EMAIL PROTECTED]
> Sent: Sunday, April 06, 2008 6:07 AM
> To: users@wicket.apache.org
> Subject: RadioButton inside DataTable
> 
> 
> 
> Hi all,
> 
> I'm trying to build DataTable using the Wickets DefaultDataTable
> component.
> One of the column in the list is a RadioButton component, which is used to
> select a particular row.
> 
> I'm using wicket fragment feature. 
> 
> My html looks like this...
> 
>  
> 
> 
> 
> 
>  
>   
>   
> 
> 
> My fragment looks like this..
> 
>   public class FlightSelectionFragment extends Fragment {
>   private RadioGroup radioGroup;
> 
>   public FlightSelectionFragment(String id, String markupId,
>   MarkupContainer markupProvider) {
>   super(id, markupId, markupProvider);
>   radioGroup.add(new Radio("selected", new Model("")) {
>   });
>   }
> 
> How do i add the same Radio button component (id=selected) to RadioGroup
> (id=radioChoicegroup) for multiple rows. i.e Assuming there are three rows
> in table. So i need 3 radio buttons which will be added to the same radio
> group (id=radioChoicegroup). But the component id (id=selected) cannot be
> the same for all the three rows. This gives Runtime Exception. How to
> handle
> this issue?
> 
> 
> 
> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/RadioButton-inside-DataTable-tp16522717p16522717.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
> 
> 
> -
> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/RadioButton-inside-DataTable-tp16522717p16524398.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RadioButton inside DataTable

2008-04-06 Thread Sathish Gopal

Hi all,

I'm trying to build DataTable using the Wickets DefaultDataTable component.
One of the column in the list is a RadioButton component, which is used to
select a particular row.

I'm using wicket fragment feature. 

My html looks like this...

 




 




My fragment looks like this..

public class FlightSelectionFragment extends Fragment {
private RadioGroup radioGroup;

public FlightSelectionFragment(String id, String markupId,
MarkupContainer markupProvider) {
super(id, markupId, markupProvider);
radioGroup.add(new Radio("selected", new Model("")) {
  });
}

How do i add the same Radio button component (id=selected) to RadioGroup
(id=radioChoicegroup) for multiple rows. i.e Assuming there are three rows
in table. So i need 3 radio buttons which will be added to the same radio
group (id=radioChoicegroup). But the component id (id=selected) cannot be
the same for all the three rows. This gives Runtime Exception. How to handle
this issue?





-- 
View this message in context: 
http://www.nabble.com/RadioButton-inside-DataTable-tp16522717p16522717.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Reg: issue in using ListView component

2008-04-02 Thread Sathish Gopal

Hi,

How do i wrap list to this model.
As i construct this ListView component, pass the DTO list wrapped in a
model

add(new ListView("id", new Model(listData))){
..
}

This is not helping as the component is rendered nothing shows up. I think
i'm missing something.

Do i need to use some other Model (A Dynamic model). Do i need to override
initModel()...

Am i doing it the right way?


igor.vaynberg wrote:
> 
> read models wiki page
> 
> -igor
> 
> 
> On Tue, Apr 1, 2008 at 9:59 PM, Sathish Gopal <[EMAIL PROTECTED]>
> wrote:
>>
>>  Hi all,
>>
>>  I'm trying to create a table using wickets repeater component ListView.
>> The
>>  problem that i face now is i have search panel where search query will
>> be
>>  entered. When the form is submitted the table needs to be populated with
>>  data received from the Database. The data received from the database is
>> a
>>  list of DataTransferObjects. I need to pass this List of transferObjects
>> to
>>  the ListView. But the listview expects that this object should be passed 
>> at
>>  the time of creation. i.e
>>
>>  add(new ListView("rows", listData){
>>   public void populateItem(final ListItem item)
>> {
>> final UserDetails user =
>> (UserDetails)item.getModelObject();
>> item.add(new Label("id", user.getId()));
>> }
>>   });
>>
>>  I cannot pass the list of DataTransferObject until the user enters
>> search
>>  criteria and submits the form.
>>  Is there any better way to do this?
>>  --
>>  View this message in context:
>> http://www.nabble.com/Reg%3A-issue-in-using-ListView-component-tp16442209p16442209.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Reg%3A-issue-in-using-ListView-component-tp16442209p1680.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Reg: issue in using ListView component

2008-04-01 Thread Sathish Gopal

Hi all,

I'm trying to create a table using wickets repeater component ListView. The
problem that i face now is i have search panel where search query will be
entered. When the form is submitted the table needs to be populated with
data received from the Database. The data received from the database is a
list of DataTransferObjects. I need to pass this List of transferObjects to
the ListView. But the listview expects that this object should be passed  at
the time of creation. i.e

add(new ListView("rows", listData){
 public void populateItem(final ListItem item)
{
final UserDetails user = (UserDetails)item.getModelObject();
item.add(new Label("id", user.getId()));
}
  });

I cannot pass the list of DataTransferObject until the user enters search
criteria and submits the form.
Is there any better way to do this?
-- 
View this message in context: 
http://www.nabble.com/Reg%3A-issue-in-using-ListView-component-tp16442209p16442209.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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