Project

General

Profile

Defect #487

After initializing the bean, first click doesn't trigger action

Added by Marc Boegem about 12 years ago. Updated about 10 years ago.

Status:
New
Priority:
Normal
Assignee:
Start date:
04/11/2012
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

After initializing the bean, the first click doesn't trigger action.
It looks like the bean is getting focus on the first click, on the 2nd click the actual callback method that has been set is getting triggered.


Files

bean_example.servoy (4.19 KB) bean_example.servoy Marc Boegem, 05/18/2012 02:33 PM

History

#1

Updated by Marc Boegem almost 12 years ago

  • Assignee set to Imre Tokai

Hi Imre,

Do you have any pointer to what needs to be done to get this solved?
Other beans don't seem to have this issue, so I'm wondering what is different with this one.

Thnkx,

Marc

#2

Updated by Imre Tokai almost 12 years ago

Hi,
Can be caused as unwanted side-effect due to complexity of specific solution's there. Do you use it within a frame or sg? Haven't been able to replicate neither in Servoy 5 nor 6. Share an example solution with steps, please

Regards

#3

Updated by Marc Boegem almost 12 years ago

Hi Imre,

please find a sample solution attached.

after executing the smart-client, you will see the tree being correctly displayed and the first line selected (see also the console output)

now click the 2nd line. You will notice the 2nd line isn't highlighted and the console doesn't display additional output. From now on every click will behave as expected.

To repeat this: click the refresh button, click the 2nd line, etc.etc.

#4

Updated by Marc Boegem over 11 years ago

This seems to be an issue only when the nodes are expanded after setting the dataset.
When left collapsed after setting the dataset, things work as advertised...

Any solution for this?

Sample solution as previously posted is still valid.

#5

Updated by Nicola Gervasi about 10 years ago

I have a similar problem, probably the same.
In my solution I want to expand a node (if it has children) when clicked so I use this:

function onNodeClick(_node,_column) {
// Expand collapse the node if needed
if(elements.bean_tree.getChildNodes(_node).length > 0) {
if(elements.bean_tree.isNodeExpanded(_node)) elements.bean_tree.collapseNode(_node)
else elements.bean_tree.expandNode(_node)
}
else {
// Execute the action
loadModule(_node)
}
}

When a node is expanded/collapsed the next click on a node doesn't trigger the onNodeClick method but you can see the node slightly shifting to the left. This is very annoying for the users.
This happens on smart client only, webclient is ok.

Latest JAR, MacOS/Win, Java7, client/developer.

Should I open a new ticket about this or is it the same problem?

Also available in: Atom PDF