On Tue, Jun 11, 2013 at 11:04 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 11 Jun 2013 02:14:18 -0300, Ilya Obshadko <ilya.obsha...@gmail.com>
> wrote:
>
>  I actually encounter the same problem:
>>
>> x.y.z.Login$EnumType cannot be cast to x.y.z.Login$EnumType
>>
>
> Move EnumType to a non-controlled package (i.e. one that isn't components,
> pages, base or mixins) and it'll work. We can't stress this enough: in a
> pages package, put only classes that are pages, and this is also valid for
> their inner classes. In a components page, only components, etc.


Ok. It's interesting however - if I declare an inner class inside a page
class, is it going to be accessible via URL?
And what this URL is going to look like? How do I create template for such
an 'inner page'? Is it able to access an 'outside' page?

It doesn't seem to be very practical, I'm just curious.


> EnumType is a simple enum embedded in a page class:
>
>>
>>     @Property @Persist
>>     private EnumType something;
>>     enum EnumType { ONE, TWO };
>>
>> What is this? Happens every time container reloads modified page/component
>> classes. I have to stop and start container again. Very disturbing
>> actually. I don't want to put such simple types outside of page classes
>> because it pollutes source tree for no reason. Could you elaborate?
>>
>
> All classes inside the pages package are transformed, so, if you try to
> use them outside the Tapestry-controlled packages, the class instance you
> have inside the controlled packages is actually different from the one you
> have outside. Yes, there's a reason.
>
>
Makes sense. Thank you.

-- 
Ilya Obshadko

Reply via email to