You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Lukasz Jazgar (JIRA)" <ji...@apache.org> on 2009/06/04 13:41:07 UTC

[jira] Created: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Parameter "translate" of TextField is specified as required, but it's realy not required
----------------------------------------------------------------------------------------

                 Key: TAP5-737
                 URL: https://issues.apache.org/jira/browse/TAP5-737
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.1.0.5
            Reporter: Lukasz Jazgar
            Priority: Minor


Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
This parameter should not be required and it isn't really. 
Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).

Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716319#action_12716319 ] 

Robert Zeigler commented on TAP5-737:
-------------------------------------

You're confusing the issue of binding vs. specifying. 
The translate parameter absolutely MUST be bound (hence the required flag), or the textfield won't function.  It's specified as required so that tapestry can catch the lack of binding early and provide a suitable exception message.

Although the parameter /must/ be bound, it may or may not have to be /explicitly/ bound by the user: if you don't provide an explicit binding, tapestry will attempt to provide a suitable binding automatically.  If tapestry is successful, then all is well.  But if it fails, your page render will fail with an exception explaining that the translate parameter isn't bound.

> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Lukasz Jazgar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Jazgar reopened TAP5-737:
--------------------------------


It's completly illogical.
Required, but not required.

If you doesn't have to specify value of parameter and component works without it, that parameter is NOT REQUIRED.

> So, the documentation is already clear about required parameters for which defaults are provided, and what those defaults are. 
It's not clear, because it is inconsistent with flag. 

Translate parameter is marked as required. In description there is text "If not specified". I am programmer, exact mind. I have one conclusion from that. This implication will never happen. Somebody made mistake, either in flag (most probably), either in description, writing redundant implication. 

Another point.
If somebody will want to write IDE plugin automaticaly  validating correctness of templates, he will have a problem. From what plugin will get to know, is parameter is required (it has to be written in component tag) or not. Attribute "required" of annotation is meaningless now. Maybe by natural language processing of description? ;) 




> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-737.
-------------------------------------

    Resolution: Invalid
      Assignee: Howard M. Lewis Ship

Robert Z's analysis stands and is correct.

> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Lukasz Jazgar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Jazgar reopened TAP5-737:
--------------------------------


It's completly illogical.
Required, but not required.

If you doesn't have to specify value of parameter and component works without it, that parameter is NOT REQUIRED.

> So, the documentation is already clear about required parameters for which defaults are provided, and what those defaults are. 
It's not clear, because it is inconsistent with flag. 

Translate parameter is marked as required. In description there is text "If not specified". I am programmer, exact mind. I have one conclusion from that. This implication will never happen. Somebody made mistake, either in flag (most probably), either in description, writing redundant implication. 

Another point.
If somebody will want to write IDE plugin automaticaly  validating correctness of templates, he will have a problem. From what plugin will get to know, is parameter is required (it has to be written in component tag) or not. Attribute "required" of annotation is meaningless now. Maybe by natural language processing of description? ;) 




> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716319#action_12716319 ] 

Robert Zeigler commented on TAP5-737:
-------------------------------------

You're confusing the issue of binding vs. specifying. 
The translate parameter absolutely MUST be bound (hence the required flag), or the textfield won't function.  It's specified as required so that tapestry can catch the lack of binding early and provide a suitable exception message.

Although the parameter /must/ be bound, it may or may not have to be /explicitly/ bound by the user: if you don't provide an explicit binding, tapestry will attempt to provide a suitable binding automatically.  If tapestry is successful, then all is well.  But if it fails, your page render will fail with an exception explaining that the translate parameter isn't bound.

> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Zeigler closed TAP5-737.
-------------------------------

    Resolution: Invalid

> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12788283#action_12788283 ] 

Howard M. Lewis Ship commented on TAP5-737:
-------------------------------------------

The parameter really is required, however in nearly all cases, Tapestry is able to provide a default value.

> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Lukasz Jazgar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716350#action_12716350 ] 

Lukasz Jazgar commented on TAP5-737:
------------------------------------


http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/annotations/Parameter.html#required()

Required:
"If true, the parameter is required and and must be bound. If false (the default), then the parameter is optional."

I would agree with you, if there would be written: "If true, the parameter is required, what means it must be bound, explicitly by user or internally by component.".
But there is "required AND bound".

"Required" according to your interpretation is completly useless, if it's  treated as specification of external interface of component.
This flag take part in validating parameter somewhere inside initialization process (after evaluating defaults) of component.

I see need to add additional attribute to Parameter annotation, which would determine external interface of components.
This new attribute could be used
* to generate documentation of components
* by IDE plugins to validate and autocomplete templates

Anyway, documentation of @Parameter.required and "Required" flag in components reference should be more precise.



> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716286#action_12716286 ] 

Robert Zeigler commented on TAP5-737:
-------------------------------------

