Re: Question about caching of assets ...

2012-02-27 Thread Steve Eynon
Hi, I'm sure if you're asking about what T5 serves up, or how the client interprets what it is served? Ultimately you have no control over what the client does - if the client wants to make a request, it'll make a request. At best all the server can do is 'suggest' and 'hint' to the client that i

Re: using DTD XHTML Basic 1.1 for mobile app

2012-02-27 Thread Lenny Primak
Sorry, there is no clear cut answer to this question, you will have to do your own research :) On Feb 27, 2012, at 9:19 PM, Paul Stanton wrote: > I don't know for sure Lenny, there seem to be a few different schools of > thought for mobile web apps. > > Can you direct me to a clear and concise

Re: using DTD XHTML Basic 1.1 for mobile app

2012-02-27 Thread Paul Stanton
I don't know for sure Lenny, there seem to be a few different schools of thought for mobile web apps. Can you direct me to a clear and concise argument/document? thanks, Paul. On 28/02/2012 1:14 PM, Lenny Primak wrote: Are you sure you don't just want to stick with HTML5? It's easy and 'free'

Re: using DTD XHTML Basic 1.1 for mobile app

2012-02-27 Thread Lenny Primak
Are you sure you don't just want to stick with HTML5? It's easy and 'free' On Feb 27, 2012, at 9:12 PM, Paul Stanton wrote: > Thanks, I'll give that a go. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For addi

Re: using DTD XHTML Basic 1.1 for mobile app

2012-02-27 Thread Paul Stanton
Thanks, I'll give that a go. On 28/02/2012 11:48 AM, Howard Lewis Ship wrote: If you look in the Tapestry source, you can see that Tapestry keeps local copies of the DTDs and provides a hook to redirect the SAXParser to use the local copy rather than go out on the Internet. Look around Tapestry

Re: t:type="grid" total records?

2012-02-27 Thread Chris Mylonas
Looking at the api docs Grid.getDataSource.getAvailableRows() returns an int https://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/corelib/components/Grid.html https://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/grid/GridDataSource.html Try that perhaps? On 28/02/

t:type="grid" total records?

2012-02-27 Thread TG
Hi, Is there any easy way to get the count of the total rows of the grid component? Thanks! -- View this message in context: http://tapestry.1045711.n5.nabble.com/t-type-grid-total-records-tp5520539p5520539.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Using Hibernate in DAOs

2012-02-27 Thread Thiago H. de Paula Figueiredo
On Mon, 27 Feb 2012 20:55:28 -0300, Ferran Maylinch wrote: Hello, Hi! We are currently using both approaches but we don't know exactly when to use each one. When should we inject a HibernateSessionSource into the DAO and create Sessions with source.create() and when should we directly inj

Re: Using Hibernate in DAOs

2012-02-27 Thread Kalle Korhonen
On Mon, Feb 27, 2012 at 3:55 PM, Ferran Maylinch wrote: > This is surely a newbie question. > Before posting here I tried (with no luck) to find information about how to > use Session and/or HibernateSessionSource in my DAO's. > We are currently using both approaches but we don't know exactly when

Re: using DTD XHTML Basic 1.1 for mobile app

2012-02-27 Thread Howard Lewis Ship
If you look in the Tapestry source, you can see that Tapestry keeps local copies of the DTDs and provides a hook to redirect the SAXParser to use the local copy rather than go out on the Internet. Look around TapestryModule to see how its done. On Mon, Feb 27, 2012 at 12:14 PM, Paul Stanton wrot

Re: Using Hibernate in DAOs

2012-02-27 Thread Howard Lewis Ship
Just inject the Session object; it's a proxy to the real per-thread Session object. It's safe to share across instances and across threads. There's no reason to use the HibernateSessionSource or HibernateSessionManager directly. On Mon, Feb 27, 2012 at 3:55 PM, Ferran Maylinch wrote: > Hello, >

Re: Reusing tapestry hibernate session in a thread

2012-02-27 Thread Paul Stanton
Ok, I didn't know that one, thanks. But what about injecting the Dao (service) outside of the thread and using it inside and outside of the thread? Surely the same dao object will be used in both cases, and therefore the same session (since it is injected per thread the first time, not the sec

Re: [ANNOUNCEMENT] Tapestry-security 0.4.1 released!

