You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by eugenebalt <eu...@yahoo.com> on 2013/10/15 15:12:43 UTC

Make a Shared Variable-Length ListView (checkbox matrix with N columns)

We have 2 cases where we need to display a matrix with checkboxes. In the
first case, the matrix has 3 columns, in the second, it has 8.

Both are working, and both were implemented as ListViews. But is there a way
to make this a Shared Component, with a more elegant design? The problem is
the HTML needs to list out the columns of every row. This makes it necessary
to implement the 2 cases separately. We would like a reusable component.

Example from Case 1, with 3 checkbox columns:

                   

                          
                            

                              	Document Type
                              	<input type="checkbox"
onclick="checkAll(this, 'cbView');"> View
                              	<input type="checkbox"
onclick="checkAll(this, 'cbUpload');"> Upload
                              	<input type="checkbox"
onclick="checkAll(this, 'cbDelete');"> Delete
                            
                          
                          
                          

                              	<strong wicket:id="docType"></strong>()
                              	<input class="cbView" type="checkbox"
value="checkbox" wicket:id="view_flag" />
                              	<input class="cbUpload" type="checkbox"
value="checkbox" wicket:id="upload_flag" />
                              	<input class="cbDelete" type="checkbox"
value="checkbox" wicket:id="delete_flag" />
                          
                          
                        


Thanks



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Make-a-Shared-Variable-Length-ListView-checkbox-matrix-with-N-columns-tp4661825.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Make a Shared Variable-Length ListView (checkbox matrix with N columns)

Posted by Paul Bors <pa...@bors.ws>.
We have a tab panel with permissions per section of the product that would
list the sections and then the permissions along with checkboxes to
authorize a user different roles.

That's a tab panel with a list view of sections which nest a list view of
check boxes depending on the model of the parent.
So yes, you can do it and re-use it throughout the app. Break it down into
smaller panels and pay attention of the list model you pass around.

~ Thank you,
  Paul Bors

-----Original Message-----
From: eugenebalt [mailto:eugenebalt@yahoo.com] 
Sent: Tuesday, October 15, 2013 9:13 AM
To: users@wicket.apache.org
Subject: Make a Shared Variable-Length ListView (checkbox matrix with N
columns)

We have 2 cases where we need to display a matrix with checkboxes. In the
first case, the matrix has 3 columns, in the second, it has 8.

Both are working, and both were implemented as ListViews. But is there a way
to make this a Shared Component, with a more elegant design? The problem is
the HTML needs to list out the columns of every row. This makes it necessary
to implement the 2 cases separately. We would like a reusable component.

Example from Case 1, with 3 checkbox columns:

                   

                          
                            

                              	Document Type
                              	<input type="checkbox"
onclick="checkAll(this, 'cbView');"> View
                              	<input type="checkbox"
onclick="checkAll(this, 'cbUpload');"> Upload
                              	<input type="checkbox"
onclick="checkAll(this, 'cbDelete');"> Delete
                            
                          
                          
                          

                              	<strong wicket:id="docType"></strong>()
                              	<input class="cbView" type="checkbox"
value="checkbox" wicket:id="view_flag" />
                              	<input class="cbUpload" type="checkbox"
value="checkbox" wicket:id="upload_flag" />
                              	<input class="cbDelete" type="checkbox"
value="checkbox" wicket:id="delete_flag" />
                          
                          
                        


Thanks



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Make-a-Shared-Variable-Length-Lis
tView-checkbox-matrix-with-N-columns-tp4661825.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org