Re: TextStreamResponse and XML and UTF-8

2007-11-13 Thread Nick Westgate
> The problem is the that I can't make TextStreamResponse to show UTF-8 (greek > in my case) characters. > Dont know if it's related with this post: > > http://www.nabble.com/T5-confused-about-Services-and-XmlHttpResponse-tf4160459.html#a11839004 Yes, my previous post pointed out a solution. Her

table active image tag changing of <

2007-11-13 Thread cometta
i have a column like below, but when render on page, the is changed to how to prevent changing of < to < because i want to display the image private class ActiveColumnEvaluator implements ITableColumnEvaluator { public Object getColumnValue(ITableColu

Re: TextStreamResponse and XML and UTF-8

2007-11-13 Thread Ezra Epstein
This is another way to do it. Look at the code for TextStreamResponse. Write your own StreamResponse impl that's backed by a ByteArrayInputStream. (The reason I avoid that approach is (a) you create an InputStream to write a response, so under the covers Tap5 is reading from it and writing to

Re: TextStreamResponse and XML and UTF-8

2007-11-13 Thread Fernando Padilla
Essentially, you gave it a string (UTF16 in memory), and it is being converted into bytes ( string.getBytes() within TextStreamResponse ). And the contentType of the response is set also from TextStreamResponse. I would double check what the string.getBytes() is returning, maybe it's actually putt

Re: TextStreamResponse and XML and UTF-8

2007-11-13 Thread thanos
I used boolean beforeRenderTemplate(){ return false; } but couldn't skip rendering check I will currently return xml using a template with the help of Fernando's patch - TAPESTRY-1600. This patch allows the generation of xml, from an xml-based description by fixing the "cutting" of

Re: T5: How to access user-defined component's properties

2007-11-13 Thread ronaldlee
I just changed back to use my custom data struct and now seems to be working, don't see those coercion exception anymore.. I believe it is caused by me passing a Persist("flash") variable to the component's @Parameter. Now I am returning a deep copy of that and is working now. Sorry for the false

Re: TextStreamResponse and XML and UTF-8

2007-11-13 Thread Ezra Epstein
You can override one of the page render methods (I think onactivate is one of those, but check the Tap5 website) and return false to tell Tap to skip the other steps of page rendering. thanos <[EMAIL PROTECTED]> wrote: thank you. I tried that but I get a mix of xml and html erro String (i

Re: T5: entities in literal:

2007-11-13 Thread Howard Lewis Ship
Well, we are going for XHTML compliance with Tapestry, so the characters need to be escaped. I supposed we could bypass that (we already generate SGML style HTML rather than well formed XML, based on the output doctype). On Nov 13, 2007 8:21 AM, Chris Lewis <[EMAIL PROTECTED]> wrote: > I've inves

Re: TextStreamResponse and XML and UTF-8

2007-11-13 Thread thanos
thank you. I tried that but I get a mix of xml and html erro String (insteαd of clean xml document) as a response. Seems that it looks for a template (I dont have one cause I didnt need it with textStreamResponse) Inside onActivate I obtain a PrintWriter from the injected Response, using "applic

Re: Multiple Tapestry Applications

2007-11-13 Thread Howard Lewis Ship
This feature is available for Tapestry 4, but it creates extra ambiguities about where each file belongs. You end up with extra folders in the web context root and under WEB-INF, named after each application (derived from the application servlet name). So if you have app "user" and app "admin" yo

Re: TextStreamResponse and XML and UTF-8

2007-11-13 Thread Ezra Epstein
If you're just returning an RSS feed you probably don't want any page wrapping, etc. In that case you can: @Inject private Response _response; You can then do things like setting headers and even write directly to the container-provided OutputStream - bypassing the whole TextStreamResponse --

Re: T5: How to access user-defined component's properties

2007-11-13 Thread Josh Canfield
No, that doesn't sound right. I pass other objects using @Parameter and have not had this problem. There shouldn't be a coercion when you are passing the parameter so my guess is that there is something else going on. Ronald, can you give us a small code example that shows the problem? Josh On Nov

Re: Antwort: [T5] Dynamic Layouts]

2007-11-13 Thread Robert Zeigler
Doing it exactly as you want won't work (as pointed out by Kris), but you can accomplish the same thing using the delegate component. I would recommend something like: create a single layout component that hides the complexity from the rest of the app. That layout component takes a parameter

[T5] Default order by for Grid

2007-11-13 Thread Christoph Jaeger
Hi, is there an easy way of setting the default order by column for the Grid component? Christoph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: T5: Grid component, reorder and empty source

2007-11-13 Thread adamh
I'm seeing the same behaviour, if my source is empty and I use the 'remove' parameter I get the same exception: 'grid: xxx -- no source to determine list type from' Results.tml Removing the 'remove' param the page renders with the 'nothing to display' message. -- View this message in context

Re: [T5] BeanEditForm validations

2007-11-13 Thread Hugo Palma
You can do your validations in the onSuccess method in your page class like what is described here http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html All you do is access the edited object instance and use the BeanEditForm object to register the errors. Hope this helps.

Re: T5: How to access user-defined component's properties

2007-11-13 Thread Chris Lewis
That doesn't sound right. I haven't done this before, but surely you don't have to do it like that. Can anyone chime in on this? ronaldlee wrote: I found out the issue. The getter function has to return "Object" instead of my custom data type to work, in order words, @Parameter can only handle

Re: Multiple Tapestry Applications

2007-11-13 Thread Jesse Kuhnert
I think it's possible yes. Can't say as I know what runtime issues you may have but do think I've seen it done. On Nov 13, 2007 7:23 AM, Pablo Ruggia <[EMAIL PROTECTED]> wrote: > Sorry, may have not been clear enough. > I need to have a single WAR with to Tapestry servlets configured inside, > e

Re: T5: How to access user-defined component's properties

2007-11-13 Thread ronaldlee
I found out the issue. The getter function has to return "Object" instead of my custom data type to work, in order words, @Parameter can only handle "Object", after that I can cast it back to my data type.. Ronald ronaldlee wrote: > > But when I tried to pass my own data structure, it throws

TextStreamResponse and XML and UTF-8

2007-11-13 Thread thanos
Hi all, I am trying to return an rss feed using TextStreamResponse("text/xml", myfeed); The problem is the that I can't make TextStreamResponse to show UTF-8 (greek in my case) characters. I tried to set the content type in the response of RequestGlobals and also added a Utf8Filter with no luck

Re: [T5] BeanEditForm validations

2007-11-13 Thread Kevin Menard
Hello Francois, On 11/12/07 3:28 AM, in article [EMAIL PROTECTED], "Francois Armand" <[EMAIL PROTECTED]> wrote: > I see at least two other way, one simple and one other a little more > complicate. > > The first one is to use the "validate" parameter in a property editor > override in the BeanEdi

Re: T5.0.6 - GirdModelProvider for GridRows - example?

2007-11-13 Thread Ezra Epstein
Maybe you could show more of your .tml (and .java) file(s). I'm new to Tap5 and all I've discovered so far in the realm of models is how to supply a one to a BeanEditor and to a Grid. I've never gone to the level of t:gridcell and from what I've learned one generally does not need to -- you ca

Re: getting remote IP address

2007-11-13 Thread Norman Franke
Ah, I'm in T4. It does work there. -Norman On Nov 12, 2007, at 6:17 AM, mnguyen21 wrote: That didn't seem to work for me. Is what you are using for T4 or T5? I'm trying to do this in T5. mnguyen21 wrote: Thanks! I'll try that! --Michael -Original Message- From: Norman Fra

Re: T5.0.6 - GirdModelProvider for GridRows - example?

2007-11-13 Thread CarstenM
Hi, ok, I tried this but I get a NullPointerException (line 4 of .tml). 1http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> 2 3 4 5 6 7 # org.apache.tapestry.corelib.base.AbstractPropertyOutput.readPropertyForObject(AbstractPropertyOutput.java:134) # org.apache.tapestry.corelib.base.Abstra

Re: example for windows

2007-11-13 Thread Francois Armand
Kristian Marinkovic wrote: i'd recommend you to take a serious look at Tapestry 5. it's much simpler and more efficient to work with. There is also a good tutrial on how to start a new Tapestry 5 project. Kris is completly right, I whould have validate this point :/ So, the quickstart for T

Re: T5: entities in literal:

2007-11-13 Thread Chris Lewis
I've investigated this issue and realized that the problem isn't receiving the unfiltered character, but writing it to the client. Here's the situation: my component receives a string parameter that is simply passed to a javascript object. This parameter is a css selector rule as supported by t

Re: example for windows

2007-11-13 Thread Kristian Marinkovic
this example is based on Tapestry 4.0! you should at least use Tapestry 4.1.3 if you start a new project. i'd recommend you to take a serious look at Tapestry 5. it's much simpler and more efficient to work with. There is also a good tutrial on how to start a new Tapestry 5 project. g, kris

Re: example for windows

2007-11-13 Thread Francois Armand
GUERARD Elisabeth wrote: Dear all, I want to begin to use Tapestry, I look at example for quick start, unlucky by looking for example to download it's only unix version at the address: http://howardlewisship.com/downloads/quick-start/ File with tar.gz extenssion. Is there another locati

T5: datefield with custom configure howTO

2007-11-13 Thread Britske
I subclassed the DateField-component to MyDateField with the purpose to overwrite the configure-method, since I need a custom method to go off when I select a date in the calendar. I did the following in MyDateField: (where onSelect1 is a function defined in my page). protected void configure

Re: T5.0.6 - GirdModelProvider for GridRows - example?

2007-11-13 Thread Ezra Epstein
It's a two step process. 1. Define a model in your Java class. It's easy to just use the standard definition and extend it like so: @Inject private BeanModelSource _beanModelSource; @Inject private ComponentResources _resources; @Retain private BeanModel _model;

Interesting Behaviour of Boolean Paramter in tapestry 4

2007-11-13 Thread Robert Binna
Hi We are using tapestry 4.1.3. We have a component that displays a select box where you are able to select, true, false and null. So the obvious choice for a value parameter would be Boolean. Therefor in our component we have a parameter called value defined like in the example below. @Pa

Re: T5: thoughts on components using javascript

2007-11-13 Thread Chris Lewis
After reading a bit on Selenium, it seems that it can in fact test JS for errors - how cool :-). Chris Lewis wrote: Hello all. I'm working on a component that makes a 'slide show.' It doesn't accept input as its only every used do display images. I'm writing it so that users can have total con

Re: Multiple Tapestry Applications

2007-11-13 Thread Pablo Ruggia
Sorry, may have not been clear enough. I need to have a single WAR with to Tapestry servlets configured inside, each one with it's own .application. Thanks ! On Nov 12, 2007 8:10 PM, Omar Valerio <[EMAIL PROTECTED]> wrote: > Well, not in a single WAR. What you need is to built an *EAR* (Enterpris

Re: T5.0.6 - GirdModelProvider for GridRows - example?

2007-11-13 Thread CarstenM
Hi again, no example for this or what's wrong? Cheers Carsten CarstenM wrote: > > Hello, > > still trying to use the GridRows component. > Can someone give an example for a GridModelProvider or the GridRows > component? > Well, the Grid is an implementation of GridModelProvider but I would

RE: T5: onchange event from a select

2007-11-13 Thread CarstenM
Hello, well, I dont know if its a nice solution but I realized it with several forms. Then you can handle the form event and update your second select box. Cheers, Carsten martin boulanger wrote: > > Hello, > I have the same need, but I don't know how to make it. > Does any one has an idea

Re: T5: testing software?

2007-11-13 Thread adasal
Interesting, thanks. I may have time to look into these issue more closely in near future. I'm interested in the transition to black box from unit testing. Are there automated systems that could be used/developed that would update black box tests as code iterations progress. Here I am talking about

RE: T5: onchange event from a select

2007-11-13 Thread martin boulanger
Hello, I have the same need, but I don't know how to make it. Does any one has an idea? Thanks, Martin Leon Derks wrote: > > > I want to be able to update a second select, based on the value in the > first select box. > > So I want to process it on the server-side, or with AJAX. > > Is ther

Re: T5: CreatePageLink and list of context

2007-11-13 Thread Nick Westgate
Probably better to look at the createPageLink parameters: http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/ComponentResourcesCommon.html #createPageLink(java.lang.String,%20boolean,%20java.lang.Object...) Try passing p.toArray(). Cheers, Nick. Ezra Epstein wrote: Take a look a

Re: T5: CreatePageLink and list of context

2007-11-13 Thread Ezra Epstein
Take a look at the pageLink component and its "context" parameter along with activate/passivate methods on the target page. Angelo Chen <[EMAIL PROTECTED]> wrote: Hi, I'd like to pass something like this to a page: /Inbox/123 List p = new ArrayList(); p.add("Inbox"); p.add("272"); Str

T5: CreatePageLink and list of context

2007-11-13 Thread Angelo Chen
Hi, I'd like to pass something like this to a page: /Inbox/123 List p = new ArrayList(); p.add("Inbox"); p.add("272"); String lnk = _resources.createPageLink("mypage", true, p).toURI(); this does not work, it has something like this: /mypage/login/%5BInbox%2C+272%5D what's the corre

Antwort: [T5] Dynamic Layouts]

2007-11-13 Thread Kristian Marinkovic
hi harald, want you ask for is not doable in Tapestry... for good reason :) (please search the mailing list for static structure dynamic behvior) part of what you want can be achieved with a Delegate component. you'd have to declare you layout specific components in your Layout component within