Re: How to override the default validate message?

2007-07-06 Thread Malin Ljungh

You can use the following syntax for example:

binding name=validators value=validators:required[The {0} is
missing!],min=0/

/Malin

On 7/6/07, Donyee [EMAIL PROTECTED] wrote:


Hello everyone!
I want to change the default validate message,such as You must
provide a value for ... ,
To change the source file maybe not grace! is there another way?




徐 依伟



T4: Can I have dynamic component id or how do I solve this?

2007-07-06 Thread Malin Ljungh

I have a loop - a component of type=For, displaying contacts.
I'd like to have a component inside the loop with component id equals
something with the database key in it, the contact ID. Is that possible?

Or is there a smarter way to solve my issue?
The reason I want it this way is that I want to use it in updateComponents
with async=true. Then I could set updateComponents to the desired contact
ID that I want to update on the client.

All I have now is loopContacts, loopContacts_0, loopContacts_1 and so on,
but I don't know which contact is which...

Hope someone understood something... :)
Any input appreciated!!!

Malin


[T5]How to write an array context in template?

2007-07-06 Thread Jun Tsai

hi
in T4,I can use parameters=p1,p2 .
but I find T4 don't support the method in context parameter.
I.E:
t:pagelink page=xxx context=p1,p2page link /t:pagelink


only use a method in page class to define an array parameter?

thanks.

jun tsai

--
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net


Re: How to override the default validate message?

2007-07-06 Thread Donyee

Do you use the T5? I am using t5!
Thanks !

2007/7/6, Malin Ljungh [EMAIL PROTECTED]:

You can use the following syntax for example:

binding name=validators value=validators:required[The {0} is
missing!],min=0/

/Malin

On 7/6/07, Donyee [EMAIL PROTECTED] wrote:

 Hello everyone!
 I want to change the default validate message,such as You must
 provide a value for ... ,
 To change the source file maybe not grace! is there another way?




 徐 依伟





--
徐 依伟


Re: How to override the default validate message?

2007-07-06 Thread Malin Ljungh

No, sorry, I use T4.
Don't know how it works in T5, unfortunately.

Malin


On 7/6/07, Donyee [EMAIL PROTECTED] wrote:


Do you use the T5? I am using t5!
Thanks !

2007/7/6, Malin Ljungh [EMAIL PROTECTED]:
 You can use the following syntax for example:

 binding name=validators value=validators:required[The {0} is
 missing!],min=0/

 /Malin

 On 7/6/07, Donyee [EMAIL PROTECTED] wrote:
 
  Hello everyone!
  I want to change the default validate message,such as You must
  provide a value for ... ,
  To change the source file maybe not grace! is there another way?
 
 
 
 
  徐 依伟
 



--
徐 依伟



Re: How to override the default validate message?

2007-07-06 Thread Erik Vullings

Hi Donyee,

Please have a look here:
http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner

Cheers
Erik


On 7/6/07, Malin Ljungh [EMAIL PROTECTED] wrote:


No, sorry, I use T4.
Don't know how it works in T5, unfortunately.

Malin


On 7/6/07, Donyee [EMAIL PROTECTED] wrote:

 Do you use the T5? I am using t5!
 Thanks !

 2007/7/6, Malin Ljungh [EMAIL PROTECTED]:
  You can use the following syntax for example:
 
  binding name=validators value=validators:required[The {0} is
  missing!],min=0/
 
  /Malin
 
  On 7/6/07, Donyee [EMAIL PROTECTED] wrote:
  
   Hello everyone!
   I want to change the default validate message,such as You must
   provide a value for ... ,
   To change the source file maybe not grace! is there another way?
  
  
  
  
   徐 依伟
  
 


 --
 徐 依伟




RE: T4: Can I have dynamic component id or how do I solve this?

2007-07-06 Thread Marcus.Schulte
As there are no dynamic component instances in Tapestry, there are no
dynamic component-ids. What you are seeing (loopContacts_i, i=1 ...) are
multiple clientId's (Element id's on the client side) rendere by one and
the same component instance, whose id, the component-id on the server,
is loopContacts. So, tapestry wouldn't recognise loopContact_0 as a
valid component-id anyway.

So, I'd just try to refresh loopContacts and see whether the overhead
of refreshing all instances really hurts.

 -Original Message-
 From: Malin Ljungh [mailto:[EMAIL PROTECTED] 
 Sent: Friday, July 06, 2007 9:03 AM
 To: Tapestry users
 Subject: T4: Can I have dynamic component id or how do I solve this?
 
 I have a loop - a component of type=For, displaying contacts.
 I'd like to have a component inside the loop with component 
 id equals something with the database key in it, the contact 
 ID. Is that possible?
 
 Or is there a smarter way to solve my issue?
 The reason I want it this way is that I want to use it in 
 updateComponents with async=true. Then I could set 
 updateComponents to the desired contact ID that I want to 
 update on the client.
 
 All I have now is loopContacts, loopContacts_0, 
 loopContacts_1 and so on, but I don't know which contact is which...
 
 Hope someone understood something... :)
 Any input appreciated!!!
 
 Malin
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to override the default validate message?

2007-07-06 Thread Donyee

Cool, I should try this first!
It works fine!

2007/7/6, Erik Vullings [EMAIL PROTECTED]:

Hi Donyee,

Please have a look here:
http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner

Cheers
Erik


On 7/6/07, Malin Ljungh [EMAIL PROTECTED] wrote:

 No, sorry, I use T4.
 Don't know how it works in T5, unfortunately.

 Malin


 On 7/6/07, Donyee [EMAIL PROTECTED] wrote:
 
  Do you use the T5? I am using t5!
  Thanks !
 
  2007/7/6, Malin Ljungh [EMAIL PROTECTED]:
   You can use the following syntax for example:
  
   binding name=validators value=validators:required[The {0} is
   missing!],min=0/
  
   /Malin
  
   On 7/6/07, Donyee [EMAIL PROTECTED] wrote:
   
Hello everyone!
I want to change the default validate message,such as You must
provide a value for ... ,
To change the source file maybe not grace! is there another way?
   
   
   
   
徐 依伟
   
  
 
 
  --
  徐 依伟
 





--
徐 依伟


[T5.0.5] NullPointerException in DependencyNode.addDependency

2007-07-06 Thread Siddhartha Argollo

Hi all,

I'm writing to the list cause I don't know where to log this error.

I'm contributing to MasterDispatcher with 2 services and the 
DependencyNode object should be logging a warning message that says 
Unable to add 'SecurityDispatcher' as a dependency of 
'RequestEncodingDispatcher', as that forms a dependency cycle 
('RequestEncodingDispatcher' depends on itself via 
'SecurityDispatcher'). The dependency has been ignored..


Instead, I get a NullPointerException in the line 83 [_log.warn(message, 
null);] of the method: addDependency(DependencyNodeT node), because 
the _log variable is null at this point since the Orderer object is 
constructed with a null log variable in 
RegistryImpl.getOrderedConfiguration.


Cheers,

Siddhartha Argollo




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tapestry5HowTos new snippet

2007-07-06 Thread Davor Hrg

Fidel Chavarria asked for a solution to inline dynamic image he needed for a
chart component...

I tried doing it, and added the snippet to
Tapestry5HowTos: http://wiki.apache.org/tapestry/Tapestry5HowTos

the example is placed at:
http://wiki.apache.org/tapestry/Tapestry5HowToCreateASimpleGraphComponent

hope it helps someone :)

Davor Hrg


Re: T5 IOC questions

2007-07-06 Thread David Avenante

Ok,

I continue my investigation.
So I think I don't need to override my service but only override my
service configuration.

So my service is :
PageRenderInitializer
and my service configuration is :
contributePageRenderInitializer( ...

As write in the documentation :
The extensibility comes from the fact multiple modules may all
contribute to the same service configuration:

So I override the the contributePageRenderInitializer with :

public void 
contributePageRenderInitializer(OrderedConfigurationPageRenderCommand
configuration,
   final SymbolSource symbolSource,
   final AssetSource assetSource) {
   configuration.add(PageRenderSupport, new PageRenderCommand() {
   public void cleanup(Environment environment) {
   environment.pop(PageRenderSupport.class);
   Document document = environment.peek(Document.class);
   DocumentScriptBuilder builder =
environment.pop(DocumentScriptBuilder.class);
   builder.updateDocument(document);
   }

   public void setup(Environment environment) {
   DocumentScriptBuilder builder = new
MyOwnDocumentScriptBuilderImpl();
   environment.push(DocumentScriptBuilder.class, builder);
   environment.push(PageRenderSupport.class, new
PageRenderSupportImpl(builder,
   symbolSource, assetSource));
   }
   }, before:*);

   }

It's an ordered list so I add the before:* statement to reflect the
order that I can see in the original method.

But this approach don't work : first my method is call twice 
And the method throw and exception like :

11:21:18,796 - [SocketListener0-1] ERROR - PageRenderInitializer:
Construction of service PageRenderInitializer failed: Error invoking
service builder method
org.apache.tapestry.services.TapestryModule.build(List) (at
TapestryModule.java:988) (for service 'PageRenderInitializer'): Error
invoking service contribution method
com.illuminate.services.AppModule.contributePageRenderInitializer(OrderedConfiguration,
SymbolSource, AssetSource): java.lang.NullPointerException
java.lang.RuntimeException: Error invoking service builder method
org.apache.tapestry.services.TapestryModule.build(List) (at
TapestryModule.java:988) (for service 'PageRenderInitializer'): Error
invoking service contribution method
com.illuminate.services.AppModule.contributePageRenderInitializer(OrderedConfiguration,
SymbolSource, AssetSource): java.lang.NullPointerException
...
...
Caused by: java.lang.RuntimeException: Error invoking service
contribution method
com.illuminate.services.AppModule.contributePageRenderInitializer(OrderedConfiguration,
SymbolSource, AssetSource): java.lang.NullPointerException

Thank for any input ;)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 IOC questions

2007-07-06 Thread David Avenante

Hummm after debug time I found that impossible to me to add in ordered
list the same Id (see class Orderer code).

So if it's impossible I need to override the component
PageRenderInitializer and all the associated configuration.

So I continue my investigation with aliasOveridesService.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T5.0.5] Contributions to MasterDispatcher not working

2007-07-06 Thread Siddhartha Argollo

No warnings.

Howard Lewis Ship wrote:
Sounds like it should work as is, are you getting any warnings in the 
console?


On 7/6/07, Siddhartha Argollo [EMAIL PROTECTED] wrote:

Hi all,

I have two submodules, both used by AppModule.

In the first module, I contribute with a MyFirstDispatcher to
MasterDispatcher and the constraint before:*. In the second module, I
contribute with MySecondDispatcher and the constraint
after:MyFirstDispatcher. Although both contributions are correctly
done, only MyFirstDispatcher.dispatch is called by the application.
The thing is, if I switch the constraints, again only
MySecondDispatcher.dispatch is called. If I don't use the constraints,
neither service is called.

I'm returning false in the dispatch method of both services. Am I
forgetting anything?
What I'm trying to do is wrong in anyway?

I solved my problem contributing to RequestHandler with one of the
services and leaving the other one with the constraint before:*, still
contributing to MasterDispatcher (without this constraint, it doesn't
work). This way, both dispatches are called by the framework.

Thanks,

Siddhartha Argollo


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







--
Siddhartha Argollo
Técnico Judiciário
TRE-BA
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T5] T4 $content$ equivalent for T5 ?

2007-07-06 Thread #Cyrille37#

Hello,

In a old post I asked a question about the T5's component html (subject 
was: [T5] about component's html).
Now I now the T4 equivalent : the $content$ attribute define which part 
of the component will be rendered in the parent component/page.


Howard answered to me that there is a JIRA about that, but I do not find it.
Is this improvement exists now ?

Thanks
Cyrille.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tapestry5HowTos new snippet

2007-07-06 Thread #Cyrille37#

Davor Hrg a écrit :
Fidel Chavarria asked for a solution to inline dynamic image he needed 
for a

chart component...

I tried doing it, and added the snippet to
Tapestry5HowTos: http://wiki.apache.org/tapestry/Tapestry5HowTos

the example is placed at:
http://wiki.apache.org/tapestry/Tapestry5HowToCreateASimpleGraphComponent

hope it helps someone :)

Thanks a lot.
It demonstrate the power of Tapestry !
In a line of code, Tapestry got da Power ! Really impressing !
Cyrille.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T5] Dispatcher or RequestFilter?

2007-07-06 Thread Dan Adams
So I'm designing a service that allows you to contribute url rewriters.
The problem is that I'm not sure if this should be implemented as a
Dispatcher or up a level as a RequestFilter. The rewriters need to be
able to both redirect using the response to another url and do
tapestry-specific stuff like load a page with a given context.
Suggestions?

-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4: Can I have dynamic component id or how do I solve this?

2007-07-06 Thread Malin Ljungh

OK, it does NOT work to have the ognl id in the page-file.
Not that it's important - but ... am I correct?

I thought everything could be done either way.


On 7/6/07, Malin Ljungh [EMAIL PROTECTED] wrote:


Andreas!

That was EXACTLY what I was looking for!!! Thanks!!!
(And thank you Marcus too, I'll to refresh the whole loop if this doesn't
work out)

Actually I started with something like this but I normally use just jwcid
in my .html file and have everything else in the page-specification (.page
file) but it seemed so weird to have ognl in the jwcid in the .html file
that I didn't even test it... would it work? I guess I should just try...

Thanks again! *happy*

/Malin - I'm a she btw ;)



On 7/6/07, Andreas Andreou [EMAIL PROTECTED]  wrote:

 But he can set the id parameter to whatever he likes, i.e.
 span jwcid=@MyComponent id=ognl:'data_'+currentIddata/span

 On 7/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
  As there are no dynamic component instances in Tapestry, there are no
  dynamic component-ids. What you are seeing (loopContacts_i, i=1 ...)
 are
  multiple clientId's (Element id's on the client side) rendere by one
 and
  the same component instance, whose id, the component-id on the server,

  is loopContacts. So, tapestry wouldn't recognise loopContact_0 as a
  valid component-id anyway.
 
  So, I'd just try to refresh loopContacts and see whether the
 overhead
  of refreshing all instances really hurts.
 
   -Original Message-
   From: Malin Ljungh [mailto:[EMAIL PROTECTED]
   Sent: Friday, July 06, 2007 9:03 AM
   To: Tapestry users
   Subject: T4: Can I have dynamic component id or how do I solve this?
  
   I have a loop - a component of type=For, displaying contacts.
   I'd like to have a component inside the loop with component
   id equals something with the database key in it, the contact
   ID. Is that possible?
  
   Or is there a smarter way to solve my issue?
   The reason I want it this way is that I want to use it in
   updateComponents with async=true. Then I could set
   updateComponents to the desired contact ID that I want to
   update on the client.
  
   All I have now is loopContacts, loopContacts_0,
   loopContacts_1 and so on, but I don't know which contact is which...
  
   Hope someone understood something... :)
   Any input appreciated!!!
  
   Malin
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


 --
 Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
 Tapestry / Tacos developer
 Open Source / JEE Consulting





Re: T4: Can I have dynamic component id or how do I solve this?

2007-07-06 Thread Marcus Schulte

Yes, you should be able to define any attribute (=informal parameter) in the
template, in the spec or in annotated Java. In some components, however, id
is a reserved parameter, because the component insists on generating it
itself.

But I think even if you had your data-id in the client-side element-id, your
problem of updating only one rendering of a component in a @For would not
be solved.

One approach would be to make your loopContacts component a JSON-Component
like it's described here:
http://tapestry.apache.org/tapestry4.1/ajax/json.html .

2007/7/6, Malin Ljungh [EMAIL PROTECTED]:


OK, it does NOT work to have the ognl id in the page-file.
Not that it's important - but ... am I correct?

I thought everything could be done either way.


On 7/6/07, Malin Ljungh [EMAIL PROTECTED] wrote:

 Andreas!

 That was EXACTLY what I was looking for!!! Thanks!!!
 (And thank you Marcus too, I'll to refresh the whole loop if this
doesn't
 work out)

 Actually I started with something like this but I normally use just
jwcid
 in my .html file and have everything else in the page-specification
(.page
 file) but it seemed so weird to have ognl in the jwcid in the .html file
 that I didn't even test it... would it work? I guess I should just
try...

 Thanks again! *happy*

 /Malin - I'm a she btw ;)



 On 7/6/07, Andreas Andreou [EMAIL PROTECTED]  wrote:
 
  But he can set the id parameter to whatever he likes, i.e.
  span jwcid=@MyComponent id=ognl:'data_'+currentIddata/span
 
  On 7/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  
   As there are no dynamic component instances in Tapestry, there are
no
   dynamic component-ids. What you are seeing (loopContacts_i, i=1 ...)
  are
   multiple clientId's (Element id's on the client side) rendere by one
  and
   the same component instance, whose id, the component-id on the
server,
 
   is loopContacts. So, tapestry wouldn't recognise loopContact_0 as
