Otho did you ever find a solution to the the Class Cast Exception when using the @ApplicationState annotation? I have read and reread the docs and it seems like my code should work. I am basically just trying to create an ASO with the default persistence strategy and constructor. So I am not sure I understand why I am getting the class cast exception.
-BGregory Otho wrote: > > Hi all! > Was there a solution to this really strange ClassCastException already? > > I have the same problem in the following circumstances: > > public class Search extends BaseComponent > { > @Component > private Form simpleSearch; > > @ApplicationState > private SimpleSearchString simpleSearchString; > > private String searchTerm; // wil be populated by the form; > > /* Form Handler */ > > String onSuccess() > { > if (searchTerm == null) > return null; > > >>>>> getSimpleSearchString().setSearchTerm(searchTerm); > return "ExtendedSearch"; > } > > public SimpleSearchString getSimpleSearchString() > { > return simpleSearchString; > } > >>>>> This line gives the following stacktrace > > java.lang.ClassCastException myapp.state.SimpleSearchString cannot be cast > to myapp.state.SimpleSearchString > Stack trace > > - myapp.components.search.Search._$read_simpleSearchString(Search.java > ) > - myapp.components.search.Search.getSimpleSearchString(Search.java:79) > - myapp.components.search.Search.onSuccess(Search.java:53) > - myapp.components.search.Search.handleComponentEvent(Search.java) > > > This happens regardless of if I access simpleSearchString directly or with > the getter. > Any idead what causes this somewhat puzzling behaviour? > > Regards, > Otho > -- View this message in context: http://www.nabble.com/T5---Authentication-filter-tf3726392.html#a11607946 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]