Problem with tree tag (event selected)

2008-12-11 Thread Juanjo Cuadrado
Hi,

I'm working with s:tree tag, but it not working for me.

I have this code in my jsp

...
script type=text/javascript
dojo.even.topic.subscribe(treeSelected, function(e){
alert(The id is: + e.node.widgetId);
});

  /script
...
 s:tree id=contentTree
name=contentTree
theme = ajax
rootNode=#session.baremoNode
childCollectionProperty=children
nodeIdProperty=id
nodeTitleProperty=name
treeSelectedTopic=treeSelected
treeCollapsedTopic=treeCollapsed
treeExpandedTopic=treeExpanded
/s:tree

I have loaded a baremoNode object in my action class, and I can view the
tree, but when I do click over nodes, I can't view the alert message. The
nodes work fine (collapse and expand)

Any idea?

Thanks.


Re: Problem with tree tag (event selected)

2008-12-11 Thread Juanjo Cuadrado
Sorry...

I'm using Struts 2.0.11.2

2008/12/11 Juanjo Cuadrado [EMAIL PROTECTED]

 Hi,

 I'm working with s:tree tag, but it not working for me.

 I have this code in my jsp

 ...
 script type=text/javascript
 dojo.even.topic.subscribe(treeSelected, function(e){
 alert(The id is: + e.node.widgetId);
 });

   /script
 ...
  s:tree id=contentTree
 name=contentTree
 theme = ajax
 rootNode=#session.baremoNode
 childCollectionProperty=children
 nodeIdProperty=id
 nodeTitleProperty=name
 treeSelectedTopic=treeSelected
 treeCollapsedTopic=treeCollapsed
 treeExpandedTopic=treeExpanded
 /s:tree

 I have loaded a baremoNode object in my action class, and I can view the
 tree, but when I do click over nodes, I can't view the alert message. The
 nodes work fine (collapse and expand)

 Any idea?

 Thanks.



Combining the iterator tag with the tree tag (problem with label field)

2008-01-24 Thread strutting

Hi All,

I'm new in struts and I can't solve a little problem... I'm trying to
populating a tree with data from a database, and I'd like to do that using
the iterator tag. My code is the following one:

s:tree theme = ajax id = root label = Reservations
s:iterator value = reservations
s:treenode theme = ajax label=Reservation ID: s:property 
value =
rid/
s:treenode theme = ajax label=Is a pre-reservation? 
: s:property
value = isPre//
s:treenode theme = ajax label=Services
s:iterator value = services
s:treenode theme = ajax 
label=s:property value=sid/ /
s:treenode theme = ajax 
label=Automatic activation: s:property
value=automaticActivation//
/s:iterator
/s:treenode
/s:treenode
/s:iterator
/s:tree

The definition of the data type reservations:

Reservation[] reservation
 int rid;
 boolean is Pre;
 Service[] services;
  int sid;
  boolean automaticActivation;

The problem is the LABEL field that only allows Strings. I'd like to fill
this field with the evaluation of the iterator property.

Can someone help me? I've looking for this in many tutorials, forums... but
I haven't found anything...

Thanks in advance!
-- 
View this message in context: 
http://www.nabble.com/Combining-the-iterator-tag-with-the-tree-tag-%28problem-with-label-field%29-tp15061806p15061806.html
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts 2 tree tag question

2007-12-01 Thread john feng
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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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

2007-11-29 Thread akash agrawal
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 [EMAIL PROTECTED] 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.

Struts 2 tree tag question

2007-11-28 Thread akash agrawal
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.

Re: Struts 2 tree tag question

2007-11-28 Thread john feng
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 fieldholds 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 [EMAIL PROTECTED] 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.


Re: [S2] tree tag and nodes customization

2007-08-22 Thread Paolo Beccari
 
 
 Hi,
 
 is there a way to specify different images for each node? Or are property
 such expandIconSrcPlus immutable for the entire tree?
 
 Thanks,
 
 P.

...ping? (Btw, I think it's not possibile because it's a tree attribute.
Shouldn't properties like this belong to treenode?) 



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



[S2] tree tag and nodes customization

2007-08-18 Thread Paolo Beccari
Hi,

is there a way to specify different images for each node? Or are property
such expandIconSrcPlus immutable for the entire tree?

Thanks,

P.



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



Tree Tag

2007-07-24 Thread Richard Sayre

I am using the tre tag to display a tree of items.  I got a very basic
tree showing.  Is it possible to have the tree node do something when
you click it?  I tried onclick but it didnt seem to render that
attribute into the HTML.  Is it possible to add some extra html to
each node (for example a check box)?

Thank you,

Rich

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



Re: Tree Tag

2007-07-24 Thread Musachy Barroso

You can use treeSelectedTopic to get notified when a node is clicked.

musachy

On 7/24/07, Richard Sayre [EMAIL PROTECTED] wrote:

I am using the tre tag to display a tree of items.  I got a very basic
tree showing.  Is it possible to have the tree node do something when
you click it?  I tried onclick but it didnt seem to render that
attribute into the HTML.  Is it possible to add some extra html to
each node (for example a check box)?

Thank you,

Rich

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





--
Hey you! Would you help me to carry the stone? Pink Floyd

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