Re: who decides which control gets focus?

2009-04-18 Thread Howard Lewis Ship
You can influence Tapestry by injecting the @Environmental RenderSupport object, and invoking the autofocus() method. The default is the following order (weakest to strongest) first field first required field first field with a validation error associated On Sat, Apr 18, 2009 at 12:04 PM, Yury

Re: who decides which control gets focus?

2009-04-18 Thread Kalle Korhonen
Incidentally, I just opened up an enhancement issue to optionally specify fieldname for autofocus rather than boolean only. Do vote if you feel it's important to you: https://issues.apache.org/jira/browse/TAP5-650. Kalle On Sat, Apr 18, 2009 at 7:32 PM, Thiago H. de Paula Figueiredo < thiag...@g

Re: who decides which control gets focus?

2009-04-18 Thread Thiago H. de Paula Figueiredo
Em Sat, 18 Apr 2009 16:04:38 -0300, Yury Luneff escreveu: Hello, users. Hi! When the page is rendered, it has "$('control_id').activate();" in the JS part of the page. How do I manually decide which control gets focus? As for now tapestry seem to choose control that is first on page. Take

Re: Custom Property Editor for String Array

2009-04-18 Thread Thiago H. de Paula Figueiredo
Em Sat, 18 Apr 2009 16:48:03 -0300, Yeargan Yancey escreveu: Before I go banging my head against a wall for too long, is it possible to create a custom property editor to handle a complex (multi- valued) property? Yes! :) There's a guide here: http://tapestry.apache.org/tapestry5/guide/be

Custom Property Editor for String Array

2009-04-18 Thread Yeargan Yancey
Before I go banging my head against a wall for too long, is it possible to create a custom property editor to handle a complex (multi- valued) property? I am working with a directory services database via LDAP and it would be extremely helpful if I can mange to enhance BeanEditForm and B

who decides which control gets focus?

2009-04-18 Thread Yury Luneff
Hello, users. When the page is rendered, it has "$('control_id').activate();" in the JS part of the page. How do I manually decide which control gets focus? As for now tapestry seem to choose control that is first on page. -- Best regards, Yury

T5.0.18: how to have variable data structures in a bean?

2009-04-18 Thread Chuck Kring
Hi all, This is somewhat complicated so bear with me. I'm trying to create a bean with a variable number of fields, each which has a name and an associated select box to set various properties. The tml looks something like this: . t:encoder="encoder">

Re: [bean-edit-form] make a sub-set of parameters visible but not editable

2009-04-18 Thread manuel aldana
Thiago H. de Paula Figueiredo schrieb: Em Sat, 18 Apr 2009 13:00:19 -0300, manuel aldana escreveu: Yes, but as you said it is a workaround and looks not good inside the template. I think it is quite a common formular use-case, that some data columns are displayed but are read only during edi

Re: [bean-edit-form] make a sub-set of parameters visible but not editable