2012-02-27 Thread AndrejKr
Hi all TX a lot, all combined this works perfect. Hope I can someday return the favor. b.r., Andrej Krušnik -- View this message in context: http://tapestry.1045711.n5.nabble.com/ANNOUNCEMENT-Tapestry-security-0-4-1-released-tp5432299p5519958.html Sent from the Tapestry - User mailing list ar

using DTD XHTML Basic 1.1 for mobile app

2012-02-27 Thread Paul Stanton
Hi all, I recently started writing an app specifically for mobile devices. The first hurdle came quite early on. One recommendation is that you use XHTML BASIC doctype: "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd";> However, I've found that when I put this in my tml, the SaxParser in

Re: Is it possible to use Zone with Radio Group to trigger an onValueChangedFrom?

2012-02-27 Thread Muhammad Gelbana
Why don't list your code and we can see if we can figure out what's wrong with it :) On Mon, Feb 27, 2012 at 1:58 AM, George Ludwig wrote: > I spent a couple of hours on this today, and learned that my understanding > of Tapestry is not yet deep enough for me to make this work. > > Has anyone els

Re: Reusing tapestry hibernate session in a thread

2012-02-27 Thread Howard Lewis Ship
Using PerthreadManager.run() is more convenient. i.e. new Thread("MyThread") { public void run() { ptm.run(new Runnable() { public void run() { List stuff = dao.getSomething(); doSomethingWithIt(stuff); } }); }; If I was do

Re: Using coposite key with value encoder.

2012-02-27 Thread George Christman
Thanks for informing me of that. I was completely unaware of this behavior and was able to clean up some code. I do believe I'm still going to need to the value encoder for my custom component, so would my code sample below work? -- View this message in context: http://tapestry.1045711.n5.nabble

Re: Using coposite key with value encoder.

2012-02-27 Thread Lenny Primak
I use JPA, not Hibernate, but I always assumed that Hibernate support is equivalent, but I don't know that for sure. On Feb 27, 2012, at 12:43 PM, Robert Zeigler wrote: > Last time I checked (it's been awhile, I admit :), tapestry-hibernate didn't > support composite keys for auto-valueencoder-

Re: Using coposite key with value encoder.

