apache > cocoon
 

Portal: The URICoplet

This section describes the URICoplet and the different possibilities to configure it. For general configuration see the previous section.

The Content Location and Parameter Handling

A URICoplet uses a uri to fetch the coplet. This configuration is obviously a configuration of the coplet class (and not of the coplet type) as each coplet uses a different location.

The attribute uri takes the complete uri (as a string) to fetch the content from:

...
   <coplet-data id="CZ Weblog" name="standard">
      <title>CZ's Weblog</title>
      <coplet-base-data>URICoplet</coplet-base-data>
      <attribute>
      	<name>uri</name>
      	<value xsi:type="java:java.lang.String" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      	  cocoon:/news/liverss?feed=http://radio.weblogs.com/0107211/rss.xml
      	</value>
      </attribute>
   </coplet-data>
...
   

If you're using the cocoon protocol to call internal pipelines, you can also configure the boolean attribute handleParameters (default is false), that defines if the coplet handles request parameters itself. This should be used for coplets that process request parameters (have forms for example). In that case, the parameters from the request are only forwarded to the coplet, if they are meant for this coplet. All other coplets that use request parameters don't get them in this request-response-cycle.

Error Handling

Usually, in the case of an error during rendering the content of a coplet, a message is included in the coplet window instead of the coplet content. If you want to customize this, you can specifiy the attribute error-uri that should contain a valid uri that deliveres the content for a better error message.