[ 
https://issues.jboss.org/browse/RF-11060?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brian Leathem updated RF-11060:
-------------------------------

    Steps to Reproduce: 
Try this code to reproduce (it is different from my real code but it does show 
the error):
{code}
<h:form id="tom" prependId="false" >
Lijst A <br/>
<rich:extendedDataTable
        value="#{test.a}"
        var ="lijstA"
        onselectionchange="alert('a')"
        >

    <rich:column>
        <h:inputText value="#{lijstA.naam}" />
    </rich:column>

</rich:extendedDataTable>
</h:form>

<h:form id="gib" prependId="false" >
Lijst B <br/>
<rich:extendedDataTable
        value="#{test.b}"
        var ="lijstB"
        onselectionchange="alert('b')"
        >

    <rich:column>
        <h:inputText value="#{lijstB.naam}" />
    </rich:column>

</rich:extendedDataTable>
</h:form>
{code}

{code}
@Named(value="test")
@SessionScoped
public class Test implements Serializable{


    private List<Hond> A = new ArrayList<Hond>();
    private List<Hond> B = new ArrayList<Hond>();


    /** Creates a new instance of Test */
    public Test() {
    }

    @PostConstruct
    public void init() {
       A.add(new Hond("A"));
       A.add(new Hond("B"));
       A.add(new Hond("C"));
       B.add(new Hond("D"));
       B.add(new Hond("E"));
       B.add(new Hond("F"));
    }

    public List<Hond> getA() {
        return A;
    }

    public void setA(List<Hond> A) {
        this.A = A;
    }

    public List<Hond> getB() {
        return B;
    }

    public void setB(List<Hond> B) {
        this.B = B;
    }


public class Hond {

    private String naam;

    public Hond() {
    }

    public Hond(String naam) {
        this.naam = naam;
    }

    public String getNaam() {
        return naam;
    }

    public void setNaam(String naam) {
        this.naam = naam;
    }

}
{code}


  was:
Try this code to reproduce (it is different from my real code but it does show 
the error):
<h:form id="tom" prependId="false" >
                    Lijst A <br/>
                    <rich:extendedDataTable
                        value="#{test.a}"
                        var ="lijstA"
                        onselectionchange="alert('a')"
                        >

                        <rich:column>
                            <h:inputText value="#{lijstA.naam}" />
                        </rich:column>

                    </rich:extendedDataTable>
                </h:form>

                <h:form id="gib" prependId="false" >
                    Lijst B <br/>
                    <rich:extendedDataTable
                        value="#{test.b}"
                        var ="lijstB"
                        onselectionchange="alert('b')"
                        >

                        <rich:column>
                            <h:inputText value="#{lijstB.naam}" />
                        </rich:column>

                    </rich:extendedDataTable>
                </h:form>

@Named(value="test")
@SessionScoped
public class Test implements Serializable{


    private List<Hond> A = new ArrayList<Hond>();
    private List<Hond> B = new ArrayList<Hond>();


    /** Creates a new instance of Test */
    public Test() {
    }

    @PostConstruct
    public void init() {
       A.add(new Hond("A"));
       A.add(new Hond("B"));
       A.add(new Hond("C"));
       B.add(new Hond("D"));
       B.add(new Hond("E"));
       B.add(new Hond("F"));
    }

    public List<Hond> getA() {
        return A;
    }

    public void setA(List<Hond> A) {
        this.A = A;
    }

    public List<Hond> getB() {
        return B;
    }

    public void setB(List<Hond> B) {
        this.B = B;
    }


public class Hond {

    private String naam;

    public Hond() {
    }

    public Hond(String naam) {
        this.naam = naam;
    }

    public String getNaam() {
        return naam;
    }

    public void setNaam(String naam) {
        this.naam = naam;
    }

}



       Forum Reference: http://community.jboss.org/thread/167554  (was: 
http://community.jboss.org/thread/167554)


> onselectionchange working incorrect with two extendedDataTable on same page
> ---------------------------------------------------------------------------
>
>                 Key: RF-11060
>                 URL: https://issues.jboss.org/browse/RF-11060
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: component-selects, component-tables
>    Affects Versions: 4.0.0.Final
>         Environment: GlassFish 3.0.1, Firefox
>            Reporter: Tom Giberius
>            Priority: Critical
>             Fix For: 4.1.0.Milestone2
>
>
> If you put two extendedDataTable A en B on the same page then the following 
> goes wrong:
> If you selected record one of Table A en then select record one from table B 
> then the onselectionchange trigger does not fire. The same counts for record 
> two, three, etc. 
> This prevents me for building a Master-Detail data entry screen where both 
> the master and the detail are multirecord. E.g.
> Step 1) Select records one in master and show it details.
> Step 2) Select record three in details, then go back to record 3 of master 
> and then the onselectionchange trigger does not fire. The master tables 
> "thinks" that record three is the selected record while actually it should be 
> record one which was the selected record in the master table.
> The correct behaviour should be that each table should "rember" it selected 
> record. E.g.
> Step 1) Select records one in master and show it details.
> Step 2) Select record three in detail, then go back to record 3 of master and 
> the onselectionchange of the master should fire so that details of master 
> record 3 can be shown. If you would have go back to record one of the master 
> then not firing the onselectionchange would be correct.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to