2012-02-27 Thread Robert Zeigler
Last time I checked (it's been awhile, I admit :), tapestry-hibernate didn't support composite keys for auto-valueencoder-generation. Sounds like tapestry-jpa's support is a bit better in that regard. I haven't looked at tapestry-hibernate in 5.3, though; maybe composite key support was added?

Re: [T5.3] Contributing a Service Override using addInstance()

2012-02-27 Thread Howard Lewis Ship
FYI: http://tapestryjava.blogspot.com/2012/02/plastic-advanced-example.html On Mon, Feb 27, 2012 at 8:45 AM, Howard Lewis Ship wrote: > On Fri, Feb 24, 2012 at 9:14 AM, Blower, Andy > wrote: >> Sorry, premature celebration. :-( >> >> It works until the proxy is serialized, which throws a >> No

Re: Using coposite key with value encoder.

2012-02-27 Thread Lenny Primak
AjaxFormLoop or any other component can be used with Entity beans without any kind of custom Value Encoder, as long as they are provided by Tapestry-JPA or Hibernate equivalent. On Feb 27, 2012, at 12:32 PM, George Christman wrote: > Oh wow and you don't need to use them for components such as

Re: Using coposite key with value encoder.

2012-02-27 Thread George Christman
Oh wow and you don't need to use them for components such as an AjaxFormLoop? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Using-coposite-key-with-value-encoder-tp5519520p5519634.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Using coposite key with value encoder.

2012-02-27 Thread Lenny Primak
I don't have any value encoders at all for my entities. Tapestry-JPA handles it all. On Feb 27, 2012, at 12:17 PM, George Christman wrote: > I set up my entity to use an @EmbeddedId. The @EmbeddedId annotation maps a > PK class to table PK. See code below, would I just return time.getTimePk

Re: Using coposite key with value encoder.

2012-02-27 Thread George Christman
I set up my entity to use an @EmbeddedId. The @EmbeddedId annotation maps a PK class to table PK. See code below, would I just return time.getTimePk(); in toClient and let the value encoder handle it automatically? Thanks, George @Embeddable public class TimePK implements Serializable { prote

Re: Using coposite key with value encoder.

2012-02-27 Thread Lenny Primak
I use tapestry-JPA and composite keys work for me automatically. It should work with hibernate the same way I believe. . On Feb 27, 2012, at 11:57 AM, George Christman wrote: > Hello, I'm using hibernate annotations and I also have a db table that > utilizes composite keys. I'm wondering if

RE: tml parameter rendered into a JavaScript string

2012-02-27 Thread Guerin Laurent
Hi Lance, We prefer keep the model like this as a matter of separation of concerns, and let the user fill the model with his own server side logic. BTW, that didn't mean it's not possible to get a list of markers from a database. You can loop over a list of markers and fetch the marker infos fr

Using coposite key with value encoder.

2012-02-27 Thread George Christman
Hello, I'm using hibernate annotations and I also have a db table that utilizes composite keys. I'm wondering if there is a best practice to get it to work with a value encoder? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Using-coposite-key-with-value-encoder-tp5519520

Re: [T5.3] Contributing a Service Override using addInstance()

2012-02-27 Thread Howard Lewis Ship
On Fri, Feb 24, 2012 at 9:14 AM, Blower, Andy wrote: > Sorry, premature celebration. :-( > > It works until the proxy is serialized, which throws a > NotSerializableException. In normal binding / override the proxy is a > JustInTimeObjectCreator and using this proxy it seems to be a > Reloadabl

Re: How does MultiZoneUpdateEventResultProcessor get a html string from a RenderCommand

2012-02-27 Thread Howard Lewis Ship
The code is simpler in 5.4, using the AjaxResponseRenderer, but it's basically the same thing: - Contribute a filter into the active thread's PartialMarkupRenderer pipeline - The filter creates an empty element for the renderable object - The renderable object renders markup inside the element - Th

Re: [ANNOUNCEMENT] Tapestry-security 0.4.1 released!

2012-02-27 Thread Lenny Primak
try this: public static void contributeSecurityConfiguration(Configuration configuration, SecurityFilterChainFactory factory, WebSecurityManager securityManager, PageService pageService) { ... } PageService should be automatically injected by tapestry-ioc via constructor injection. On F

Question about caching of assets ...

2012-02-27 Thread Gunnar Eketrapp
Hi! Recently I made a fix so that my uploaded images (stored in db) are cached. I did this by returning status 304 (HTTP status not modified) as I found out that T5 handles asset requests in that way. But this means that the client has to perform a request for each asset/image. I thought that t

Re: How does MultiZoneUpdateEventResultProcessor get a html string from a RenderCommand

2012-02-27 Thread Thiago H. de Paula Figueiredo
Hi! Have you checked its source? Here's the 5.1.0.5 one (which is the version used in the project I'm working now): public class MultiZoneUpdateEventResultProcessor implements ComponentEventResultProcessor { private final PageRenderQueue queue; private final TypeCoercer typeCoerc

Re: [ANNOUNCEMENT] Tapestry-security 0.4.1 released!

2012-02-27 Thread AndrejKr
Hi, ok, I can create constructor: ArtisolHostFilter(PageService pageService, String... blockedIPs) but in AppModule it wants to have just String if i use call like: public static void contributeSecurityConfiguration(Configuration configuration, SecurityFilterChainFactory factory, WebSecurityMana

How does MultiZoneUpdateEventResultProcessor get a html string from a RenderCommand

2012-02-27 Thread Lance Java
I thought I'd start another thread since my last thread got off topic without answering my initial question. I would like to write a component that takes a RenderCommand parameter (or a Block parameter) and uses tapestry's template engine to get a html string on the serverside. I do not want the h

Re: Reusing tapestry hibernate session in a thread

2012-02-27 Thread Greg Pagendam-Turner
Thanks for your thoughts Paul Regards, Greg On 27/02/2012, at 4:37 PM, Paul Stanton wrote: > Hi Greg, > > The following seems to work, although I'm not entirely sure if it should !! > > If the tapestry IOC geniuses agree, it is quite elegant and you can @Inject > Session within your DaoIm

Re: tml parameter rendered into a JavaScript string

2012-02-27 Thread Lance Java
Hi Laurent, I think the normal use case for using a google map would be to get a list of markers from a database search or from a lucene search result. Using your current implementation this would mean storing html in the database which I'd like to avoid. I would like to follow a similar pattern