Re: T5:Problem with Beaneditor and autobuilding

2008-03-28 Thread Andreas Pursian

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thanks Howard, your hint did the trick.

cheers

Andreas

Howard Lewis Ship wrote:
| I think what's happened is that there's a subtle change in the order
| of operations inside BeanEditForm and BeanEditor.
|
| They now build the BeanModel from the bound property type ... in this
| case, your abstract bean.
|
| I think youre best bet is to inject the BeanModelSource service, and
| obtain the right bean model for the specific sub-class class, and
| provide that to the BeanEditor (or BeanEditForm) via the model
| parameter.
|
| On Thu, Mar 27, 2008 at 6:40 PM, Andreas Pursian <[EMAIL PROTECTED]> wrote:
|> -BEGIN PGP SIGNED MESSAGE-
|>  Hash: SHA1
|>
|>  Hi list,
|>
|>  i just updated my t5 app from an early 5.0.11 Snapshot to the finally
|>  release version. Unfortunatly i experienced some problems. One of the
|>  app pages is using the beaneditor component to display and edit
|>  different data beans. Different means, that there is not one specific
|>  bean staticly bound to the beaneditor but an abstract super class works
|>  as a placeholder for the specific bean instance which is instanciated
|>  through a factory class during onActivate(). So the following code
|>  snippet worked fine before the new autobuiling feature of beaneditor was
|>  introduced.
|>
|>  @Persist("Flash")
|>  private AbstractTaskData taskData;
|>
|>  void onActivate(Long Id) throws InstantiationException,
|> ccmCase = cw.getCaseById(Id);
|> if (ccmCase != null){
|>
|> TaskDataFactory taskDataFactory = new TaskDataFactory();
|> taskData =
taskDataFactory.getTaskData(ccmCase.getStateData());
|>
|> } else System.out.println("Case is null ...");
|>  }
|>
|>  Right now no specific error is thrown but beside the action buttons no
|>  bean properties are rendered anymore, the page is just empty. If i alter
|>  the abstract beaneditor datasource (taskData) to a specific data bean,
|>  everything works fine beside that this static behavior is not the
|>  intended task of the page.
|>  So my question is, which changes are necessary to get the beaneditor
|>  working again with a abstract data source which represents a specific
|>  bean instance?
|>
|>  thanks a lot ...
|>
|>  Andreas
|>  -BEGIN PGP SIGNATURE-
|>  Version: GnuPG v1.4.7 (Darwin)
|>  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
|>
|>  iD8DBQFH7EyZM14O/Esx/74RAuI6AJ9ux4HxbkhbSiYWSZ0SSbhwWwxdTQCbBp+f
|>  KsxjdNmtPBrVy1v46/hhGOA=
|>  =bFbV
|>  -END PGP SIGNATURE-
|>
|>  -
|>  To unsubscribe, e-mail: [EMAIL PROTECTED]
|>  For additional commands, e-mail: [EMAIL PROTECTED]
|>
|>
|
|
|
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH7Na1M14O/Esx/74RAmxdAKDGsguGtQuj2MnhTBuQ2eXML6oYdACff5xA
YGx+VyUl2ECggCVHphLi/Xo=
=VcX0
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5:Problem with Beaneditor and autobuilding

2008-03-27 Thread Howard Lewis Ship
I think what's happened is that there's a subtle change in the order
of operations inside BeanEditForm and BeanEditor.

They now build the BeanModel from the bound property type ... in this
case, your abstract bean.

I think youre best bet is to inject the BeanModelSource service, and
obtain the right bean model for the specific sub-class class, and
provide that to the BeanEditor (or BeanEditForm) via the model
parameter.

On Thu, Mar 27, 2008 at 6:40 PM, Andreas Pursian <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
>  Hash: SHA1
>
>  Hi list,
>
>  i just updated my t5 app from an early 5.0.11 Snapshot to the finally
>  release version. Unfortunatly i experienced some problems. One of the
>  app pages is using the beaneditor component to display and edit
>  different data beans. Different means, that there is not one specific
>  bean staticly bound to the beaneditor but an abstract super class works
>  as a placeholder for the specific bean instance which is instanciated
>  through a factory class during onActivate(). So the following code
>  snippet worked fine before the new autobuiling feature of beaneditor was
>  introduced.
>
>  @Persist("Flash")
>  private AbstractTaskData taskData;
>
>  void onActivate(Long Id) throws InstantiationException,
> ccmCase = cw.getCaseById(Id);
> if (ccmCase != null){
>
> TaskDataFactory taskDataFactory = new TaskDataFactory();
> taskData = 
> taskDataFactory.getTaskData(ccmCase.getStateData());
>
> } else System.out.println("Case is null ...");
>  }
>
>  Right now no specific error is thrown but beside the action buttons no
>  bean properties are rendered anymore, the page is just empty. If i alter
>  the abstract beaneditor datasource (taskData) to a specific data bean,
>  everything works fine beside that this static behavior is not the
>  intended task of the page.
>  So my question is, which changes are necessary to get the beaneditor
>  working again with a abstract data source which represents a specific
>  bean instance?
>
>  thanks a lot ...
>
>  Andreas
>  -BEGIN PGP SIGNATURE-
>  Version: GnuPG v1.4.7 (Darwin)
>  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>  iD8DBQFH7EyZM14O/Esx/74RAuI6AJ9ux4HxbkhbSiYWSZ0SSbhwWwxdTQCbBp+f
>  KsxjdNmtPBrVy1v46/hhGOA=
>  =bFbV
>  -END PGP SIGNATURE-
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5:Problem with Beaneditor and autobuilding

2008-03-27 Thread Andreas Pursian

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi list,

i just updated my t5 app from an early 5.0.11 Snapshot to the finally
release version. Unfortunatly i experienced some problems. One of the
app pages is using the beaneditor component to display and edit
different data beans. Different means, that there is not one specific
bean staticly bound to the beaneditor but an abstract super class works
as a placeholder for the specific bean instance which is instanciated
through a factory class during onActivate(). So the following code
snippet worked fine before the new autobuiling feature of beaneditor was
introduced.

@Persist("Flash")
private AbstractTaskData taskData;

void onActivate(Long Id) throws InstantiationException,
ccmCase = cw.getCaseById(Id);
if (ccmCase != null){

TaskDataFactory taskDataFactory = new TaskDataFactory();
taskData = taskDataFactory.getTaskData(ccmCase.getStateData());

} else System.out.println("Case is null ...");
}

Right now no specific error is thrown but beside the action buttons no
bean properties are rendered anymore, the page is just empty. If i alter
the abstract beaneditor datasource (taskData) to a specific data bean,
everything works fine beside that this static behavior is not the
intended task of the page.
So my question is, which changes are necessary to get the beaneditor
working again with a abstract data source which represents a specific
bean instance?

thanks a lot ...

Andreas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH7EyZM14O/Esx/74RAuI6AJ9ux4HxbkhbSiYWSZ0SSbhwWwxdTQCbBp+f
KsxjdNmtPBrVy1v46/hhGOA=
=bFbV
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]