You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Brian K. Wallace (JIRA)" <ta...@jakarta.apache.org> on 2006/04/25 02:24:18 UTC

[jira] Commented: (TAPESTRY-352) Catch common invalid abstract setter

    [ http://issues.apache.org/jira/browse/TAPESTRY-352?page=comments#action_12376136 ] 

Brian K. Wallace commented on TAPESTRY-352:
-------------------------------------------

While I can understand the confusion, I don't believe this falls into the realm of Tapestry. And the error message does clearly state "public abstract java.lang.String ....set()".

> Catch common invalid abstract setter
> ------------------------------------
>
>          Key: TAPESTRY-352
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-352
>      Project: Tapestry
>         Type: Improvement

>   Components: Framework
>     Versions: 4.0
>     Reporter: Howard M. Lewis Ship
>     Priority: Minor

>
> I constantly attempt to define properties as follows:
> public abstract String setMessage(String message);
> Which is not valid; it should be a void method.
> However, I always spend a good amount of time parsing the following to determine that:
> Error at context:/WEB-INF/Home.page, line 6, column 21: Method 'public abstract java.lang.String com.vaisala.ww.ui.pages.Home.setMessage()' (declared in class com.vaisala.ww.ui.pages.Home) has no implementation in class com.vaisala.ww.ui.pages.Home (or enhanced subclass $Home_0).
> location: 	context:/WEB-INF/Home.page, line 6, column 21
> 1	<?xml version="1.0"?>
> 2	<!DOCTYPE page-specification PUBLIC
> 3	"-//Apache Software Foundation//Tapestry Specification 4.0//EN"
> 4	"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> 5	
> 6	<page-specification>
> 7	
> 8	<component id="register" type="DirectLink">
> 9	<binding name="listener" value="doRegister"/>
> 10	</component>
> 11	</page-specification>
> Stack Trace:
>     * org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39)
>     * org.apache.hivemind.impl.ErrorLogImpl.error(ErrorLogImpl.java:40)
>     * org.apache.tapestry.enhance.EnhancedClassValidatorImpl.validate(EnhancedClassValidatorImpl.java:60)
>     * $EnhancedClassValidator_1049ff23ffb.validate($EnhancedClassValidator_1049ff23ffb.java)
>     * $EnhancedClassValidator_1049ff23ffa.validate($EnhancedClassValidator_1049ff23ffa.java)
>     * org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getComponentConstructor(ComponentConstructorFactoryImpl.java:85)
>     * $ComponentConstructorFactory_1049ff23fe6.getComponentConstructor($ComponentConstructorFactory_1049ff23fe6.java)
>     * $ComponentConstructorFactory_1049ff23fe5.getComponentConstructor($ComponentConstructorFactory_1049ff23fe5.java)
>     * org.apache.tapestry.pageload.PageLoader.instantiatePage(PageLoader.java:611)
>     * org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:639)
>     * $IPageLoader_1049ff23fe1.loadPage($IPageLoader_1049ff23fe1.java)
>     * $IPageLoader_1049ff23fe2.loadPage($IPageLoader_1049ff23fe2.java)
>     * org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:118)
>     * $IPageSource_1049ff23f4f.getPage($IPageSource_1049ff23f4f.java)
>     * $IPageSource_1049ff23f4e.getPage($IPageSource_1049ff23f4e.java)
>     * org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:252)
> This is a very common mistake (I think); Tapestry should have a special message for this case, such as "Setter methods must return void.".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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