I'm experiencing some issues with Tapestry 4.1 (the latest version from maven).

First is that I can't seem to get a listener called unless I have my
listener submit a form. If remove the submitForm attribute, theres no
indication on the server that a listener method is called.


<form jwcid="[EMAIL PROTECTED]" action=""><div id="mLink"
style="background-color: yellow; width:100px;">
       click me to activate my script
   </div>

   <div jwcid="[EMAIL PROTECTED]"  >
       <span jwcid="@If" condition = "ognl:good">
           <span jwcid="@Insert" value="ognl: new
java.util.Date()">12/22/2006</span>
           <span jwcid="@Insert" value="ognl: message"> the msg goes
here </span>
           <span script="scripts/Test.script" jwcid="@Script"
type="text/javascript">

           </span>
       </span>


   </div>

</form>

and:
   @EventListener(events = "onclick", submitForm = "f",async = true
,elements= "mLink" )
     public void  handleUpdatingThingsAreGood ( IRequestCycle c)
     {
          BrowserEvent event =   new BrowserEvent(c)  ;
           setGood(true);
           getLogger().log(  "x = {0}, y={1}",event.getPageX()
,event.getPageY()) ;
          getRequestCycle().getResponseBuilder().updateComponent("refreshme");
     }

Second, and this one's more relevant to me, is that there doesnt seem
to be any way to guarantee a dynamic component isnide of a component
that is dynamically rendered will work on ajax loading. the lifecycle
doesnt seem to be as in place as it is for standard rendering.

// the component i need to render
<span jwcid="[EMAIL PROTECTED]">
 <span jwcid="@If" condition = "ognl: good ">

   <span script="scripts/Test.script" jwcid="@Script"  type="text/javascript">
           </span>

</span>
</span>

// the following would be invoked when something happens
  @EventListener(events = "onclick", submitForm = "f",async = true
,elements= "mLink" )
   public void  handleUpdatingThingsAreGood ( IRequestCycle c)  {
        setGood(true);
        getRequestCycle().getResponseBuilder().updateComponent("foo");
  }

I would hope that when foo is updated, and the condition is finally
true, the script component would render and cause the

<initialization>
   <![CDATA[
 alert( 'moo' );
   ]]>
</initialization>

block to run on the refresh.

This is important for the obvious reason: it's component specific
initialization which wont have had a chance to get setup on the pages
real load.

Can we modify the behavior of the framework so that the initialization
block is relevant for all components rendered during and acutal page
reload OR for any components rendered after an ajax request? or at
least modify the .script DTD to support contributing code to be run
after an ajax reload?

Peace,
Josh


On 7/29/06, Korbinian Bachl <[EMAIL PROTECTED]> wrote:
Yesterday i asked for Tap4.1 jars - and here they are, on
http://tapestry.apache.org/ itself !!! great work guys !

now, when will i get the doc in pdf ? ;)

Best Regards and thumbs up for the new version,

Korbinian


> -----Ursprüngliche Nachricht-----
> Von: Korbinian Bachl [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 28. Juli 2006 19:10
> An: users@tapestry.apache.org
> Betreff: Tap 4.1 / doc
>
> Hi,
>
> yesterday i read on the list that Tap4.1 seems ot be out
> today (as beta), and since im starting a new project, i
> thought i may try it with 4.1 oinstead of 4.0. So i went to
> webpage and it also found some info (but no beta - jars so
> far).So, will it be out as beta in usable jar files or not ?
>
> And another question: does the Tap4.1 doc who is online also
> exist as a PDF or sth like that? - I know that im
> oldfashioned, but i prefer it to print everything out and
> then read it....
>
> Best Regards,
>
> Korbinian
>


---------------------------------------------------------------------
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]

Reply via email to