Re: confused using tapestry page to return json data

2012-08-29 Thread jqzone
Yes ,I do think pages / components don't need a template,I'm using tapestry 5.3.4 On Wed, Aug 29, 2012 at 4:49 PM, Lance Java wrote: > Pages / components don't need a template. If your page always returns a > StreamResponse from onActivate() then it should not have a template. > > I'm not sure

Re: custom head component

2012-08-29 Thread Thiago H de Paula Figueiredo
On Wed, 29 Aug 2012 22:15:10 -0300, Ken in Nashua wrote: Hi Folks, Hi, Ken! It's been years since we've heard from you in this mailing list. Welcome back! :) In T4 I use to operate a custom head component. And I instrumented the stylesheet and injected special style sheet stuff that I

Re: [t5.3.4] Plugin blocks

2012-08-29 Thread Bob Harner
Unfortunately, there is a bit of ambiguity in the term "component" as used by Tapestry. It can actually mean 2 different things, depending on whether you're talking in a specific or general way: 1) Specific: objects defined by the classes in in your {package-name}/components folders 2) General: o

Re: [t5.3.4] Plugin blocks

2012-08-29 Thread Thiago H de Paula Figueiredo
On Wed, 29 Aug 2012 17:28:06 -0300, Muhammad Gelbana wrote: Yes that's true. Is including pages in a component library not common ? Including pages in a component library is common. And don't forget that in Tapestry pages and components are 95% the same. A page is a component with URL a

Re: Passing form component into service

2012-08-29 Thread Lance Java
No, this is not allowed and is generally considered bad practice. You will need to pass a class (or interface) that is not in the components/pages/mixins/base packages. There are two main options: 1. Copy the data into a domain object and pass the domain object 2. Have your component implement an

Re: [t5.3.4] Plugin blocks

2012-08-29 Thread Muhammad Gelbana
Yes that's true. Is including pages in a component library not common ? Calling it a "component library" makes it sound like it's only for components. Was modules supported mainly as component libraries ? On Wed, Aug 29, 2012 at 9:57 PM, Lance Java wrote: > If you are writing a component library

Passing form component into service

2012-08-29 Thread George Christman
Hello, I'm wondering if someone could tell me if it's possible to pass the form component into my validation service to record form errors. I'm getting the following exception. java.lang.LinkageError loader constraint violation: when resolving interface method "org.company.eprs.services.PurchaseR

Re: [t5.3.4] Plugin blocks

2012-08-29 Thread Lance Java
If you are writing a component library then yes, you will need a LibraryMapping. I've never included pages in a component library (only components) but I'm assuming that your page names will have require a prefix (as specified in your library mapping). For instance, if your app package "foo.bar",

Re: [t5.3.4] Plugin blocks

2012-08-29 Thread Muhammad Gelbana
Isn't that for web apps only ? I'm writing a module (jar) to be auto-loaded by a tapestry web app. Would tapestry process a web.xml file in a tapestry module ? On Wed, Aug 29, 2012 at 8:25 PM, Lance Java wrote: > Are you familiar with the tapestry.app-package init-param in web.xml? If > you place

Re: [t5.3.4] Plugin blocks

2012-08-29 Thread Lance Java
Are you familiar with the tapestry.app-package init-param in web.xml? If you place pages/mixins/components under this package you won't need to contribute a LibraryMapping

Re: Request Filter not called if declared with addInstance (vs add)

