You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Vangel V. Ajanovski" <aj...@ii.edu.mk> on 2011/09/28 00:49:45 UTC

5.3 Beta change in behaviour from Alpha with regard to event methods

I was using 5.3 alpha in production up until a couple of days, and when 
I changed the settings in the pom.xml to include latest beta, and 
rebuild, the behaviour changed and invalidated several pages in run-time.

The problem is that suddenly errors occured in run-time, stating that 
some components were missing.
Different components in different pages.
This happened on all pages where I commented out some components.

In all previous versions if I wanted to temporary hide a component, for 
example an ActionLink, it was enough to just put it in comments in the 
TML. But with 5.3 Beta this will issue an exception that the component 
is missing.

Is this intentional?

Because in production (without live reload), one will have to change the 
source and recompile and redeploy. Much much more complicated day-to-day 
life, than before.


Re: 5.3 Beta change in behaviour from Alpha with regard to event methods

Posted by Howard Lewis Ship <hl...@gmail.com>.
Meanwhile, beta-14 includes the PageCatalog, and beta-15 (building
now) improves it by dealing better with pages that have problems.

On Wed, Sep 28, 2011 at 9:30 PM, Steve Eynon
<st...@alienfactory.co.uk> wrote:
>> if Tapestry did all the checks at startup, before the first
>> request, you would not have a good place to report the errors ...
>
> If you wanted to go down this line you could have a filter in place
> that redirected you to an error reporting page if any errors were
> recorded at startup.
>
> I do something similar with a Configuration Module I have - all config
> is loaded on startup and any errors recorded. When attempting to
> access any page, if config errors were detected, you're sent to a
> Config Error page where you're enlightened of your mistakes. (Guru
> Meditation Style!)
>
> But by doing this, you effectively disable the whole app until the
> errors are rectified - which may not desired behaviour.
>
> Steve.
>
>
> On 29 September 2011 10:29, Vangel V. Ajanovski <aj...@ii.edu.mk> wrote:
>> On 29.09.2011 00:25, Howard Lewis Ship wrote:
>>>
>>> errors in most pages. So the "PageCatalog" page would either generate
>>> a list of all pages, or an exception report for the first error
>>> loading a page.  Quite doable.
>>>
>> That would probably help. Thanks for the idea.
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: 5.3 Beta change in behaviour from Alpha with regard to event methods

Posted by Steve Eynon <st...@alienfactory.co.uk>.
> if Tapestry did all the checks at startup, before the first
> request, you would not have a good place to report the errors ...

If you wanted to go down this line you could have a filter in place
that redirected you to an error reporting page if any errors were
recorded at startup.

I do something similar with a Configuration Module I have - all config
is loaded on startup and any errors recorded. When attempting to
access any page, if config errors were detected, you're sent to a
Config Error page where you're enlightened of your mistakes. (Guru
Meditation Style!)

But by doing this, you effectively disable the whole app until the
errors are rectified - which may not desired behaviour.

Steve.


On 29 September 2011 10:29, Vangel V. Ajanovski <aj...@ii.edu.mk> wrote:
> On 29.09.2011 00:25, Howard Lewis Ship wrote:
>>
>> errors in most pages. So the "PageCatalog" page would either generate
>> a list of all pages, or an exception report for the first error
>> loading a page.  Quite doable.
>>
> That would probably help. Thanks for the idea.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: 5.3 Beta change in behaviour from Alpha with regard to event methods

Posted by "Vangel V. Ajanovski" <aj...@ii.edu.mk>.
On 29.09.2011 00:25, Howard Lewis Ship wrote:
> errors in most pages. So the "PageCatalog" page would either generate
> a list of all pages, or an exception report for the first error
> loading a page.  Quite doable.
>
That would probably help. Thanks for the idea.


Re: 5.3 Beta change in behaviour from Alpha with regard to event methods

Posted by Howard Lewis Ship <hl...@gmail.com>.
Part of Tapestry's philosophy is lazy loading of pages and components
on an as-needed basis. This has good points and bad points ... good
points are very fast startup which I find very important.  The bad
side is that a lot of checks occur when the page is lazily loaded
(when first needed), and some things people want (such as a @Path
annotation on pages to control the URL for that page) aren't possible.

Further, if Tapestry did all the checks at startup, before the first
request, you would not have a good place to report the errors ...
errors logged to the console are not nearly as nice as the full
exception report page.

A thought: a built in page that, when it renders, identifies and loads
all pages in the application, which should flesh out most of the
errors in most pages. So the "PageCatalog" page would either generate
a list of all pages, or an exception report for the first error
loading a page.  Quite doable.



On Wed, Sep 28, 2011 at 1:01 PM, Vangel V. Ajanovski <aj...@ii.edu.mk> wrote:
> On 28.09.2011 10:32, Dragan Sahpaski wrote:
>>
>> The symbol you have to use to turn off this check is
>> SymbolConstants.UNKNOWN_COMPONENT_ID_CHECK_ENABLED.
>>
> Actually, I like this check, but it would be better if it was possible to
> happen at application startup, not on first access to the page.
>
>



-- 
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: 5.3 Beta change in behaviour from Alpha with regard to event methods

Posted by "Vangel V. Ajanovski" <aj...@ii.edu.mk>.
On 28.09.2011 10:32, Dragan Sahpaski wrote:
> The symbol you have to use to turn off this check is
> SymbolConstants.UNKNOWN_COMPONENT_ID_CHECK_ENABLED.
>
Actually, I like this check, but it would be better if it was possible 
to happen at application startup, not on first access to the page.


