I guess it's also easy to swap objects between the two models as well, 
this would be a nice addition to the example to allow bananas to be
swapped between bunches.  I did notice the new banana before but I
wanted 
it to take values from fields on the form but I guess this is very
simple 
to do now.  It solves my problem in theory at least : ) all I have to
work
out now is how to maintain a tree in Struts :( I don't think the applet
way
is a very nice way of doing it.

Jon.

-----Original Message-----
From: Arron Bates [mailto:[EMAIL PROTECTED]] 
Sent: 28 November 2002 13:06
To: Struts Users Mailing List
Subject: Re: Complicated Web Interfaces?

> > 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.

Have another play, click on "new banana"... :)

http://www.keyboardmonkey.com/StrutMonkey/MonkeyStruts_v2.jsp


> 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.

It's all up to watever you want to code. The fact that the monkey
example trips to the server has nothing to do with the nested tags.

To write the monkey example in Struts without the nested tags is verging
on impossible, at the very least a truly large headache, it was really
quite easy.

If the nested tags are guilty of anything, they make it very easy (and
even fun?... maybe I'm wired differently) to add more and more
complexity to the structure. The nested tags have made some truly
unwieldy applications, including the reason for their creation.

You just have to ask yourself one question...
Red or Blue pill?  :P


Arron.



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



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

Reply via email to