You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Elad Messing <El...@sphera.com> on 2004/02/08 10:56:16 UTC

Problems referencing to a component inherited parameter

Hi All

	In my "Border" component I include my own "Error Window"
component. This component has 2 parameters : "hasErrors"  and "errors".

*****
<component-specification class="org.apache.tapestry.BaseComponent"
allow-body="yes" allow-informal-parameters="yes">
		<parameter name="errors" type="java.lang.String"
required="no" direction="in" />
		<parameter name="hasErrors" type="java.lang.Boolean"
required="yes" direction="auto" />
</component-specification>
*****


	In the "ErrorWindow.html" file I write :


*****
<span jwcid="@Conditional" condition="ognl:hasErrors">	
*****


	the "border" compoenent has these lines :


*****
<component-specification 
	class="com.sphera.rd.layout.Border"
allow-informal-parameters="no">
	<parameter name="cache" type="java.lang.String" required="yes"
direction="auto" />    
	<parameter name="hasErrors" type="java.lang.Boolean"
required="yes" direction="auto" />    
	<parameter name="errors" type="java.lang.String" required="no"
direction="in" />    

    <component id="errorWindow" type="ErrorWindow" >
        <inherited-binding name="hasErrors" parameter-name="hasErrors"
/>
        <inherited-binding name="errors" parameter-name="errors" />
    </component>
*****


So - each page that uses the "border" can set wether to show errors, and
what the errors are.

The problem is that I get an expection :
"
Unable to resolve expression 'hasErrors' for
org.apache.tapestry.BaseComponent$Enhance_1@1b9d4d8[Home/border.errorWin
dow].
context:/WEB-INF/ErrorWindow.html, line 1
"

Am I referencing the paremeter wrong ?

Thanks


Elad Messing

Sphera Tech. LTD
 
<http://www.sphera.com/demosite/index.htm>



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org