Sure, if it's going to always be applied, then there's no need doing
anything specific in AbstractComponentEventLink#beginRender
or Form#beginRender() - and thus no need to extract common code
into ClientBehaviorSupport.

On Tue, Aug 16, 2011 at 01:20, Howard Lewis Ship <hls...@gmail.com> wrote:
> On Mon, Aug 15, 2011 at 3:08 PM, Andreas Andreou <andre...@gmail.com> wrote:
>> Ok - interesting idea, i like it.
>>
>> Notice though that with the change i'm proposing to
>> ClientBehaviorSupport it can also be implemented right there,
>> i.e. ClientBehaviorSupport.addWaitForPage(Element) will be changed
>> to include ajax-protection.js
>>
>
> I really saw this as more something the (@Traditional)
> DocumentLinkerImpl would do automatically.  Part of the idea is to
> make it more fool proof by just applying it to the whole page, no
> questions asked ... and to streamline markup at the same time.
>
>>
>> On Mon, Aug 15, 2011 at 23:39, Howard Lewis Ship <hls...@gmail.com> wrote:
>>> I've been thinking about this as well.
>>>
>>> I want to experiment with an approach that does the following:
>>>
>>> <html>
>>>  <head>
>>>   <script src="..../require.js"/>
>>>  </head>
>>>  <body>
>>>    <script src="ajax-protection.js"/>
>>>
>>>  ...
>>>
>>>   <script>
>>>    // Use require.js to load everthing else
>>>  </script>
>>> </html>
>>>
>>> The ajax-protection would write to document, adding an translucent (0%
>>> alpha) div covering the whole body element. When clicked it would
>>> become visible. When the document is fully loaded, it would be
>>> removed.
>>>
>>> This should be written with no dependencies, as Prototype (in 5.3) and
>>> jQuery (in 5.4) will not yet be loaded and available.
>>>
>>> If implemented correctly, we shouldn't need to worry about the wait
>>> for page on individual components, it will simply "work", as any
>>> attempt to click on a field or link will hit the div first instead.
>>>
>>> On Mon, Aug 15, 2011 at 12:30 PM, Andreas Andreou <andre...@gmail.com> 
>>> wrote:
>>>> Hi, in some projects i'd like to get rid of the
>>>> onclick="javascript:return Tapestry.waitForPage(event);'
>>>> and
>>>> onsubmit="javascript:return Tapestry.waitForPage(event);"
>>>> code in the generated html.
>>>>
>>>> That code is generated in AbstractComponentEventLink#beginRender and in
>>>> Form#beginRender()
>>>>
>>>> Initially i though of using some (more) conditionals to change this, but 
>>>> then i
>>>> noticed that in both cases ClientBehaviorSupport is available and used
>>>> in the code
>>>> nearby.
>>>> And as the ClientBehaviorSupport name suggests, it makes sense for it to be
>>>> the one responsible for outputting that code ( and in that way give
>>>> anyone the ability
>>>> to override its behavior )
>>>>
>>>> So i'm thinking of a new method, 
>>>> ClientBehaviorSupport.addWaitForPage(Element)
>>>>
>>>> Do you guys see any problems with thisd approach? If there are no
>>>> objections, i'll
>>>> soon add a JIRA and go on with this
>>>>
>>>> --
>>>> Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
>>>> Apache Tapestry PMC / http://chesstu.be owner
>>>> Open Source / JEE Consulting
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>>>> For additional commands, e-mail: dev-h...@tapestry.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator of Apache Tapestry
>>>
>>> The source for Tapestry training, mentoring and support. Contact me to
>>> learn how I can get you up and productive in Tapestry fast!
>>>
>>> (971) 678-5210
>>> http://howardlewisship.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: dev-h...@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
>> Apache Tapestry PMC / http://chesstu.be owner
>> Open Source / JEE Consulting
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: dev-h...@tapestry.apache.org
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: dev-h...@tapestry.apache.org
>
>



-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Apache Tapestry PMC / http://chesstu.be owner
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org

Reply via email to