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
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 --
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
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
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
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:
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/
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.
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
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
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:
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
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
13 matches
Mail list logo