Since itemsPerPage is a property of a page, the @Parameter bit won't work.
Instead, try:
@Property
private int itemsPerPage
void setupRender() {
itemsPerPage=50;
}
Robert
On Oct 11, 2012, at 10/1111:25 PM , Cezary Biernacki wrote:
> You are giving us incomplete examples, so we can only guess. However my
> suspicion is that your declaration of default value itemsPerPage is bad.
> Tapestry 5 does not like initialisation of private fields in components and
> pages. Try:
>
> @Parameter(value="50", required = false, cache = false)
> private int itemsPerPage;
>
> If it does not help, send minimal but complete example of failing code
> (i.e. Java source + TML).
>
> Best regards,
> Cezary
>
>
>
> On Fri, Oct 12, 2012 at 6:05 AM, Ken in Nashua <[email protected]> wrote:
>
>>
>> thanks czar
>>
>> yeah collestion is absolutely size = 1 and has a hibernate entity in it
>>
>> In my Gallery.JAVA I tried the following...
>>
>> removed @Property on itemsPerPage
>>
>> and added
>>
>> public Integer getItemsPerPage() {
>> return itemsPerPage;
>> }
>>
>> and invoked it directly instead of attempting to reference itemsPerPage
>>
>> still produces NPE
>>
>> :(
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]