Re: [t5.3] Using a map object with BeanEditor

2012-05-21 Thread Muhammad Gelbana
I can say it's not simple at all but I'm trying to comprehend it, specially that the code in the link you provided has some deprecated methods. But while I'm trying to master this, what if I need to apply validation too ? I understand from the link you provided is that I have 2 choices, either to

Re: [t5.3] Using a map object with BeanEditor

2012-05-21 Thread Lance Java
> So the question is, what if I have those validation strings (maxLength=5,minLength=2..etc) in an independant string ? Because I intend to have this information in a database (label, name\id, validation rules). You could provide a DatabaseConstraintGenerator in a similar way to how Tapestry prov

Beaneditform looses data of non visual fields.

2012-05-21 Thread Michael Schmidt
Hi all, I'm trying to use the BeanEditForm for editing the data of a object and persist it using hibernate. Here are some code snippets: Page Class: public class AdministrationGroupsEdit { @Inject Session session; @InjectPage AdministrationGroups redirectPage; private Intege

Re: [t5.3.x] Potential Static Util Class Concurrency Issue

2012-05-21 Thread Lance Java
Without seeing any code it's hard to tell but there are only a couple of ways for user A to see user B's data. 1. You have initialized a page/component variable in the field declaration (or the constructor). This is the most likely candidate. Mutable objects MUST NOT be initialized in the field de

Re: [t5.3.x] Potential Static Util Class Concurrency Issue

2012-05-21 Thread Bryan Lewis
I experienced a fourth possibility, although it could be considered a variant of the third one. I was storing an object map (a Cayenne ObjectContext) in a ThreadLocal and I wasn't clearing the ThreadLocal immediately at the end of each request. In rare circumstances, when a second user started a

memcached sticky session

2012-05-21 Thread captain_rhino
Is there any thing I have to configure or add to my tapestry project if i want to use memcached sticky sessions please with my apache tomcat server? Any experiances/general advice much appreciated. -- View this message in context: http://tapestry.1045711.n5.nabble.com/memcached-sticky-session-tp

Re: [t5.3.x] Potential Static Util Class Concurrency Issue

2012-05-21 Thread Lance Java
FYI you can call PerthreadManager.addThreadCleanupListener(ThreadCleanupListener listener) to cleanup any ThreadLocals. Tapestry fires the listeners at the end of each request. -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-3-x-Potential-Static-Util-Class-Concurrency-Is

Re: Beaneditform looses data of non visual fields.

2012-05-21 Thread Thiago H. de Paula Figueiredo
On Mon, 21 May 2012 06:07:55 -0300, Michael Schmidt wrote: Hi all, Hi! I'm trying to use the BeanEditForm for editing the data of a object and persist it using hibernate. You either @Persist the object or use BeanEditor (which is the base of BeanEditForm) and use the Hidden component

Re: [t5.3] Using a map object with BeanEditor

