Project

General

Profile

Defect #315

WebClientUtils plugin with JQuery hover problem

Added by Norbert ten Hove almost 13 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
06/01/2011
Due date:
% Done:

0%

Estimated time:
Browser (if web client):
Any

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

sample.servoy (6.66 KB) sample.servoy Nicola Gervasi, 01/23/2012 05:32 PM
Libraries.zip (256 KB) Libraries.zip Nicola Gervasi, 01/23/2012 05:35 PM

History

#1

Updated by Patrick Talbot almost 13 years ago

Can you provide a sample solution showcasing this problem, please?

#2

Updated by Nicola Gervasi over 12 years ago

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.

#3

Updated by Nicola Gervasi over 12 years ago

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

#4

Updated by Patrick Talbot about 12 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.

Also available in: Atom PDF