Hi Tacoers,

I have problems interacting with the Dialog component, I can't update
correctly the content of a dialog using an AjaxSubmit inside an AjaxForm,
the template goes like this:

<div jwcid=" [EMAIL PROTECTED]:Id">
   <a jwcid="@tacos:AjaxDirectLink"
       listener="listener:showDialog"
       updateComponents="ognl:{'dialog1'}">
       ShowDialog
   </a>
   <span jwcid="[EMAIL PROTECTED]:Dialog" hidden="ognl:!show">
       <div style="background:yellow;">
           <form jwcid="@tacos:AjaxForm">
               <div jwcid="[EMAIL PROTECTED]:Id">
                   <div style="background:yellow;">
                       This is a tacos dialog
                       <br/>
                       Actual: <span jwcid="@Insert" value="ognl:actual"/>
                       <br/>
                       New: <span jwcid="@TextField" value="ognl:valor"/>
                       <br/>
                       <input jwcid="@tacos:AjaxSubmit"
listener="listener:hideDialog"
                           value="hide!"
updateComponents="ognl:{'dialog1'}"/>
                       <input jwcid="@tacos:AjaxSubmit"
listener="listener:doSomething"
                           value="do something"
updateComponents="ognl:{'content'}" />
                   </div>
               </div>
           </form>
       </div>
   </span>
</div>

The Controller side goes like this:

   public void showDialog() {
       setShow(Boolean.TRUE);
   }

   public void hideDialog() {
       setShow(Boolean.FALSE);
   }

   public void doSomething() {
       setActual(getActual() + getValor());
   }


Well dialog shows and hides without any problem but the second submit isn't
refreshing the content... I've already tried including the 'content' element
in its updates but
it isn't working. Doing some research i found out what might be the problem:

Seems the dialog its appending clones of its node every time it shows, This
is the structure, according to firebug:

<div id="dialogExample">   <a id="$AjaxDirectLink" onclick="return
tacos.defaultLinkAction({targetLink: this, url: this.href, processScripts:
    true})" 
href="/tacos-test/ajaxdirect.svc?component=%24AjaxDirectLink&page=Home&rand=-1456923475&ses
sion=T&updatedirect=false&updateid=dialog1"
    style="cursor:
    auto;"> ShowDialog </a>
</div>
<script type="text/javascript" language="JavaScript">
</script>
<div id="dialog1" class="dojoDialog" dojoattachpoint="wrapper"
style="overflow:
visible; position: absolute; z-index: 999; left: 651.5px; top: 177px;
display: block;">
<div style="background: yellow none repeat scroll 0%; -moz-background-clip:
-moz-initial; -moz-background-origin: -moz-initial;
-moz-background-inline-policy: -moz-initial;">
  <form id="AjaxForm" name="AjaxForm" action="
/tacos-test/Home,$AjaxForm.sdirect" method="post">
     <div id="AjaxFormhidden" style="display: none;">
     </div>
     <div id="content">
        <div style="background: yellow none repeat scroll 0%;
-moz-background-clip:
           -moz-initial; -moz-background-origin: -moz-initial;
-moz-background-inline-policy: -moz-initial;">
             This is a tacos dialog
            <br/>
            Actual: 0
            <br/>
            New:
            <input id="TextField" type="text" value="0" name="TextField"/>
            <br/>
            <input id="AjaxSubmit" type="submit" value="hide!" name="
AjaxSubmit"/>
            <input id="AjaxSubmit_0" type="submit" value="do something"
name="AjaxSubmit_0"/>
          </div>
       </div>
    </form>
  </div>
</div>
<div class="dialogUnderlay" style="position: absolute; top: 0px; left: 0px;
z-index: 998; display: block; background-color: rgb(0, 0, 0); opacity: 0.4;
width: 1600px; height: 454px;"/>
<div id="dialog1" style="display: none;"/>
<div id="dialog1" style="display: none;">
<div style="background: yellow none repeat scroll 0%; -moz-background-clip:
-moz-initial; -moz-background-origin: -moz-initial;
-moz-background-inline-policy: -moz-initial;">
<form id="AjaxForm" name="AjaxForm" action="
/tacos-test/Home,$AjaxForm.sdirect" method="post">
<div id="AjaxFormhidden" style="display: none;">
<input type="hidden" value="TextField,AjaxSubmit,AjaxSubmit_0" name="formids
"/>
<input type="hidden" value="" name="submitmode"/>
<input type="hidden" value="" name="submitname"/>
</div>
<div id="content">
<div style="background: yellow none repeat scroll 0%; -moz-background-clip:
-moz-initial; -moz-background-origin: -moz-initial;
-moz-background-inline-policy: -moz-initial;">
This is a tacos dialog
<br/>
Actual: 0
<br/>
New:
<input id="TextField" type="text" value="0" name="TextField"/>
<br/>
<input id="AjaxSubmit" type="submit" value="hide!" name="AjaxSubmit"/>
<input id="AjaxSubmit_0" type="submit" value="do something" name="
AjaxSubmit_0"/>
</div>
</div>
</form>
</div>
</div>

Any thoughts on how to fix this?

thanks in advance,

mh
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Tacos-devel mailing list
Tacos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to