Translate absolutely is required.  But like many parameters, tapestry can often determine an appropriate value to fill in if the user doesn't provide one.
But if it can't figure out a suitable default, you'll get an exception (because it's required).

The value parameter is likewise required, but if you have a page/component property with the same name as the component id, you don't have to supply the value because tapestry will auto-bind to that property (the one with the same name as the component id).

What /would/ be nice is for the documentation to somehow flag those properties which are required, but tapestry will attempt to provide a default value should the user not supply one. Examples include the "model" parameter of BeanEditor & BeanDisplay, the value parameter of form fields, and the translate parameter of form fields.

> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12788283#action_12788283 ] 

Howard M. Lewis Ship commented on TAP5-737:
-------------------------------------------

The parameter really is required, however in nearly all cases, Tapestry is able to provide a default value.

> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716290#action_12716290 ] 

Robert Zeigler commented on TAP5-737:
-------------------------------------

Documentation for translate parameter:

"The object which will perform translation between server-side and client-side representations. If not specified, a value will usually be generated based on the type of the value parameter."

Note: the "providing a default" behavior is already documented.

Documentation for the value parameter of form fields:

"The value to be read and updated. This is not necessarily a string, a translator may be provided to convert between client side and server side representations. If not bound, a default binding is made to a property of the container matching the component's id. If no such property exists, then you will see a runtime exception due to the unbound value parameter. "

Note: the "providing a default" behavior is already documented.

Checking BeanDisplay, the "providing a default" behavior is documented for "object" (which is required) and "model" (which isn't required).

Likewise for BeanEditor and BeanEditForm.

So, the documentation is already clear about required parameters for which defaults are provided, and what those defaults are.

> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Zeigler closed TAP5-737.
-------------------------------

    Resolution: Invalid

> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716286#action_12716286 ] 

Robert Zeigler commented on TAP5-737:
-------------------------------------

Translate absolutely is required.  But like many parameters, tapestry can often determine an appropriate value to fill in if the user doesn't provide one.
But if it can't figure out a suitable default, you'll get an exception (because it's required).

The value parameter is likewise required, but if you have a page/component property with the same name as the component id, you don't have to supply the value because tapestry will auto-bind to that property (the one with the same name as the component id).

What /would/ be nice is for the documentation to somehow flag those properties which are required, but tapestry will attempt to provide a default value should the user not supply one. Examples include the "model" parameter of BeanEditor & BeanDisplay, the value parameter of form fields, and the translate parameter of form fields.

> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Lukasz Jazgar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716350#action_12716350 ] 

Lukasz Jazgar commented on TAP5-737:
------------------------------------


http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/annotations/Parameter.html#required()

Required:
"If true, the parameter is required and and must be bound. If false (the default), then the parameter is optional."

I would agree with you, if there would be written: "If true, the parameter is required, what means it must be bound, explicitly by user or internally by component.".
But there is "required AND bound".

"Required" according to your interpretation is completly useless, if it's  treated as specification of external interface of component.
This flag take part in validating parameter somewhere inside initialization process (after evaluating defaults) of component.

I see need to add additional attribute to Parameter annotation, which would determine external interface of components.
This new attribute could be used
* to generate documentation of components
* by IDE plugins to validate and autocomplete templates

Anyway, documentation of @Parameter.required and "Required" flag in components reference should be more precise.



> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716290#action_12716290 ] 

Robert Zeigler commented on TAP5-737:
-------------------------------------

Documentation for translate parameter:

"The object which will perform translation between server-side and client-side representations. If not specified, a value will usually be generated based on the type of the value parameter."

Note: the "providing a default" behavior is already documented.

Documentation for the value parameter of form fields:

"The value to be read and updated. This is not necessarily a string, a translator may be provided to convert between client side and server side representations. If not bound, a default binding is made to a property of the container matching the component's id. If no such property exists, then you will see a runtime exception due to the unbound value parameter. "

Note: the "providing a default" behavior is already documented.

Checking BeanDisplay, the "providing a default" behavior is documented for "object" (which is required) and "model" (which isn't required).

Likewise for BeanEditor and BeanEditForm.

So, the documentation is already clear about required parameters for which defaults are provided, and what those defaults are.

> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TAP5-737) Parameter "translate" of TextField is specified as required, but it's realy not required

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-737.
-------------------------------------

    Resolution: Invalid
      Assignee: Howard M. Lewis Ship

Robert Z's analysis stands and is correct.

> Parameter "translate" of TextField is specified as required, but it's realy not required
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-737
>                 URL: https://issues.apache.org/jira/browse/TAP5-737
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Lukasz Jazgar
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>
> Components TextField, TextArea and PasswordField have parameter "translate", which is specified by annotation and in documentation as required.
> This parameter should not be required and it isn't really. 
> Even in examples of using TextField parameter "translate" is not used (http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/TextField.html).
> Specification in documentation, specification in annotations,  examples and real behaviour should be consistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.