struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Holloway" <>
Subject RE: Complicated Web Interfaces?
Date Thu, 28 Nov 2002 09:11:51 GMT
Ok fair enough but surely the issue of embedding all this javascript 
In my html is reversing the whole embedding presentation logic within
business logic?  Surely  embedding javascript in a JSP is just as bad 
as embedding scriptlets in a JSP?  Or am I missing the point here 
somewhere :) ?

Jonathan Holloway.

-----Original Message-----
From: Affan Qureshi [] 
Sent: 28 November 2002 03:31
To: Struts Users Mailing List
Subject: Re: Complicated Web Interfaces?

My comment between lines.

> Say I want to display two lists of objects and swap lists in and out
> 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
> 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
portal setup. You dont have to use tables like struts-layout. You can
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
> it with Struts?

Struts is just another Web application and runs servlets and JSPs. You
to come up with your own way to intergrate your stuff (JavaScript,
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
> 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
> wrong.

KB-Monkey-example uses a fixed object model (i.e it knows what fields
there in each object). However I think if you want the tree to be
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
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

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
if you only want to add "blank" fields? If anybody has accomplished this
would be glad to know.

> I know there's a lot of questions abou the above and I'm still
> 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.



To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message