You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by david joffrin <da...@hotmail.com> on 2005/04/02 22:06:33 UTC
A show error component
Hi,
I tried several things, but I can make it work. I'd like to display all
errors that have occured.
To do that, I modified the ShowError.jwc sample like that:
<span jwcid="ifError">
<div id="error">
<span jwcid="@Foreach"
source="bindings.delegate.object.associatedTrackings"
value="ognl:fieldTracking">
<span jwcid="@Conditional" condition="ognl:fieldTracking.inError">
<span jwcid="@Delegator"
delegate="ognl:fieldTracking.errorRenderer">Error message goes here.</span>
</span>
</span>
</div>
</span>
and,
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE component-specification
PUBLIC "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
<component-specification class="org.apache.tapestry.BaseComponent"
allow-body="no" allow-informal-parameters="no">
<parameter name="delegate"
type="org.apache.tapestry.valid.IValidationDelegate"
required="yes"/>
<property-specification name="fieldTracking"
type="org.apache.tapestry.valid.IFieldTracking"/>
<component id="ifError" type="Conditional">
<binding name="condition" expression="bindings.delegate.object.hasErrors"/>
</component>
<component id="loopErrors" type="Foreach">
<binding name="source"
expression="bindings.delegate.object.associatedTrackings"/>
<binding name="value" expression="bindings.fieldTracking"/>
</component>
</component-specification>
finally, the following error message:
Unable to resolve expression 'fieldTracking.errorError != null' for
org.apache.tapestry.BaseComponent$Enhance_246@1698cbe[SignIn/$ShowError].
What could it be?
Thanks.
DvJ
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: A show error component
Posted by david joffrin <da...@hotmail.com>.
Hi,
I am coming with this topic as I left it on the side while fixing some other
stuffs:
<span jwcid="ifError">
<div id="error">
<table>
<tr>
<td>
<img jwcid="@Image" image="ognl:assets.warningImage"/>
</td>
<tr jwcid="@Foreach" source="bindings.delegate.object.fieldTrackings"
value="ognl:fieldTracking">
<span jwcid="@Conditional" condition="ognl:fieldTracking != null">
<td> DvJ - <span jwcid="@Delegator"
delegate="ognl:fieldTracking.errorRenderer">Error message goes here.</span>
</td>
</span>
</tr>
</table>
</div>
</span>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE component-specification
PUBLIC "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
"http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
<component-specification class="org.apache.tapestry.BaseComponent"
allow-body="no" allow-informal-parameters="no">
<parameter name="delegate"
type="org.apache.tapestry.valid.IValidationDelegate" required="yes"/>
<private-asset name="warningImage" resource-path="/images/attention.gif"/>
<property-specification name="fieldTracking"
type="org.apache.tapestry.valid.IFieldTracking"/>
<component id="ifError" type="Conditional">
<binding name="condition" expression="bindings.delegate.object.hasErrors"/>
</component>
</component-specification>
Even if I am in error, nothing is appear... only the icon!
Any ideas?
Thanks.
DvJ
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: A show error component
Posted by Andreas Andreou <an...@di.uoa.gr>.
You don't seem to have any
fieldTracking.errorError != null
expressions in the html or the jwc.
Did you post the correct source?
Maybe this error message is from a previous version of your app. Did you
refresh correctly?
david joffrin wrote:
> Hi,
>
> I tried several things, but I can make it work. I'd like to display
> all errors that have occured.
> To do that, I modified the ShowError.jwc sample like that:
> <span jwcid="ifError">
> <div id="error">
> <span jwcid="@Foreach"
> source="bindings.delegate.object.associatedTrackings"
> value="ognl:fieldTracking">
> <span jwcid="@Conditional" condition="ognl:fieldTracking.inError">
> <span jwcid="@Delegator"
> delegate="ognl:fieldTracking.errorRenderer">Error message goes
> here.</span>
> </span>
> </span>
> </div>
> </span>
>
> and,
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE component-specification
> PUBLIC "-//Apache Software Foundation//Tapestry Specification
> 3.0//EN"
> "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
>
> <component-specification class="org.apache.tapestry.BaseComponent"
> allow-body="no" allow-informal-parameters="no">
> <parameter name="delegate"
> type="org.apache.tapestry.valid.IValidationDelegate"
> required="yes"/>
> <property-specification name="fieldTracking"
> type="org.apache.tapestry.valid.IFieldTracking"/>
> <component id="ifError" type="Conditional">
> <binding name="condition"
> expression="bindings.delegate.object.hasErrors"/>
> </component>
> <component id="loopErrors" type="Foreach">
> <binding name="source"
> expression="bindings.delegate.object.associatedTrackings"/>
> <binding name="value" expression="bindings.fieldTracking"/>
> </component>
> </component-specification>
>
> finally, the following error message:
> Unable to resolve expression 'fieldTracking.errorError != null' for
> org.apache.tapestry.BaseComponent$Enhance_246@1698cbe[SignIn/$ShowError].
>
> What could it be?
>
> Thanks.
> DvJ
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org