You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bojke <bo...@aim.ac.yu> on 2004/03/04 17:33:05 UTC
optionsCollection struts 1.1
Hi,
I don't see optionsCollection in struts1.1
Is there optionsCollection in struts1.1?
I have ArrayList as property of FormBean. ArrayList is collection of
beans. Beans of course has a propreties.
Does anybody know how to dislpay e.g bean property beanName using
html:options
in drop-down list.
Thanks,
Bojan
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: optionsCollection struts 1.1
Posted by bojke <bo...@aim.ac.yu>.
as as wrote:
>Good explanation.Then any way to set a default value show up in the list...onthe jsp page...
>
>Thanks
>
>yoge <yo...@adventnet.com> wrote:
>
>
>
>
>For the above to work, your FormBean should have a property *conditions*
>with type as Collection.
>The coditions should be collection of properties and each should have
>two property Label and Value for display and value for the tag.
>
>In short , conditions property should contain collection of JavaBean
>given below
>
>public class Option
>{
>String label ="";
>String value = "";
>
>public String getLabel()
>{
>return label;
>}
>public String getValue()
>{
>return value;
>}
>public void setLabel(String temp)
>{
>this.label=temp;
>}
>public void setValue(String temp)
>{
>this.value=temp;
>}
>}
>
>
>Hope this helps
>
>--Yoge
>
>
>bojke wrote:
>
>
>
>>Hi,
>>
>>I don't see optionsCollection in struts1.1
>>Is there optionsCollection in struts1.1?
>>
>>I have ArrayList as property of FormBean. ArrayList is collection of
>>beans. Beans of course has a propreties.
>>Does anybody know how to dislpay e.g bean property beanName using
>>html:options
>>in drop-down list.
>>
>>Thanks,
>>Bojan
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>>
>
>
>
>
>---------------------------------
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free web site building tool. Try it!
>
>
Yes, it helps.
Thans guys,
Bojan
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: optionsCollection struts 1.1
Posted by as as <sa...@yahoo.com>.
Good explanation.Then any way to set a default value show up in the list...onthe jsp page...
Thanks
yoge <yo...@adventnet.com> wrote:
For the above to work, your FormBean should have a property *conditions*
with type as Collection.
The coditions should be collection of properties and each should have
two property Label and Value for display and value for the tag.
In short , conditions property should contain collection of JavaBean
given below
public class Option
{
String label ="";
String value = "";
public String getLabel()
{
return label;
}
public String getValue()
{
return value;
}
public void setLabel(String temp)
{
this.label=temp;
}
public void setValue(String temp)
{
this.value=temp;
}
}
Hope this helps
--Yoge
bojke wrote:
> Hi,
>
> I don't see optionsCollection in struts1.1
> Is there optionsCollection in struts1.1?
>
> I have ArrayList as property of FormBean. ArrayList is collection of
> beans. Beans of course has a propreties.
> Does anybody know how to dislpay e.g bean property beanName using
> html:options
> in drop-down list.
>
> Thanks,
> Bojan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
Re: optionsCollection struts 1.1
Posted by as as <sa...@yahoo.com>.
Good explanation.Then any way to set a default value show up in the list...onthe jsp page...
Thanks
yoge <yo...@adventnet.com> wrote:
For the above to work, your FormBean should have a property *conditions*
with type as Collection.
The coditions should be collection of properties and each should have
two property Label and Value for display and value for the tag.
In short , conditions property should contain collection of JavaBean
given below
public class Option
{
String label ="";
String value = "";
public String getLabel()
{
return label;
}
public String getValue()
{
return value;
}
public void setLabel(String temp)
{
this.label=temp;
}
public void setValue(String temp)
{
this.value=temp;
}
}
Hope this helps
--Yoge
bojke wrote:
> Hi,
>
> I don't see optionsCollection in struts1.1
> Is there optionsCollection in struts1.1?
>
> I have ArrayList as property of FormBean. ArrayList is collection of
> beans. Beans of course has a propreties.
> Does anybody know how to dislpay e.g bean property beanName using
> html:options
> in drop-down list.
>
> Thanks,
> Bojan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster.
Re: optionsCollection struts 1.1
Posted by yoge <yo...@adventnet.com>.
<html:select property="*name*">
<html:optionsCollection property="*conditions*" />
</html:select>
For the above to work, your FormBean should have a property *conditions*
with type as Collection.
The coditions should be collection of properties and each should have
two property Label and Value for display and value for the <option> tag.
In short , conditions property should contain collection of JavaBean
given below
public class Option
{
String label ="";
String value = "";
public String getLabel()
{
return label;
}
public String getValue()
{
return value;
}
public void setLabel(String temp)
{
this.label=temp;
}
public void setValue(String temp)
{
this.value=temp;
}
}
Hope this helps
--Yoge
bojke wrote:
> Hi,
>
> I don't see optionsCollection in struts1.1
> Is there optionsCollection in struts1.1?
>
> I have ArrayList as property of FormBean. ArrayList is collection of
> beans. Beans of course has a propreties.
> Does anybody know how to dislpay e.g bean property beanName using
> html:options
> in drop-down list.
>
> Thanks,
> Bojan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>