You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Thomas Nichols <nx...@yahoo.co.uk> on 2003/12/01 10:29:27 UTC

Re: Docs or examples for modular database actions?

At 18:03 29/11/2003 +0100, Christian Haul wrote:

>Thomas Nichols wrote:
>
>>>BTW I've been reading docs on SOFIA recently
>>  From salmonllc.com? Looks interesting on paper - RAD for J2EE...
>
>Yep. Although I believe Cocoon is well up to the job ;-)

So I am finding.


>>>  and am wondering if we
>>>should provide a _second_, less powerful but simpler interface to esql:
>>>   [...snip...]
>>>Thoughts?
>>>
>>>         Chris.
>>
>>The <esql:row-results> approach took me a little time to get my head 
>>around - and the alternative syntax is a good deal simpler. Would this be 
>>an alternative syntax, with the old syntax still supported?
>
>It's not really "old" vs "new" -- it would be an additional tag that
>would expand to the very same code as the current combination. Hence,
>it could be fully combined with all other esql tags that may appear
>inside a esql:row-results. Well, that would be the plan.

Ok, in that case it sounds useful.


>>Unless you can mix the old and new code together, though, this represents 
>>yet another choice between simplicity and power, of which there are 
>>several already :-)
>
>Indeed. But maybe the current ESQL usage is a little too complex to just
>list the contents of a table?

I didn't find it so, but then I'm reasonably familiar with SQL.

>>To be honest, I don't have a problem with embedding SQL SELECTs directly 
>>into the XSP or logicsheet. The row-results logic, once grasped, is also 
>>straightforward enough. More of an issue is the insert/update/delete 
>>logic. In your GT2003 slides, IIUC, you recommended against doing these 
>>using ESQL or SQLTransformer: this is my instinct also, but what are your 
>>reasons? And could these problems be overcome by an alternate "simple 
>>ESQL" interface? If so, that would to me make a more compelling reason 
>>for an "ESQL Simple" interface.
>
>Nope. What I don't like about manipulating tables from XSP is that a)
>application logic appears on the page

Agreed - generally horrid.

>  b) different results (eg errors)
>lead to different pages or ask for redirects which makes the pages too
>complex to maintain.

You mean the process flow is defined within XSPs? Ok, I can see this is a 
problem.

>Actions are a good step in the right direction if used correctly.
>
>Honestly, the flow + o/r apprach is so much more elegant for complex
>logic. Especially if you add CocoonForms aka Woody to it.

I'll check this out more carefully.

>>Cocoon has the best architecture I've worked with for a very long time - 
>>thanks for all your work.
>
>Thank you! Now go and spread the word :-)

I already am :-)

>         Chris.


Thanks again,
Thomas.


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


Re: log messages of actions and modules

Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Michael Wolf wrote:

> Hello,
> Is there a introduction to the cocoon log-system?
>
> I look for log-messages in the WEB-INF/logs directory.
> And I can also write my own error messages from the flow, but I cannot 
> find any messages from my input/output modules and the modular 
> database actions I use.


The modules log to core.log while the actions log to sitemap.log.
However, you'll need to set the log-level in WEB-INF/logkit.xconf to 
DEBUG for those
targets in order to see anything.

If you modify the logger attribute for the components (-> cocoon.xconf 
for modules,
-> sitemap.xmap for actions) you can introduce a new target or a 
subtarget in logkit.xconf
and let only those components you're interested in log more verbosibly.

Apart from that, I expect that you'll find documentation for logkit on 
the logkit pages http://avalon.apache.org/logkit

    Chris.


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


log messages of actions and modules

Posted by Michael Wolf <wu...@scirem.de>.
Hello,
Is there a introduction to the cocoon log-system?

I look for log-messages in the WEB-INF/logs directory.
And I can also write my own error messages from the flow, but I cannot 
find any messages from my input/output modules and the modular database 
actions I use.

Can anyone help?

Michael


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


using actions in flow

Posted by Michael Wolf <wu...@scirem.de>.
Hello,
I specified the modular database actions in a my.roles file and can 
access them via the getComponent() method:

var action = cocoon.getComponent("mod-db-sel");

to call the act method of the action I have to specify the various 
parameters:

public java.util.Map act(Redirector redirector,
                          SourceResolver resolver,
                          java.util.Map objectModel,
                          java.lang.String source,
			 org.apache.avalon.framework.parameters.Parameters param)

In my flowscript I have the parameters in javaScript:

for example: {"table-set" : "login_check"}

I've heard that the redirector and the source parameter can be null.
But what about the other parameters?
How do I access a resolver and the objectModel to pass it to the act-method?
How do I transform my parameters to the appropriate format?
Is there a script that already implements such a transformation?

Thanks for your help,
Michael


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