You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Peter Beshai (JIRA)" <de...@tapestry.apache.org> on 2008/04/04 23:03:25 UTC

[jira] Created: (TAPESTRY-2332) Annotation for property of bean used by BeanEditForm to allow automatic use of TextArea

Annotation for property of bean used by BeanEditForm to allow automatic use of TextArea
---------------------------------------------------------------------------------------

                 Key: TAPESTRY-2332
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2332
             Project: Tapestry
          Issue Type: Improvement
    Affects Versions: 5.0
            Reporter: Peter Beshai
            Priority: Minor


It would be nice if I could just add an annotation to a String property, in a similar fashion to @NonVisual, and have the beanEditor just display it as a textArea by default instead of a TextField.

e.g.
@TextArea
public String getDescription() { ... }

Maybe you could do something like detect if the annotation is there and wrap the property in a "LargeString" which has a edit block defined as TextArea instead of TextField. 

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


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


[jira] Closed: (TAPESTRY-2332) Annotation for property of bean used by BeanEditForm to allow automatic use of TextArea

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

Howard M. Lewis Ship closed TAPESTRY-2332.
------------------------------------------

    Resolution: Invalid
      Assignee: Howard M. Lewis Ship

Use @DataType("longtext").

> Annotation for property of bean used by BeanEditForm to allow automatic use of TextArea
> ---------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2332
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2332
>             Project: Tapestry
>          Issue Type: Improvement
>    Affects Versions: 5.0
>            Reporter: Peter Beshai
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>
> It would be nice if I could just add an annotation to a String property, in a similar fashion to @NonVisual, and have the beanEditor just display it as a textArea by default instead of a TextField.
> e.g.
> @TextArea
> public String getDescription() { ... }
> Maybe you could do something like detect if the annotation is there and wrap the property in a "LargeString" which has a edit block defined as TextArea instead of TextField. 

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


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


[jira] Commented: (TAPESTRY-2332) Annotation for property of bean used by BeanEditForm to allow automatic use of TextArea

Posted by "Peter Beshai (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12586019#action_12586019 ] 

Peter Beshai commented on TAPESTRY-2332:
----------------------------------------

Oh, that's great! I think this annotation should be mentioned in the BeanEditFrom Guide. It would also be useful if there was a list of default data types that come with Tapestry. 
-----
Explicitly Set Data Type

There are some cases when you want to override the default data type supplied by DataTypeAnalyzer, such as when you want your String property to be displayed as a text area instead of a text field (without having to manually override the editor every time). In such a case, the DataType annotation may be applied to the property (either the getter or the setter method). 

The DataType values available by default and their respective editing components are:
 
* text - text field
* longtext  - text area
* enum - drop down list
* boolean - checkbox






> Annotation for property of bean used by BeanEditForm to allow automatic use of TextArea
> ---------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2332
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2332
>             Project: Tapestry
>          Issue Type: Improvement
>    Affects Versions: 5.0
>            Reporter: Peter Beshai
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>
> It would be nice if I could just add an annotation to a String property, in a similar fashion to @NonVisual, and have the beanEditor just display it as a textArea by default instead of a TextField.
> e.g.
> @TextArea
> public String getDescription() { ... }
> Maybe you could do something like detect if the annotation is there and wrap the property in a "LargeString" which has a edit block defined as TextArea instead of TextField. 

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


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