Re: Regarding <jf:mxmlComboBox>

2 views
Skip to first unread message

Jihoon Kim

unread,
Nov 24, 2008, 1:34:02 PM11/24/08
to Raj Kumar, jsf-...@googlegroups.com
Hi Raj,

Currently there does not exist dataBinding of label/data for
mxmlComboBox, but simply of the selected label + selectedIndex.
However, since I have implemented the data retrieval of DataGrid
component through service over the past weekend [work still needs to
be done in updating the info when modification], I do plan on working
in dataBinding of other components this coming weekend. Of course I
wanted to write the code in a "non messy" way and that is why I have
tabled this portion of dataBinding right now. Currently there exists a
method of setting the fields of mxmlComboBox through writing of
actionscript or having child mxmlDataProvider tags, but they are
simply a temporary solution until a real solution with "non messiness"
is figured out.

Below is the content from mxmlExampl.jsp. Since it will be a long
weekend, hopefully I will be able to perform a deal of modification.
Thanks!

<jf:mxmlComboBox text="#{mxmlBean.comboBoxText}"
selectedIndex="#{mxmlBean.comboBoxSelectedIndex}" >
<jf:mxmlDataProvider>
<jf:mxmlObject label="First" data="First" />
<jf:mxmlObject label="Second" data="Second" />
</jf:mxmlDataProvider>
</jf:mxmlComboBox>

On Mon, Nov 24, 2008 at 8:02 AM, Raj Kumar <rna...@gmail.com> wrote:
> Dear Jihoon Kim,
>
> Thanks a lot for the exceptional work done.
>
> I was trying out the some modifications in the example provided by you. and
> i was trying to load values to <jf:mxmlComboBox>
>
> Details:
>
> I added a List in MXMLBean.java
>
> private List<SelectItem> officeList ;
>
> /**
> * @return the officeList
> */
> public List<SelectItem> getOfficeList() {
> if ( officeList == null ) {
> officeList = new ArrayList<SelectItem>();
> officeList .add( new SelectItem( "One" , "1" ));
> officeList .add( new SelectItem( "Two" , "2" ));
> }
> return officeList ;
> }
>
> /**
> * @param officeList the officeList to set
> */
> public void setOfficeList(List<SelectItem> officeList) {
> this . officeList = officeList;
> }
>
> I was trying to retieve the value in the combobox. tried different ways
> .could you please help me out where i went wrong.
>
> Thanks in advance.
> Rajkumar.P
>
>
>

--
Sincerely,

Ji Hoon Kim

Reply all
Reply to author
Forward
0 new messages