a
   valid component-id anyway.
  
   So, I'd just try to refresh loopContacts and see whether the
  overhead
   of refreshing all instances really hurts.
  
-Original Message-
From: Malin Ljungh [mailto:[EMAIL PROTECTED]
Sent: Friday, July 06, 2007 9:03 AM
To: Tapestry users
Subject: T4: Can I have dynamic component id or how do I solve
this?
   
I have a loop - a component of type=For, displaying contacts.
I'd like to have a component inside the loop with component
id equals something with the database key in it, the contact
ID. Is that possible?
   
Or is there a smarter way to solve my issue?
The reason I want it this way is that I want to use it in
updateComponents with async=true. Then I could set
updateComponents to the desired contact ID that I want to
update on the client.
   
All I have now is loopContacts, loopContacts_0,
loopContacts_1 and so on, but I don't know which contact is
which...
   
Hope someone understood something... :)
Any input appreciated!!!
   
Malin
   
  
  
-
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 
  --
  Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
  Tapestry / Tacos developer
  Open Source / JEE Consulting
 







--
Marcus Schulte
http://marcus-schulte.blogspot.com


Re: T4: Can I have dynamic component id or how do I solve this?

2007-07-06 Thread Malin Ljungh

Well, actually I works excellent!

I have it like this in my template now:

span jwcid=loopContacts
tr id=ognl:'contact_'+currentContact.contactId jwcid=@Any
renderTag=true
   ...
/tr
/span

(loopContacts is of type For)
and on every row I have edit button which swithes current contact from
display to edit form.
So on edit linkbutton I have this:

binding name=async value=true /
binding name=updateComponents
value=ognl:'contact_'+currentContact.contactId/binding

and the same on submit/save button.
Result is very neat AJAX style table with editable rows without reload of
page :)




On 7/6/07, Marcus Schulte [EMAIL PROTECTED] wrote:


Yes, you should be able to define any attribute (=informal parameter) in
the
template, in the spec or in annotated Java. In some components, however,
id
is a reserved parameter, because the component insists on generating it
itself.

But I think even if you had your data-id in the client-side element-id,
your
problem of updating only one rendering of a component in a @For would
not
be solved.

One approach would be to make your loopContacts component a JSON-Component
like it's described here:
http://tapestry.apache.org/tapestry4.1/ajax/json.html .

2007/7/6, Malin Ljungh [EMAIL PROTECTED]:

 OK, it does NOT work to have the ognl id in the page-file.
 Not that it's important - but ... am I correct?

 I thought everything could be done either way.


 On 7/6/07, Malin Ljungh [EMAIL PROTECTED] wrote:
 
  Andreas!
 
  That was EXACTLY what I was looking for!!! Thanks!!!
  (And thank you Marcus too, I'll to refresh the whole loop if this
 doesn't
  work out)
 
  Actually I started with something like this but I normally use just
 jwcid
  in my .html file and have everything else in the page-specification
 (.page
  file) but it seemed so weird to have ognl in the jwcid in the .html
file
  that I didn't even test it... would it work? I guess I should just
 try...
 
  Thanks again! *happy*
 
  /Malin - I'm a she btw ;)
 
 
 
  On 7/6/07, Andreas Andreou [EMAIL PROTECTED]  wrote:
  
   But he can set the id parameter to whatever he likes, i.e.
   span jwcid=@MyComponent id=ognl:'data_'+currentIddata/span
  
   On 7/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
   
As there are no dynamic component instances in Tapestry, there are
 no
dynamic component-ids. What you are seeing (loopContacts_i, i=1
...)
   are
multiple clientId's (Element id's on the client side) rendere by
one
   and
the same component instance, whose id, the component-id on the
 server,
  
is loopContacts. So, tapestry wouldn't recognise loopContact_0
as
 a
valid component-id anyway.
   
So, I'd just try to refresh loopContacts and see whether the
   overhead
of refreshing all instances really hurts.
   
 -Original Message-
 From: Malin Ljungh [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 06, 2007 9:03 AM
 To: Tapestry users
 Subject: T4: Can I have dynamic component id or how do I solve
 this?

 I have a loop - a component of type=For, displaying contacts.
 I'd like to have a component inside the loop with component
 id equals something with the database key in it, the contact
 ID. Is that possible?

 Or is there a smarter way to solve my issue?
 The reason I want it this way is that I want to use it in
 updateComponents with async=true. Then I could set
 updateComponents to the desired contact ID that I want to
 update on the client.

 All I have now is loopContacts, loopContacts_0,
 loopContacts_1 and so on, but I don't know which contact is
 which...

 Hope someone understood something... :)
 Any input appreciated!!!

 Malin

   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
  
  
   --
   Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
   Tapestry / Tacos developer
   Open Source / JEE Consulting
  
 
 




