[ 
https://issues.apache.org/jira/browse/TAPESTRY-1543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jesse Kuhnert updated TAPESTRY-1543:
------------------------------------

    Fix Version/s:     (was: 4.1.3)
                   4.1.4

> Property not updated for InlineEditBox Component
> ------------------------------------------------
>
>                 Key: TAPESTRY-1543
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1543
>             Project: Tapestry
>          Issue Type: Bug
>          Components: XHR/dhtml/Ajax
>    Affects Versions: 4.1.2
>         Environment: Weblogic 8, Sun jdk 1.4 Tapestry latest 4.1.2 Snapshot
>            Reporter: Chris Chiappone
>             Fix For: 4.1.4
>
>
> Here is the following scenerio:
> In my page.html I have the following form defined in which a the 
> @InlineEditBox is wrapped within a @For loop:
>   <span jwcid="@If" condition="ognl:tsAgents">
>     <form jwcid="[EMAIL PROTECTED]" listener="listener:updateAgents">
>       <table border="1" cellspacing="0" width="100%" cellpadding="5" 
> style="border-collapse:collapse;border:1px solid #333333">
>           
>       <tr valign="top" jwcid="[EMAIL PROTECTED]" source="ognl:ActiveAgents" 
> value="ognl:currentAgent">
>         <td align="center">
>           <a jwcid="@DirectLink" listener="listener:removeAgent" 
> parameters="ognl:currentAgent" >
>           <img jwcid="@Image" image="asset:deleteImg" border="0"/>
>           </a>
>          </td>
>         <td><span jwcid="@InlineEditBox" 
> value="ognl:currentAgent.label"/></td>
>         <td><span jwcid="@If" condition="ognl:currentAgent.licenseretrieved 
> == null">
>             <a jwcid="@DownloadLinkComponent" filename="ognl:licenseName" 
> linkId="ognl:currentAgent.agentId"
>               type="ognl:@[EMAIL PROTECTED]">
>               <span key="getLicense"/>
>             </a>
>             </span>
>             <span jwcid="@Else">
>               <span key="retrieved"/>: <span jwcid="@Insert" 
> value="ognl:currentAgent.licenseretrieved.time"/>
>             </span>
>         </td>
>         <td><span jwcid="@Insert" value="ognl:installedStatus"></span></td>
>         <td align="center"><input jwcid="@Checkbox" 
> value="ognl:currentAgent.transientMonitor" disabled="ognl:currentAgent.lastip 
> == null"/></td>
>       </tr>
>     
>   </table>
>   <br/>
>   <center>
>     <input jwcid="@Submit" value="message:update"/>
>   </center>
>   </form>
>   </span>
> In my page.java I have the following where getActiveAgents is set to 
> persistant=session in the page spec:
>       public abstract List getActiveAgents();
>       public abstract void setActiveAgents(List a);
> //This page implements PageBeginRenderListener where when the form is not 
> rewinding sets the agents and the activeAgents
>       public void pageBeginRender(PageEvent event) {
>               getRequestGlobals().getRequest().setAttribute(ROADMAP, "false");
>               List agents = null;
>               if (!event.getRequestCycle().isRewinding()) {
>                       try {
>                               agents = getTsAgentEJB().getAgentsFromClient(
>                                               
> getCurrentClient().getClientId());
>                               if (agents != null) {
>                                       List activeAgents = new ArrayList();
>                                       Iterator it = agents.iterator();
>                                       while (it.hasNext()) {
>                                               TsAgent agent = (TsAgent) 
> it.next();
>                                               if 
> (agent.getStatus().equals("a")) {
>                                                       activeAgents.add(agent);
>                                               }
>                                       }
>                                       setActiveAgents(activeAgents);
>                               }
>                       } catch (Exception e) {
>                               logger.debug("Unable to get agents for client 
> in view");
>                       }
>               }
>               setTsAgents(agents);
>       }
> //Then the listener defined basically updates my agents in persistent storage:
>       public void updateAgents(){
>               List agents = getActiveAgents();
>               Iterator it = agents.iterator();
>               while(it.hasNext()){
>                       TsAgent agent = (TsAgent) it.next();
>                         logger.info("Agent labelname should be updated to: "+ 
> agent.label);
>                       saveAgent(agent);
>               }
>               
>       }
> I would assume that my agent.label should be updated with the new value from 
> the InlineEditBox component.  But it is not.  The thing is I believe the code 
> is all correct because if I simply change @InlineEditBox to @TextField it 
> works as I would expect and agent.label is updated with the new value.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to