943,634 Members | Top Members by Rank

Ad:
Jul 8th, 2008
0

Trouble with jsf, passing event

Expand Post »
Hi folks, quick question for ya. I'm working on getting a custom context menu to work in Firefox (it was written for IE with behaviors) and I can get the menu to pop-up, but i'm getting a javascript error when it does. (Also, nothing in the menu works, but I believe that's because of some other behaviors I haven't redone).

On line 4: onContextMenu="displayContextMenu" calls the function which calls a chain of functions for highlighting grid rows, getting the row id, and of course, making the contextMenu div visible. For Firefox, I've read that I need to pass the event when this is written inline like this. so I change it to this: onContextMenu="displayContextMenu(event)".
This works, but I get an error: "displayContextMenu(event) is not a function" when i'm using webdeveloper addon for firefox. Also, the source code for that line looks like "displayContextMenu(event)()". So it believes "(event)" is part of the name of the function, instead of the actual event. I know they wrote this back when JSF was new, and created custom components, but is there a way to attach the event to that function call at all?

Thank you,
Jmasta

<w:grid id="sourceNavGrid"
				beanName="sourceNav.gridManager" 
				selectionColumnEnabled="true" 
				onContextMenu="displayContextMenu"
				pagingEnabled="true"
				filteringEnabled="true"
				sortingEnabled="true"
				trackingEnabled="true"
				trackingImage="/codesWeb/theme/images/tracking.gif"
				styleClass="grid" 
				headerClass="grid-header" 
				rowClasses="grid-row1,grid-row2" 
				footerClass="grid-paging" 
				columnClasses="grid-link,grid-image,grid-text,grid-text,grid-number,grid-text,grid-number,grid-date,grid-date,grid-date,grid-date,grid-date,grid-date,grid-date"/>
Last edited by jmasta; Jul 8th, 2008 at 3:47 pm. Reason: made some code bold
Reputation Points: 10
Solved Threads: 0
Light Poster
jmasta is offline Offline
26 posts
since Apr 2007
Jul 9th, 2008
0

Re: Trouble with jsf, passing event

I ended up having one of the people responsible for the custom jsf components re-do the renderer, so sending in "displayContextMenu" results in "displayContextMenu(event)", which works great in firefox, and IE doesn't seem to care. Consider this one solved.
Reputation Points: 10
Solved Threads: 0
Light Poster
jmasta is offline Offline
26 posts
since Apr 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Two drop downs with image
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: correct?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC