You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Charles Mason <ch...@gmail.com> on 2007/08/27 20:46:48 UTC

T5 Access Page / Component Annotations from Other Classes

I have a method that needs to be able to redirect the user to another
page based on the Application Sate. My problem is this class is part
of a separate package from the MyApp.Pages package.

To make this work I need to use these injected fields. However
Tapestry 5 clearly isn't processing the annotations as they all remain
null.

@ApplicationState
private User authenticatedUser;
private boolean authenticatedUserExists;
	
@Inject
@Service("LinkFactory")
private LinkFactory linkFactory;

@Inject
@Service("RequestPageCache")
private RequestPageCache requestPageCache;

@Inject
@Service("RequestGlobals")
 private RequestGlobals requestGlobals;

Is there some why to get tapestry 5 to process this classes
annotations or is there another way to access these objects.

I am using my own service to modify the pages at runtime so, I really
don't want to have to pass all these objects through to my class.

Charlie M

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Re: [T5]Encoding Problem while submiting form with a Upload component.

Posted by Christian Koeberl <ch...@porsche.co.at>.
> Not everyone is using tapestry-upload and not everyone is using fancy
> file names and tapestry-upload module is the younger in T5 space so...
> anyway you´re is indeed a good catch so propably will be evaluated.

It's not the file name. The problem is: as soon as you add a upload 
component to a form all other text fields (in the same form) are not 
decoded with the request encoding. 
So, you cannot have text fields and an upload in one form (with UTF-8
encoding).

Cheers,
Chris

Re: [T5]Encoding Problem while submiting form with a Upload component.

Posted by Massimo Lusetti <ml...@gmail.com>.
On 8/28/07, Christian Koeberl <ch...@porsche.co.at> wrote:

> I wondered, why nobody found this bug before. Anyway, I filed the
> bug yesterday and provided a fix.

Not everyone is using tapestry-upload and not everyone is using fancy
file names and tapestry-upload module is the younger in T5 space so...
anyway you´re is indeed a good catch so propably will be evaluated.

-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5]Encoding Problem while submiting form with a Upload component.

Posted by Martin Grotzke <ma...@javakaffee.de>.
On Tue, 2007-08-28 at 12:22 +0200, Christian Koeberl wrote:
> > I have a form with a 'textfield' and a 'upload' field .
> > The Chinese words I input in textfield will be irrecognizable  when I 
> > submit the form .
> 
> I wondered, why nobody found this bug before. Anyway, I filed the
> bug yesterday and provided a fix.
> 
> https://issues.apache.org/jira/browse/TAPESTRY-1723
> 
> You can easyily apply the fix and generate your own tapestry-upload jar
> or wait until one of the committers applies the patch.
Thanx a lot, we also ran into this issue!

Cheers,
Martin



Re: [T5]Encoding Problem while submiting form with a Upload component.

Posted by Christian Koeberl <ch...@porsche.co.at>.
> I have a form with a 'textfield' and a 'upload' field .
> The Chinese words I input in textfield will be irrecognizable  when I 
> submit the form .

I wondered, why nobody found this bug before. Anyway, I filed the
bug yesterday and provided a fix.

https://issues.apache.org/jira/browse/TAPESTRY-1723

You can easyily apply the fix and generate your own tapestry-upload jar
or wait until one of the committers applies the patch.

-- 
Chris

[T5]Encoding Problem while submiting form with a Upload component.

Posted by Allen Guo <el...@gmail.com>.
Hi All,

I have a form with a 'textfield' and a 'upload' field .
The Chinese words I input in textfield will be irrecognizable  when I 
submit the form .
Or I use the form without a 'upload' but exactly add the property 
enctype="multipart/form-data", the same error occurr.

And I absolutely use UTF-8 in my html.  Is it a T5 bug?
Do you have any idea? 

Thanks&Regards
Guoguo Long

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org