2009-04-18 Thread Thiago H. de Paula Figueiredo
Em Sat, 18 Apr 2009 13:00:19 -0300, manuel aldana escreveu: Yes, but as you said it is a workaround and looks not good inside the template. I think it is quite a common formular use-case, that some data columns are displayed but are read only during editing a data-item (e.g. id, email, use

Re: [bean-edit-form] make a sub-set of parameters visible but not editable

2009-04-18 Thread manuel aldana
Thiago H. de Paula Figueiredo schrieb: I see, but how do I set a property to be read only? Sorry, I misundestood your question. Answer: you don't set a property to be read only. The workaround is to override an edition block with . Yes, but as you said it is a workaround and looks not good insi

Re: [bean-edit-form] make a sub-set of parameters visible but not editable

2009-04-18 Thread Thiago H. de Paula Figueiredo
Em Sat, 18 Apr 2009 12:42:33 -0300, manuel aldana escreveu: I see, but how do I set a property to be read only? Sorry, I misundestood your question. Answer: you don't set a property to be read only. The workaround is to override an edition block with . Maybe it would be cool to add a ne

Re: [bean-edit-form] make a sub-set of parameters visible but not editable

2009-04-18 Thread manuel aldana
Thiago H. de Paula Figueiredo schrieb: Em Sat, 18 Apr 2009 07:38:53 -0300, manuel aldana escreveu: Generally I would need something more flexible how to tell whether a parameter is read-only or editable inside the form. For my current problem the read-only vs. editable depends on roles (i.e.

Re: [bean-edit-form] make a sub-set of parameters visible but not editable

2009-04-18 Thread Thiago H. de Paula Figueiredo
Em Sat, 18 Apr 2009 07:38:53 -0300, manuel aldana escreveu: Generally I would need something more flexible how to tell whether a parameter is read-only or editable inside the form. For my current problem the read-only vs. editable depends on roles (i.e. different roles have different acces

Re: Tearing my hair out using Palette with hibernate managed object

2009-04-18 Thread Thiago H. de Paula Figueiredo
Em Sat, 18 Apr 2009 07:14:41 -0300, daniel joyce escreveu: What I learned today "If you think something is wrong with Tapestry/Hibernate, more than likely you need to fix or override equals() and hashcode()" By the way, it is a recommended practice to implement this methods in all classe

Re: [bean-edit-form] make a sub-set of parameters visible but not editable

2009-04-18 Thread Ulrich Stärk
Add a block for the cell you want to have non-editable and just output its value. Something along ${foo.bar} public boolean isHasEditRights() { return user.inRole(FOO_ROLE) || user.inRole(BAR_ROLE); } HTH, Uli manuel aldana schrieb: H

[bean-edit-form] make a sub-set of parameters visible but not editable

2009-04-18 Thread manuel aldana
Hi, I am using the BeanEditor Form for editing users. For that I would like to have a "partial" editing form, i.e. I want to protect certain columns from being edited. Example is the id of the object: Once it is created I want to have it visible but not editable. Using the @NonVisual flag or

Re: Tearing my hair out using Palette with hibernate managed object

2009-04-18 Thread daniel joyce
What I learned today "If you think something is wrong with Tapestry/Hibernate, more than likely you need to fix or override equals() and hashcode()" On Sat, Apr 18, 2009 at 1:23 AM, daniel joyce wrote: > Which method in a page class should I setup to ensure I can reattach > my object to the Hibe

Re: [REQUEST] Live T5 web sites, quotes, marketting

2009-04-18 Thread Otho
It's very similar for me, but on a smaller scale. I developed a couple of internal apps in T5, mostly integration with legacy stuff and also an app which for me replaces the most annoying parts of the horrid interface of the webshop-software in use. Since I am lazy I looked into the scripting frame

Re: Tearing my hair out using Palette with hibernate managed object

2009-04-18 Thread daniel joyce
Which method in a page class should I setup to ensure I can reattach my object to the HibernateSession which is being used by the render request? Nothing in the docs provides any hints. On Sat, Apr 18, 2009 at 12:44 AM, daniel joyce wrote: > Hmm, apparently tapestry doesn't keep the session open

Re: Tearing my hair out using Palette with hibernate managed object

2009-04-18 Thread daniel joyce
Hmm, apparently tapestry doesn't keep the session open during the render phase? What is the easiest way to fix this? -Daniel On Sat, Apr 18, 2009 at 12:34 AM, daniel joyce wrote: > Also, lazy fetching is failing, even inside the OnActivate method. > > I am using objects that were set by another

Re: Tearing my hair out using Palette with hibernate managed object

2009-04-18 Thread daniel joyce
Also, lazy fetching is failing, even inside the OnActivate method. I am using objects that were set by another page, and inside onActivate, I am making sure to attach them to a session via the appropriate method on a dao. (daos are subclass chenillekit AbstractHibernateDAO, user doRefresh() method

Re: T5 equivalent of ServletContext.getResource()

2009-04-18 Thread Inge Solvoll
Excellent, thanks :) I only checked RequestGlobals, didn't know/remember ApplicationGlobals existed :) On Sat, Apr 18, 2009 at 1:19 AM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > Hi! > > Try injecting the ApplicationGlobals and using its getServletContext() > method. > > -- > T