SessionPropertyPersistence and Infrastructure object provider

2007-05-04 Thread Eric Fesler
Hi, it's maybe a newbie question but I'm missing something and I can't understand the following: SessionPropertyPersistenceStrategy seems to be a service deployed as a *singleton*. It has a property webRequest into which one injects infrastructure:request. How can the

How update component on the page

2007-05-04 Thread Бурлака Денис
Hello. I have made a simple form and table on the page. I send async AJAX request to the server, then I update model (ListItem) on the server side and then I update table component on the page. But table component does't change. Here some code: Home.html page: html jwcid=@Shell

T5: How to inject a service into a component?

2007-05-04 Thread Michael Maier
Hi List, I'm trying to inject via @Inject annotation a service (internal service RequestPageCache) into a component: public class Menu { @Inject(RequestPageCache) RequestPageCache requestPageCache; public String getPageName() { ComponentResources pageResources=

RE: T5: How to inject a service into a component?

2007-05-04 Thread Kristian Marinkovic
hi michael, it should work with just @Inject. You can take a look at the BeanEditForm component... it uses a bunch of @Injects. (T5.0.4) g, kris Michael Maier [EMAIL PROTECTED] 04.05.2007 11:37 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users

RE: SessionPropertyPersistence and Infrastructure object provider

2007-05-04 Thread Marcus.Schulte
Because with HiveMind services, in your code you always deal with proxies. When SessionPropertyPersistenceStrategy calls a mehod on the WebRequest it really calls a proxy which determines the correct instance belonging to the current thread and then, in turn, calls the core implementation

t5 - Grid help

2007-05-04 Thread Alex Fishlock
Can anybody help me with this: I am displaying a grid in T5 so: For example: Start.html is: html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; body h2Name: ${foo.name}/h2 Systems table t:type=grid source=foo.bars /table /body /html Where:

T5: whitespaces in select component.

2007-05-04 Thread Sabine K.
Hi, there is one selectbox: t:select t:model=_restrictionEnzymes style=width: 300px; font-family:monospace size=7 t:value=selectedEnzyme/ _restrictionEnzymes is an arraylist with strings like: [Acc65I] | GGTACC [EcoRI]| GAATTC [Hpy188III] | TCNNGA

Re: [T5]: rendering component with nested component with @Component annotation

2007-05-04 Thread Kristian Marinkovic
hi howard, i switched to normal inheritance having Stylesheet extend RelationshipLink. Now i experience some troubles with @Parameter overrides (redefining a property with another @Parameter). Can you tell me how this works? What rules are applied to it? following override works correct and

Re: T5: How to inject a service into a component?

2007-05-04 Thread Michael Maier
ok, I solved... requestPageCache must be private...I don't know why the variable to be injected must be declared private but tapestry could log a warning, that the instance variable is not private and therefor it won't be injected... Am 04.05.2007 um 11:37 schrieb Michael Maier:

T5: SelectModel - a real world example

2007-05-04 Thread Joel Wiegman
Not to be harsh, but I don't think I've ever written a select box with constant values (Enum). Seems like even Male/Female drop downs need to be data-driven now-a-days. :- I've started to stub out a very simple real world example of a select component in T5, but it doesn't appear to be as

Re: T5: How to inject a service into a component?

2007-05-04 Thread Jesse Kuhnert
I wonder why this is as well, it's happened at least a couple times now - at least enough that this idea may need to be re-evaluated. (I can help if it's just reflection stuff) On 5/4/07, Michael Maier [EMAIL PROTECTED] wrote: ok, I solved... requestPageCache must be private...I don't know

Re: SessionPropertyPersistence and Infrastructure object provider

2007-05-04 Thread Eric Fesler
Thanks Marcus. --ERic On Friday 04 May 2007 12:43:42 [EMAIL PROTECTED] wrote: Because with HiveMind services, in your code you always deal with proxies. When SessionPropertyPersistenceStrategy calls a mehod on the WebRequest it really calls a proxy which determines the correct instance

Re: [T5] Tree component and recursive component ?

2007-05-04 Thread Davor Hrg
I may be way off track, but adding recursive component support to print out a menu or a tree seems like a big overkill. I have some hazy idea how this should be implemented: in both cases we have a model with all the data we need, a way to reuse single component (ActionLink) which would

Re: How update component on the page

2007-05-04 Thread Jesse Kuhnert
Ah I remember this - I think there's still actually a ticket open for it...The gist of it is that the @Table component doesn't honor the component id you pass in to it, so there probably really isn't an element on your rendered page with a id=table attribute. You can get around this for now by

Re: T5: How to inject a service into a component?

2007-05-04 Thread Massimo Lusetti
On 5/4/07, Jesse Kuhnert [EMAIL PROTECTED] wrote: I wonder why this is as well, it's happened at least a couple times now - at least enough that this idea may need to be re-evaluated. (I can help if it's just reflection stuff) This way the framework (inner javassist stuff) only need to

Re: t5 - Grid help

