Hi Oleg,

This is not really an XWiki-related question as much as it`s a standard
HTML form one.

You want to create a simple (1 button) HTML form that submits to the
current page and the result is to be handled with velocity to check if the
request has the button clicked and execute some other velocity code.

{{velocity}}
#if ("$!request.myButton" != '')
  Button pressed!
  ## more code follows here
#else
  ## Show the form (button)
  {{html}}
    <form action="">
      <input type="submit" name="myButton" value="Click this Button" />
    </form>
  {{/html}}
#end
{{/velocity}}

Hope this helps,
Eduard

On Tue, Apr 19, 2016 at 10:04 AM, Rochlin Oleg <
oleg.roch...@ssi-schaefer.com> wrote:

> Thanks for the link. it´s still not really helping me with my question.  )
>
>
> -----Ursprüngliche Nachricht-----
> Von: Mohamed Boussaa [mailto:mohamed.bous...@xwiki.com]
> Gesendet: Montag, 18. April 2016 17:41
> An: XWiki Users
> Betreff: Re: [xwiki-users] XWiki Button with ActionListener?
>
> Hello,
>
> Here is the XWiki Developer's Guide:
> http://platform.xwiki.org/xwiki/bin/view/DevGuide/
>
>
> Regards,
> Mohamed.
>
> On Mon, Apr 18, 2016 at 1:28 PM, Rochlin Oleg <
> oleg.roch...@ssi-schaefer.com
> > wrote:
>
> > Hello my fellow XWIKI-people.
> > I would like to create a button to generate some content.
> >
> > Pseudo-code example
> >
> > {{velocity}}
> >
> > #set(button=false)
> >
> > Click this Button causes #set(button=true)
> >
> > #if($button)
> >
> > script starts
> >
> > #end
> >
> > {{/velocity}}
> >
> > Any ideas? I am pretty new to WIKI
> >
> >
> > _______________________________________________
> > users mailing list
> > users@xwiki.org
> > http://lists.xwiki.org/mailman/listinfo/users
> >
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to