I just changed back to use my custom data struct and now seems to be
working, don't see those coercion exception anymore.. I believe it is caused
by me passing a Persist("flash") variable to the component's @Parameter. Now
I am returning a deep copy of that and is working now. Sorry for the false
No, that doesn't sound right. I pass other objects using @Parameter and have
not had this problem. There shouldn't be a coercion when you are passing the
parameter so my guess is that there is something else going on.
Ronald, can you give us a small code example that shows the problem?
Josh
On Nov
That doesn't sound right. I haven't done this before, but surely you
don't have to do it like that. Can anyone chime in on this?
ronaldlee wrote:
I found out the issue. The getter function has to return "Object" instead of
my custom data type to work, in order words, @Parameter can only handle
I found out the issue. The getter function has to return "Object" instead of
my custom data type to work, in order words, @Parameter can only handle
"Object", after that I can cast it back to my data type..
Ronald
ronaldlee wrote:
>
> But when I tried to pass my own data structure, it throws
But when I tried to pass my own data structure, it throws an exception like
this:
..
Could not find a coercion from type java.lang.String to type
com.xxx...MyDataStructure.
Actually, MyDataStructure is quite complex, it contains some primitive data
types (byte,int,boolean), another custom data st
Sorry, I was unclear in my cut and paste of your question.
You can pass anything as a parameter.
If you want to get access to your component in your page then define an
attribute with the right type and use the @Component annotation. Add a
getter to your component if you want to get something ba
So the @Parameter can only be used to passed user-defined data structure to
the custom component...
Is there a way such that the page that displays the custom component can
have access to the componet's properties (public getter functions) in order
to retrieve the user-defined data structure? F
> For @Parameter attributes of custom components, can it be user-defined
> data
> structure? Or it has to be simple java-defined ones?
>
Yes.
>
Yes, but you don't need the ${}, the default binding is property
Josh
On Nov 12, 2007 3:01 PM, ronaldlee <[EMAIL PROTECTED]> wrote:
>
>
> For @Pa
For @Parameter attributes of custom components, can it be user-defined data
structure? Or it has to be simple java-defined ones?
For example, can I have this in my custom component:
@Parameter
MyOwnDataStructure data
And in my main page I will feed that param using the page's property
function
Ronald,
Tapestry receives input (and fires events) using its Form component,
which is used for creating html forms. Checkboxes are themselves
components and are tied to boolean properties of the containing page (or
component in your case). If you have declared the checkboxes as 'raw'
html tag
10 matches
Mail list logo