cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Hrivik" <hri...@isdd.sk>
Subject RequestParameterModule
Date Thu, 27 Nov 2003 14:31:50 GMT

This can be reported as bug, I think.

When I try to access for parameter from request in sitemap and in
request is not such parameter I'll get null-exception.

I think that RequestParameterModule should return always not null value.


The method getAttribute from RequestParameterModule shoul be like this.




   public Object getAttribute( 
		String name,
		Configuration modeConf, 
		Map objectModel )
		 throws ConfigurationException {

        String pname = (String) this.settings.get("parameter", name);

        if ( modeConf != null ) {
            pname = modeConf.getChild("parameter").getValue(pname);
        }

        String value =
ObjectModelHelper.getRequest(objectModel).getParameter( pname );

        if (value == null) {
			return "";
		} 
	  else {
            	return value;
		} 

    }








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


Mime
View raw message