It is working usign the following fragment code. It is to much code for
tapestry. If you have any way of doing this, Using the SelectModel object. 

Now the jobClasses is a list of a string,

public List<String> getJobClasses() {
        return employeeDao.getJobClasses();
}

public boolean getSelectedJobClass() {
         return jobClass.equals(employee.getJobClass());
}

<t:parameter name="jobClassCell">
        <select t:value="employee.jobClass" t:context="employee.id">    
                <t:loop t:source="jobClasses" t:value="jobClass">
                        <t:if t:test="selectedJobClass">
                                <option value="${jobClass}" 
selected="selected">${jobClass}</option>
                                <t:parameter name="else">
                                        <option 
value="${jobClass}">${jobClass}</option>
                                </t:parameter>
                        </t:if>
                </t:loop>
        </select>
</t:parameter>

Thank you,

Anteneh




Anteneh Bayouh wrote:
> 
> Hi Everyone,
> 
> I tried to override the jobClass row in a grid to display as a select drop
> down.The following fragment code were used. 
> 
> <t:Grid  t:source="employeeList" t:row="employee"  t:model="employeeModel"
> >
>        <t:parameter name="jobClassCell">
>                <select t:model="jobClasses" t:value="employee.jobClass"
> t:context="employee.id"/>     
>       </t:parameter>
> </t:Grid>
> 
> It is not working! My guess is there might be a conflict between the two
> models (employeeModel, which is a BeanModel, and jobClasses model, which
> is  a SelectModel).
> 
> Any help?
> 
> Thank you.
> 

-- 
View this message in context: 
http://www.nabble.com/Tapestry-5----Select-Drop-Down-in-a-Grid-Component-tp15162558p15165401.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to