Re: fckeditor for Tapestry 5.3

2012-02-17 Thread Kalle Korhonen
Ah well, partly a user error. If you have the component (mixin) wrapped in a zone, you'll get multiple instances of CKEditor with plenty of interesting effects. It does make sense not to re-initialize it during ajax updates but wasn't ready to spend enough time to find the appropriate place to add

Re: Tapestry TreeGrid

2012-02-17 Thread Lance Java
It seems that hibernate (unlike JDBC) uses zero based query parameter indexes. Use query.setLong(i, value) instead of i+1 All of your code should reference the interface (CategoryDao) instead of the concrete class (HibernateCategoryDao). This will help in testing (mocking interfaces is easy) and

Re: How to call a method in java page for button submit action?

2012-02-17 Thread ksrijith
You can find which button has been clicked using onSelectedFromSubmit methods. Eg: private boolean cancel; void onSelectedFromUpdate() { cancel = false; } void onSelectedFromCancel() { cancel = true; } void onSuccess() { if (cancel) { } else { }

Set t:id value from a component property

2012-02-17 Thread ksrijith
Hi, I'm trying to create a component which would generate a form. While doing that I'm creating the form fields and form buttons using the t:loop by picking the values from a hashmap as shown below: Java Code: private HashMap actionmap = new HashMap(); @Proper

Failure reading parameter 'product' of component shop/Product: productpopupzone.questionform: Could not find a coercion from type java.lang.String to type ru.kupivip.service.shop.model.ProductDesc

2012-02-17 Thread m!g
Hi, I've got strange error. Here is example: Component code: On page rendering I'm getting error: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure reading parameter 'value' of component shop/Product:productpopupzone.questionform.feedbacksubject: Failure reading parameter 'prod

Re: How to call a method in java page for button submit action?

2012-02-17 Thread karthi
Thank you for your reply, it works but not as expected I have a button to check the username keyed in the form with the database for existence and I want to show a message if the username already exists in the same page I tried that above coding and I filled the firstname, lastname, username and

Re: How to call a method in java page for button submit action?

2012-02-17 Thread ksrijith
What you can do is check if the action clicked is to validate the userid, if so then do the validation and set the property value that is going to be shown in the UI saying "User Already Exists" or what ever the message you would like and in the OnSuccessFromFormName() method check if the button cl

Re: Set t:id value from a component property

2012-02-17 Thread Thiago H. de Paula Figueiredo
On Fri, 17 Feb 2012 06:50:15 -0200, ksrijith wrote: Hi, Hi! While doing this all the values are getting populated to the template properly except the t:id field. t:id is the Tapestry component id, not the HTML id. t:id is static, so you cannot set it from a property. Try this: id="act

Re: Failure reading parameter 'product' of component shop/Product: productpopupzone.questionform: Could not find a coercion from type java.lang.String to type ru.kupivip.service.shop.model.ProductDesc

2012-02-17 Thread Thiago H. de Paula Figueiredo
On Fri, 17 Feb 2012 07:09:10 -0200, m!g wrote: Hi, I've got strange error. Here is example: Hi! Component code: The component code didn't appear in the mailing list. But the most important part, the template, you haven't provided (or Nabble ate it). -- Thiago H. de Paula Figueiredo In

Re: Tapestry TreeGrid

2012-02-17 Thread Thiago H. de Paula Figueiredo
On Fri, 17 Feb 2012 03:37:30 -0200, George Christman wrote: I did make further progress with the query, I fixed the count exception with count(c2.id). "select c1.id, count(c2.id) " + "from CATEGORY c1 " + "left join CATEGORY c2 on c2.parentCate

forForm with ComponentEventLinkTransformer

2012-02-17 Thread Jens Reufsteck
Hi I’m trying to upgrade from 5.1 to 5.2. This includes moving from the deprecated URLRewriting to LinkTransformer. Igor’s blog post has mostly explained everything. But I couldn’t find out about the forForm parameter, when creating a Link with ComponentEventLinkEncoder.createComponentEvent

Re: Tapestry TreeGrid

2012-02-17 Thread Lance Java
Thiago, please re-read the code... It is using parameters (indexed rather than named) and cannot be SQL injected. On Friday, 17 February 2012, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > On Fri, 17 Feb 2012 03:37:30 -0200, George Christman < gchrist...@cardaddy.com> wrote: > >> I

Deferring component rendering

2012-02-17 Thread antalk
Hi all, I have a webapp where a so called 'ribbon' (the office one) is introduced at the top of each page. The content of this ribbon (a Tapestry Component) is filled through a per-thread service with block id's. Once the component starts rendering, it searches for the supplied block id's in the

Re: Tapestry TreeGrid

2012-02-17 Thread Thiago H. de Paula Figueiredo
On Fri, 17 Feb 2012 09:18:36 -0200, Lance Java wrote: Thiago, Hi, Lance! please re-read the code... It is using parameters (indexed rather than named) and cannot be SQL injected. I'm talking about this: "where c1.id in (" + questions + ") " He should use Query.setParameterList() inste

Re: Tapestry TreeGrid

2012-02-17 Thread Lance Java
> I'm talking about this: > > "where c1.id in (" + questions + ") " I'm hoping you realise that questions is just a comma separated string of question marks eg "?, ?, ?" so it's SQL injection safe. > > He should use Query.setParameterList() instead. Cool, I didn't know about this. I'm assuming hib

Re: Deferring component rendering

2012-02-17 Thread antalk
As in : a mixin for the Layout component... which in turn is my mother of all other page elements ? Any more tips / code ? As i'm not sure how to approach this.. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Deferring-component-rendering-tp5492209p5492285.html Sent from

Re: Tapestry TreeGrid

2012-02-17 Thread Lance Java
Ah, just saw in the javadoc you can provide a type parameter to setParameterList(). This is getting OT Cheers, Lance On Friday, 17 February 2012, Lance Java wrote: >> I'm talking about this: >> >> "where c1.id in (" + questions + ") " > I'm hoping you realise that questions is just a comma separ

Re: Tapestry TreeGrid

2012-02-17 Thread Thiago H. de Paula Figueiredo
On Fri, 17 Feb 2012 10:14:31 -0200, Lance Java wrote: I'm talking about this: "where c1.id in (" + questions + ") " I'm hoping you realise that questions is just a comma separated string of question marks eg "?, ?, ?" so it's SQL injection safe. I haven't thought of that, but there's a be

Re: Deferring component rendering

2012-02-17 Thread Thiago H. de Paula Figueiredo
On Fri, 17 Feb 2012 10:15:14 -0200, antalk wrote: As in : a mixin for the Layout component... which in turn is my mother of all other page elements ? Yep! Any more tips / code ? As i'm not sure how to approach this.. Learning about mixins in Tapestry is something that will be very useful

Re: fckeditor for Tapestry 5.3

2012-02-17 Thread Dragan Sahpaski
Hi Kalle, Thanks for the code cleanup. I'm not quite following you. I've successfully tested it with multiple editors in one zone with form and it's ok. Can you send me an example page which has this problem? I promise to look at it right away. Cheers, Dragan Sahpaski On Fri, Feb 17, 2012 at 9

Re: How to call a method in java page for button submit action?

2012-02-17 Thread karthi
It works great thanks a lot!! When I clicked on the validation button it returns the validation message. At last only one issue when I return null from the onSuccess method I thought it should keep the values already filled in the form but it clears all the values in the form. -- View this me

Re: Tapestry TreeGrid

2012-02-17 Thread George Christman
Well guys, the good news was I was able to get the treegrid to load for the first time this morning, still a few bugs calling the child nodes, however I should be able to fix that pretty easily tonight. So what is the final query recommendation? Are we sticking with HQL, or are we converting it to

Re: Tapestry TreeGrid

2012-02-17 Thread Thiago H. de Paula Figueiredo
On Fri, 17 Feb 2012 12:07:52 -0200, George Christman wrote: So what is the final query recommendation? Are we sticking with HQL, or are we converting it to use the Criteria API? In this case, the structure of the query is static, just the number of parameters in the "in" clause is dynami

Re: fckeditor for Tapestry 5.3

2012-02-17 Thread Kalle Korhonen
On Fri, Feb 17, 2012 at 4:42 AM, Dragan Sahpaski wrote: > I'm not quite following you. I've successfully tested it with multiple > editors in one zone with form and it's ok. > Can you send me an example page which has this problem? I promise to look > at it right away. Odd then, I get multiple ed

Re: Tapestry TreeGrid

2012-02-17 Thread Nicolas Barrera
Hi, I 've seen Lance's ways of implementing hierarchical data on a flat table... and I think it could be improved adding two index columns as it says here: http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ there you could easily query for example to a complete branch of the tree

retrieving image paths of uploaded images

2012-02-17 Thread sommeralex
Hi, I am dynamically uploading files/images with tapestry, and storing them in a path named /usercontent/username/type/files(..) at the top of my project. /target /.settings /src /usercontent but the image is not shown within a tapestry page: ${fileElement.path} ${fileElement.name}

Re: retrieving image paths of uploaded images

2012-02-17 Thread Robert Zeigler
I think you need a bit more info. Like, how are you generating the image path? Robert On Feb 17, 2012, at 2/1712:36 PM , sommeralex wrote: > Hi, > > I am dynamically uploading files/images with tapestry, and storing them in a > path named /usercontent/username/type/files(..) at the top of my p

Re: retrieving image paths of uploaded images

2012-02-17 Thread sommeralex
just with file.getPath() -- View this message in context: http://tapestry.1045711.n5.nabble.com/retrieving-image-paths-of-uploaded-images-tp5493508p5493524.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

Re: retrieving image paths of uploaded images

2012-02-17 Thread sommeralex
i am now storing everyting in layout and can refer to my image by src="/layout/usercontent/sommeralex/animations/maria/images-Autumn1600x1200.jpg" but i am not sure if this is the best approach. 2012/2/17 sommeralex [via Tapestry] < ml-node+s1045711n5493524...@n5.nabble.com> > just with file.

Re: retrieving image paths of uploaded images

2012-02-17 Thread Robert Zeigler
1) if they are at the top of the project they aren't (readily) accessible to the web app. To make them more accessible, try putting usercontent in src/main/webapp. That will put usercontent into the context path and make your life simpler 2) In your original e-mail, you state: "the full path

