Defect #487
After initializing the bean, first click doesn't trigger action
0%
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
History
Updated by Marc Boegem almost 13 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
Updated by Imre Tokai almost 13 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
Updated by Marc Boegem almost 13 years ago
- File bean_example.servoy bean_example.servoy added
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.
Updated by Marc Boegem over 12 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.
Updated by Nicola Gervasi about 11 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?