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

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 t:if id=notNullNorZero(MyClass) /t:if and it displays me an error : Coercion from my that object to type java.lang.Number( via Object --

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

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

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

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:

Excluding properties if 0 or null

2012-10-23 Thread o1550762
Hi, Lets say I have one component and in it following // Numbers.java @Property @Parameter private double number1; @Property @Parameter private double number2; @Property @Parameter private double number3; //Number.tml t:label for=number1/ t:textfield t:id=number1 size=3/ t:label for=number2/

Re: Calling specific object

2012-10-22 Thread o1550762
Thank you mr. Howard. :) It worked exactly how I wanted it to work. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Calling-specific-object-tp5717114p5717130.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Calling specific object

2012-10-21 Thread o1550762
Hi, I have two entities which extends entity called Article. Now I call article and I want based on what type of object is it to call properties for that specific object. How should I get this? Should I use some sort of t:if test=returnWhatTypeIsiT/t:if in tml and checking what type it is by

Mixing parameters from component and page

2012-10-20 Thread o1550762
I have one component named PartofAddition.java and in it I have the following public class PartOfAddition{ @Property private int number; @Property private int picture; public int getNumber() { return number; } public int getPicture() { return picture; } } //PartOfAddition.tml div

Re: Gallery for each article using hibernate

2012-10-17 Thread o1550762
Thanks for the answers. I have chosen to go for LanceJava's solution, but kcollasi code is very helpful and has contributed me greatly for better understanding how Tapestry works. :) -- View this message in context:

Raty component

2012-10-17 Thread o1550762
I want to implement raty component and bound it to the existing DB. I have seen raty component of the JQUERY project and seems to be OK, however no demo is presented anywhere, and I can't figure out how does it correctly work. http://tapestry5-jquery.com/mixins/docsraty

Gallery for each article using hibernate

2012-10-11 Thread o1550762
Hi! I want to implement gallery for each article using hibernate, and how many images per article should it have is not mandatory set by some value? I am here for your opinion what is the best way to implement it, so any help is greatly appreciated. Thanks in advance. :) -- View this message