Re: Excluding properties if 0 or null

2012-10-26 Thread Thiago H de Paula Figueiredo
On Fri, 26 Oct 2012 11:17:21 -0200, o1550762 wrote: OK, how to do that? To make some function of type BeanModel with parameters of an Object, and inside it to write if function that if that object holds 0 or null value( by getField() function) to add to the bean model that field(property)

Re: Excluding properties if 0 or null

2012-10-26 Thread o1550762
OK, how to do that? To make some function of type BeanModel with parameters of an Object, and inside it to write if function that if that object holds 0 or null value( by getField() function) to add to the bean model that field(property) and to return that bean model. Is that what you had on your m

Re: Excluding properties if 0 or null

2012-10-25 Thread Thiago H de Paula Figueiredo
On Thu, 25 Oct 2012 22:31:17 -0200, o1550762 wrote: Yes, I understand that, but could I go through the class( all of it's properties ), not through one single property? Have you tried the BeanEditor component? -- Thiago H. de Paula Figueiredo

Re: Excluding properties if 0 or null

2012-10-25 Thread o1550762
I could pass Number ... n but because I have so many vars, I am not sure if that's the best way of handling it. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Excluding-properties-if-0-or-null-to-be-shown-in-tml-tp5717193p5717260.html Sent from the Tapestry - User mailin

Re: Excluding properties if 0 or null

2012-10-25 Thread o1550762
Yes, I understand that, but could I go through the class( all of it's properties ), not through one single property? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Excluding-properties-if-0-or-null-to-be-shown-in-tml-tp5717193p5717258.html Sent from the Tapestry - User m

Re: Excluding properties if 0 or null

2012-10-25 Thread Thiago H de Paula Figueiredo
On Thu, 25 Oct 2012 22:05:20 -0200, o1550762 wrote: OK, I have made following for my class public static boolean notNullNorZero(Number n){ return n == null || n.intValue() == 0; } and called it in my tml file -- Thiago H. de Paula Figueiredo

Re: Excluding properties if 0 or null

2012-10-25 Thread o1550762
OK, I have made following for my class public static boolean notNullNorZero(Number n){ return n == null || n.intValue() == 0; } and called it in my tml file http://tapestry.1045711.n5.nabble.com/Excluding-properties-if-0-or-null-to-be-shown-in-tml-tp5717193p5717255.html Sent from the Tapestry - Us

Re: Excluding properties if 0 or null

2012-10-25 Thread Thiago H de Paula Figueiredo
On Wed, 24 Oct 2012 23:56:53 -0200, o1550762 wrote: Thank you mr. Thiago on your reply. How could I do this with objects? The same way. For example if I have object and 4 parameters in it, I want to show only parameters that are not set to 0, but if are set other than that to show them? Is

Re: Excluding properties if 0 or null

2012-10-24 Thread o1550762
Thank you mr. Thiago on your reply. How could I do this with objects? For example if I have object and 4 parameters in it, I want to show only parameters that are not set to 0, but if are set other than that to show them? Is it possible? -- View this message in context: http://tapestry.1045711.

Re: Excluding properties if 0 or null

2012-10-24 Thread Thiago H de Paula Figueiredo
On Wed, 24 Oct 2012 10:23:54 -0200, o1550762 wrote: Hi Thiago! Could you please give me some directions or part of the code so that I can start it. I was thinking to implement javascript code something like if (element.find("div" === null)) return; but then I am not sure if it will render

Re: Excluding properties if 0 or null

2012-10-24 Thread o1550762
Hi Thiago! Could you please give me some directions or part of the code so that I can start it. I was thinking to implement javascript code something like if (element.find("div" === null)) return; but then I am not sure if it will render only non null values. So, if I choose to omit some field on p

Re: Excluding properties if 0 or null

2012-10-23 Thread Thiago H de Paula Figueiredo
You could use a provide a Translator (translate parameter) to do that. On Tue, 23 Oct 2012 21:24:08 -0200, o1550762 wrote: Hi, Lets say I have one component and in it following // Numbers.java @Property @Parameter private double number1; @Property @Parameter private double number2; @Propert