cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dev at weitling <...@weitling.net>
Subject Re: How to get Avalon Component from Bean?
Date Sun, 25 Feb 2007 09:37:50 GMT
Hi Grzegorz,

if I don't have to reinvent the wheel I stop chiseling quadratic stones :-)

Yes, there is lazy loading of dependent SQL tables, handled in the form
as nested repeaters. Any class loading my SQL data should use a
preconfigured (Avalon) component for the DB connection - but how to get
access from a simple bean? Is there an interface I could implement to
get the appropriate ServiceManager? (within flowscript it's easy because
the cocoon object is available)

I would like to XMLify as much as possible but there is some special
update logic necessary. And I don't catch it all how to use
SQLTransformer in a binding for load and save.

> I think binding code tries to find out which values were changed and
bind only if something was changed. That should explain why get is called.
 
Cocoon is too often like a black box. We too often rely on assumptions.
What about discussing the value of documentation at the next
GetTogether...? The whol eproject and its spreading would win with a
precise and stringent docu.

To be more precise:
Example 1)
My form just has one textfield "mytext", my java bean reads and writes
this value from/to a file. When I want to get this file via cocoon: or
context: protocol I need the Cocoon object.

Example 2)
I have three tables representing a nested structure (Answers belong to
QuestionLocales belong to Questions, so each question has several
locales which has several answers). On updating I have to lookup if the
values have been changed in the meantine in the database. And I can call
a SQL statement only when I have gathered all necessary fields. So e.g.
a call getMyText() on my bean can't give a result as long as there has
not been a call to getMyId() and getMyUser(). And there should be as
less SQL calls as possible.

Any ideas greatly appreciated :-)

Florian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message