0

ON_CLICK event on Nav element

asked 2014-02-18 09:29:00 +0800

salbader gravatar image salbader
15 5

Hello support,

i am using ZK 7.0.0 on Firefox 27 and i do have an issue with ONCLICK events on a Nav element. Unfortunately the ONCLICK event is never fired.

Greetings

delete flag offensive retag edit

Comments

Sample code would help us to solve the issue.. Please post some code.

MVarun ( 2014-02-18 10:10:00 +0800 )edit

Hi Varun,

thank you for the quick response, but i need the ON_CLICK event on the Nav. We are supposed to show a default page when the user clicks on this Nav. The Navitems for this Nav serves as a filter for this default page.

Greetings, Salbader

salbader ( 2014-02-18 10:39:02 +0800 )edit

Sample code is on the way ...

salbader ( 2014-02-18 10:40:59 +0800 )edit

Hi Varun,

Unfortunately all supported events (f.e ONRIGHTCLICK) for HtmlBasedComponent works, except the ON_CLICK event. It looks like it is not being propagated to the server :-( Sample code is ready but i can't post the whole code.

salbader ( 2014-02-18 11:14:59 +0800 )edit

I create an eventListener at the composer like:

Nav nav = new Nav(); nav.setLabel("test"); nav.addEventListener(Events.ON_CLICK, new EventListener(){
@Override public void onEvent(final Event event){ // Do something } }; );

salbader ( 2014-02-18 11:19:00 +0800 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2014-02-20 11:35:12 +0800

salbader gravatar image salbader
15 5

updated 2014-02-22 18:49:31 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

Ticket created.

tracker : http://tracker.zkoss.org/browse/ZK-2182

link publish delete flag offensive edit
0

answered 2014-02-18 10:06:39 +0800

MVarun gravatar image MVarun flag of India
268 1 6

Hi salbader,

Navitem in Nav supports these Events..

Recheck by giving it to navitem instead of nav.

Greetings..

M Varun.

link publish delete flag offensive edit

Comments

@Varun, the nav is also an HtmlBasedComponent what supports the on_click event ;)

chillworld ( 2014-02-18 10:45:28 +0800 )edit
0

answered 2014-02-18 11:47:58 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9
https://github.com/chillw...

updated 2014-02-18 11:48:45 +0800

Salbader.

Your ON_CLICK event is already intercepted. If you want the ON_CLICK event you have to use the ON_OPEN event.

see this fiddle :

http://zkfiddle.org/sample/b9sft4/4-NavItem-Drag-and-Drop-issue#source-2

Greetz chill.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-02-18 09:29:00 +0800

Seen: 37 times

Last updated: Feb 22 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More