• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Auto-generate textField with AjaxObserveFiled and AjaxUpdateComponent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Auto-generate textField with AjaxObserveFiled and AjaxUpdateComponent


  • Subject: Auto-generate textField with AjaxObserveFiled and AjaxUpdateComponent
  • From: Raymond NANEON <email@hidden>
  • Date: Wed, 14 Sep 2011 07:30:18 +0000 (GMT)

Hi,

I have a little problem to auto-generate textField with AjaxObserveFiled and AjaxUpdateComponent when a textField is filled. This is the code,
" HTML :    

      <table>

        <tr>

          <td class = "texte">&nbsp;Mots clefs&nbsp;:</td>

          <td class = "texte">&nbsp;<wo:textField name = "motclef1" id = "motclef" value = "$session.motClef" />&nbsp; 

          </td>

          <td class = "texte">&nbsp; 

            <wo:if condition = "$session.motClef"> <wo:textField name = "motclef2" id = "motCle2" value = "$session.motClef1" /> </wo:if>

            &nbsp;</td>

          <td class = "texte">&nbsp; 

            <wo name = "mo3UC">

              <wo:conditional condition = "$session.motClef1"> <wo:textField name = "motclef3" id = "motCle3" value = "$session.motClef2" /> </wo:conditional>

            </wo>

            &nbsp;</td>

          <td class = "texte">&nbsp; 

            <wo name = "mo4UC">

              <wo:conditional condition = "$session.motClef2"> <wo:textField name = "motclef4" id = "motCle4" value = "$session.motClef3" /> </wo:conditional>&nbsp; </wo>

          </td>

          <td class = "texte">&nbsp; 

            <wo name = "mo5UC">

              <wo:conditional condition = "$session.motClef3"><wo:textField name = "motclef5" value = "$session.motClef4" /></wo:conditional>&nbsp; </wo>

          </td>

          <td class = "texte">&nbsp; 

            <wo name = "mo6UC">

              <wo:conditional condition = "$session.motClef4"><wo:textField name = "motclef6" value = "$session.motClef5" /></wo:conditional>&nbsp; </wo>

          </td>

        </tr>

        <tr>

          <td class = "texte">&nbsp;&nbsp;</td>

          <td class = "texte">&nbsp;<wo:conditional condition = "$session.motClef5"><wo:textField name = "motclef7" value = "$session.motClef6" /></wo:conditional>&nbsp;</td>

          <td class = "texte">&nbsp;<wo:conditional condition = "$session.motClef6"><wo:textField name = "motclef8" value = "$session.motClef7" /></wo:conditional>&nbsp;</td>

          <td class = "texte">&nbsp;<wo:conditional condition = "$session.motClef7"><wo:textField name = "motclef9" value = "$session.motClef8" /></wo:conditional>&nbsp;</td>

          <td class = "texte">&nbsp;<wo:conditional condition = "$session.motClef8"><wo:textField name = "motclef10" value = "$session.motClef9" /></wo:conditional>&nbsp;</td>

          <td class = "texte">&nbsp;<wo:conditional condition = "$session.motClef9"><wo:textField name = "motclef11" value = "$session.motClef10" /></wo:conditional>&nbsp;</td>

          <td class = "texte">&nbsp;<wo:conditional condition = "$session.motClef11"><wo:textField name = "motclef12" value = "$session.motClef11" /></wo:conditional>&nbsp;</td>

        </tr>

        <wo name = "mOF1" />

        <wo name = "mOF2" />

        <wo name = "mOF3" />

        <wo name = "mOF4" />

        <wo name = "mOF5" />

      </table>"

WOD :

mOF1 : AjaxObserveField {

fullSubmit = true;

observeFieldFrequency = 2;

observeFieldID = "motclef";

updateContainerID = "mo2UC";

}


mo2UC : AjaxUpdateContainer {

id="mo2UC";

}


mOF2 : AjaxObserveField {

fullSubmit = true;

observeFieldFrequency = 2;

observeFieldID = "motcle2";

updateContainerID = "mo3UC";

}