2007-05-04 Thread Massimo Lusetti
On 5/4/07, Alex Fishlock [EMAIL PROTECTED] wrote: And I would like to make a special render for the ListStuff, so that in my cell I can make my own HTML for the column called bars; Use t:parameter and the BeanEditModel, if you look at ML archive you'll find answers/examples -- Massimo

Re: T5: How to inject a service into a component?

2007-05-04 Thread Jesse Kuhnert
I hope that's not the only reason. ...The framework should be working hard - not the users. ;) On 5/4/07, Massimo Lusetti [EMAIL PROTECTED] wrote: On 5/4/07, Jesse Kuhnert [EMAIL PROTECTED] wrote: I wonder why this is as well, it's happened at least a couple times now - at least enough

Re: [T5]: rendering component with nested component with @Component annotation

2007-05-04 Thread Howard Lewis Ship
It's a dangerous ambigutity that should probably not be allowed! On 5/4/07, Kristian Marinkovic [EMAIL PROTECTED] wrote: hi howard, i switched to normal inheritance having Stylesheet extend RelationshipLink. Now i experience some troubles with @Parameter overrides (redefining a property with

Re: t5 - Grid help

2007-05-04 Thread wi
Massimo Lusetti mlusetti at gmail.com writes: On 5/4/07, Alex Fishlock alex.fishlock at racingjag.com wrote: And I would like to make a special render for the ListStuff, so that in my cell I can make my own HTML for the column called bars; Use t:parameter and the BeanEditModel, if

Re: [T5] Tree component and recursive component ?

2007-05-04 Thread Francois Armand
Le jeudi 03 mai 2007 à 11:56 -0700, Howard Lewis Ship a écrit : I was just thinking about some of this on the way in. If you @Inject the ServiceResources into your Tree component, you can ask it to generate action links for you. Handy! Well, I succeeded in doing something... And Tapestry

4.1 and do it once components

2007-05-04 Thread Geoff Callender
I've got this working in 4.0 but need some help getting it working with 4.1. It involves Tapestry's javascript. I have some do it once components, eg. SubmitOnce and DirectLinkOnce; which address the problem of multiple clicks (causing duplicate submissions). I've adapted them from the

Re: tapestry-acegi

2007-05-04 Thread Asim Khaja
I will try it out, thanks a lot. Asim On 5/3/07, William Keller [EMAIL PROTECTED] wrote: I forgot to mention that you will need to map your User and GrantedAuthority as per usual on Acegi. The stuff I gave you doesn't go in depth on setting up your models (your User needs to implement

Re: 4.1 and do it once components

2007-05-04 Thread Jesse Kuhnert
Sure ...I think you can generally do something like: -) Use http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/validation.js?view=markupas a reference. -) Override tapestry.form.validation.validateForm(form, props) with something else Like maybe

Re: T5: whitespaces in select component.

2007-05-04 Thread Howard Lewis Ship
Whitespace in HTML is generally not meaningful. Perhaps you should use CSS to style the options to use a fixed-width font? On 5/4/07, Sabine K. [EMAIL PROTECTED] wrote: Hi, there is one selectbox: t:select t:model=_restrictionEnzymes style=width: 300px; font-family:monospace size=7

Re: T5: How to inject a service into a component?

2007-05-04 Thread Howard Lewis Ship
You should be seeing some logged console messages about private variables. Only private instance variables may have annotations on them; yours is package private not private. On 5/4/07, Michael Maier [EMAIL PROTECTED] wrote: Hi List, I'm trying to inject via @Inject annotation a service

Re: T5: How to inject a service into a component?

2007-05-04 Thread Howard Lewis Ship
Tapestry works by identifying the points at which a variable is read or updated and often replaces that with a method invocation that does something more complicated (such as persistent field values or component parameters). If the field is private, Tapestry is able to make the changes within a

Re: T5: How to inject a service into a component?

2007-05-04 Thread Howard Lewis Ship
Sure beats abstract properties, though! On 5/4/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: Tapestry works by identifying the points at which a variable is read or updated and often replaces that with a method invocation that does something more complicated (such as persistent field values

Re: T5: SelectModel - a real world example

2007-05-04 Thread Howard Lewis Ship
In the simplest case, T5 thinks that the options in the drop down list are all strings. In your case, they are Brands. The Select component doesn't know how to create a client-side representation of a Brand (it doesn't magically know to use the id). You must provide a ValueEncoder that can

RE: T5: SelectModel - a real world example

2007-05-04 Thread Joel Wiegman
Thanks for the reply Howard. The Select component doesn't know how to create a client-side representation of a Brand (it doesn't magically know to use the id). So, then... I guess my question would be... what is the BrandSelectModel for? In that object, I'm essentially mapping a Brand's

Re: T5: whitespaces in select component.

2007-05-04 Thread Jesse Kuhnert
I guess this is my disagree with Howard day, but I don't think that's a completely valid statement. Just look at the actions list drop down in the email (gmail) client you are using to reply to these messages. ;) ..It's extremely convenient and not something you can easily do with css alone. On

Re: T5: SelectModel - a real world example

