You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Eko S.W." <sw...@gmail.com> on 2007/06/04 08:53:24 UTC

Re: Problem on creating generic SharedCrudPage using BeanEditForm

okay.
here I attach four files: SharedCrud for page that can do Crud for any bean
to any table using specific DAO. And the OpenResearch that use SharedCrud.

If you open OpenResearch.html, it display link along top of it.
For example in Reference link, there's a New Reference.
And in Journal link, there's a New Journal
So on, and so on.
That link will use SharedCrud<Reference> and SharedCrud<Journal>,
respectively.

But the problem is, if I click New Reference and then New Journal, the first
time I change to another Bean Type, it'll cause problem and the error is :
An unexpected application exception has occurred.

   - org.apache.tapestry.ioc.internal.util.TapestryException Failure
   reading parameter value of component
   tapestry.pages.shared.SharedCrud:form.textfield: crms.domain.Journal
   - java.lang.ClassCastException crms.domain.Journal
   Stack trace
      -
      org.apache.tapestry.internal.services.CoercingPropertyConduitWrapper.get
      (CoercingPropertyConduitWrapper.java:36)
      -
      org.apache.tapestry.corelib.components.BeanEditForm.getValueForProperty
      (BeanEditForm.java:241)
      - org.apache.tapestry.internal.bindings.PropBinding.get(
      PropBinding.java:54)

(I am sorry that I paste it)
I'll look forward again this problem again.
(somehow I think I know the problem is)
:)
Thanks

-- 
Best wishes,
Eko SW
http://swdev.blogs.friendster.com/my_blog/