Re: Render Queue Error in Expansion

2012-04-13 Thread Thiago H. de Paula Figueiredo
On Fri, 13 Apr 2012 12:14:23 -0300, Lance Java wrote: It sounds like a lot of work... perhaps someone else knows of an easier way to get the source of a component event? Have you thought of adding a query parameter containing the id of the rendered object? That's what I'd do. -- Thiago

Re: Render Queue Error in Expansion

2012-04-13 Thread Chris Mylonas
Mate, thanks a lot for your effort I must say. And you summed it up well - how to get the source of a component event? (if all the components have the same id) At the moment, all 16 droppables have a component id of either "extensionZone" or "voicemailZone". I can't set a "context" or custom

Render Queue Error in Expansion

2012-04-13 Thread Lance Java
Ignore my prev post about adding the drop zone to the context as this is not associated with the draggable when the page is drawn. I think that you need a handle on the ComponentEventRequestParameters so that you can call getNestedComponentId() which will have the id of the zone which fired the ev

Re: Render Queue Error in Expansion

2012-04-13 Thread Lance Java
If you want to know which dropzone received the dragabble, just pass the zone id in the context along with the extension id. I can't remember exatly how but I'm sure you can lookup zones by id by @Inject'ing the ComponentResources

Re: Render Queue Error in Expansion

2012-04-13 Thread Lance Java
Something like this: ${extension.name} ${extension.number} ${droppedExtension.name} ${droppedExtension.number} Page.java - @InjectComponent private Zone extensionZone; @Property private Item extension; @Property pri

Re: Render Queue Error in Expansion

2012-04-13 Thread Chris Mylonas
Thanks Lance - I have two problems at the moment - both when I componentize the stuff. On a single page, no probs. 1. Render Queue Error - on AJAX update for Extensions - it gets lost after the initial render because the looping is finished from initial page load (i presume). 2. Which dropzo

Re: Render Queue Error in Expansion

2012-04-13 Thread Lance Java
Create a ValueEncoder for your currentExtension Object Then use ValueEncoder.toClient(V value) to create a string which will be used in your draggablecontext. Then, in your drop event, use ValueEncoder.toValue(String value) on the context value to deserialise the Object.

Re: Render Queue Error in Expansion

2012-04-13 Thread Chris Mylonas
I think I need to @InjectContainer private MainPage container Then I can access the "rows" of the grid through the source List<>. (or source list of my entity - phones in this case) I'll have a look at the in-place-editor for grid because that must do something similar. Then do something in t

Re: Render Queue Error in Expansion

2012-04-13 Thread Chris Mylonas
> Your ajax event handler method will need to initialize any properties that > are required in the rendering block So somewhere in my early rendering phases I'd need to get a reference to the current block that is to be re-rendered and grab values out of that - I guess. > Draggables can have a

Re: Render Queue Error in Expansion

2012-04-13 Thread Lance Java
Your ajax event handler method will need to initialize any properties that are required in the rendering block Draggables can have a "draggablecontext" attribute. Although I've not used it I'm sure that you could pass the context required to initialize your property.

AJAX Re: Render Queue Error in Expansion

2012-04-13 Thread Chris Mylonas
Ah ha - let me make it a bit clearer. The AJAX stuff all works, if I hard code the values within my component. It's like having a grid and each row has the ${currentRow.name} ${currentRow.value} These property bindings don't exist after render. If I were to use the Grid -> addCell then there is

Render Queue Error in Expansion

2012-04-13 Thread Chris Mylonas
Hi Tap List, I've got two custom components. Reception Line & Office Phone They are just little divs and with a draggable and a droppable zone respectively. In my testing, dragging and dropping between these works when everything is done on the same page and this is my first shot at componenti