Re: Tapestry Contrib Table to MS-Excel

2008-01-07 Thread Christian Köberl POI


swapnilpatil wrote:
 
 I have one tapestry page in which i am using Tapestry's Contrib Table
 which contains some data. Now i want to export this table/data to MS-Excel
 file using a button.
 
The easy way to accomplish this is to simply send the HTML table and set the
content type to application/vnd.ms-excel. 
You could do this with something like this:
  response.setContentType(application/vnd.ms-excel);
 
response.setHeader(Content-disposition,attachment;filename=MyFileName.xls);
See: http://www.devtrain.de/artikel_912.aspx (German)

The more complex way is to use Apache POI (http://poi.apache.org/) - here
you have to build the Excel table via POI API and you cannot use the
Tapestry table at all (maybe you can write a special render logic for the
Tapestry table and use it anyway).

Cheers,
Chris
-- 
View this message in context: 
http://www.nabble.com/Tapestry-Contrib-Table-to-MS-Excel-tp14659255p14660404.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: enctype=multipart/form-data cause encoding problem in Chinese!

2007-11-30 Thread Christian Köberl POI

You will have to set the character encoding in the ServletRequest. Add the
UTF-8 Filter to your AppModule
http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding

Chris

ps: thanks for the hint - there should be a null check for the
request.getCharacterEncoding() - I will file a patch
-- 
View this message in context: 
http://www.nabble.com/enctype%3D%22multipart-form-data%22-cause-encoding-problem-in-Chinese%21-tf4895497.html#a14042373
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: enctype=multipart/form-data cause encoding problem in Chinese!

2007-11-29 Thread Christian Köberl POI


yuan gogo wrote:
 
 Hasn't this problem been resolved in 5.0.7-snapshot ?
 
It was resolved yesterday - so probably it's not in the snapshot build yet
or you havent got the most recent snapshot.

You could also checkout the 5.0.6 and apply the patch from
https://issues.apache.org/jira/browse/TAPESTRY-1723 (we're using 5.0.6 in
production so we had to do this). 

We're using a (Maven) classifier to distinguish between the patched and
unpatched versions (see maven-jar-plugin)

Chris
-- 
View this message in context: 
http://www.nabble.com/enctype%3D%22multipart-form-data%22-cause-encoding-problem-in-Chinese%21-tf4895497.html#a14028577
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: disable javascript

2007-11-06 Thread Christian Köberl POI

Hello Angelo!


Angelo Chen wrote:
 
 You could have saved me one day work:) 
 

It could have saved you one day if it would work, but unfortunately it
doesnt: http://issues.apache.org/jira/browse/TAPESTRY-1748
-- 
View this message in context: 
http://www.nabble.com/T5%3A-disable-javascript-tf4749556.html#a13602999
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: disable javascript

2007-11-06 Thread Christian Köberl POI


Angelo Chen wrote:
 
 Good you pointed out, It works now with 5.0.6. 
 
Hey, that's good - I checked that and it seems to work.

But then I looked at how and it seems that Tapestry still generate the
validation script:
script type=text/javascript
!--
Event.observe(window, load, function() {
Tapestry.Field.required('name', 'You must provide a value for Name.');
});
// --
/script

It also adds the dependecies to the header - this is why it works now. It
would be a lot nicer if the scripts were removed when clientValidation is
false :(

A partly happy,
Chris

-- 
View this message in context: 
http://www.nabble.com/T5%3A-disable-javascript-tf4749556.html#a13606148
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: retrieve user defined parameter at start of Tapestry

2007-10-04 Thread Christian Köberl POI


Angelo Chen wrote:
 
 I'm thinking of putting some parameters in web.xml and retrieve them when
 the application starts, any hint how to do this? Thanks.
 A.C.
 
Create a new Service, Inject the ApplicationGlobals and get the parameters
out of the ServletContext in ApplicationGlobals.

Chris
-- 
View this message in context: 
http://www.nabble.com/T5%3A-retrieve-user-defined-parameter-at-start-of-Tapestry-tf4565342.html#a13035379
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: retrieve user defined parameter at start of Tapestry

2007-10-04 Thread Christian Köberl POI

Hello Angelo!


Angelo Chen wrote:
 
 I tried to do following, but does not work:
 1. i added a param in the web.xml:
  context-param
   param-nametapestry.app-package/param-name
   param-valueorg.test/param-value
 
   param-nametest/param-name
   param-valuemyparam/param-value
  /context-param
 

You have to define each context parameter seperately:

 context-param
  param-nametapestry.app-package/param-name
  param-valueorg.test/param-value
 /context-param

 context-param
  param-nametest/param-name
  param-valuemyparam/param-value
 /context-param

Then it should work.

Chris

PS: you can also use the ApplicationGlobals in your AppModule to use it in
other services (e.g. for things you want to do during startup).



-- 
View this message in context: 
http://www.nabble.com/T5%3A-retrieve-user-defined-parameter-at-start-of-Tapestry-tf4565342.html#a13042750
Sent from the Tapestry - User mailing list archive at Nabble.com.


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