On Mon, Aug 18, 2014 at 6:43 PM, Jason Clemons <[email protected]> wrote:
> Hello all,
>
> I'm sure this question has been asked before but I can't seem to find 
> anything using the all mighty Google, so I thought I'd ask.  I've created a 
> tracking application (ticketing / workflow) using "App Within Minutes".  What 
> I'd like to do using either Groovy or Velocity is when a ticket is "closed" 
> (by changing the value of a combo box) is to gather some details from the 
> closed ticket that appears in a few controls on the page and post them to 
> another page in the wiki when the user saves the page.  The idea is to keep a 
> running log of recently closed tickets.  I've been looking for examples in 
> three parts that I think I need help with:
>

> 1.  How do I capture a "combo box" change event using Groovy or Velocity ?

You don't need to capture the change event on the "combo box". You
need to capture the save event, on the server side. For this we have
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingEventListenerTutorial
. The idea is to write an event listener that is triggered whenever an
XWiki document is saved and which checks if the document is an entry
of your application, i.e. if the document has an xobject of the type
defined by your application. See
http://extensions.xwiki.org/xwiki/bin/view/Extension/App+Within+Minutes+Application#HApplicationStructure
. Each application created with AppWithinMinutes defines a data type
(e.g. a ticket, a workflow, a blog post,  etc.) which we call an
xclass.

>

> 2.  How do I get values of text boxes and combo boxes from a page using 
> Groovy or Velocity ?

If the text boxes and the combo boxes you are referring to are those
from the form that was generated automatically for you by
AppWithinMinutes then when the document (the ticket) is saved those
values are stored in the xobject. I recommend following the
http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial in order
to better understand these concepts. So in your event listener you can
access the xobject from the saved document and check the property
values.

>

> 3.  How do I write to a different page in the Wiki using Groovy or Velocity?

You should go over http://platform.xwiki.org/xwiki/bin/view/DevGuide/WebHome

Hope this helps,
Marius

>
> I'm obviously going to continue searching Google, but any pointers / help is 
> greatly appreciated.
>
>
> Thanks in Advance,
>
> Jason Clemons
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to