Re: 5.3 Beta change in behaviour from Alpha with regard to event methods

Posted by Dragan Sahpaski <dr...@gmail.com>.
Hi,
I think you are looking for the part "New Component Class Validations" in
the release notes<http://tapestry.apache.org/release-notes-53.html#ReleaseNotes5.3-ReleaseNotes%253ATapestry5.3.0>
.

The symbol you have to use to turn off this check is
SymbolConstants.UNKNOWN_COMPONENT_ID_CHECK_ENABLED.

USe this in contributeApplicationDefaults in the IOC module.

Cheers

On Wed, Sep 28, 2011 at 10:20 AM, Vangel V. Ajanovski <aj...@ii.edu.mk>
wrote:
> On 28.09.2011 01:56, Howard Lewis Ship wrote:
>>
>> Also, you can turn this check off, at least in 5.3 (in later releases,
>> the option to turn off the check may be removed).  See the release
>> notes on the Tapestry home page.
>>
>>
> Sorry. I have read the release notes 2-3 times since moving from 5.2 to
5.3
> alpha, but somehow I didn't understand this. Maybe it should be also
> mentioned with a bullet in breaking changes, just because it is not seen
at
> compile time.
>
> Can Tapestry start these checks for all the initialized pages at start
time?
> So one could be warned in advance.
>
> It is hard to find all such methods and hidden components while in
> development, especially if not all pages are covered with tests. I have
> tried some extensions for Eclipse to find dead code, but they give a
zillion
> of false positives due to how Tapestry works.
>
>

Re: 5.3 Beta change in behaviour from Alpha with regard to event methods

Posted by "Vangel V. Ajanovski" <aj...@ii.edu.mk>.
On 28.09.2011 01:56, Howard Lewis Ship wrote:
> Also, you can turn this check off, at least in 5.3 (in later releases,
> the option to turn off the check may be removed).  See the release
> notes on the Tapestry home page.
>
>
Sorry. I have read the release notes 2-3 times since moving from 5.2 to 
5.3 alpha, but somehow I didn't understand this. Maybe it should be also 
mentioned with a bullet in breaking changes, just because it is not seen 
at compile time.

Can Tapestry start these checks for all the initialized pages at start 
time? So one could be warned in advance.

It is hard to find all such methods and hidden components while in 
development, especially if not all pages are covered with tests. I have 
tried some extensions for Eclipse to find dead code, but they give a 
zillion of false positives due to how Tapestry works.


Re: 5.3 Beta change in behaviour from Alpha with regard to event methods

Posted by Howard Lewis Ship <hl...@gmail.com>.
Also, you can turn this check off, at least in 5.3 (in later releases,
the option to turn off the check may be removed).  See the release
notes on the Tapestry home page.

On Tue, Sep 27, 2011 at 4:55 PM, Howard Lewis Ship <hl...@gmail.com> wrote:
> See the release notes about this; it is an intentional change, to
> catch a common case of typos in names of event handler methods (the
> component id part).  You may be better wrapping your components in a
> <t:if test="false"> than a comment or <t:remove>.
>
> On Tue, Sep 27, 2011 at 3:49 PM, Vangel V. Ajanovski <aj...@ii.edu.mk> wrote:
>> I was using 5.3 alpha in production up until a couple of days, and when I
>> changed the settings in the pom.xml to include latest beta, and rebuild, the
>> behaviour changed and invalidated several pages in run-time.
>>
>> The problem is that suddenly errors occured in run-time, stating that some
>> components were missing.
>> Different components in different pages.
>> This happened on all pages where I commented out some components.
>>
>> In all previous versions if I wanted to temporary hide a component, for
>> example an ActionLink, it was enough to just put it in comments in the TML.
>> But with 5.3 Beta this will issue an exception that the component is
>> missing.
>>
>> Is this intentional?
>>
>> Because in production (without live reload), one will have to change the
>> source and recompile and redeploy. Much much more complicated day-to-day
>> life, than before.
>>
>>
>
>
>
> --
> 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
>



-- 
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: 5.3 Beta change in behaviour from Alpha with regard to event methods

Posted by Howard Lewis Ship <hl...@gmail.com>.
See the release notes about this; it is an intentional change, to
catch a common case of typos in names of event handler methods (the
component id part).  You may be better wrapping your components in a
<t:if test="false"> than a comment or <t:remove>.

On Tue, Sep 27, 2011 at 3:49 PM, Vangel V. Ajanovski <aj...@ii.edu.mk> wrote:
> I was using 5.3 alpha in production up until a couple of days, and when I
> changed the settings in the pom.xml to include latest beta, and rebuild, the
> behaviour changed and invalidated several pages in run-time.
>
> The problem is that suddenly errors occured in run-time, stating that some
> components were missing.
> Different components in different pages.
> This happened on all pages where I commented out some components.
>
> In all previous versions if I wanted to temporary hide a component, for
> example an ActionLink, it was enough to just put it in comments in the TML.
> But with 5.3 Beta this will issue an exception that the component is
> missing.
>
> Is this intentional?
>
> Because in production (without live reload), one will have to change the
> source and recompile and redeploy. Much much more complicated day-to-day
> life, than before.
>
>



-- 
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org