Re: Error in BeginRender[...]: Parameter 'translate' of component .. is bound to null. This parameter is not allowed to be null.

2014-06-20 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jun 2014 20:24:23 -0300, Net Dawg   
wrote:


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 cannot see how the null handler would affect or cause this issue. The  
problem here was caused by using a text field or text area to edit  
something which isn't a String. You can do that, but a Translator needs to  
be provided in some way.



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.


Hehehe, naming stuff is hard! :)

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Error in BeginRender[...]: Parameter 'translate' of component .. is bound to null. This parameter is not allowed to be null.

2014-06-18 Thread Net Dawg


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

Re: Error in BeginRender[...]: Parameter 'translate' of component .. is bound to null. This parameter is not allowed to be null.

2014-06-17 Thread Net Dawg
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;

I have been looking at the bulletin boards, stack overflow and seems like a 
known issue...
should I file JIRA?


On Tuesday, June 17, 2014 12:25 AM, Net Dawg  wrote:
 


Getting this parameter not allowed to be null error.  Actually there is no 
restriction whatsoever on this parameter.  


I have a entity class called "Project" with the field "details", 



@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"  
2.  In entity class, Should there be some type other decorator besides @Field 
(the @Parameter is not allowed to experiment with acceptNull=true)

Error in BeginRender[...]: Parameter 'translate' of component .. is bound to null. This parameter is not allowed to be null.

2014-06-17 Thread Net Dawg
Getting this parameter not allowed to be null error.  Actually there is no 
restriction whatsoever on this parameter.  


I have a entity class called "Project" with the field "details", 



@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"  
2.  In entity class, Should there be some type other decorator besides @Field 
(the @Parameter is not allowed to experiment with acceptNull=true)