I got it!

It was not a delay. Tapestry.DEBUG_ENABLED was set true. 

I used the renderSupport to turn it off.

        public void afterRender()
        {
                renderSupport.addScript("Tapestry.DEBUG_ENABLED = false;");
        }

Now it is working fine!

Thank you,

Anteneh






Anteneh Alemayehu wrote:
> 
> Hi All,
> 
> When I use any of the T5Components inside the Ajax Result there is a
> remarkable delay in loading and checking previously loaded .js files. 
> 
> The T5Component, InPlaceCheckbox, is inside someBlock which is the result
> of an Ajax Call. 
> 
> Find the java and tml code below.
> 
> Is there any one who can help me to avoid the delay?
> 
> Thank you,
> 
> Anteneh
> 
> -- Java code -----Start ------
> 
>         private boolean checked;
> 
>       @Inject
>       private Block someBlock;
> 
>       @Component(parameters = { "value=checked",
> "onCompleteCallback=onCompleteFunction" })
>       private InPlaceCheckbox myInPlaceCheckbox;
> 
>       public boolean isChecked()
>       {
>               return checked;
>       }
> 
>       public void setChecked(boolean checked)
>       {
>               this.checked = checked;
>       }
> 
>       @OnEvent(component = "myInPlaceCheckbox", value =
> InPlaceCheckbox.EVENT_NAME)
>       public boolean inPlaceCheckbox(boolean checked)
>       {
>               return checked;
>       }
> 
>       Block onActionFromTheLink()
>       {
>               return someBlock;
>       }
> 
>       public InPlaceCheckbox getMyInPlaceCheckbox()
>       {
>               return myInPlaceCheckbox;
>       }
> 
> 
> -- Java code -----End------
> 
> 
> -- tml code -----Start ------
>         <script type="text/javascript">
>           function onCompleteFunction(response)
>           {
>               if (response.evalJSON().value == "true") {
>                   $('checkboxResult').update("<strong>checked</strong>");
>               } else {
>                   $('checkboxResult').update("<strong>un-checked</strong>");
>               }
>           }
>       </script>
>       To display the Inplace checkbox <t:actionLink t:id="theLink"
> t:zone="updateZone">Click here</t:actionLink>
>       <t:zone t:id="updateZone">
>               Initial content
>       </t:zone>
>       <t:block t:id="someBlock">
>                       Checkbox:  <input type="checkbox"
>                                                               
> t:id="myInPlaceCheckbox"
>                                                           
> t:type="t5components/InPlaceCheckbox"/>                             
>                       <hr />
>                       <br />
>                       Checkbox state : <div id="checkboxResult">state will 
> display here</div>
>       </t:block>
> 
> -- tml code -----End------
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5Components-Inside-AjaxResult---delay-in-loading-javascript-files-tp19575134p19615736.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to