Re: retrieving image paths of uploaded images

2012-02-17 Thread sommeralex
Hi Robert, Thanks for the quick reply. I put the files no in the webapp folder. And things are easier now :0) missunderstanding: the path below is "shown" as the image path if am clicking on the image, but the image itself is not shown, therfore: the path cant be resolved. http://localhost:8080/

Re: fckeditor for Tapestry 5.3

2012-02-17 Thread Dragan Sahpaski
Hi, OK I see it. After merging the pull request the changes are not saved at all. Previously the field gets updated although an errors in the javascript console are thrown upon zone update. I tested it after the merge but somehow it didn't reload the page and while I did it in a hurry didn't spot

Re: fckeditor for Tapestry 5.3

2012-02-17 Thread Kalle Korhonen
On Fri, Feb 17, 2012 at 12:33 PM, Dragan Sahpaski wrote: > OK I see it. After merging the pull request the changes are not saved at > all. Previously the field gets updated although an errors in the javascript > console are thrown upon zone update. After merging mine you mean? Yes, that may be th

Re: Set t:id value from a component property

2012-02-17 Thread ksrijith
Thanks I'll try this out. - -- Don't Forget to Rate -- View this message in context: http://tapestry.1045711.n5.nabble.com/Set-t-id-value-from-a-component-property-tp5491862p5494461.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: How to call a method in java page for button submit action?

