On Tue, 01 Oct 2013 18:32:50 -0300, Adriana Bojorquez
<albojorq...@yahoo.com> wrote:
Hi
Hi!
1. Can anyone please provide guidance/assistance on how to implement a
multi-level checkbox selection component with tapestry 5.3.6?
Following layout is needed:
Remember, layout is CSS, HTML for structure and Tapestry for generating
HTML and including CSS dynamically. :)
1st level check-boxes must be on one line
2nd level check boxes should have an indentation (to distinguish that
they belong to previous 1st level checkbox), and more than 2 check boxes
on a line will be great for better layout
This is all HTML and CSS, nothing Tapestry specific.
Component may have one or many 1st level check-boxes, each with one or
many 2nd level check-boxed.
In the data, what distinguishes the first level from the second? Will
choosing a checkbox in the first level change the options in the second?
Notice Checklist will <input type="checkbox" value="xxx">, so you can use
a CSS attribute locator like input[value=xxx] to style it anyway you want.
Of course, this will work if the list of options is static. If not, you
can take a look at Checklist's source, copy it and adapt it to your needs.
Tip: SelectModel is basically a list of OptionModel, and you can use its
getAttributes() method to pass the 'class' attribute to be rendered in the
<option> element so you can write some CSS for that. For some reason,
Checklist itself doesn't do that. Weird.
2. And is it possible to use something similar to Tapestry's checklist
component, but avoid rendering each option on a single line?
Yep. Just write some CSS (probably involving some display: inline) to do
that.
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org