Not 100% sure, but it seems like Tapestry has designated my.package.pagesfor Tapestry Pages (convention) and my.package.components for Tapestry Components (convention again). So Tapestry will treat the classes in those packages as pages/components respectively. It is likely a better idea anyway to keep your data objects in a separate package from your pages :-)
On 3/22/07, Bogdan Calmac <[EMAIL PROTECTED]> wrote:
After creating my own ASO object, I kept getting the ClassCastExeception below when accessing it, until I had the inspiration to move the ASO in a different package than the page. Then it worked fine. Is this just a bug or intentional design? This is the exception (with 5.0.3). The ASO reader throws a ClassCastException: Caused by: java.lang.ClassCastException: org.byteberry.survey.pages.SurveySession at org.byteberry.survey.pages.SurveyDetail2._$read_surveySession( SurveyDetail2.java) at org.byteberry.survey.pages.SurveyDetail2.getQuestion0( SurveyDetail2.java:55) at $PropertyConduit_11179d07ce4.get($PropertyConduit_11179d07ce4.java) at org.apache.tapestry.internal.bindings.PropBinding.get( PropBinding.java:54) For more details, the ASO is defined with: @ApplicationState private SurveySession surveySession; and then accessed in: public SurveyQuestion getQuestion0() throws SQLException { return surveySession.questions.get(0); } Thanks, Bogdan Calmac. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Peter Beshai Computer Science Student University of Waterloo