My comment between lines.

> Say I want to display two lists of objects and swap lists in and out of
> these two
> lists as required.
>
> List A       -->   List B
> Object A          Object C
> Object B
>
> e.g. Move object B to List B
>
> I also want to add/remove objects as required to these lists.  Is this
> possible in
> Struts.  I've looked at the struts-layout library on
> http://struts-application-servers.com/
> but it look sto be buggy.  Has anbody actually had any success with
> this?

This is shown in Tiles portal example. Works pretty well for simple
purposes. Look at the place where you can add, delete, change tiles in the
portal setup. You dont have to use tables like struts-layout. You can use
some HTML select lists and some simple JS to manipulate them.

> I also want to be able to display a tree component to a user and allow
> the user to
> manipulate the tree by adding or removing nodes to the tree.  Is this
> possible with
> any of the struts user interface components or will I have to use an
> applet or a
> sophiticated javascript tree to achieve this.  If so how do I integrate
> it with Struts?

Struts is just another Web application and runs servlets and JSPs. You need
to come up with your own way to intergrate your stuff (JavaScript, Applets)
with it. Struts does not provide you with an IDE. It provides you with a
framwork to make your work easy.

> I've also looked at the monkey-struts example as well but that seems to
> lack the
> creation of objects in these lists, which doesn't look to be a problem
> to implement
> but that might be an oversight on my part : ) please let me know if I'm
> wrong.
>

KB-Monkey-example uses a fixed object model (i.e it knows what fields are
there in each object). However I think if you want the tree to be dynamic
you can use the same technique with your own object model (which seems to be
dynamic in content). The key to adding and deleting the nodes is the way the
button clicks of "Add" and "Delete" are handled in a nested environment.
Nested tags enable you to remember the context of added and deleted
objects/nodes. You can use Map-backed properties for dynamic form-fields.

But one issue with the monkey example is that it refreshes the page if I
want to add/delete an object/node. Wouldn't it be more efficient to use
JavaScript for the purpose? I mean why resend the request back to the server
if you only want to add "blank" fields? If anybody has accomplished this I
would be glad to know.

> I know there's a lot of questions abou the above and I'm still pondering
> them as well
> myself but I just wanted to know whether it is possible to do this in
> Struts at present.
> From what I can see it is possible to create simple web based
> applications using
> Struts but I haven't come across any really complicated web interfaces
> yet using
> Struts, has anybody got any ideas on this or any examples of web
> applications that
> are a little more compicated.

> Many thanks,
> Jon Holloway.
>

If you find any such resource please let us know.

Regards,

Affan


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

Reply via email to