You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org> on 2005/06/15 15:44:47 UTC

[jira] Closed: (TAPESTRY-342) @Parameter does not work for required

     [ http://issues.apache.org/jira/browse/TAPESTRY-342?page=all ]
     
Howard M. Lewis Ship closed TAPESTRY-342:
-----------------------------------------

    Resolution: Fixed

> @Parameter does not work for required
> -------------------------------------
>
>          Key: TAPESTRY-342
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-342
>      Project: Tapestry
>         Type: Bug
>   Components: Annotations
>     Versions: 4.0
>     Reporter: Howard M. Lewis Ship
>     Assignee: Howard M. Lewis Ship
>      Fix For: 4.0

>
> Attempting to use the @Parameter annotation results in an exception:
> Parameter pageNames of component regwiz/RegistrationWizard/wizardForm is required and must not have a default value.
> component: 	$WizardForm_33@11402c4[regwiz/RegistrationWizard/wizardForm]
> location: 	context:/regwiz/RegistrationWizard.html, line 3
> 1	<html jwcid="@Border">
> 2	
> 3	<div jwcid="wizardForm@WizardForm"
> 4	pages="regwiz/Credentials,regwiz/Contact"/>
> 5	
> 6	</html>
> Stack Trace:
>     * org.apache.tapestry.pageload.EstablishDefaultParameterValuesVisitor.visitComponent(EstablishDefaultParameterValuesVisitor.java:64)
>     * $IComponentVisitor_1047c0944d6.visitComponent($IComponentVisitor_1047c0944d6.java)
>     * org.apache.tapestry.pageload.ComponentTreeWalker.walkComponentTree(ComponentTreeWalker.java:45)
>     * org.apache.tapestry.pageload.ComponentTreeWalker.walkComponentTree(ComponentTreeWalker.java:57)
>     * org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:645)
> This is because the defaultValue() attribute of the annotation is the empty string and the code checks for null.  Either the ParameterAnnotationWorker should change to not set the defaultValue property if the attribute is the empty string OR EstablishDefaultParameterValuesVisitor should consider the empty string the same as null (somewhat dangerous, on reflection).

-- 
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