I am totally stumped with a problem.
I have a Faces
JSP and a corresponding backing bean
In the faces JSP I have:
h:inputText id="bodybgcolor" value="# {pc_PageProperties.bbgcolor}"
/h:inputText
h:selectOneMenu id="bodyFontType"
value="#{pc_PageProperties.selectedbodyfont}"
f:selectItemsvalue="#{pc_PageProperties.fontlist}"
/h:selectOneMenu
h:inputText id="textnumone" value="#{pc_PageProperties.btxtcolor}" size="20"
/h:inputText
There are other
JSF & HTML components on the page, but I'm
mainly concerned with the above.
What I want to do is perform the setStyle method on
the h:inputText fields in the backing bean.
I first perform the get??? methods to instantiate
them in the bean. Then I'll call the setStyle method.
When I try to setStyle on inputtext field "textnumone"
for some odd reason, I am getting a null pointer exception.
I can set the style on the "bodybgcolor" just fine in
the bean.
Example of the "get" method
protected HtmlInputText getTextnumone()
{
if (textnumone == null)
{
textnumone = (HtmlInputText) findComponentInRoot("textnumone");
}
return textnumone;
}
Any help would be greatly appreciated. I hope what I have above isn't
to messy.
Chris