Sylvain Wallez a écrit :

Carsten Ziegeler wrote:
Sylvain Wallez schrieb:

What about simply adding Form.setId(String formId)?
Yes, that was my first thought as well - but I was wondering if it's a
good idea to "always"
allow to change the id. So I thought that if the id is dynamic, it
should be part of the constructor - therefore the above changes.

But of course just adding setId() works fine as well.

It seems to me that the form writer should not have to care about
setting a dynamic ID on the form, as it's more an integration concern (a
form could run equally well standalone or within the portal).

Is there a simple test that can be performed (without introducing a
dependency on the portal block) that can allow us to detect that we're
running as a coplet and then set a dynamic ID on the form?

Yes, it is possible to test if an entry "cocoon-portal-copletId" is in the objectModel.

Sylvain



--
Philippe GASSMANN
Solutions & Technologies
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/

Reply via email to