Defect #315
WebClientUtils plugin with JQuery hover problem
0%
Description
We are currently using the WebClientUtils plugin to integrate with JQuery.
We implemented a document.ready function in a .js file which is added to the web client using
plugins.WebClientUtils.addJsReference. Within this document.ready function, we initialize some
hover functions for form elements, e.g.:
$(document).ready(function(){
$(".hover_region").hover(
function () {
$('#basicmenu').css('visibility','visible');
},
function () {
$('#basicmenu').css('visibility','hidden');
}
);
});
We also have a small tabpanel on our form. When navigating to those tab-panels, it looks like the
hover initialization functions are removed from the form elements. We can still execute js functions
but the hover functions set in document.ready are gone. When we do a page refresh (F5), the hover
functions work again.
The hover functions are attached to elements (labels) that do not have a dataprovider attached.
Is this expected behavior? Is there something we could do to prevent the functions set in document.ready
from being disabled/removed?
Files
History
Updated by Patrick Talbot almost 14 years ago
Can you provide a sample solution showcasing this problem, please?
Updated by Nicola Gervasi over 13 years ago
- File sample.servoy sample.servoy added
I'm having a similar issue: I have a main form with a split tab, on the left pane there's an HTML area containing an jQuery accordion, when a link is clicked a form is loaded in the right pane of the tab; everytime a form is loaded in the right pane the accordion gets broken because the html is rendered again, I tried to use plugins.WebClientUtils.setRendered(elements._accordion) but it's not working as I expect.
Am I doing something wrong or is there a bug?
I created a small sample solution to showcase the issue.
Updated by Nicola Gervasi over 13 years ago
- File Libraries.zip Libraries.zip added
I forgot to mention that I'm using Servoy 6.0.4, I've also attached the needed libraries to reproduce the issue, just unzip the Libraries.zip file to server/webapps/ROOT
Updated by Patrick Talbot about 13 years ago
- Status changed from New to Closed
- Browser (if web client) set to Any
- Client type set to Web client
- In developer? set to No
- Servoy version set to Servoy 6.0.x
- Component version set to 1.3
- OS version set to Any
- Java version set to Any
This is more a problem of Servoy which is rebuilding the content when navigating from one tab panel to the next.
The plugin can't work in that case, and the setRendered method is not helping, this is not its purpose.