Originally posted by Daniel Prene:
Just trying to apeas the boss. I think he's woried about having to grab the int value whenever dealing with the accessor methods outside the forms
Originally posted by Adeel Ansari:
Surely, I am here to help you out mate, if I can. But for code, I'm sorry to say its proprietry.
BTW, you didn't respond to my question. It might be helpful for me to tell you the real reason or solve your problem.
Originally posted by Rob HK:
We're using the Sun reference implementation version 1.1.
Originally posted by Paul Smiley:
Well, I have a HtmlSelectOneMenu component that has a value of 1 member of the backing bean and the SelectItem options are populated with another member which is a list of potential values. When the page renders, the first element of the list always displays in the list, not the current value as held in the backing bean element 1. It seems like some type of translation to the Html Option selected="true" needs to be rendered, but I don't know how to do it. It seems like the data element is not bound to the component.
Thanks,
Paul
Originally posted by Jolie Lee:
hmm, i tried to have two forms, but when i submit the first form, it shows me validation error cos my 2nd forms there's validation checking....
how should i go about it?
Originally posted by Paul Smiley:
OK, related question. How do you get the combo box to select the current value from the bean on page population? I can't seem to get the list to coordinate with the value chosen. Thanks
Originally posted by Paul Smiley:
I have a HtmlSelectOne component on a form. My value-changed listener is not working - never enters the method in the backing bean. I have registered the property in the faces-config.xml:
<managed-property>
<property-name>classIfSelItem</property-name>
<null-value/>
</managed-property>
<h:selectOneMenu id="classification" value="#{form.classIfSelItem}" converter="ItemConverter" valueChangeListener="#{form.processValueChange}"
immediate="true" >
<f:selectItems value="#{list.classifList}" />
</h:selectOneMenu>
And my method:
public void processValueChange(ValueChangeEvent event){
HtmlSelectOneMenu selOne = (HtmlSelectOneMenu)event.getComponent();
System.out.println(selOne.getValue());
System.out.println(selOne.getId());
event.getOldValue();
event.getNewValue();
}
This method never gets entered. Any ideas?
Originally posted by Mauro Castaldo:
Mauro
Originally posted by Gregg Bolinger:
That makes sense to me. Ok, since we are on this topic, I have a question. Say I want to change an outputText component to be red when there is an error with it's associated inputText field. If I am using the standard validatators, where can I check for errors to exist to change that label? Would I have to catch this in a phase listener of some sort?
Originally posted by Rob HK:
Hi,
I have the following code to create a selectOneMenu:
<h:selectOneMenu id="country" tabindex="12" value="#{myForm.country}" disabled="true"
>
<f:selectItems value="#{enumeratiesBean.countries}"/>
</h:selectOneMenu>
and it generates the following starttag:
<select id="body:myForm:country" name="body:myForm:country" size="1" tabindex="12">
The problem is that the disabled attribute is not being rendered at all. Does anyone know this problem?
Greets,
Rob
Originally posted by Sloan Bowman:
What is the best way to go about creating a template to use with JSF. Currently the only way I have figured out how to do this is to create one .jsp file with includes but the problem is you have to create several navigation cases within the one navigational rule because I can't seem to get the forms to post with parameters. Any ideas what the best method to do this is so I don't have to include a header, footer, menu etc.. in each and every jsp page?
[ July 21, 2005: Message edited by: Sloan Bowman ]