You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by akash agrawal <ak...@yahoo.co.uk> on 2007/11/28 02:25:14 UTC
Tree ui component with each node having a checkbox (struts 2.0.9)
Hi,
Can someone tell me how to build a tree with each node having a check box, so that user can input their choices by selecting/unchecking each node in the tree and input can be collected in the action?
Thanks in advance,
-Akash
---------------------------------
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.
Re: Struts 2 tree tag question
Posted by john feng <jo...@gmail.com>.
put the box inside the iterate loop:
<html:mutlibox id=... name=... value='<bean:write name="your record id"/>' >
the actionform knows how many boxes being checked by the user.
On 11/29/07, akash agrawal <ak...@yahoo.co.uk> wrote:
>
> Hi John,
>
> Thanks for the insight. If you can share some code that will be helpful to
> understand how you used multibox tag. ( I haven't used multibox tag before).
>
> Thanks,
> -akash
>
> john feng <jo...@gmail.com> wrote: I have created tree that each node
> displays several attributes of an object,
> i.e., top node is Dept object that user could see a checkbox field
> DeptNo>, DeptNo field, DName field, Location field. clicking top node +
> image, the second layer nodes display Employee object that user could see
> a
> checkbox field, EmpNo, EName field, Sal field, NumberOfDepents
> field. Clicking the second node Employee + image, then displays Dependent
> object...
>
> You see my tree is not like a Windows folder like tree, it has more fields
> to display for each row of the nodes. Its each parent node field header
> left
> most position has a checkbox that could check or uncheck all the children
> nodes' checkboxes.
>
> I used the regular iterate and multibox tags and CSS to get this done
> really
> straight forward, without using tree tag.
>
>
>
> On 11/28/07, akash agrawal wrote:
> >
> > Hi,
> >
> > Trying to build a form having a tree where each node in the tree needs
> to
> > have a checkbox to take input from the user. How can I accomplish this
> using
> > struts tree tag?
> >
> > Thanks,
> >
> > -Akash
> >
> >
> > ---------------------------------
> > Get easy, one-click access to your favorites. Make Yahoo! your
> homepage.
>
>
>
> ---------------------------------
> Get easy, one-click access to your favorites. Make Yahoo! your homepage.
Re: Struts 2 tree tag question
Posted by akash agrawal <ak...@yahoo.co.uk>.
Hi John,
Thanks for the insight. If you can share some code that will be helpful to understand how you used multibox tag. ( I haven't used multibox tag before).
Thanks,
-akash
john feng <jo...@gmail.com> wrote: I have created tree that each node displays several attributes of an object,
i.e., top node is Dept object that user could see a checkbox field
DeptNo>, DeptNo field, DName field, Location field. clicking top node +
image, the second layer nodes display Employee object that user could see a
checkbox field, EmpNo, EName field, Sal field, NumberOfDepents
field. Clicking the second node Employee + image, then displays Dependent
object...
You see my tree is not like a Windows folder like tree, it has more fields
to display for each row of the nodes. Its each parent node field header left
most position has a checkbox that could check or uncheck all the children
nodes' checkboxes.
I used the regular iterate and multibox tags and CSS to get this done really
straight forward, without using tree tag.
On 11/28/07, akash agrawal wrote:
>
> Hi,
>
> Trying to build a form having a tree where each node in the tree needs to
> have a checkbox to take input from the user. How can I accomplish this using
> struts tree tag?
>
> Thanks,
>
> -Akash
>
>
> ---------------------------------
> Get easy, one-click access to your favorites. Make Yahoo! your homepage.
---------------------------------
Get easy, one-click access to your favorites. Make Yahoo! your homepage.
Re: Struts 2 tree tag question
Posted by john feng <jo...@gmail.com>.
I have created tree that each node displays several attributes of an object,
i.e., top node is Dept object that user could see a checkbox field <holds
DeptNo>, DeptNo field, DName field, Location field. clicking top node +
image, the second layer nodes display Employee object that user could see a
checkbox field<holds EmpNo>, EmpNo, EName field, Sal field, NumberOfDepents
field. Clicking the second node Employee + image, then displays Dependent
object...
You see my tree is not like a Windows folder like tree, it has more fields
to display for each row of the nodes. Its each parent node field header left
most position has a checkbox that could check or uncheck all the children
nodes' checkboxes.
I used the regular iterate and multibox tags and CSS to get this done really
straight forward, without using tree tag.
On 11/28/07, akash agrawal <ak...@yahoo.co.uk> wrote:
>
> Hi,
>
> Trying to build a form having a tree where each node in the tree needs to
> have a checkbox to take input from the user. How can I accomplish this using
> struts tree tag?
>
> Thanks,
>
> -Akash
>
>
> ---------------------------------
> Get easy, one-click access to your favorites. Make Yahoo! your homepage.
Struts 2 tree tag question
Posted by akash agrawal <ak...@yahoo.co.uk>.
Hi,
Trying to build a form having a tree where each node in the tree needs to have a checkbox to take input from the user. How can I accomplish this using struts tree tag?
Thanks,
-Akash
---------------------------------
Get easy, one-click access to your favorites. Make Yahoo! your homepage.