3
I have a select on my page that should have its value and caption populated through a list of Strings that come from my Action.
I am sending the list correctly, because I see the combo have the number of elements of the same size as the list, but I do not know how to identify the value and description in Taglib.
<s:select name="status" list="status" headerKey="" headerValue="-- Selecione --" id="statusMedico" listKey="" listValue="" />
What should I use in listKey
and listValue
to popular the options?
The method in action:
public List<String> getStatus() {
return Arrays.asList("Ativo", "Inativo");
}
I don’t know much about Trouts. See if this link helps you: http://www.mkyong.com/struts2/struts-2-sselect-drop-down-box-example/. This japa is fera.
– Edgar Muniz Berlinck
Thank you, @Edgarmunizberlinck. But the answer is only to remove attributes
listKey
andlistValue
.– Philippe Gioseffi