2012-02-17 Thread ksrijith
You would need the properties for the form field be persistent using the @Persist annotation. If you have it like that it would be available after throughout the request. If you need to clear any fields you can do it in the beginRender method. - -- Don't Forget to Rate -- View this message in

Re: Tapestry TreeGrid

2012-02-17 Thread Geoff Callender
Just mail it to me and I will include it in the next release with acknowledgements to the authors. Cheers, Geoff On 18/02/2012, at 1:07 AM, George Christman wrote: > Well guys, the good news was I was able to get the treegrid to load for the > first time this morning, still a few bugs calling

Re: Tapestry TreeGrid

2012-02-17 Thread George Christman
Hey guys, seeing the following exception org.apache.tapestry5.ioc.internal.util.TapestryException Failure reading parameter 'model' of component Tree:tree: org.apache.tapestry5.ioc.internal.util.TapestryException location classpath:com/youtag/tag/pages/Tree.tml, line 2 java.lang.NullPointerE

Re: Tapestry TreeGrid

2012-02-17 Thread George Christman
btw, I should mention the model exception only happens while trying to expand the tree node. It produces an ajax exception. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-TreeGrid-tp5462126p5494602.html Sent from the Tapestry - User mailing list archive at Nabble

Simple CMS / content editor component

2012-02-17 Thread Kalle Korhonen
In the past, I've been keeping longer, largely textual content in an external wiki system and pulling it out to appropriate locations on the main wesite by placing a little wiki components on the pages, so that I can update the data on the fly as needed. This strategy has worked out fairly well as

Re: Simple CMS / content editor component

2012-02-17 Thread Lenny Primak
I would love to use something like this. On Feb 17, 2012, at 11:46 PM, Kalle Korhonen wrote: > In the past, I've been keeping longer, largely textual content in an > external wiki system and pulling it out to appropriate locations on > the main wesite by placing a little wiki components on th