Hi Martin,

Thanks for replying. I loked at I am iterating through the collection to
display some the items as follows:

<s:iterator value="actionItems">
        <tr>
           <td><s:property value = "status" /></td>
            <td><s:select name="action" headerKey=""
                 headerValue="Change Status" list="statuses" />
            </td>
            <td>
            <s:hidden name="id" />
            <s:submit name="update" value = "Change"/>
            </td>
        </tr>
    </s:iterator>

There is a submit button for every row. I want to update the value of a bean
attribute status with the value from the drop down. I have tried to change
the invocation from submit to get using <s:action><s:param  name ="idValue"
value = "id" /></s:action>. But I am not able to get status attribute to be
populated in my action class.


On Wed, Apr 28, 2010 at 5:27 PM, Martin Gainty <mgai...@hotmail.com> wrote:

>
> the list attribute defined is the variable bound from the action as seen
> here with a bound Collection variable called availableItems
>
>    <s:select list="#skillAction.availableItems" listKey="name" label="Main
> Skill"
>               name="currentEmployee.mainSkill.name"/>
> public abstract class AbstractCRUDAction extends ActionSupport {
>    private Collection availableItems;
>
> the hidden field needs a value attribute and a id attribute as seen here:
> <s:hidden id="project-name" name="project-name" value="Struts 2" />
>
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
> de ceci est interdite. Ce message sert à l'information seulement et n'aura
> pas n'importe quel effet légalement obligatoire. Étant donné que les email
> peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
> aucune responsabilité pour le contenu fourni.
>
>
>
>
> > Date: Wed, 28 Apr 2010 13:31:05 -0700
> > Subject: Submit not passing the form input to the action
> > From: krishnan.1...@gmail.com
> > To: user@struts.apache.org
> >
> > Hi,
> >
> > I have a use case in which we iterate through the items in the list and
> > display them on the page. We do that with s:iterator tag.
> >
> > <s:iterator value="actionItems">
> >         <tr>
> >             <td><s:property value="creatorName" /></td>
> >             <td><s:property value="assignedTo" /></td>
> >             <td><s:property value="creationDate" /></td>
> >             <td><s:property value="dueTo" /></td>
> >             <td><s:property value="externalItemNumber" /></td>
> >             <td><s:property value="description" /></td>
> >             <td><s:property value="currentStatus" /></td>
> >             <td width="100"><s:property value="status"/></td>
> >             <td>*<s:select name="actionStatus" headerKey=""
> >                  headerValue="Change Status" list="statuses" />*
> >             </td>
> >             <td>
> >               <s:hidden name="id"/>
> >              * <s:submit value="Update" name="update" />*
> >             </td>
> >         </tr>
> >     </s:iterator>
> >
> > I have a s:submit tag that inovkes the appropriate action class and
> method.
> > For update to work, I have to to update the back end with a new pull down
> > menu value from db and is given below:
> >
> > *<s:select name="actionStatus" headerKey=""
> >                  headerValue="Change Status" list="statuses" />*
> >
> > I also have a hidden field "id" that I used to identify the identity of
> the
> > bean to be updated and is given below:
> > <s:hidden name="id"/>
> >
> > and I have a submit button for every entry in the list being iterated
> >
> > My issues is that my action class is not getting any value from "id" and
> > "actionStatus" field even though they are defined in my action class. I
> > don't know what is going wrong. The action is being invoked but these
> fields
> > have a null value.
> >
> > Any help would be appreciated.
> >
> > Thanks,
> >
> > Kartik
>
> _________________________________________________________________
> The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with
> Hotmail.
>
> http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
>

Reply via email to