String to Object Structure in GWT

23 views
Skip to first unread message

Deepan

unread,
Feb 29, 2012, 3:02:58 PM2/29/12
to google-we...@googlegroups.com
Hi All,

I am relatively new to GWT. 
I have input as a string and i want to convert it into object structure. I was wondering how it can be done in GWT.

Example String -  (node1(node2(node3) (node4)) (node5))

"node1" has 2 children "node2" and "node5"
"node2" has 2 children "node3" and "node4"

More like converting a string into binary tree object.

Thanks,
Nikhil

vinayak kulkarni

unread,
Mar 2, 2012, 2:26:07 AM3/2/12
to Google Web Toolkit
GWT has a class called Tree. It also has TreeMenuItems.
Use REGEX and iterate over nodes and make it a Tree object.
It will give a Tree structure in UI.

If you just want to convert your string to Tree structure, its plain
java. Nothing to do with GWT.

On Mar 1, 1:02 am, Deepan <nicky3...@gmail.com> wrote:
> Hi All,
>
> I am relatively new to GWT.
> I have input as a string and i want to convert it into object structure. I
> was wondering how it can be done in GWT.
>
> Example String -  *(node1(node2(node3) (node4)) (node5))*
Reply all
Reply to author
Forward
0 new messages