You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2003/11/04 15:36:41 UTC

DO NOT REPLY [Bug 24390] New: - New StaticStringModule

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24390>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24390

New StaticStringModule

           Summary: New StaticStringModule
           Product: Cocoon 2
           Version: 2.1.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: general components
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: andrzej@chaeron.com


When using Modular Database actions, updates in particular, I had a need to be 
able to specify a constant value for a column in the database descriptor.  The 
StaticStringModule makes this easy to do.

You configure it in cocoon.xconf like:

<component-instance 
  class="org.apache.cocoon.components.modules.input.StaticStringModule"  
  logger="core.modules.input" 
  name="static"/>

Then in your Modular Database Actions db descriptor you can do something like 
this:

<value name="status" type="string">
	<mode name="static" type="voidStatus">
		<value>void</value>
	</mode>
</value>

To write the value "void" into the status column of a database table.

Simple but very useful.

.....Andrzej