Delete/Edit Button

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Delete/Edit Button

LaStudent
This post has NOT been accepted by the mailing list yet.
Hi,

I want to create a Delete and Edit Button. This Buttons should delete and edit Object (of a self made Class).
Can someone help me?

best regards
Reply | Threaded
Open this post in threaded view
|

Re: Delete/Edit Button

LaStudent
This post has NOT been accepted by the mailing list yet.
I forgot to say, that I dont want to use LiveTable-Macro.
Reply | Threaded
Open this post in threaded view
|

Re: Delete/Edit Button

Lockie
In reply to this post by LaStudent
Hi LaStudent

You could try applying the edit and delete code found in the Event Calendar application:

#foreach($yourobject in $doc.getObjects("XWiki.YourClass"))

#if($hasedit) (<a href="$doc.getURL("edit", "editor=object&amp;classname=XWiki.YourClass&amp;object=$yourobject.number")">$msg.get("edit")</a>, 
<a href="$doc.getURL("objectremove", "classname=XWiki.YourClass&amp;classid=${yourobject.number}&amp;xredirect=$doc.getURL('view')")">$msg.get("delete")</a>)

#end
Lockie