[jboss-dev-forums] [Design of JBoss Tools (dev)] - Re: Editing in visual pane
kukeltje
do-not-reply at jboss.com
Thu Mar 5 19:42:04 EST 2009
Ok, it works partially now
|
| public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
| VpeCreationData creationData = null;
| Element sourceElement = (Element) sourceNode;
| readAttributes(sourceElement);
| nsIDOMElement label;
|
| label = visualDocument.createElement(HTML.TAG_LABEL);
| label.setAttribute(HTML.ATTR_STYLE, style);
| label.setAttribute(HTML.ATTR_CLASS, styleClass);
|
| creationData = new VpeCreationData(label);
|
| Node textChild = sourceElement.getFirstChild();
| if (textChild != null) {
|
| VpeElementData elementData = new VpeElementData();
| nsIDOMText text;
| boolean isEditable = true;
|
| text = visualDocument.createTextNode(textChild.getNodeValue());
|
| label.appendChild(text);
| elementData.addNodeData(new NodeData(textChild, label, isEditable));
| creationData.setElementData(elementData);
| }
|
| return creationData;
|
makes it possible to edit the data inline at least at the place you click. You cannot go left or right with the cursors.
I'll try to look into this, but any hints would be appreciated
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215527#4215527
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215527
More information about the jboss-dev-forums
mailing list