2012-08-29 Thread DenisGL
Yes, my Logger is a org.slf4j.Logger. 2012/8/29 Lance Java [via Tapestry] < ml-node+s1045711n5715870...@n5.nabble.com> > addInstance will invoke the constructor with the most arguments on the > given class. It will pass all arguments from the registry that match by > type (and additional annotati

Re: grid in zone gets pre-selected value from select component

2012-08-29 Thread jupraman
Found the problem in my code: Select component generates onChange when zone parameter is bound. This is different from a form submit event. so changing my onChange method to this solved my problem: public Object onValueChangedFromBrBilletTypeFilter(BRBilletType brBilletTypeFilter){ < includ

Re: [T5.1] Input string is not valid; the character at position X is not valid

2012-08-29 Thread f.nemeth
I changed Steve's solution to replace the space character with Tapestry default $0020. The following link with %20 (=space) works now: http://localhost/b2c/productcatalog/article/detail/F/1K0061500P%20041/0 My code is: @Match("ContextPathEncoder") public static void adviseException

Re: grid in zone gets pre-selected value from select component

2012-08-29 Thread jupraman
Actually looking at the way I worded my problem, this may clarify some: When I select a value from the select component and the 'onValueChanged' is triggered, the first value is always null. Subsequent selections will always return the prior value from the select. So if I had select with the value

Re: [t5.3.4] Plugin blocks

2012-08-29 Thread Gerold Glaser
We have written another solution to overcome the limitations of the block contributions. You can work with the contributed components with the normal tapestry features like parameter binding, event propagation and so on. You can find the source and the module here: https://github.com/porscheinfor

Re: [t5.3.4] Plugin blocks

2012-08-29 Thread Taha Siddiqi
If you can share the project I can look into it. On Aug 29, 2012, at 8:23 PM, Muhammad Gelbana wrote: > I cannot disregard your post because It solved my problem :D > > But now you are saying that "InstructionBlocks" page is under " > debitCardModule" folder which is under pages, but I still ca

Re: [t5.3.4] Plugin blocks

2012-08-29 Thread Muhammad Gelbana
I cannot disregard your post because It solved my problem :D But now you are saying that "InstructionBlocks" page is under " debitCardModule" folder which is under pages, but I still can't see how will the main app locate the page if it doesn't know the contributing module package. When I first g

[t5.3.4] Plugin blocks

2012-08-29 Thread Lance Java
Please disregard my last post as it was wrong (I should take more time reading the actual problem). In Taha's post he refers to a page named "debitCardModule/instructionblocks". This means that he has a page with class "foo.bar.basepackage.pages.debitCardModule.InstructionBlocks" where "foo.bar.ba

Re: confused with Page ContextType and onActivate with StreamResponse

2012-08-29 Thread Muhammad Gelbana
Check this page http://tapestry.apache.org/component-cheat-sheet.html And then try reading this article which should explain more about what I think you are trying to accomplish http://blog.tapestry5.de/index.php/2010/08/23/context-values-vs-request-parameters/ On Wed, Aug 29, 2012 at 7:17 AM,

[t5.3.4] Plugin blocks

2012-08-29 Thread Lance Java
I'm assuming that in Taha's example, each department was a separate component library. Component libraries contribute a LibraryMapping to the ComponentClassResolver specifying the prefix to use. See here for the docs on component libraries http://tapestry.apache.org/component-libraries.html --

Re: [t5.3.4] Plugin blocks

2012-08-29 Thread Taha Siddiqi
Hi Muhammad You should be able to access any page as long as tapestry finds it. (You can check that using the startup logs). Also are you adding manifest entry for 'Tapestry-Module-Classes' in your module jars http://tapestry.apache.org/autoloading-modules.html regards Taha On Aug 29, 2012,

Re: [t5.3.4] Plugin blocks

2012-08-29 Thread Muhammad Gelbana
I'm going with Taha's approach but I'm having some difficulties and questions. In Taha's article he referred to his contributed page this way " debitCardModule/instructionblocks" where "debitCardModule" is the page's module name in camel case (first letter is lowered) and then the page name, all in

Re: How to return HTTP 404 for in-exact URL requests

2012-08-29 Thread Steve Eynon
If T5 could throw more specific exceptions, as oppose the generic ones that it does, then it'd be a simple exception handling matter for the user to decide what to do. (As mentioned above.) I rose a JIRA about this last year: Throw bespoke exceptions so they may be more easily identified by Error

How to return HTTP 404 for in-exact URL requests

2012-08-29 Thread Lance Java
It sounds like you are fixing something that really should be handled by tapestry. I agree that a 404 is much better than a 500 in these cases and I think it should be the default behavior. -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-return-HTTP-404-for-in-exac

How to return HTTP 404 for in-exact URL requests

2012-08-29 Thread Steve Eynon
A topic that crops up time and time again is that of the elusive HTTP 404 in T5 apps. When running a public website, for SEO reasons, it is desirable for in-exact urls to return a HTTP 404 rather than returning a 'best fit' page.For the same reasons, it is undesirable for malformed urls to return

Re: confused using tapestry page to return json data

2012-08-29 Thread Lance Java
Pages / components don't need a template. If your page always returns a StreamResponse from onActivate() then it should not have a template. I'm not sure why you're seeing this strange behaviour though? I would have assumed that tapestry would ignore the TML. -- View this message in context:

Request Filter not called if declared with addInstance (vs add)

2012-08-29 Thread Lance Java
addInstance will invoke the constructor with the most arguments on the given class. It will pass all arguments from the registry that match by type (and additional annotations if provided). Is your logger of type org.slf4j.Logger? -- View this message in context: http://tapestry.1045711.n5.nab

Re: [ANN] JumpStart gets jQuery DataTables example

2012-08-29 Thread Emmanuel DEMEY
No. The default implementation will add all the datas on the client side. You are right. But you can also use the ajax mode, and when the user will change the displayed page, send an ajax request, and update the datatable with the next set of datas. Manu 2012/8/29 antalk > It's really nice, but

Re: [ANN] JumpStart gets jQuery DataTables example

2012-08-29 Thread antalk
It's really nice, but the biggest drawback (afaik) is that you just cannot use large datasets (talking 10.000+ rows) All the data has to be on the client side for the datatable to work. Which will probably (haven't test it) kill or slow down the clients browser to a unusable state. -- View this