| Author |
Message |
|
|
Post subject: Renderer simple color bug
Posted: Aug 27, 2010 - 08:46 AM
|
|
Registered Member


Joined: Oct 15, 2005
Posts: 212
|
|
hi
I am using the renderer simple example to change the color of the ouput code using this java renderer
package renderer ;
public class BlueOutputRenderer extends OutputModificationRenderer {
public String doModification(String value) {
value = "<font color=\'red\'>" + value + "</font>"; // not changing clor why?
return(value);
}
}
The bug is the output value is shown but with no color change instead it adds the html code as it s to the value. why ?
how could I append the above simple line to work ?
do not worry about the super class OutputModificationRenderer as it is fine and general
so many thanks
Amir |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: Renderer simple color bug
Posted: Aug 27, 2010 - 11:42 AM
|
|
Registered Member

Joined: May 18, 2009
Posts: 1532
|
|
|
_________________ Shalini
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: RE: Renderer simple color bug
Posted: Aug 27, 2010 - 12:27 PM
|
|
Registered Member


Joined: Feb 03, 2009
Posts: 3442
|
|
Amir,
Can you refresh the page after rendering? Probably you need to execute an event to ensure the color change. |
_________________ Joy
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Aug 29, 2010 - 07:23 AM
|
|
Registered Member


Joined: Oct 15, 2005
Posts: 212
|
|
dear all
thank you but the refresh is not working.
I do not use c:out but the jsf outputText
<h:outputText value="#{msgs.quote1}"></h:outputText>
the msgs is for the resourceBundle.proerties to pass a hello world message.
many thanks if you know a certain site or reason.
Amir |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Aug 30, 2010 - 06:59 AM
|
|
Registered Member

Joined: May 18, 2009
Posts: 1532
|
|
|
_________________ Shalini
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Aug 30, 2010 - 09:57 AM
|
|
Registered Member


Joined: Oct 15, 2005
Posts: 212
|
|
hi dear
still the escape is not working
simply how to get outputText to run html code
greeting=Hello World! // defined in resoulceBundle
<h:outputText value="#{msgs.greeting}" escape="false" ></h:outputText>
public class BlueOutputRenderer extends OutputModificationRenderer {
public String doModification(String value) {
value = "<font color=\'red\'>" + value + "</font>";
return(value);
}
}
the jsf should display Hello World in red color but instead I get the html code in red on the browser
"<font color=\'red\'>" Hello World "</font>";
lots of thanks
Amir |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Aug 31, 2010 - 06:50 AM
|
|
Registered Member

Joined: May 18, 2009
Posts: 1532
|
|
Amir,
This looks more like a development issue, can you cross post the relevant forums? |
_________________ Shalini
MyEclipse Support
|
| |
|
|
|
 |
|
|