Thanks, Thiago. Resolved. Generally, seems like this problem is caused by
botched getter method (my case) or not using translate/null handler in
presentation layer.
I got the hint from your question below and also other solutions to the
issue of translate attribute in textfield (to render dates etc). Turns
out programmer had overloaded the "getter method" in this case.
Specifically, the entity class, Project, had a "isDetails()" as well as
"getDetails()" method within the entity class. No clue why someone
would do that. However, this made the detail property ambiguous to the
textfield renderer and it was looking to translate boolean which was
actually null in the database - disaster I just changed the
spelling of the method from isDetails() to isDetailed() and took care of the
cascading effects. The whole application is working fine now.
Other resources on this topic (just Google the Error):
1. Programmers Lounge: Error: Parameter 'translate' of component is bound to
null This parameter is not allowed to be null.
2. java - Allow Number object to be null in Tapestry BeanEditor - Stack
Overflow
Programmers Lounge: Error: Parameter 'translate' of component is bound to null
This parameter is ...
Error in Tapestry: An unexpected application exception has occurred.
View on programmerslounge.blogspot.com Preview by Yahoo
java - Allow Number object to be null in Tapestry BeanEditor - Stack Overflow
I have an object I'd like to edit via beaneditor. One of the properties is of
the Number class. When I try to display the beaneditor, I get the following
error:
View on stackoverflow.com Preview by Yahoo
On Tuesday, June 17, 2014 7:32 AM, Thiago H de Paula Figueiredo
wrote:
On Tue, 17 Jun 2014 13:55:17 -0300, Net Dawg wrote:
I tried explicitly dropping the null constraint at the database level - same
issue - for some reason the parameter is being interpreted as not allowed to be
null...while other fields defined exactly the same way are OK...
>
>
>
>ALTER TABLE project ALTER COLUMN details DROP NOT NULL;
Tapestry itself doesn't look at database tables for defining validation
constraints at all.
I have been looking at the bulletin boards, stack overflow and seems like a
known issue...
Any links to other people having the same issue?
By the way, you haven't posted the full stack trace, which is very important to
figure out what's happening. Nor you posted the full error message from
Tapestry. You probably didn't any answers because of that. Maybe the error is
from another component instance and you're looking at the wrong place. The
"Parameter 'translate' of ... is bound to null" error message is almost always
related to trying to edit a non-String property with TextField or TextArea.
That's why I'm thinking you're looking at the wrong component.
>
>@Entity @Indexed
>public class Project
>{
> @Id @GeneratedValue @DocumentId
@NonVisual
> private Long id;
> @Field
> private String details="";
>
>
>Questions: 1. In text area should there be another attribute? I tried
>nulls="default"
No. Does it have public getter and setter methods?
2. In entity class, Should there be some type other decorator besides @Field
(the @Parameter is not allowed to experiment with acceptNull=true)
@Field is an annotation, not a decorator. @Parameter can only be used in
Tapestry components and mixins, and your entity class isn't either. @Field
seems to be from Lucene or Hibernate Search and it's ignored by Tapestry itself.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br