2012-05-21 Thread Thiago H. de Paula Figueiredo
On Mon, 21 May 2012 04:03:54 -0300, Muhammad Gelbana wrote: I understand from the link you provided is that I have 2 choices, either to implement BeanModel for editing or go a step back and implement a BeanModelSource (which according to the document "provides support to the model by genera

Re: Rendering another component inside a component

2012-05-21 Thread egarcia-sms
I'm doing a tree rendering, so I don't think I can use a tml file only, as the documentation suggested using a component for that. Problem is, when generating my links manually I don't know the path I'm in, and I cannot use a relative path. I'll try your suggestions, thanks a lot! -- View this me

Pass component parameter back to method - Exception

2012-05-21 Thread George Christman
Hello, I'm trying to pass back a component id to a backend method as Thiago suggested in another post, however it's resulting in the following exception before the method is even called. I have a work around passing back the id as a String which works without any issues providing the field id's are

Re: Pass component parameter back to method - Exception

2012-05-21 Thread George Christman
Sorry, my I posted the wrong backend method in my question. public FieldValidator getFieldValidator(Field field) { return null; } -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pass-component-parameter-back-to-method-Exception-tp5712975p5712977.html Sent from the T

Re: Pass component parameter back to method - Exception

2012-05-21 Thread Robert Zeigler
Hi George, The problem is with the "component:shiptoContactName" piece of the expression. Specifying the property prefix (eg: prop:, component:, validate:, etc.) only works at the beginning of the expression, and it is applied to the entire expression. The thing to do in this case is: .tml:

Re: [t5.3] Using a map object with BeanEditor

2012-05-21 Thread trsvax
Here is how I did it http://tapestry.1045711.n5.nabble.com/writer-writeRaw-String-text-td5601234.html#a5601626 -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-3-Using-a-map-object-with-BeanEditor-tp5712589p5712988.html Sent from the Tapestry - User mailing list archive

Re: Pass component parameter back to method - Exception

2012-05-21 Thread George Christman
Thanks Rebert for the explanation. Wasn't quite the answer I was hoping for since I was trying to keep the backend clean, but looks as if this is the only way to get this working dynamically. Once again, thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pass-componen

Re: Pass component parameter back to method - Exception

2012-05-21 Thread George Christman
I managed to get the page to render without issue. At render it calls my FieldValidator method and I can see the field.clientId(). However onSubmit, the field.getClientId() becomes null. Any ideas? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pass-component-parameter-ba

Is there a way to have Tapestry generate well-formatted html?

2012-05-21 Thread Rural Hunter
It's very hard to view what actually Tapestry generated at client side since the html source generated by Tapestry is almost in only one line. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional comman

Re: Pass component parameter back to method - Exception

2012-05-21 Thread George Christman
Nevermind, Resolved this with field.getControlName rather than field.getClientId. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pass-component-parameter-back-to-method-Exception-tp5712975p5713007.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: Is there a way to have Tapestry generate well-formatted html?

2012-05-21 Thread Taha Siddiqi
http://tapestry.apache.org/configuration.html#Configuration-tapestry.compresswhitespace On May 21, 2012, at 9:28 PM, Rural Hunter wrote: > It's very hard to view what actually Tapestry generated at client side since > the html source generated by Tapestry is almost in only one line. > > --

Re: Is there a way to have Tapestry generate well-formatted html?

2012-05-21 Thread Chris Cureau
For what its worth, Firebug and Chrome's debugging tools format the output for you. You can always use this and not mess with the whitespace compression at all... On Mon, May 21, 2012 at 10:58 AM, Rural Hunter wrote: > It's very hard to view what actually Tapestry generated at client side > sinc

Re: Is there a way to have Tapestry generate well-formatted html?

2012-05-21 Thread Rural Hunter
Thanks guys! 于 2012/5/22 0:16, Chris Cureau 写道: For what its worth, Firebug and Chrome's debugging tools format the output for you. You can always use this and not mess with the whitespace compression at all... On Mon, May 21, 2012 at 10:58 AM, Rural Hunterwrote: It's very hard to view what

Custom Validation with AjaxFormLoop component

2012-05-21 Thread George Christman
hello, I've disabled client validation and currently going to rely on server side validation. My validation is dynamic, so it's determined by the backend at render and submit. The validation works perfectly, however when you add a new row using AjaxFormLoop and click the submit button for the first

[t5.3.x] Potential Static Util Class Concurrency Issue

2012-05-21 Thread llama-king
Hello, First post! Woo! While using various revisions of T5.3 we ran into a strange case as follows: 1. User A fills in text field, submits form. 2. User B fills in text field, submits form. (Where 1 and 2 occur within milliseconds of each other.) 3. Events trigger, util class static method cal

Re: [t5.3.x] Potential Static Util Class Concurrency Issue

2012-05-21 Thread Howard Lewis Ship
On Mon, May 21, 2012 at 4:54 AM, Bryan Lewis wrote: > I experienced a fourth possibility, although it could be considered a > variant of the third one.  I was storing an object map (a Cayenne > ObjectContext) in a ThreadLocal and I wasn't clearing the ThreadLocal > immediately at the end of each r

Re: memcached sticky session

2012-05-21 Thread Howard Lewis Ship
Don't store session state in memcached. Part of memcached is that it can crash or otherwise discard state at any time, which is irritating to your active users. Memcached is intended only for caching values that can be recovered if lost. Servlet containers have lots of options for storing state, T