voyent
Anyone have example of mixing HTML5 (canvas), JS and ICEfaces in Liferay Portlet?  XML
Forum Index -> Portals & Portlets
Author Message
grubin

Joined: 10/Dec/2011 07:44:13
Messages: 19
Offline


Or, failing that, any advice, warnings, etc.

Specifically, I an ice:datatable in a portlet and I want to replace with a graphical representation of the data (very specific formatting needs--graphs won't do). The form includes about 12 ice:popups that I make visible and use as property editors, and I want specific clicks on the canvas to cause JavaScript to set a rendered=true.

That brings up a subsidiary question: can I access the rendered property in my Bean from the JS function or do I have to have an invisible field on the page?

Thanks for any help.
grubin

Joined: 10/Dec/2011 07:44:13
Messages: 19
Offline


I've gotten this to work except on refreshes it seems the DOM is being duplicated (and more). I see all sorts of copies when I view source.

Is there something I need to do to avoid this, like setting phase?
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


grubin wrote:
Specifically, I an ice:datatable in a portlet and I want to replace with a graphical representation of the data (very specific formatting needs--graphs won't do). The form includes about 12 ice:popups that I make visible and use as property editors, and I want specific clicks on the canvas to cause JavaScript to set a rendered=true.. 


Not 100% sure of the exact requirement here. Can you post a simple, stripped down portlet .war that shows the behaviour? My interpretation is that you want to click on elements in the HTML5 canvas and have those clicks adjust the render (or perhaps visible?) attribute of the various popups - is that right?

grubin wrote:
That brings up a subsidiary question: can I access the rendered property in my Bean from the JS function or do I have to have an invisible field on the page?. 


You'd probably have to render something out when the value changes but you could pontentially use the JavaScriptRunner to set variables (or run existing functions that do the same thing) that your existing scripts could use:

http://res.icesoft.org/docs/v3_latest/core/api/

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team