mo3UC : AjaxUpdateContainer {

id="mo3UC";

}


mOF3 : AjaxObserveField {

fullSubmit = true;

observeFieldFrequency = 2;

observeFieldID = "motCle3";

updateContainerID = "mo4UC";

}


mo4UC : AjaxUpdateContainer {

id="mo4UC";

}


mOF4 : AjaxObserveField {

fullSubmit = true;

observeFieldFrequency = 2;

observeFieldID = "motCle4";

updateContainerID = "mo5UC";

} 


mo5UC : AjaxUpdateContainer {

id="mo5UC";

}


mOF5 : AjaxObserveField {

fullSubmit = true;

observeFieldFrequency = 2;

observeFieldID = "motCle5";

updateContainerID = "mo6UC";

} 


mo6UC : AjaxUpdateContainer {

id="mo6UC";

}



The first textField generate the second, but the second one don't generate the third and when I enter in source code, I see the the first textField as HTML input Object but the second one is not an HTML input object. It does not exist so the other textField don't appears.

So I tried another code with _javascript_ and fullSubmit with a submitButton.
here is the second code :

"HTML : 

<table>

        <tr>

          <td class = "texte">&nbsp;Mots clefs&nbsp;:</td>

          <td class = "texte">&nbsp;<wo:textField name = "motclef1" id = "motclef" value = "$session.motClef" onKeyDown = "declaration.elements['changes'].click();" onKeyUp = "declaration.elements['changes'].click();"/>&nbsp; 

          </td>

          <td class = "texte">&nbsp; 

            <wo:if condition = "$session.motClef"> <wo:textField name = "motclef2" id = "motCle2" value = "$session.motClef1" onKeyDown = "declaration.elements['changes'].click();" onKeyUp = "declaration.elements['changes'].click();"/> </wo:if>

            &nbsp;</td>

          <td class = "texte">&nbsp; 

              <wo:if condition = "$session.motClef1"> <wo:textField name = "motclef3" id = "motCle3" value = "$session.motClef2" onKeyDown = "declaration.elements['changes'].click();" onKeyUp = "declaration.elements['changes'].click();"/> </wo:if>

            &nbsp;</td>

          <td class = "texte">&nbsp; 

              <wo:if condition = "$session.motClef2"> <wo:textField name = "motclef4" id = "motCle4" value = "$session.motClef3" onKeyDown = "declaration.elements['changes'].click();" onKeyUp = "declaration.elements['changes'].click();"/> </wo:if>&nbsp;

          </td>

          <td class = "texte">&nbsp; 

              <wo:if condition = "$session.motClef3"><wo:textField name = "motclef5" value = "$session.motClef4" onKeyDown = "declaration.elements['changes'].click();" onKeyUp = "declaration.elements['changes'].click();"/></wo:if>&nbsp;

          </td>

          <td class = "texte">&nbsp; 

              <wo:if condition = "$session.motClef4"><wo:textField name = "motclef6" value = "$session.motClef5" onKeyDown = "declaration.elements['changes'].click();" onKeyUp = "declaration.elements['changes'].click();"/></wo:if>&nbsp;

          </td>

        </tr>

</table>

<wo:submitButton name = "changes" action = "$ctrl.motclef2" class = "hide" />

"

It works fine but there is lot of submit and it is not smooth but in the WebPage code source, when the new textField appears, it is automatically an HTML input Object and it is not the case of AjaxMethod. Why?

Thanks

Envoyé depuis iCloud
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Auto-generate textField with AjaxObserveFiled and AjaxUpdateComponent
      • From: "Jérémy DE ROYER [INGENCYS]" <email@hidden>
  • Prev by Date: Re: FrontBasePlugIn & EOQualifier.QualifierOperatorContains
  • Next by Date: Re: Auto-generate textField with AjaxObserveFiled and AjaxUpdateComponent
  • Previous by thread: Re: [MEETING] WO-NOVA TOMORROW NIGHT 9/20/2011
  • Next by thread: Re: Auto-generate textField with AjaxObserveFiled and AjaxUpdateComponent
  • Index(es):
    • Date
    • Thread