--
Marcus Schulte
http://marcus-schulte.blogspot.com



New to Tapestry

2007-07-06 Thread Matt Coatney
Hello and thanks in advance!

 

I'm new to Tapestry and working on a T5 project. I found a T4 tutorial that
described something similar to what I need to achieve, only to realize that
T5 does things differently. Can anyone provide a tutorial or example that
describes all or part of the following:

 

I need to call a tapestry service from a Javascript function. The service
generates a page then updates the Src of an Iframe setting it to the newly
generated page. 


Thanks,

Matt



Re: [T5]How to write an array context in template?

2007-07-06 Thread Howard Lewis Ship

Currently, there is not a way to do this; you have to write a short
getter method to accomplish this.

On 7/6/07, Jun Tsai [EMAIL PROTECTED] wrote:

hi
 in T4,I can use parameters=p1,p2 .
but I find T4 don't support the method in context parameter.
I.E:
t:pagelink page=xxx context=p1,p2page link /t:pagelink


only use a method in page class to define an array parameter?

thanks.

jun tsai

--
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net




--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



currently rendering grid column?

2007-07-06 Thread Robert Zeigler
Is there some way to get at which column is currently rendering in  
the grid component?
PropertyDisplayContext is halfway there, providing the current column  
value, but it doesn't give the column name.   It seems like this  
would be useful information to have (at least, I could sure use it  
right now :).  If there isn't a way to get that info, I'd be happy to  
contribute a patch to get the currently rendering property name from  
PropertyDisplayContext.


Robert

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with non-ASCII form parameters in form containing upload component

2007-07-06 Thread Doug Hauge
I am running into an encoding problem with form parameter values that
contain non-ASCII characters in a form that contains an upload
component. Without the upload component everything works fine. The
problem appears to be in the handling of strings in
'multipart/form-data', in that both Firefox and Mozilla seem to send
strings encoded as UTF-8, but don't specify a character set, and the
upload component interprets these as ISO-8559-1. This actually seems to
be the correct response to incorrect behavior by the browsers, but in
practice we need to find a workaround. I can't find a way to get around
this without modifying the tapestry-upload project, and I was wondering
if anyone could suggest a better solution, and if not whether Tapestry
itself will deal with this in the future

Our simple, hack workaround is to modify
'MultipartDecoderImpl.processFileItems(...)' to call

wrapper.addParameter(item.getFieldName(), item.getString(UTF8))

instead of

wrapper.addParameter(item.getFieldName(), item.getString())

To improve this, I think we would need

1) To have a way of passing in an appropriate default encoding to use.
We could contribute a 'HttpServletRequestHandler' that sets the
request's default character encoding, but is there a way to guarantee
that our handler would be called before the
'MultipartServletRequestFilter'?

2) Even if did (1), we would need a way to use this encoding to parse
strings multipart form fields. Passing the encoding to
'FileItem.getString()' is undesirable because it would not handle the
case where the part's 'charset' parameter was explicitly set. The
parameterless version of 'FileItem.getString()' cannot be used, however,
because it explicitly defaults to 'ISO-8859-1' if the character set is
not specified (e.g. it uses neither the request's character encoding or
the header encoding set by 'FileUpload.setHeaderEncoding'). I can't find
a nice way to do this without duplicating some code in
'commons-fileupload' or relying on public methods of 'DiskFileItem' that
aren't in the 'FileItem' interface.

Thanks,
Doug



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5 Services

2007-07-06 Thread Ben Acker

Howdy!

Being somewhat of a T5 noob, I have had troubles getting explicit directions
on how to create a service in T5.

I'm positive that it is simple, I just can't find anything that says
anything explicitly in the mailing lists, documentation, etc.

If anyone has the time, please let me know where I need to throw in my
annotations and where to throw the service (probably mypackage.services,
with AppModule)

Thanks in advance!

-Ben

PS - A link to any documentation would be more than adequate, and I really
appreciate any help!