Hello,

Fairly new to Tapestry. Using version 5.3.4. I'm having a strange (to me
anyway) behavior using a select component to update a grid via ajax. The
grid is updated just fine except that my index.java class reads the previous
value from the select component, not the one I just selected.

In my tml I have:

<t:zone t:id="billetZone" id="billetZone">
    <t:grid source="billetList" row="billet" rowsPerPage="billetPagerSize"
inPlace="true" add="view" reorder="view">
        <p:viewCell>
            <t:actionlink t:id="viewBillet" context="billet.id"
zone="viewBilletZone">View</t:actionlink>
        </p:viewCell>
    </t:grid>
</t:zone>

<t:zone t:id="filterZone" id="filterZone">
<t:form>

    
Filters
    

        <t:label t:for="brBilletTypeFilter">Type:</t:label>
        <t:select t:id="brBilletTypeFilter"
                     model="brBilletTypeModel"
                     encoder="brBilletTypeEncoder"
                     zone="billetZone"/>
    

</t:form>
</t:zone>

my java:

@Persist
private BRBilletType brBilletTypeFilter;

public Object onValueChangedFromBrBilletTypeFilter(){
    if(brBilletTypeFilter == null){
        billetList = session.createCriteria(BRBillet.class).list();
    }
    else {
        brBilletTypeFilter = (BRBilletType)session.load(BRBilletType.class,
brBilletTypeFilter.getId());
        billetList.clear();
        billetList.addAll(brBilletTypeFilter.getBillets());
    }
    return billetZone.getBody();
}
 
Haven't found a post with a similar problem, only stuff that deals with
setting the value of the select.
Firebug shows my last selection as "selected" but my grid will always be
loaded using the value that is
currently selected, not the value I just selected. I have select and option
models, and an encoder for the 'brBilletTypeFilter'. 

Thanks for any insight into this problem.
--Mark 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/grid-in-zone-gets-pre-selected-value-from-select-component-tp5715860.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to