2007-05-04 Thread Howard Lewis Ship
In your OptionModel, the label is the Brand description, and the value is the Brand itself. You then supply a ValueEncoder that converts between Brands and brand ids (as strings, for the client side). If Brand is an entity object, then it may be necessary to have the ValueEncoder talk to the

Re: T5: whitespaces in select component.

2007-05-04 Thread Howard Lewis Ship
Just prompting Sabine for more details about what HTML was produced, and what was expected. On 5/4/07, Jesse Kuhnert [EMAIL PROTECTED] wrote: I guess this is my disagree with Howard day, but I don't think that's a completely valid statement. Just look at the actions list drop down in the

Tapestry 5.0.4 now available via Maven

2007-05-04 Thread Howard Lewis Ship
Looks like the 5.0.4 binaries have been rsync'ed over to ibiblio. It'll be a bit longer before they show up on Apache Mirrors. There's a new distribution format; binary contains each T5 module's JAR (and sources JAR). Source contains all the source code. Documentation is still on the live

Re: [T4] Component initialization and PageBeginRender

2007-05-04 Thread Jorge Montero
First, thanks for the answer. It turns out a version upgrade improved things quite a bit: I just upgraded my ancient 4.0 distribution to 4.1, and now parameters are loaded before the pageBeginRender in the component. The only problem I had with the upgrade was to find the apropriate

Re: [T4] Component initialization and PageBeginRender

2007-05-04 Thread Jesse Kuhnert
Yeah, I would just move the logic out of pageBeginRender() and not do it at all. Ie just let the properties flow naturally from whatever your parameters are to your contained components. Tapestry should cache your models for you as well so there's no point in second guessing things until you find

Re: Tapestry 5 and Template Reloading

2007-05-04 Thread bjornharvold
The problem was resolved. 1. I couldn't even get Jetty to run with 5.0.4-SNAPSHOT in Eclipse (this worked fine in Intellij / Tomcat). I reverted to 5.0.3. 2. The files had gotten jumbled around with html files in src/main/java and java files in src/main/resources. Real mess. 3. Maven adds the

[T4] ValidationDelegate to edit attributes?

2007-05-04 Thread Norman Franke
I'm trying to develop a customized ValidationDelegate that add a class to fields with an error. It works if the field doesn't already have a class attribute. What I want to do is add the class name to the existing attribute. Just adding one yields two class= attributes, which doesn't seem

Re: [T4] ValidationDelegate to edit attributes?

2007-05-04 Thread Jesse Kuhnert
If using tap 4.1.2 (I know, sorry ) I think it just works as expected - but there's also some new api calls for handling stuff like this - ie appendAttribute() / getAttribute() / etc... http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/IMarkupWriter.html On 5/4/07, Norman

RE: T5: SelectModel - a real world example

2007-05-04 Thread Joel Wiegman
Still getting unintuitive errors... I've added the ValueEncoder and now when I submit the form I get the following stack trace (and yes the Main component has a setBrand(Brand) method, which from the root cause exception seems to be the cause of the problem?): [ERROR] RequestExceptionHandler

Anyone using TACOS components in Production ?

2007-05-04 Thread sunilmanu
Hi Everyone, Is anyone currently using any of the TACOS components in Production ? I was trying some components and behaviour is different in IE Firefox. Upload Status does not work at all. I tried the AjaxSubmitEvent for the onchange on the Select option, works fine in Firefox, but not in IE.

I want to use httpSession,but don't use hivemind?

2007-05-04 Thread li li
Hi friends: I use Tapestry4.0.2. I find that the "getVisit" is deprecated. So I don't want to use it. I develope a web application.After user logon,I will store "userinfo" in httpsession.The "userInfo" could be used in many pages. So I need have to use httpsession.I mean that I couldn't use

Re: Anyone using TACOS components in Production ?

2007-05-04 Thread Zsombor
On 5/4/07, sunilmanu [EMAIL PROTECTED] wrote: Hi Everyone, Is anyone currently using any of the TACOS components in Production ? I was trying some components and behaviour is different in IE Firefox. Upload Status does not work at all. I tried the AjaxSubmitEvent for the onchange on the

Re: I want to use httpSession,but don't use hivemind?

2007-05-04 Thread Ben Acker
Howdy! Is there a reason that you're leaving out Hivemind? If not, I can show a fairly simple way of injecting an Application State Object (ASO) that can contain your userinfo. Just let me know! -Ben On 5/4/07, li li [EMAIL PROTECTED] wrote: Hi friends: I use Tapestry4.0.2. I find that

[Tapestry 5] CookieSink Implementation

2007-05-04 Thread chan Alfred
Hi All, I am trying to use org.apache.tapestry.services.PersistentLocale to explicitly set the locale of the page regardless of the Client browser locale. But, I found that Null Pointer exception was thrown when I call PersistentLocale.set(Locale.ENGLISH); Aftert looking the source code, it

Re: Tapestry 5.0.4 now available via Maven

2007-05-04 Thread Jun Tsai
[EMAIL PROTECTED]:~/workspace-tmp/myapp$ mvn -up jetty:run [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'jetty'. [INFO] [INFO] Building myapp Tapestry 5 Application [INFO]