<s:form theme="simple">
                    <s:submit action="employeeAction_saveAndRedisplay" />

                    <s:iterator value="employees">

                        <tr>
                            <td>
                                <!-- key was 7932F and leaving the single
ticks off here dropped the trailing F! -->
                                <s:textfield name="employees['%{key}'].id"
value="%{key}" size="10%" disabled="true"/>
                            </td>
                            <td>

                            <s:select name="employees['%{key}'].department"
list="departments"
                            listKey="departmentName"
                            listValue="departmentName"
                            value="%{value.department}"

                            />
                            </td>


                            <td>
                                <s:textfield name="employees['%{key}'].name"
                                    value="%{value.name}" size="40%"/>

                            </td>
                            <td>
                                <s:url id="change"
action="employeeAction_edit">
                                    <s:param name="employee.id"
value="%{key}" />
                                </s:url>
                                <s:a href="%{change}">Update</s:a>

                            </td>
                        </tr>
                    </s:iterator>
                </s:form>

Peace,
Scott

On Fri, Nov 14, 2008 at 12:00 AM, Pierre Thibaudeau <
[EMAIL PROTECTED]> wrote:

> Say, I have a Map<String,String> of the kind:
>
> Map<String, String> pet = new HashMap<String, String>();
> public Map<String, String> getPet() { return pet; }
> public void setPet(Map<String,String> pet) { this.pet = pet; }
>
> Typically, pet might contain something like:
>
> pet.put("fr", "chat");
> pet.put("en", "cat");
>
> How do I refer to one of the map entries in a texfield?  What is the proper
> OGNL expression?
> The following doesn't seem to be understood by OGNL:
>
> <s:form>
> Enter the type of pet: <s:textfield name="pet['en']" />
> </s:form>
>

Reply via email to