You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Juan Alvarado <ju...@yahoo.com> on 2004/09/20 13:15:35 UTC
Deleting objects from nested tags
Hi:
I am displaying a hierarchy of objects in a textarea using the nested tags. Whenever a user deletes whatever is in the textarea for a particular object, I want to remove that object from the list.
Has anyone done this in the past?? If so, could you please share how you accomplished it.
Thanks
---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
Re: Deleting objects from nested tags
Posted by kjc <ks...@elp.rr.com>.
You need to have a delete button associated with each individual item
you wish to delete.
In your <nested:submit property="deleteMe" />
your class should be defined as
public YourClass {
SomeParent myParent;
//: This method will be called when the delete button is pushed
public void setDeleteMe(String anUnusedString){
//: In order for this to work, your class MUST have a reference
to the containing parent.
myParent.remove(this);
}
}
Juan Alvarado wrote:
>Hi:
>
>I am displaying a hierarchy of objects in a textarea using the nested tags. Whenever a user deletes whatever is in the textarea for a particular object, I want to remove that object from the list.
>
>Has anyone done this in the past?? If so, could you please share how you accomplished it.
>
>Thanks
>
>
>---------------------------------
>Do you Yahoo!?
>vote.yahoo.com - Register online to vote today!
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org