Referencing the context path in AppModule

2009-07-06 Thread Peter Stavrinides
Hi all, I am trying to referencing a properties file in my AppModule... currently I am doing this based on the wiki example: public ContextSymbolProvider buildFileSystemPropertiesSymbolProvider() { return new ContextSymbolProvider( "src/main/webapp/WEB-INF/context

Re: Securing (SSL) entire application

2009-07-06 Thread Joachim Van der Auwera
If you are using 5.1 then you should contribute using the application defaults : public static void contributeApplicationDefaults( MappedConfiguration configuration ) { configuration.add( MetaDataConstants.SECURE_PAGE, "true" ); } If your entire application is using https then

RE: Need help with tricky T5 URL / onPassivate problem

2009-07-06 Thread Blower, Andy
That is an option that we considered, although the requirement is that they'll always work so we'd be storing a lot of information that will never get used. I take it that there's no way of doing what I want in onPassivate at the moment then? Looking at Tapestry code I couldn't see anything, but

Accessing the tapesty registry from a service

2009-07-06 Thread Alfie Kirkpatrick
Hi, is there a way to do this? I am building a service for jBPM in my module and it needs to lookup services in the registry. I could do this by hacking TapestryFilter and putting the registry in a singleton but am wondering if there is a neater way. I could also explicitly pass services into my jB

Re: Referencing the context path in AppModule

2009-07-06 Thread nille hammer
Hi Peter, I presume that the error occurs, because in developent environment the file is accessible as file whilst in production it is packed into a jar. There are some other implementations for interface SymbolProvider, look here: http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapes

Re: Referencing the context path in AppModule

2009-07-06 Thread P . Stavrinides
Hi Nille, Thanks for your reply! > I presume that the error occurs, because in development environment the file > is accessible as file whilst in production it is packed into a jar. kind of, its packaged as a war, and then deployed... so the file's destination is: "/AppName/WEB-INF/context.prop

Re: Accessing the tapesty registry from a service

2009-07-06 Thread Felix Gonschorek
Hi Alfie, there is the Service "ObjectLocator". the Registry extends this Service. It has all the functionality you need (getService, autobuild...) As far as i see, you can't directly inject this service in pages, but i use it in a "contribute" method in my modules (i use that to inject servi

Inheriting from Component Classes

2009-07-06 Thread Jonathan O'Connor
Hi, I'm pretty sure what the answer is, but can someone confirm that it is not possible to use java inheritance to extend a component class? What I'm trying to do is add a CSV Download button to a Grid, preferably aligned to the right of the table. I can override the .tml files of the existin

Getting/Iterating through the information from the Grid

2009-07-06 Thread cajmrn
Hi Guys, Im relatively new to Tapestry and I've tasked with assessing the viability of Tapestry as the primary framework for our project solution. First let me quickly describe the project, I will present the user with a grid of content, at the end of each row will be a check box. when the user

Re: Inheriting from Component Classes

2009-07-06 Thread Thiago H. de Paula Figueiredo
n Mon, Jul 6, 2009 at 10:20 AM, Jonathan O'Connor wrote: > Hi, Hi! > I'm pretty sure what the answer is, but can someone confirm that it is not > possible to use java inheritance to extend a component class? Yes, it is. > What I'm trying to do is add a CSV Download button to a Grid, preferably

Re: Inheriting from Component Classes

2009-07-06 Thread Jonathan O'Connor
Thiago, I was just about to write my solution up in the Wiki, but I'm having problems getting my password to work :-( Anyway, yes, you're quite right, you can extend component classes. My main job was to supply a GridEx.tml where I added my special link: xmlns:t="http://tapestry.apache.org/sc

Re: Inheriting from Component Classes

2009-07-06 Thread Thiago H. de Paula Figueiredo
On Mon, Jul 6, 2009 at 12:05 PM, Jonathan O'Connor wrote: > Thiago, Hi! > Thanks for the ideas, but in this case, I think it was easier to just > provide a tml file. You're welcome! And thanks for giving me the idea of creating a CSV/HTML/whatever export mixin for Grids. :) -- Thiago

Mixin to grid component - adding columns

2009-07-06 Thread Alfie Kirkpatrick
Hi, I'd like to write a mixin to the grid component which adds a column which is under the control of the mixin. In my case it's a checkbox column where the selected state is held by the mixin. Not sure if this is ultimately going to work (well) but am seeing how far I can take it... So the TML

Re: Mixin to grid component - adding columns

2009-07-06 Thread Thiago H. de Paula Figueiredo
Em Mon, 06 Jul 2009 13:36:16 -0300, Alfie Kirkpatrick escreveu: I tried simply adding a new field using grid.getDataModel().add("mynewcolumn") but, not surprisingly, it fails saying that this is not a property of the source bean! Try add("mynewcolumn", null). If you don't pass the second pa

Re: Mixin to grid component - adding columns

2009-07-06 Thread Robert Zeigler
This is an interesting idea, although I'm not sure if it will work (see point #2) 1) you want to use: grid.getDataModel().add("mynewcolumn",null); which will inform the data model that you're adding a column that doesn't correspond (directly) to a property. Alternatively, you can provide a

Re: Mixin to grid component - adding columns

2009-07-06 Thread Robert Zeigler
Actually, Thiago, he's right about grid. special rendering here "somecolumnname" is really just an informal parameter, albeit one that grid will explicitly search for (actually, it's not grid that does the searching, directly, it's one of the components contained by grid, ultima

Tapestry5 and Applets

2009-07-06 Thread Walter Botscher
Hi, I looked for some existing threads, but couldn't find any information on that issue. Applets I would I like to use in some parts of the application with heavy use of graphics. For the rest I would prefer to use tapestry, which is new to me. I tested a small example with JSF, no problem.

Re: Tapestry5 and Applets

2009-07-06 Thread Thiago H. de Paula Figueiredo
Em Mon, 06 Jul 2009 14:31:48 -0300, Walter Botscher escreveu: Hi, Hi! Tapestry, by default, compresses almost all files before sending them to the clieng. Maybe that's what causing your problem. To deactivate it, add configuration.add(SymbolConstants.GZIP_COMPRESSION_ENABLED, "false");

T5 Hidden

2009-07-06 Thread Norman Franke
I'm trying to use a Hidden component to allow my web page to automatically submit a login page if a browser-injected JavaScript object exists. (Allowing my web app to auto-login if run in my embedded web browser.) I've created the field thusly: However, it doesn't really work. Th

Re: Mixin to grid component - adding columns

2009-07-06 Thread Thiago H. de Paula Figueiredo
Em Mon, 06 Jul 2009 14:23:41 -0300, Robert Zeigler escreveu: Actually, Thiago, he's right about grid. special rendering here "somecolumnname" is really just an informal parameter, I'm sorry, Robert, but I think it isn't an *informal* parameter as it's defined by the docume

Re: T5 Hidden

2009-07-06 Thread Thiago H. de Paula Figueiredo
Em Mon, 06 Jul 2009 15:02:20 -0300, Norman Franke escreveu: Just add an id attribute to it. :) -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago --

