You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by nazeem <md...@gmail.com> on 2010/09/17 01:40:20 UTC

Mouse click position

Hi,

I would like to show small popup relative to the position of mouse click.
Especially when user click a link, I need to show list of options and allow
user to click on one of them. For this I need to know the position of the
link and mouse click so that I can position the popup accordingly. Please
advice how we do this using wicket.

Regards.
Naz
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mouse-click-position-tp2543125p2543125.html
Sent from the Users forum mailing list archive at Nabble.com.

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


SV: Mouse click position

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> Any clue to get the mouse click position will be great.

The event object has clientX and clientY properties you can use.

But Wicket AFAIK uses Yahoo User Interface (YUI) out of the box, so look into the functions there to simplify the work.

- Tor Iver

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


Re: Mouse click position

Posted by Jeremy Thomerson <je...@wickettraining.com>.
On Thu, Sep 16, 2010 at 9:23 PM, nazeem <md...@gmail.com> wrote:

> Yes, I agree it is more of javascript. But in my code I am trying to use
> only
> java scripts bundled in wicket. Did not want to add more java script
> libraries to keep it simple. I use attribute modifier for all dynamic
> behaviour's,


This is the right way to go.


> similarly I am trying to open a window popup but instead of
> positioning in middle, would like to position just next to the mouse click.
>
> Any clue to get the mouse click position will be great.
>

This is all JS.  If you need to get it passed into Wicket, you'll need to
grab it with JS and then add it as a query parameter (or similar) to a
Wicket AJAX request.

-- 
Jeremy Thomerson
http://www.wickettraining.com

Re: Mouse click position

Posted by nazeem <md...@gmail.com>.
Yes, I agree it is more of javascript. But in my code I am trying to use only
java scripts bundled in wicket. Did not want to add more java script
libraries to keep it simple. I use attribute modifier for all dynamic
behaviour's, similarly I am trying to open a window popup but instead of
positioning in middle, would like to position just next to the mouse click.

Any clue to get the mouse click position will be great.


-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mouse-click-position-tp2543125p2543257.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Mouse click position

Posted by Jeremy Thomerson <je...@wickettraining.com>.
On Thu, Sep 16, 2010 at 6:40 PM, nazeem <md...@gmail.com> wrote:

>
> Hi,
>
> I would like to show small popup relative to the position of mouse click.
> Especially when user click a link, I need to show list of options and allow
> user to click on one of them. For this I need to know the position of the
> link and mouse click so that I can position the popup accordingly. Please
> advice how we do this using wicket.
>

This is just JavaScript - not really Wicket-specific.  There are a lot of JS
libraries out there to help with this.

-- 
Jeremy Thomerson
http://www.wickettraining.com

Re: Mouse click position

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Maybe you could use [1] to implement such functionality. This
component is based on [2]. There is a setting (see section Event
management on [2]) that allows to control the events.

Ernesto

1-http://wiquery-plugins-demo.appspot.com/demo/?wicket:bookmarkablePage=wicket-0:com.wiquery.plugins.demo.ToolTipPage
2-http://flowplayer.org/tools/tooltip/

On Fri, Sep 17, 2010 at 1:40 AM, nazeem <md...@gmail.com> wrote:
>
> Hi,
>
> I would like to show small popup relative to the position of mouse click.
> Especially when user click a link, I need to show list of options and allow
> user to click on one of them. For this I need to know the position of the
> link and mouse click so that I can position the popup accordingly. Please
> advice how we do this using wicket.
>
> Regards.
> Naz
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mouse-click-position-tp2543125p2543125.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Mouse click position

Posted by James Carman <ja...@carmanconsulting.com>.
Have you looked at using overlib?

On Thu, Sep 16, 2010 at 7:40 PM, nazeem <md...@gmail.com> wrote:
>
> Hi,
>
> I would like to show small popup relative to the position of mouse click.
> Especially when user click a link, I need to show list of options and allow
> user to click on one of them. For this I need to know the position of the
> link and mouse click so that I can position the popup accordingly. Please
> advice how we do this using wicket.
>
> Regards.
> Naz
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mouse-click-position-tp2543125p2543125.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Ajax "Target"

Posted by James Carman <ja...@carmanconsulting.com>.
It might help to look at the hierarchy for AjaxRequestTarget.  Notice
that it implements IRequestTarget.  So, it's a request target, or the
target of a particular servlet/http request.

On Thu, Sep 16, 2010 at 9:02 PM, Chris Colman
<ch...@stepaheadsoftware.com> wrote:
> I'm just wondering what the 'target' is in the term Ajax target. From my
> desktop days I was lead to think that 'target' meant a specific
> component but I'm not sure if that's what is intended in the Wicket
> context.
>
> In the wicket context what is the actual target? A JSON packet, the
> browser? Something else?
>
> There's some confusion about the whole target concept that my brain
> would be much happier with if it knew what we were targeting :)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Ajax "Target"

Posted by Chris Colman <ch...@stepaheadsoftware.com>.
I'm just wondering what the 'target' is in the term Ajax target. From my
desktop days I was lead to think that 'target' meant a specific
component but I'm not sure if that's what is intended in the Wicket
context.

In the wicket context what is the actual target? A JSON packet, the
browser? Something else?

There's some confusion about the whole target concept that my brain
would be much happier with if it knew what we were targeting :)


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