Title: InputSuggest and CSS
For all who have the same problem: I have achieved it by modifying the InputSuggestRenderer.class in the sandbox.jar file in the directory: org/apache/myfaces/custom/suggest
 
There I have added the following line:
 
 private void renderInputField(ResponseWriter out, String text, String clientId, UIComponent component)
        throws IOException
    {
        out.startElement("input", component);
        out.writeAttribute("name", clientId, null);
        out.writeAttribute("id", clientId, null);
        out.writeAttribute("autocomplete", "off", null);
        out.writeAttribute("style","FONT-SIZE: 11px; FONT-FAMILY: Verdana, Geneva, Helvetica, Arial;border: #676767 1px solid;background: #FDFDC8;",null);
        if(text != null)
            out.writeAttribute("value", text, "value");
        else
            out.writeAttribute("value", "", "value");
        out.endElement("input");
    }
 
It worked like I wanted. The solution might be a bit strange, but it works...
 
 
-----Ursprüngliche Nachricht-----
Von: Mitter Andreas, IDE
Gesendet: Montag, 26. September 2005 16:47
An: [email protected]
Betreff: InputSuggest and CSS

Hi!

Has anyone Experiences with InputSuggest Component and CSS.

I have tried:
<x:inputSuggest value="#{newPartnerDto.fname}" required="true" style="FONT-SIZE: 11px;
FONT-FAMILY: Verdana, Geneva, Helvetica, Arial; border: #676767 1px solid; background: #FDFDC8;">
        <f:selectItems value="#{queryHelper.tm}" />
</x:inputSuggest>

but the style isn't set.

With a normal Input Box it works, so how do I have to use CSS with the sandbox Components?

Regards,
Andy


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to