Re: Passing a javascript function in JSONArray or JSONObject

2012-10-21 Thread bhorvat
Hi Howard, Can I please ask you to share a link as I couldnt find anything related to the Java Fox Jsonstring. tnx for help -- View this message in context: http://tapestry.1045711.n5.nabble.com/Passing-a-javascript-function-in-JSONArray-or-JSONObject-tp5717095p5717097.html Sent from the

Re: Passing a javascript function in JSONArray or JSONObject

2012-10-21 Thread bhorvat
I have tried to use JSONString such as JSONString string = new JSONLiteral( select: function (event, ui) { alert('test') }); however the problem is that I can not pass that to the tapestry autocomponent since it only accesspts JSONObject and this is not a valid JSONObject.

Re: Passing a javascript function in JSONArray or JSONObject

2012-10-21 Thread bhorvat
I figured it out Tnx Howard for pointing me in right direction. For those interested here is what did the trick for me public JSONObject getAutoParams() { JSONObject params = new JSONObject(); params.put(select, new JSONLiteral(function (event, ui) {alert('This is the call

Re: Implement Autocomplete OnSelect event - jquery bind event

2012-10-21 Thread bhorvat
I manage to solve my problem in a different way. By passing a function that will be triggered once the item in autocomponent is selected. cheers -- View this message in context:

JSONLiteral breks zone refresh

2012-10-21 Thread bhorvat
Hi, I have already wrote about a problem I was having in 2 different treads and I was finally able to figure out the solution for that. My problem was that I needed to pass the function to the autocomplete mixin. public JSONObject getAutoUsersParams() { JSONObject params = new

Re: JSONLiteral breks zone refresh

2012-10-21 Thread Howard Lewis Ship
What if the function already existed on some global object? What if the JSONObject you pass in is not passed directly to autocommit code? So you pass what I call a spec, and it builds the options for the autocommit itself. You don't specify a function, you specify a function name or reference.

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

Re: Calling specific object

2012-10-21 Thread Howard Lewis Ship
I do something like this: public static T T as(ClassT type, Object value) { if (type.isInstance(value)) { return type.cast(value); } return null; } public Fruit getFruit() { return as(Fruit.class, article); } public Vegetable getVegetable { return as(Vegetable.class, article); } In your

hyperlink color problem in javadoc

2012-10-21 Thread Rural Hunter
Hi, Seems the color of hyperlinks is same as background at some places in javadoc. For example, http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/plastic/MethodInvocation.html In the part: *Methods inherited from interface org.apache.tapestry5.plastic.MethodInvocationResult

RE: Coercion exception in loop for Map

2012-10-21 Thread Athneria, Mahendra
With loop use formState property to get rid of below exception. t:loop source=keys value=key formState =none t:select model=value encoder=value value=key formState=none/ /t:loop Hope it will solve your issue. Regards, Mahendra -Original Message- From: rosecorp