-
1. Re: Force full or partial update in vpe plugin
mareshkau Mar 1, 2009 5:50 PM (in response to kukeltje)For now no direct mechanism force for updating elements, you can manipulate of update element for which template was created by overriding method isRecreateAtAttrChange(..) of VpeAbstractTemplate.
Also you can see VpeVisualDomBuilder class, line 967. Here exists such code
// TODO Ssergey Vasilyev make a common code for figuring out
// if it is need to update parent node or not
private Node getNodeForUpdate(Node sourceNode) {
/* Changing of or tags can affect whole the table */
Node sourceTable = getParentTable(sourceNode, 2);
if (sourceTable != null) {
return sourceTable;
}
/* Changing of an tag can affect the parent select */
Node sourceSelect = getParentSelect(sourceNode);
if (sourceSelect != null) {
return sourceSelect;
}
return sourceNode;
}
but common code, hasn't been created yet. -
2. Re: Force full or partial update in vpe plugin
kukeltje Mar 2, 2009 3:43 AM (in response to kukeltje)I akready override that method (returns always true). The getNodeForUpdate is what I was looking for (I think). Will look into that
-
3. Re: Force full or partial update in vpe plugin
kukeltje Mar 5, 2009 4:33 PM (in response to kukeltje)ok, I've been looking into this... When I select the parent node that needs updating myself and pass that into updateNode like
Node updateNode = ComponentUtil.getParentElementByName(sourceElement, XForms.TAG_REPEAT); pageContext.getVisualBuilder().updateNode(updateNode);
My whole page becomes empty. I do this right before I return from the create method in my template.
Any other suggestions? -
4. Re: Force full or partial update in vpe plugin
kukeltje Mar 5, 2009 5:06 PM (in response to kukeltje)uuuhhhhhhhmmmmmmmmm guys, have you seen that the in the VpeAbstractTemplate the method is called getNodeForUptate (with a t instead of a d) that is why I implemented things wrongly I think.
Refactoring would be wise ;-) Now lets check if that does work :-) -
5. Re: Force full or partial update in vpe plugin
maxandersen Mar 5, 2009 5:14 PM (in response to kukeltje)hmm - report that in jira so we won't forget - thanks
-
6. Re: Force full or partial update in vpe plugin
kukeltje Mar 5, 2009 5:14 PM (in response to kukeltje)cool... overriding getNodeForUptate works... thanks.....
-
7. Re: Force full or partial update in vpe plugin
kukeltje Mar 5, 2009 6:26 PM (in response to kukeltje)