Hi Samuel,
I have tried that library on a php project. It should be something
on client side. What I now want to do is to display a recursive
structure on server side, specifically in jsp.
What I am trying to do is , I want to output something like this
with the structure I mention in previous post:
<select>
<option> Main Category A<option>
<option> Main Category A>> Sub-Category A<option>
<option> Main Category A>> Sub-Category B<option>
<option> Main Category A>> Sub-Category C<option>
<option> Main Category B>> Sub-Category A<option>
<option> Main Category B>> Sub-Category A >> Sub Sub category
A<option>
</select>
In this case, the tree component definitely cannot help me.
If jsp is not possible, I can build the tree structure at code level
so that i can generate the full path (Let's call those text between
option tag are fullpath) , and build an ArrayList from that tree and
output it.
Best regards,
Jonathan
Samuel Alfonso Velázquez Díaz wrote:
Hi Jonathan
What about using a the following tree UI component
http://webfx.eae.net/dhtml/xloadtree/xloadtree.html
http://webfx.eae.net/dhtml/xloadtree/demo.html
We are using it with appfuse/springmvc and XML to dynamically load the
contents of a hierarchy too.
If you end up using it would be very nice to share thoughts about
use/integration-design.
Cheers,
Samuel.
-----Original Message-----
From: Jonathan Tse [mailto:[EMAIL PROTECTED]
Sent: Martes, 23 de Enero de 2007 02:46 a.m.
To: [email protected]
Subject: Re: [appfuse-user] Recursive data structure in JSP
Hi Matt,
I cannot follow. What should those JSTL look like as there is
n-level of category? If only the root node is passed in, it is just a
plain object. JSTL should not be able to iterate it through.
Best regards,
Jonathan
Matt Raible wrote:
You could probably use JSTL's <c:forEach> to traverse the tree and
print out the contents. Regular ol' HTML tags should help you indent
it where you need to.
Matt
On 1/23/07, Jonathan Tse <[EMAIL PROTECTED]> wrote:
Hi all,
I am implementing a multi-level hierarchy (You can imagine it
category , sub category and sub sub category). I want to output the
structure with indentation but still cannot find a good solution. Let's
ignore how the DAO retrieve the data first(another complication here).
Suppose I got an category POJO like this:
Class Category
private int categoryId ;
private List subCategoryList;
Each object inside subCategoryList is a Category object (Assume the
whole tree is retrieved for the sake of simplicity). Therefore, it means
that I need to read it recursively in the JSP if I just pass the root
node to the View. I couldn't find any tag library on the net that could
traverse the whole tree. Any idea? Should I write a custom tag? Or just
flatten the structure before output to View?
Best regards,
Jonathan Tse
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]