So... is it the same?

The first thing I'd try is generated well-formed HTML by using the S2 tags 
outside of your own table: use the <s:form.../> etc. tags on a plain page w/o 
your extra table markup.

----- Original Message ----
From: Mansour <[EMAIL PROTECTED]>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Sunday, June 24, 2007 7:02:31 PM
Subject: Re: Submitting a form with ajax submit inside the form

Dave Newton wrote:
> --- Mansour <[EMAIL PROTECTED]> wrote:
>   
>> <s:if test="#stat.odd == true">
>>   <tr class="odd">
>> </s:if>
>> <s:else>
>>   <tr class="even">
>> </s:else>
>>     
>
> Btw, I would change this to (minus whatever syntax /
> attribute name errors I'm about to make):
>
> <s:set name="foo" value="${#stat.odd ? 'odd' :
> 'even'"/>
> <tr class="${foo}">
>   ...
>
> Cleaner, shorter, and better-formed JSP.
>
> d.
>
>   
I agree with you. But Now I am gonna remove this totally just until I 
get this working.
This is the HTML generated by IE (on linux):


<table id="row">
    <thead>
        <tr>
            <th>Task Id</th>
            <th>Service Name</th>
            <th>Save</th>
        </tr>
    </thead>
    <tbody>
       
       
            <div id="DIV_1">
            <form namespace="/" id="form_1" name="updateTask" 
action="/fe/updateTask.action" method="post"
 >
<table class="wwFormTable">
            <tr>
            <td><tr>
    <td class="tdLabel"></td>
    <td
 ><input type="text" name="task.id" value="1" id="form_1_task_id"/>
</td>
</tr>
</td>
            <td><tr>
    <td colspan="2"><div align="right">    <input type="submit" 
dojoType="struts:Bind" event="onclick"     value="Submit" 
      id="submit_1"  />

</div></td>
</tr>
</td>
            </tr>
           

<!-- javascript that is needed for tooltips -->
<script 
type="text/javascript">dojo.require("dojo.widget.Tooltip");dojo.require("dojo.fx.html");</script>

</table>
</form>

            </div>
           
       
       
            <div id="DIV_3">
            <form namespace="/" id="form_3" name="updateTask" 
action="/fe/updateTask.action" method="post"
 >
<table class="wwFormTable">
            <tr>
            <td><tr>
    <td class="tdLabel"></td>
    <td
 ><input type="text" name="task.id" value="3" id="form_3_task_id"/>
</td>
</tr>
</td>
            <td><tr>
    <td colspan="2"><div align="right">    <input type="submit" 
dojoType="struts:Bind" event="onclick"     value="Submit" 
      id="submit_3"  />

</div></td>
</tr>
</td>
            </tr>
           

<!-- javascript that is needed for tooltips -->
<script 
type="text/javascript">dojo.require("dojo.widget.Tooltip");dojo.require("dojo.fx.html");</script>

</table>
</form>

            </div>
           
       
       
            <div id="DIV_2">
            <form namespace="/" id="form_2" name="updateTask" 
action="/fe/updateTask.action" method="post"
 >
<table class="wwFormTable">
            <tr>
            <td><tr>
    <td class="tdLabel"></td>
    <td
 ><input type="text" name="task.id" value="2" id="form_2_task_id"/>
</td>
</tr>
</td>
            <td><tr>
    <td colspan="2"><div align="right">    <input type="submit" 
dojoType="struts:Bind" event="onclick"     value="Submit" 
      id="submit_2"  />

</div></td>
</tr>
</td>
            </tr>
           

<!-- javascript that is needed for tooltips -->
<script 
type="text/javascript">dojo.require("dojo.widget.Tooltip");dojo.require("dojo.fx.html");</script>

</table>
</form>

            </div>
           
       
    </tbody>
</table>






########################################################################
This is from FF:


<table id="row">
    <thead>
        <tr>
            <th>Task Id</th>

            <th>Service Name</th>
            <th>Save</th>
        </tr>
    </thead>
    <tbody>
       
       
            <div id="DIV_1">
            <form namespace="/" id="form_1" name="updateTask" 
action="/fe/updateTask.action" method="post"
 >
<table class="wwFormTable">

            <tr>
            <td><tr>
    <td class="tdLabel"></td>
    <td
 ><input type="text" name="task.id" value="1" id="form_1_task_id"/>
</td>
</tr>
</td>
            <td><tr>
    <td colspan="2"><div align="right">    <input type="submit" 
dojoType="struts:Bind" event="onclick"     value="Submit" 
      id="submit_1"  />

</div></td>
</tr>
</td>
            </tr>
           

<!-- javascript that is needed for tooltips -->
<script 
type="text/javascript">dojo.require("dojo.widget.Tooltip");dojo.require("dojo.fx.html");</script>

</table>
</form>

            </div>
           
       
       
            <div id="DIV_3">

            <form namespace="/" id="form_3" name="updateTask" 
action="/fe/updateTask.action" method="post"
 >
<table class="wwFormTable">
            <tr>
            <td><tr>
    <td class="tdLabel"></td>
    <td
 ><input type="text" name="task.id" value="3" id="form_3_task_id"/>
</td>
</tr>
</td>
            <td><tr>
    <td colspan="2"><div align="right">    <input type="submit" 
dojoType="struts:Bind" event="onclick"     value="Submit" 
      id="submit_3"  />

</div></td>
</tr>
</td>
            </tr>
           

<!-- javascript that is needed for tooltips -->
<script 
type="text/javascript">dojo.require("dojo.widget.Tooltip");dojo.require("dojo.fx.html");</script>

</table>
</form>

            </div>
           
       
       
            <div id="DIV_2">

            <form namespace="/" id="form_2" name="updateTask" 
action="/fe/updateTask.action" method="post"
 >
<table class="wwFormTable">
            <tr>
            <td><tr>
    <td class="tdLabel"></td>
    <td
 ><input type="text" name="task.id" value="2" id="form_2_task_id"/>
</td>
</tr>
</td>
            <td><tr>
    <td colspan="2"><div align="right">    <input type="submit" 
dojoType="struts:Bind" event="onclick"     value="Submit" 
      id="submit_2"  />

</div></td>
</tr>
</td>
            </tr>
           

<!-- javascript that is needed for tooltips -->
<script 
type="text/javascript">dojo.require("dojo.widget.Tooltip");dojo.require("dojo.fx.html");</script>

</table>
</form>

            </div>
           
       
    </tbody>

</table>

####################################################################

And this is the source JSP:



<table id="row">
    <thead>
        <tr>
            <th>Task Id</th>
            <th>Service Name</th>
            <th>Save</th>
        </tr>
    </thead>
    <tbody>
        <s:iterator value="taskList" status="stat" id="row">
       
            <div id="DIV_${row.id}">
            <s:form action="updateTask" id="form_${row.id}"
                method="post" theme="ajax">
            <tr>
            <td><s:textfield value="${id}" name="task.id" /></td>
            <td><s:submit  id="submit_${row.id}" /></td>
            </tr>
            </s:form>
            </div>
           
        </s:iterator>
    </tbody>
</table>














>
>        
> ____________________________________________________________________________________
> Got a little couch potato? 
> Check out fun summer activities for kids.
> http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
>  
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>   


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






 
____________________________________________________________________________________
Don't get soaked.  Take a quick peak at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather

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

Reply via email to