Event calling Java-Method not in Component

asked 2010-01-08 03:31:18 +0800

SabrinaGl gravatar image SabrinaGl
57 1

updated 2010-01-08 06:22:36 +0800

!!! I've found a solution using a request to the window-object. If someone has another solution, please post it. !!!

Hi together,

I've got a little problem and hope someone can help me. I've developed a component with child elements which are added dynamically. Now I want a user to double click on this child element (a div) and a java-method should be called. My problem: this java-method is not within the component, so I can't access it directly from the component's *.java.
I can access a javascript method outside the component through onclick="getPopup()". But it isn't possible to this with a onClick="callJavaMethod()", is it?

My component is called by:

<eventline id="eventline" height="300px" width="500px"
         range="month" startYear="2008" endYear="2011" />

and in HTML it looks like this:

<div id="z_0q_09" class="eventline_div" style="height: 300px; width: 500px; overflow-x: auto; overflow-y: hidden;" years="2008-2011" z.type="eventline.Eventline">
<div id="z_0q_39" style="position: absolute; height: 10px; width: 200px; left: 699px; top: 79px; background-color: rgb(204, 204, 204); cursor: move;" ondblclick="getInfoPopup(this)" z.type="project.Project">

Has anybody an idea how I can solve this?


delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2010-01-08 15:36:39 +0800

kesavkolla gravatar image kesavkolla
180 3

If you can figure out how the zAU.send works then you can certainly call the java method using zk's event mechanism. The other possible way of doing so is have a hidden textfield and have a onBlur event handler setup for that.

For the child elements set the hidden textfields's value and generate blur event on it. This will invoke the blur event handler on the server side.


link publish delete flag offensive edit

answered 2010-01-14 02:54:39 +0800

SabrinaGl gravatar image SabrinaGl
57 1

Thanks for your answer. It's working good now :)

link publish delete flag offensive edit
Your reply
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




Asked: 2010-01-08 03:31:18 +0800

Seen: 612 times

Last updated: Jan 14 '10

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