I've got some code now which does what I want - different from what you
suggested with London-Paint - still need to return to that as once I have it
working it will be probably be better. I can click on a link/button, and run
a piece of code which runs a javascript function and returns the value to
the java code. My particular use case is to call an activeX function to see
if a security minikey is attatched, configured, and so on. I think what I
have is a bit of a hack right now, but it works, and now I want to package
it up better so it can be used as a component, kind of like this:

Object obj = new JSFunctionCaller("function-name").getReturnValue();

This is what I am thinking: put the functionality I have in a seperate panel
(JSFunctionCaller), instantiate the panel and then, within the constructor,
automatically call the ajax ink which, right now, I have to manually click
on to get this thing to work. I am also thinking now that I may be able to
just add an AjaxEventListener to the onload of the page - that would also
work as it would give me an AjaxRequestTarget which I could then use for
appendJavascript()




On Thu, Mar 3, 2011 at 2:23 PM, Martin Grigorov-4 [via Apache Wicket] <
ml-node+3333227-1044453854-65...@n4.nabble.com> wrote:

> What do you want to do exactly ?
>
> There is no need to click a button in Wicket.
> E.g.:
> btn = new Button(...) {
>    public void onClick() {
>       myService.doSomething();
>    }
> }
>
> so you can just call: myService.doSomething() instead.
>
> In javascript you can do: Wicket.$("myButtonId").click()
>
> On Thu, Mar 3, 2011 at 2:16 PM, drf <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=3333227&i=0&by-user=t>>
> wrote:
>
> > Is there any way to automate the clicking of a link or button, similar to
>
> > WicketTester, but within a running Wicket WebApplication ?
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/How-to-automate-clicking-of-a-link-or-button-tp3333220p3333220.html<http://apache-wicket.1842946.n4.nabble.com/How-to-automate-clicking-of-a-link-or-button-tp3333220p3333220.html?by-user=t>
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=3333227&i=1&by-user=t>
> > For additional commands, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=3333227&i=2&by-user=t>
> >
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/How-to-automate-clicking-of-a-link-or-button-tp3333220p3333227.html
>  To unsubscribe from How to automate clicking of a link or button, click
> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3333220&code=ZGF2aWRyZmllbGRAZ21haWwuY29tfDMzMzMyMjB8MTQ2MjgwNTU1MQ==>.
>
>


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-automate-clicking-of-a-link-or-button-tp3333220p3333358.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to