Home » Eclipse Projects » JavaServer Faces » Where can I change the HostElement attribute value?
| |
Re: Where can I change the HostElement attribute value? [message #475033 is a reply to message #475032] |
Thu, 16 August 2007 23:10 |
Ian Trimble Messages: 137 Registered: July 2009 |
Senior Member |
|
|
To add a little more information to my previous posting, typically you
would call createElement(String) to create a new Element, manipulate this
new Element's attributes, and ultimately return the new Element.
For example:
Element resultElement = createElement("input");
resultElement.setAttribute("type", "text");
resultElement.setAttribute("value",
getHostElement().getAttribute("value"));
resultElement.setAttribute("maxsize", "80");
return resultElement;
The method "getHostElement()" will return the source document's Element
that is being converted, and even if you could manipulate it from within
the tag converter, this would not affect the expected result of a tag
conversion.
Perhaps I do not understand what it is you are attempting to do in your
tag converter. Please feel free to elaborate further.
- Ian, JSF Tools Project
|
|
|
Re: Where can I change the HostElement attribute value? [message #475034 is a reply to message #475032] |
Fri, 17 August 2007 02:41 |
Dart peng Messages: 27 Registered: July 2009 |
Junior Member |
|
|
"Ian Trimble" <ian.trimble@oracle.com>
??????:24108ccc01065d107d035447a639b132$1@www.eclipse.org...
>I don't think I understand the use case. Why are you changing the "host"
>element within this method? The purpose of this method is to create and
>return the HTML Element that will be rendered by the Web Page Editor. If
>you are trying to change an Element in the source document, this is not the
>place to attempt it.
>
> - Ian, JSF Tools Project
>
Hi Ian:
Thank you for your help.
first, I show the use case follow:
when I show the some tag , the tag don't use the "style" attribute to
control its size but
only use the special attribute "width" or "height". It means that the
"style" attribute is useless .
So when user resize the host element by web page editor ,"style" attribute
value of the host element was changed,then
the special attribute "width" or "height" should be change .
You are right,The converter's purpose is ONLY convert the tag element to
html tag element,so I think that I should install new EditPoliy for the
special tag , then I can change the host element attribute value use by some
GEF commands when I can get the resize request by my EditPolicy , right?
|
|
| | | | | |
Re: Where can I change the HostElement attribute value? [message #614199 is a reply to message #475032] |
Thu, 16 August 2007 23:10 |
Ian Trimble Messages: 137 Registered: July 2009 |
Senior Member |
|
|
To add a little more information to my previous posting, typically you
would call createElement(String) to create a new Element, manipulate this
new Element's attributes, and ultimately return the new Element.
For example:
Element resultElement = createElement("input");
resultElement.setAttribute("type", "text");
resultElement.setAttribute("value",
getHostElement().getAttribute("value"));
resultElement.setAttribute("maxsize", "80");
return resultElement;
The method "getHostElement()" will return the source document's Element
that is being converted, and even if you could manipulate it from within
the tag converter, this would not affect the expected result of a tag
conversion.
Perhaps I do not understand what it is you are attempting to do in your
tag converter. Please feel free to elaborate further.
- Ian, JSF Tools Project
|
|
|
Re: Where can I change the HostElement attribute value? [message #614203 is a reply to message #475032] |
Fri, 17 August 2007 02:41 |
Dart peng Messages: 27 Registered: July 2009 |
Junior Member |
|
|
"Ian Trimble" <ian.trimble@oracle.com>
??????:24108ccc01065d107d035447a639b132$1@www.eclipse.org...
>I don't think I understand the use case. Why are you changing the "host"
>element within this method? The purpose of this method is to create and
>return the HTML Element that will be rendered by the Web Page Editor. If
>you are trying to change an Element in the source document, this is not the
>place to attempt it.
>
> - Ian, JSF Tools Project
>
Hi Ian:
Thank you for your help.
first, I show the use case follow:
when I show the some tag , the tag don't use the "style" attribute to
control its size but
only use the special attribute "width" or "height". It means that the
"style" attribute is useless .
So when user resize the host element by web page editor ,"style" attribute
value of the host element was changed,then
the special attribute "width" or "height" should be change .
You are right,The converter's purpose is ONLY convert the tag element to
html tag element,so I think that I should install new EditPoliy for the
special tag , then I can change the host element attribute value use by some
GEF commands when I can get the resize request by my EditPolicy , right?
|
|
| | | | |
Goto Forum:
Current Time: Wed Sep 25 01:33:26 GMT 2024
Powered by FUDForum. Page generated in 0.29225 seconds
|