Re: T5 Hidden

2009-07-06 Thread Robert Zeigler
id isn't rendered because nowhere in the server-side code is "getClientId" called. Check out: https://issues.apache.org/jira/browse/TAP5-680 Which describes this. There's a new mixin in the 5.2-SNAPSHOT branch (RenderClientId) that ensures the client id is rendered for a form element. It'

Re: Mixin to grid component - adding columns

2009-07-06 Thread Robert Zeigler
Just because grid is using the parameters in a different way doesn't make them any less informal. Nor does the fact that this particular use of an informal parameter is documented make them any less informal. :) From: http://tapestry.apache.org/tapestry5.1/cookbook/informals.html "Inform

Re: T5 Hidden

2009-07-06 Thread Norman Franke
I tried that first, but T5 seems to strip it out as well. It does put in a name="loginId", but that's not really useful. Norman Franke Answering Service for Directors, Inc. www.myasd.com On Jul 6, 2009, at 2:06 PM, Thiago H. de Paula Figueiredo wrote: Em Mon, 06 Jul 2009 15:02:20 -0300, Nor

Re: Mixin to grid component - adding columns

2009-07-06 Thread Thiago H. de Paula Figueiredo
You're right, Robert. Maybe there should be a distinction between -style informal parameters and the HTML attribute ones, so we don't have the confusion we had here. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago --

