You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by jnl1 <it...@yahoo.com> on 2008/04/08 22:39:45 UTC
af:selectOneChoice
hi all..
I'm new to faces and having a little trouble setting a value in a list.
The list is part of an editable table. The table displays fine and I have
an af:inputText that is being populated fine as well. I have 2
selectOneChoice dropdowns and neither is getting set. Below is one of the
selectOneChoice elements. I hardcoded the 'value' attribute while
debugging. The 'value' should be set to value="#{row.groupId}". Both
scenarios are not working. If I use just <h:outputText
value="#{row.status}"></h:outputText> the value is displayed correctly.
Below is my code:
xmlns:af="http://xmlns.oracle.com/adf/faces"
<af:column sortable="true" sortProperty="group">
<f:facet name="header">
<h:outputText value="#{messages['group']}"/>
</f:facet>
<af:selectOneChoice
id="existingStandardGroupId"
value="1"
required="false"
label="#{messages['group.id']}:"
readOnly="false" unselectedLabel="">
<c:if test="${!empty criteriaGroupIdBackingList}">
<f:selectItems value="#{criteriaGroupIdBackingList}"
/>
</c:if>
</af:selectOneChoice>
</af:column>
The source html:
<!-- Start: oracle.adf.Column["_id69"] -->
<td class="x2m x60"><!-- Start:
oracle.adf.SelectOne["existingStandardGroupId"] -->
<select id="_id54:_id55:1:existingStandardGroupId"
name="_id54:_id55:1:existingStandardGroupId" class="x6">
<option value=""></option>
<option value="0">ASTM 31.15</option>
<option value="1">ASTM 31.25</option>
<option value="2">ASTM 31.35</option>
<option value="3">BRIDG</option>
<option value="4">CDISC ADaM</option>
Error from server log:
13:46:30,260 INFO [STDOUT] Apr 8, 2008 1:46:30 PM
oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer
_getSelectedIndex
WARNING: Could not find selected item matching value "1" in
CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=existingStandardGroupId]
13:46:30,267 INFO [STDOUT] Apr 8, 2008 1:46:30 PM
oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer
_getSelectedIndex
WARNING: Could not find selected item matching value "1" in
CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=existingStandardGroupId]
any ideas/help is greatly appreciated...
thanks
--
View this message in context: http://www.nabble.com/af%3AselectOneChoice-tp16572647p16572647.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: af:selectOneChoice
Posted by jnl1 <it...@yahoo.com>.
I set the backing bean. it's in a row element and if I just output the
value, it's displayed correctly.
thanks on the feedback...i'll try posting to the oracle forums to see if
they can help out...
Richard Yee-3 wrote:
>
> You don't want to have this in your tag (value="1") This will hardcode the
> value returned by the component to be 1. You should have an EL expression
> in
> the value attribute to refer to a property in your backing bean. If you
> are
> trying to preselect an item in your list, then you should set the backing
> bean attribute for the SelectOneChoice to that value.
>
> -R
>
>
>
> On 4/8/08, jnl1 <it...@yahoo.com> wrote:
>>
>>
>> hi all..
>>
>> I'm new to faces and having a little trouble setting a value in a list.
>> The list is part of an editable table. The table displays fine and I
>> have
>> an af:inputText that is being populated fine as well. I have 2
>> selectOneChoice dropdowns and neither is getting set. Below is one of
>> the
>> selectOneChoice elements. I hardcoded the 'value' attribute while
>> debugging. The 'value' should be set to value="#{row.groupId}". Both
>> scenarios are not working. If I use just <h:outputText
>> value="#{row.status}"></h:outputText> the value is displayed correctly.
>>
>> Below is my code:
>>
>> xmlns:af="http://xmlns.oracle.com/adf/faces"
>>
>> <af:column sortable="true" sortProperty="group">
>> <f:facet name="header">
>> <h:outputText value="#{messages['group']}"/>
>> </f:facet>
>> <af:selectOneChoice
>> id="existingStandardGroupId"
>> value="1"
>> required="false"
>> label="#{messages['group.id']}:"
>> readOnly="false" unselectedLabel="">
>> <c:if test="${!empty criteriaGroupIdBackingList}">
>> <f:selectItems
>> value="#{criteriaGroupIdBackingList}"
>> />
>> </c:if>
>> </af:selectOneChoice>
>> </af:column>
>>
>>
>> The source html:
>>
>> <!-- Start: oracle.adf.Column["_id69"] -->
>>
>> <td class="x2m x60"><!-- Start:
>> oracle.adf.SelectOne["existingStandardGroupId"] -->
>> <select id="_id54:_id55:1:existingStandardGroupId"
>> name="_id54:_id55:1:existingStandardGroupId" class="x6">
>> <option value=""></option>
>> <option value="0">ASTM 31.15</option>
>> <option value="1">ASTM 31.25</option>
>> <option value="2">ASTM 31.35</option>
>> <option value="3">BRIDG</option>
>> <option value="4">CDISC ADaM</option>
>>
>>
>> Error from server log:
>> 13:46:30,260 INFO [STDOUT] Apr 8, 2008 1:46:30 PM
>> oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer
>> _getSelectedIndex
>> WARNING: Could not find selected item matching value "1" in
>> CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=existingStandardGroupId]
>> 13:46:30,267 INFO [STDOUT] Apr 8, 2008 1:46:30 PM
>> oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer
>> _getSelectedIndex
>> WARNING: Could not find selected item matching value "1" in
>> CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=existingStandardGroupId]
>>
>> any ideas/help is greatly appreciated...
>>
>> thanks
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/af%3AselectOneChoice-tp16572647p16572647.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/af%3AselectOneChoice-tp16572647p16576527.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: af:selectOneChoice
Posted by Richard Yee <ri...@gmail.com>.
You don't want to have this in your tag (value="1") This will hardcode the
value returned by the component to be 1. You should have an EL expression in
the value attribute to refer to a property in your backing bean. If you are
trying to preselect an item in your list, then you should set the backing
bean attribute for the SelectOneChoice to that value.
-R
On 4/8/08, jnl1 <it...@yahoo.com> wrote:
>
>
> hi all..
>
> I'm new to faces and having a little trouble setting a value in a list.
> The list is part of an editable table. The table displays fine and I have
> an af:inputText that is being populated fine as well. I have 2
> selectOneChoice dropdowns and neither is getting set. Below is one of the
> selectOneChoice elements. I hardcoded the 'value' attribute while
> debugging. The 'value' should be set to value="#{row.groupId}". Both
> scenarios are not working. If I use just <h:outputText
> value="#{row.status}"></h:outputText> the value is displayed correctly.
>
> Below is my code:
>
> xmlns:af="http://xmlns.oracle.com/adf/faces"
>
> <af:column sortable="true" sortProperty="group">
> <f:facet name="header">
> <h:outputText value="#{messages['group']}"/>
> </f:facet>
> <af:selectOneChoice
> id="existingStandardGroupId"
> value="1"
> required="false"
> label="#{messages['group.id']}:"
> readOnly="false" unselectedLabel="">
> <c:if test="${!empty criteriaGroupIdBackingList}">
> <f:selectItems
> value="#{criteriaGroupIdBackingList}"
> />
> </c:if>
> </af:selectOneChoice>
> </af:column>
>
>
> The source html:
>
> <!-- Start: oracle.adf.Column["_id69"] -->
>
> <td class="x2m x60"><!-- Start:
> oracle.adf.SelectOne["existingStandardGroupId"] -->
> <select id="_id54:_id55:1:existingStandardGroupId"
> name="_id54:_id55:1:existingStandardGroupId" class="x6">
> <option value=""></option>
> <option value="0">ASTM 31.15</option>
> <option value="1">ASTM 31.25</option>
> <option value="2">ASTM 31.35</option>
> <option value="3">BRIDG</option>
> <option value="4">CDISC ADaM</option>
>
>
> Error from server log:
> 13:46:30,260 INFO [STDOUT] Apr 8, 2008 1:46:30 PM
> oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer
> _getSelectedIndex
> WARNING: Could not find selected item matching value "1" in
> CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=existingStandardGroupId]
> 13:46:30,267 INFO [STDOUT] Apr 8, 2008 1:46:30 PM
> oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer
> _getSelectedIndex
> WARNING: Could not find selected item matching value "1" in
> CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=existingStandardGroupId]
>
> any ideas/help is greatly appreciated...
>
> thanks
>
>
>
> --
> View this message in context:
> http://www.nabble.com/af%3AselectOneChoice-tp16572647p16572647.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>
Re: af:selectOneChoice
Posted by Simon Lessard <si...@gmail.com>.
p.s. You might try valuePassThru="true" on your selectOneChoice components
though, it might works.
On Tue, Apr 8, 2008 at 4:49 PM, Simon Lessard <si...@gmail.com>
wrote:
> Hello,
>
> For ADF Faces questions please refer to the JDeveloper forum at
> http://forums.oracle.com.
>
>
> Regards,
>
> ~ Simon
>
>
> On Tue, Apr 8, 2008 at 4:39 PM, jnl1 <it...@yahoo.com> wrote:
>
> >
> > hi all..
> >
> > I'm new to faces and having a little trouble setting a value in a
> > list.
> > The list is part of an editable table. The table displays fine and I
> > have
> > an af:inputText that is being populated fine as well. I have 2
> > selectOneChoice dropdowns and neither is getting set. Below is one of
> > the
> > selectOneChoice elements. I hardcoded the 'value' attribute while
> > debugging. The 'value' should be set to value="#{row.groupId}". Both
> > scenarios are not working. If I use just <h:outputText
> > value="#{row.status}"></h:outputText> the value is displayed correctly.
> >
> > Below is my code:
> >
> > xmlns:af="http://xmlns.oracle.com/adf/faces"
> >
> > <af:column sortable="true" sortProperty="group">
> > <f:facet name="header">
> > <h:outputText value="#{messages['group']}"/>
> > </f:facet>
> > <af:selectOneChoice
> > id="existingStandardGroupId"
> > value="1"
> > required="false"
> > label="#{messages['group.id']}:"
> > readOnly="false" unselectedLabel="">
> > <c:if test="${!empty criteriaGroupIdBackingList}">
> > <f:selectItems
> > value="#{criteriaGroupIdBackingList}"
> > />
> > </c:if>
> > </af:selectOneChoice>
> > </af:column>
> >
> >
> > The source html:
> >
> > <!-- Start: oracle.adf.Column["_id69"] -->
> >
> > <td class="x2m x60"><!-- Start:
> > oracle.adf.SelectOne["existingStandardGroupId"] -->
> > <select id="_id54:_id55:1:existingStandardGroupId"
> > name="_id54:_id55:1:existingStandardGroupId" class="x6">
> > <option value=""></option>
> > <option value="0">ASTM 31.15</option>
> > <option value="1">ASTM 31.25</option>
> > <option value="2">ASTM 31.35</option>
> > <option value="3">BRIDG</option>
> > <option value="4">CDISC ADaM</option>
> >
> >
> > Error from server log:
> > 13:46:30,260 INFO [STDOUT] Apr 8, 2008 1:46:30 PM
> >
> > oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer
> > _getSelectedIndex
> > WARNING: Could not find selected item matching value "1" in
> > CoreSelectOneChoice[UIXEditableFacesBeanImpl,
> > id=existingStandardGroupId]
> > 13:46:30,267 INFO [STDOUT] Apr 8, 2008 1:46:30 PM
> >
> > oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer
> > _getSelectedIndex
> > WARNING: Could not find selected item matching value "1" in
> > CoreSelectOneChoice[UIXEditableFacesBeanImpl,
> > id=existingStandardGroupId]
> >
> > any ideas/help is greatly appreciated...
> >
> > thanks
> >
> >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/af%3AselectOneChoice-tp16572647p16572647.html
> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >
> >
>
Re: af:selectOneChoice
Posted by Simon Lessard <si...@gmail.com>.
Hello,
For ADF Faces questions please refer to the JDeveloper forum at
http://forums.oracle.com.
Regards,
~ Simon
On Tue, Apr 8, 2008 at 4:39 PM, jnl1 <it...@yahoo.com> wrote:
>
> hi all..
>
> I'm new to faces and having a little trouble setting a value in a list.
> The list is part of an editable table. The table displays fine and I have
> an af:inputText that is being populated fine as well. I have 2
> selectOneChoice dropdowns and neither is getting set. Below is one of the
> selectOneChoice elements. I hardcoded the 'value' attribute while
> debugging. The 'value' should be set to value="#{row.groupId}". Both
> scenarios are not working. If I use just <h:outputText
> value="#{row.status}"></h:outputText> the value is displayed correctly.
>
> Below is my code:
>
> xmlns:af="http://xmlns.oracle.com/adf/faces"
>
> <af:column sortable="true" sortProperty="group">
> <f:facet name="header">
> <h:outputText value="#{messages['group']}"/>
> </f:facet>
> <af:selectOneChoice
> id="existingStandardGroupId"
> value="1"
> required="false"
> label="#{messages['group.id']}:"
> readOnly="false" unselectedLabel="">
> <c:if test="${!empty criteriaGroupIdBackingList}">
> <f:selectItems
> value="#{criteriaGroupIdBackingList}"
> />
> </c:if>
> </af:selectOneChoice>
> </af:column>
>
>
> The source html:
>
> <!-- Start: oracle.adf.Column["_id69"] -->
>
> <td class="x2m x60"><!-- Start:
> oracle.adf.SelectOne["existingStandardGroupId"] -->
> <select id="_id54:_id55:1:existingStandardGroupId"
> name="_id54:_id55:1:existingStandardGroupId" class="x6">
> <option value=""></option>
> <option value="0">ASTM 31.15</option>
> <option value="1">ASTM 31.25</option>
> <option value="2">ASTM 31.35</option>
> <option value="3">BRIDG</option>
> <option value="4">CDISC ADaM</option>
>
>
> Error from server log:
> 13:46:30,260 INFO [STDOUT] Apr 8, 2008 1:46:30 PM
> oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer
> _getSelectedIndex
> WARNING: Could not find selected item matching value "1" in
> CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=existingStandardGroupId]
> 13:46:30,267 INFO [STDOUT] Apr 8, 2008 1:46:30 PM
> oracle.adfinternal.view.faces.renderkit.core.xhtml.SimpleSelectOneRenderer
> _getSelectedIndex
> WARNING: Could not find selected item matching value "1" in
> CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=existingStandardGroupId]
>
> any ideas/help is greatly appreciated...
>
> thanks
>
>
>
> --
> View this message in context:
> http://www.nabble.com/af%3AselectOneChoice-tp16572647p16572647.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>