You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Stefan Gesigora <sg...@googlemail.com> on 2006/08/04 16:12:41 UTC
SelectOneRow problem: only called every second time
Hi!
I've got some problems with the SelectOneRow tag using it into a data table.
It is shown in the right way but my "doPrimaryAddressSelected" method used
with the valueChangeListener were only every second time called.
In other words:
After the first radio button selection I've made nothing happened. After the
second the doPrimaryAddressSelected method were called.
After the third nothing happened. After the fourth the method were called.
The whole thing is used as MyFacesPortlet. Could this be the problem?
Can anyone help me?
regards,
Steven
----snipp begin---
<t:dataTable
value="#{overviewBean.subOverviewBean.group.addressesAccepted}"
var="row" height="70px"
cellpadding="10px" cellspacing="0px" width="100%"
preserveDataModel="false"
renderedIfEmpty="false">
<h:column>
<f:facet name="header">
<h:outputText value="#{res.lbl_primary}" title="#{
res.lbl_primary}"/>
</f:facet>
<s:selectOneRow groupName="selection1" id="addressSel"
value="#{overviewBean.subOverviewBean.selAdrRowIndex}"
onchange="submit();" immediate="true"
valueChangeListener="#{
overviewBean.doPrimaryAddressSelected}"/>
</h:column>
....
--------snipp end--------
--------snipp begin-----
public void doPrimaryAddressSelected(ValueChangeEvent event){
Long newVal = (Long) event.getNewValue();
Long oldVal = (Long) event.getOldValue();
SelectOneRow radioButton = (SelectOneRow)event.getComponent();
Object val = radioButton.getValue();
String id = radioButton.getId();
if (val != null){
int selIndex = Integer.parseInt(val.toString());
...
--------snipp end--------
Re: SelectOneRow problem: only called every second time
Posted by Mike Kienenberger <mk...@gmail.com>.
Using different versions for Tomahawk and Sandbox is NOT supported.
Things will mysteriously break.
It's unclear if you're using MyFaces Core 1.1.3 as well, and
unfortunately, 1.1.3 is not compatible with 1.1.4 between Core and
Tomahawk due to a bug fix for JSF RI javascript compatibility.
On 9/14/06, prem <ke...@yahoo.com> wrote:
> I had the same problem, there was a panelGroup tag which had an id specified,
> I removed the id and tada..it worked!
>
> I'm using MyFaces/Tomahawk 1.13/Sandbox 1.1.4 with the MyFaces Portlet bridge.
>
> HTH
> Prem
>
>
>
Re: SelectOneRow problem: only called every second time
Posted by prem <ke...@yahoo.com>.
I had the same problem, there was a panelGroup tag which had an id specified,
I removed the id and tada..it worked!
I'm using MyFaces/Tomahawk 1.13/Sandbox 1.1.4 with the MyFaces Portlet bridge.
HTH
Prem
Re: SelectOneRow problem: only called every second time
Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Read your post and tried the component.
It works for me - everytime i click on the radion button a event is
fired - everytime.
I am using complete 1.1.4 snapshot + facelets 1.1.11 and it works - i
can't force the behaviour you described.
kind regards
Am Sonntag, den 06.08.2006, 20:38 +0200 schrieb Stefan Gesigora:
> Hi!
>
> Doesn't anbody know the reason for this curious attitude?
> Plz help.
>
> regards,
> Stefan
>
> 2006/8/4, Stefan Gesigora <sg...@googlemail.com>:
> Hi!
>
> I've got some problems with the SelectOneRow tag using it into
> a data table.
> It is shown in the right way but my "doPrimaryAddressSelected"
> method used with the valueChangeListener were only every
> second time called.
> In other words:
> After the first radio button selection I've made nothing
> happened. After the second the doPrimaryAddressSelected method
> were called.
> After the third nothing happened. After the fourth the method
> were called.
>
> The whole thing is used as MyFacesPortlet. Could this be the
> problem?
>
> Can anyone help me?
>
> regards,
> Steven
>
> ----snipp begin---
>
> <t:dataTable
>
> value="#{overviewBean.subOverviewBean.group.addressesAccepted }"
> var="row" height="70px"
> cellpadding="10px" cellspacing="0px" width="100%"
> preserveDataModel="false"
> renderedIfEmpty="false">
>
> <h:column>
> <f:facet name="header">
> <h:outputText value="#{res.lbl_primary}"
> title="#{res.lbl_primary}"/>
> </f:facet>
>
> <s:selectOneRow groupName="selection1"
> id="addressSel"
>
> value="#{overviewBean.subOverviewBean.selAdrRowIndex }"
> onchange="submit();" immediate="true"
>
> valueChangeListener="#{overviewBean.doPrimaryAddressSelected}"/>
> </h:column>
> ....
> --------snipp end--------
>
> --------snipp begin-----
>
> public void doPrimaryAddressSelected(ValueChangeEvent
> event){
>
> Long newVal = (Long) event.getNewValue();
> Long oldVal = (Long) event.getOldValue();
> SelectOneRow radioButton =
> (SelectOneRow)event.getComponent();
> Object val = radioButton.getValue();
> String id = radioButton.getId();
>
> if (val != null){
>
> int selIndex = Integer.parseInt(val.toString());
> ...
>
> --------snipp end--------
>
>
>
Re: SelectOneRow problem: only called every second time
Posted by Stefan Gesigora <sg...@googlemail.com>.
Hi!
Doesn't anbody know the reason for this curious attitude?
Plz help.
regards,
Stefan
2006/8/4, Stefan Gesigora <sg...@googlemail.com>:
>
> Hi!
>
> I've got some problems with the SelectOneRow tag using it into a data
> table.
> It is shown in the right way but my "doPrimaryAddressSelected" method used
> with the valueChangeListener were only every second time called.
> In other words:
> After the first radio button selection I've made nothing happened. After
> the second the doPrimaryAddressSelected method were called.
> After the third nothing happened. After the fourth the method were called.
>
>
> The whole thing is used as MyFacesPortlet. Could this be the problem?
>
> Can anyone help me?
>
> regards,
> Steven
>
> ----snipp begin---
>
> <t:dataTable
> value="#{overviewBean.subOverviewBean.group.addressesAccepted}"
> var="row" height="70px"
> cellpadding="10px" cellspacing="0px" width="100%"
> preserveDataModel="false"
> renderedIfEmpty="false">
>
> <h:column>
> <f:facet name="header">
> <h:outputText value="#{res.lbl_primary}" title="#{
> res.lbl_primary}"/>
> </f:facet>
>
> <s:selectOneRow groupName="selection1" id="addressSel"
> value="#{overviewBean.subOverviewBean.selAdrRowIndex}"
> onchange="submit();" immediate="true"
> valueChangeListener="#{
> overviewBean.doPrimaryAddressSelected}"/>
> </h:column>
> ....
> --------snipp end--------
>
> --------snipp begin-----
>
> public void doPrimaryAddressSelected(ValueChangeEvent event){
>
> Long newVal = (Long) event.getNewValue();
> Long oldVal = (Long) event.getOldValue();
> SelectOneRow radioButton = (SelectOneRow)event.getComponent();
> Object val = radioButton.getValue();
> String id = radioButton.getId();
>
> if (val != null){
>
> int selIndex = Integer.parseInt(val.toString());
> ...
>
> --------snipp end--------
>
>