facebook

Renderer simple color bug

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #310932 Reply

    amir55
    Participant

    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

    #310937 Reply

    Amir,
    Are you setting the output of BlueOutputRenderer in any JSP using c:out?
    In that case, the tag has an escapeXml attribute that should be set to false.
    Please refer to the following link for further reference –
    http://publib.boulder.ibm.com/infocenter/wchelp/v5r6/index.jsp?topic=/com.ibm.commerce.developer.doc/refs/rsdjspbpescapexml.htm

    #310938 Reply

    support-joy
    Member

    Amir,

    Can you refresh the page after rendering? Probably you need to execute an event to ensure the color change.

    #310952 Reply

    amir55
    Participant

    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

    #310960 Reply

    Amir,
    You can use escape=”false”
    Please refer to
    http://www.roseindia.net/jsf/outputText.shtml

    #310962 Reply

    amir55
    Participant

    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

    #310984 Reply

    Amir,
    This looks more like a development issue, can you cross post the relevant forums?

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Renderer simple color bug

You must be logged in to post in the forum log in