RE: Mixin to grid component - adding columns

2009-07-06 Thread Alfie Kirkpatrick
Thanks Robert that all makes sense to me. Had a funny feeling I was going to run up against TAP5-103 again on this one ;-) Regards, Alfie. -Original Message- From: Robert Zeigler [mailto:robe...@scazdl.org] Sent: Mon 06/07/2009 18:18 To: Tapestry users Subject: Re: Mixin to grid componen

Re: T5 Hidden

2009-07-06 Thread Norman Franke
That seems to be the problem, thanks! Still, that sounds like a bug. If I explicitly put in a "id='foo'" then it should be rendered regardless. Given the "fix version", will this be fixed in 5.2? Better to do so without a mixin, as this is not both non-obvious and breaks the "sane defaults"

Re: T5 Hidden

2009-07-06 Thread Norman Franke
Alas, one can't add a mixin to a t:hidden field. It claims that my hidden field is not assignable to ClientElement. Norman Franke Answering Service for Directors, Inc. www.myasd.com On Jul 6, 2009, at 2:16 PM, Robert Zeigler wrote: id isn't rendered because nowhere in the server-side code i

Re: T5 Hidden

2009-07-06 Thread Robert Zeigler
Hah! Nice... didn't realize that... let me look into this one. Robert On Jul 6, 2009, at 7/62:03 PM , Norman Franke wrote: Alas, one can't add a mixin to a t:hidden field. It claims that my hidden field is not assignable to ClientElement. Norman Franke Answering Service for Directors, Inc.

Re: T5 Hidden

2009-07-06 Thread Robert Zeigler
Awesome. Not only does hidden not support ClientElement, it also doesn't support informal parameters (thus explaining why id didn't pass through!). Please add a ticket to improve the Hidden component in those ways. As far as the "bug", the behavior of only rendering the client id if getCl

Re: T5 Hidden

2009-07-06 Thread Norman Franke
Glad I'm not going crazy! https://issues.apache.org/jira/browse/TAP5-764 I've come up with a hack to get the element by name using document.getElementsByName(). Norman Franke Answering Service for Directors, Inc. www.myasd.com On Jul 6, 2009, at 4:18 PM, Robert Zeigler wrote: Awesome. N

RE: [Tapestry 4.1] UTFDataFormatException in RequestCycle.encodeIdState

2009-07-06 Thread Aaron Kaminsky
Hi Howard, Thanks for the suggestion. In our case we may have been able to get by with the workaround you suggested, but it turned out to be much simpler for us to replace the calls to objectOutputStream.writeUTF() with calls to objectOutputStream.writeUnshared(). In case anyone else runs int

Re: Getting/Iterating through the information from the Grid

2009-07-06 Thread Julian Wood
Remember that bindings are just getters and setters. So take off the @Property annotation on your binding for your checkbox and replace with corresponding getter/setter. Now in getter/setter you can store/ query a map, usually of . ie your entity id and selected state. HTH, J On 6-Jul-09

Re: Getting/Iterating through the information from the Grid

2009-07-06 Thread cajmrn
Hi J, I believe I understand what you are saying. I did use setters and getters for my boolean state and I did see how changing the state from true to false changed what was initially displayed in the grid. I will try to implement your suggestion tonight. If only there was more detailed inform