You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by lukaszkaleta <lu...@gmail.com> on 2012/07/07 14:01:13 UTC

How to use java Enums inside pages

Hi, I am having enum class defined in base package.
When I am using this enum inside page class I am getting exception:

Render queue error in Expansion[PropBinding[expansion About(ExampleEnum)]]:
Base class java.lang.Enum (super class of
org.tapestry.quickstart.base.ExampleEnum) is not in a controlled package and
is therefore not valid. You should try moving the class to package
org.tapestry.quickstart.base.

Please look into attached tapestry-quickstart patch (for reproduction please
extract it into standard tapestry quickstart)
http://tapestry.1045711.n5.nabble.com/file/n5714330/tapestry-quickstart-enum-patch.zip
tapestry-quickstart-enum-patch.zip 

Please give me a hint how should I solve it.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-use-java-Enums-inside-pages-tp5714330.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: How to use java Enums inside pages

Posted by lukaszkaleta <lu...@gmail.com>.
Thanks it works!

--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-use-java-Enums-inside-pages-tp5714330p5714334.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: How to use java Enums inside pages

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Sat, 07 Jul 2012 09:01:13 -0300, lukaszkaleta <lu...@gmail.com>  
wrote:

> Hi, I am having enum class defined in base package.

Hi! Don't do that. The base package is meant to only have superclasses of  
pages, components and mixins, nothing else. Move to a non controlled  
package (anyone that isn't base, pages, components and mixins) and it'll  
work fine.

> When I am using this enum inside page class I am getting exception:
> Render queue error in Expansion[PropBinding[expansion  
> About(ExampleEnum)]]:
> Base class java.lang.Enum (super class of
> org.tapestry.quickstart.base.ExampleEnum) is not in a controlled package  
> and is therefore not valid. You should try moving the class to package
> org.tapestry.quickstart.base.

Yep, the error message	should say something specific about mixins. As it  
is now, it's misleading. Could you please file a JIRA for that?

-- 
Thiago H. de Paula Figueiredo

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


Re: How to use java Enums inside pages

Posted by Bob Harner <bo...@gmail.com>.
Just move your enum class to another package, as the exception suggests.
On Jul 7, 2012 8:01 AM, "lukaszkaleta" <lu...@gmail.com> wrote:

> Hi, I am having enum class defined in base package.
> When I am using this enum inside page class I am getting exception:
>
> Render queue error in Expansion[PropBinding[expansion About(ExampleEnum)]]:
> Base class java.lang.Enum (super class of
> org.tapestry.quickstart.base.ExampleEnum) is not in a controlled package
> and
> is therefore not valid. You should try moving the class to package
> org.tapestry.quickstart.base.
>
> Please look into attached tapestry-quickstart patch (for reproduction
> please
> extract it into standard tapestry quickstart)
>
> http://tapestry.1045711.n5.nabble.com/file/n5714330/tapestry-quickstart-enum-patch.zip
> tapestry-quickstart-enum-patch.zip
>
> Please give me a hint how should I solve it.
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/How-to-use-java-Enums-inside-pages-tp5714330.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>