Re: Null Pointer Exception

2012-05-10 Thread Lance Java
I've just taken a look at the 5.2.6 code for ResourceStreamerImpl and it looks like the input stream is being closed twice via is.close() and InternalUtils.close(is). This looks like a bug to me try { is = streamble.getStream(compress); OutputStream os = re

Re: tapestry-push - proof of concept

2012-05-10 Thread Lance Java
Ok, thanks for this. The only problem that I can see is that I don't have the event context at the time I am constructing the URL. I will only have the context in my asynchronous push event. I'll take a look at how tapestry adds the context to the URL in ComponentResources.createEventLink(String e

Re: tapestry-push - proof of concept

2012-05-10 Thread Lance Java
Thanks for the link Giulio, I'm sure I could achieve something quite similar using DWR and Tapestry side by side. I'm hoping for a far more integrated approach using tapestry's templating for html and zero javascript. Cheers, Lance. -- View this message in context: http://tapestry.1045711.n5.nab

Re: getting the object in a row from a grid component

2012-05-10 Thread Lance Java
ramonchu - In a roundabout way, you have done exactly what you would have done in a value encoder except that it is not re-usable in another page. Tapestry will take the Object[] array and will coerce it to a String and write it to the html of the page. I'd recommend using a ValueEncoder instead.

Re: Basic question about URL rewriting and Tapestry 5

2012-05-10 Thread Lance Java
FYI, I was able to do URL rewriting using simple string manipulation by decorating the ComponentEventLinkEncoder https://github.com/uklance/tapestry-sandbox/blob/master/src/main/java/com/github/uklance/mode/ModeComponentEventLinkEncoder.java -- View this message in context: http://tapestry.10457

Re: Using generics in tapestry service.

2012-05-10 Thread Lance Java
You would probably want to do it like this: AppModule.java --- public DoSomethingClass buildUserDoSomethingClass() { return new DoSomethingClassImpl(); } public DoSomethingClass buildDateDoSomethingClass() { return new DoSomethingClassImpl(); } Page.java - @Inject @Name

Re: Using generics in tapestry service.

2012-05-10 Thread Lance Java
I can't say that I've used generic services before. I was assuming that under the hood, Tapestry would think that there were two instances of the same interface (due to type erasure). I have provided you with a way of dealing with two services of the same interface. Tapestry also supports custom ma

Re: Using generics in tapestry service.

2012-05-10 Thread Lance Java
Can you paste the code and the entire error message (I get the feeling there's more to the message). This page explains using service id's or annotations to differentiate services with the same interface http://tapestry.apache.org/defining-tapestry-ioc-services.html -- View this message in contex

Re: Using generics in tapestry service.

2012-05-10 Thread Lance Java
You need to call the method "build" where is the name of the service. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Using-generics-in-tapestry-service-tp5700399p5700637.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

Re: Using generics in tapestry service.

2012-05-10 Thread Lance Java
Tapestry has naming conventions in the AppModule and "build" methods must start with the word "build" (or use equivelant annotations). You haven't shown me your code but it looks like your method is called "userDoSomethingClass()". If you take a look at the code I gave you, the method is called "b

Re: Using generics in tapestry service.

2012-05-10 Thread Lance Java
Keep in mind that you don't need to use @Inject in your services. Tapestry will use the constructor with the most arguments and will pass values matched by type (and annotations) from the registry. I prefer the constructor injection to private field injection as I can test my services without need

Re: Getting Session State Object from another servlet alongside Tapestry

2012-05-11 Thread Lance Java
This is interesting because I will probably be doing the same thing soon to integrate the DWR servlet with tapestry. I guess you will need to instantiate the servlet and set the "init-params" on it. I was thinking of configuring the values as http://tapestry.apache.org/symbols.html tapestry symbol

Re: T5.3.1 How to expand all the tree nodes?

2012-05-11 Thread Lance Java
Page.tml Page.java - @InjectComponent Tree tree; @Cached // use cached because this method may be called twice in a single request public TreeModel getTreeModel() { ... } public void onExpandAll() { TreeExpansionModel expansionModel = tree.getExpansionModel(); List roo

Re: How to render component(zone,block) widthout request and response

2012-05-14 Thread Lance Java
I just recently asked the same question on the list http://tapestry.1045711.n5.nabble.com/tapestry-push-proof-of-concept-td5697644.html here The steps to do it are: 1. In the intital tapestry page request, use ComponentResources to generate a Link to a component event (most likely without the co

Re: T5.3.1 How to expand all the tree nodes?

2012-05-14 Thread Lance Java
public void onExpandAll() { TreeExpansionModel expansionModel = tree.getExpansionModel(); List roots = getTreeModel().getRootnodes(); for (TreeNode root : roots) { expandAll(root); } } private void expandAll(TreeNode node) { if (node.getHasChildren()) { expansionModel.ma

Re: Cookies: Invalid cookie. Value not a token or quoted value

2012-05-14 Thread Lance Java
This error is being logged by Tomcat, not Tapestry (http://www.docjar.com/html/api/org/apache/tomcat/util/http/Cookies.java.html). Can you inspect the HTTP headers (using firebug etc) and see what the value of the entire cookie is? -- View this message in context: http://tapestry.1045711.n5.nabbl

Re: How to render component(zone,block) widthout request and response

2012-05-14 Thread Lance Java
> Thank you ! That's a way to solve my problem... No problem, if you could share your code I would be interested to see your solution since I'm doing something similar myself > By the way,where are you from? I'm australian but live in London, UK > I am from china, and it's difficult to communicat

Re: Cookies: Invalid cookie. Value not a token or quoted value

2012-05-14 Thread Lance Java
> Thank you for your reply... No problem > This is what I have in my request headers (Taken using firebug) > Cookie BigIP_Colcms=271399690.0. Have you given me the entire cookie value? This does not include the "isUserLogin" value you were initially talking about. > Is there any way to avoid

Re: Cookies: Invalid cookie. Value not a token or quoted value

2012-05-14 Thread Lance Java
> and the other cookies are > Cfp 1 > JEB2 4FB0E5C76E651 > i00 75474fb0eb0ee Cookies should be of the form "key2=value1; key2=value2". How are you writing these cookies? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cookies-Invalid-cookie-Value-not-a-token-or-quoted-val

Re: Cookies: Invalid cookie. Value not a token or quoted value

2012-05-14 Thread Lance Java
I think it might be a problem with "Ids=10025033/10025032" Take a look http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html here for "org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR" and "org.apache.catalina.STRICT_SERVLET_COMPLIANCE" Any further questions, I think yo

Re: tapestry-push - proof of concept

2012-05-14 Thread Lance Java
Unfortunately I think howard's right in that you will need a fake request and response. It's perfectly legal for a component to @Inject Request or @Inject Response so you will need these. It's probably easiest to take a very simple ajax zone update and try to fake it from a non-web thread. As an

Re: tapestry-push - proof of concept

2012-05-14 Thread Lance Java
Another option is call ComponentRequestHandler instead of HttpServletRequestHandler which might be easier to pass an event context. You will need to store a fake request and response in the RequestGlobals if you want to use the ComponentRequestHandler but the request URL will not be important. htt

Re: tapestry-push - proof of concept

2012-05-15 Thread Lance Java
The tapestry request processing pipeline is quite complicated and as you get further down, it becomes less of a "black box" and you must know more of it's internals ("white box"). There is a great diagram at the bottom of http://tapestry.apache.org/request-processing.html this page. One thing to

Re: tapestry-push - proof of concept

2012-05-15 Thread Lance Java
You might find http://tapestry.apache.org/5.3/apidocs/src-html/org/apache/tapestry5/internal/services/AjaxComponentEventRequestHandler.html this code interesting -- View this message in context: http://tapestry.1045711.n5.nabble.com/tapestry-push-proof-of-concept-tp5697644p5709846.html Sent fro

Re: mixin with t:datefield bug?

2012-05-15 Thread Lance Java
This sounds like the same problem that the RenderInformals mixin has (jira here https://issues.apache.org/jira/browse/TAP5-1918) I wonder how many mixins suffer from this problem. -- View this message in context: http://tapestry.1045711.n5.nabble.com/mixin-with-t-datefield-bug-tp5709435p5709859.

Feature request: SymbolSource.getSymbolNames()

2012-05-15 Thread Lance Java
I'm currently integrating DWR with Tapestry and I'd like to pass all of the "dwr.*" symbols from tapestry to DWR. Unfortunately, I can't find a public API to list all of the symbols and I need to hard code the possible symbol names and try/catch RuntimeException around SymbolSource.valueForSymbol(s

Re: tapestry-push - proof of concept

2012-05-15 Thread Lance Java
No matter what you do, you will need a fake request and probably a fake response. Tapestry converts components to RenderCommands but they still point to their resources. For example, if you have an EventLink on in your block, it requires a Request object for it to render. -- View this message in c

Re: How to send the selected button value from tml page to corr. java page

2012-05-15 Thread Lance Java
Have you considered using the Tree component? Examples: http://jumpstart.doublenegative.com.au/jumpstart/examples/component/treebrowse http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/treefromdatabasewithzones -- View this message in context: http://tapestry.1045711.n5.nabble.com/H

Re: Feature request: SymbolSource.getSymbolNames()

2012-05-15 Thread Lance Java
Searching jira for "symbol AND name" didn't find an issue so I raised https://issues.apache.org/jira/browse/TAP5-1930 Cheers, Lance. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Feature-request-SymbolSource-getSymbolNames-tp5709886p5710156.html Sent from the Tapestry -

Re: Tapestry 5.3.3, Spring 3.1 and @Inject

2012-05-17 Thread Lance Java
Take a look at the tapestry-spling 5.0 compatability mode http://tapestry.apache.org/integrating-with-spring-framework.html#IntegratingwithSpringFramework-5.0CompatibilityMode -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-5-3-3-Spring-3-1-and-Inject-tp5711099p571

Re: Tapestry 5.3.3, Spring 3.1 and @Inject

2012-05-17 Thread Lance Java
I see that you are trying @Inject @Service("personManager") Can you try @InjectService("personManager") http://tapestry.apache.org/defining-tapestry-ioc-services.html

Re: Rendering another component inside a component

2012-05-18 Thread Lance Java
One of Tapestry's principles is static structure and dynamic behaviour so components can't be created at runtime. The MarkupWriter is for writing HTML, not TML. Can you do what you want in a tml file instead? If not, you can do it programatically like this: Component.tml -

Re: [t5.3] Using a map object with BeanEditor

2012-05-21 Thread Lance Java
> So the question is, what if I have those validation strings (maxLength=5,minLength=2..etc) in an independant string ? Because I intend to have this information in a database (label, name\id, validation rules). You could provide a DatabaseConstraintGenerator in a similar way to how Tapestry prov

Re: [t5.3.x] Potential Static Util Class Concurrency Issue

2012-05-21 Thread Lance Java
Without seeing any code it's hard to tell but there are only a couple of ways for user A to see user B's data. 1. You have initialized a page/component variable in the field declaration (or the constructor). This is the most likely candidate. Mutable objects MUST NOT be initialized in the field de

Re: [t5.3.x] Potential Static Util Class Concurrency Issue

2012-05-21 Thread Lance Java
FYI you can call PerthreadManager.addThreadCleanupListener(ThreadCleanupListener listener) to cleanup any ThreadLocals. Tapestry fires the listeners at the end of each request. -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-3-x-Potential-Static-Util-Class-Concurrency-Is

Re: null value in Boolean

2012-05-23 Thread Lance Java
You are witnessing Tapestry's type coercion in action. Tapestry will happily convert from null to Boolean.FALSE (see here for more info http://tapestry.apache.org/typecoercer-service.html) If you want 3 states, (true, false and null) you will be best to have your property of type String instead of

Re: T5.3 's Tree in a Loop

2012-05-23 Thread Lance Java
I'm not 100% sure but I think you might have encountered a tricky issue. The Loop component uses the "encoder" property to integrate with the Form component so that the list is serialized to a hidden form element and then deserialized when the form is posted. I don't think that the same kind of int

Re: T5.3 's Tree in a Loop

2012-05-23 Thread Lance Java
Think about it this way, once your page has rendered the trees, this list is gone unless it stored it in the html or in the session (bad). Take a look at the event link that tapestry generates to expand a tree node, I'm betting that it does not contain enough information to determine the loop val

Re: T5.3 's Tree in a Loop

2012-05-23 Thread Lance Java
This sounds like a generic problem which might have a generic solution. If the Loop component push()ed the current element onto the environment, EventLinks could peek() for the value when rendering an ajax link. When an ajax even fires, tapestry could populate the current loop value in the componen

Re: Server side or timed update of a zone

2012-05-24 Thread Lance Java
I started developing a tapestry-push component built on top of http://directwebremoting.org/dwr/documentation/reverse-ajax/index.html DWR's reverse ajax but was disheartened to find that the DWR guys don't eat their own dogfood when it comes to push. I'm about to make a second attempt at tapestr

Re: Component cannot be cast to Page?

2012-05-25 Thread Lance Java
Tapestry does some byte code manipulation on component classes. Net result is that the Login page instance is loaded by a different classloader than the Login class that is referenced by your AuthenticationFilter. This means that the two classes are not equal which causes the ClassCastException. O

Re: How to get a service whithout using @Inject

2012-05-25 Thread Lance Java
Whilst tapestry will happily work side-by-side with other servlets, you can get tapestry to instantiate a servlet and delegate to it. Here is my recent attempt at integrating DWR with tapestry before I abandoned the idea. https://github.com/uklance/tapestry-push/blob/master/src/main/java/com/lazan

Re: Cannot get component library to load

2012-05-28 Thread Lance Java
Please copy/paste the following: 1. Your contributeComponentClassResolver() method 2. The fully qualified classname of one of your components. 3. A TML entry where you are trying to reference one of your components -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get

Re: Cannot get component library to load

2012-05-28 Thread Lance Java
> The library contains a page rather than a component A page is a component ;) Have you included a "Tapestry-Module-Classes" entry in your jar's manifest? http://tapestry.apache.org/autoloading-modules.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-compone

Re: Cannot get component library to load

2012-05-28 Thread Lance Java
Is there anything strange with your classpath? eg. multiple copies of the tapestry jars or multiple copies of your Page class / template? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713455.html Sent from the Tapestry - Use

Re: Cannot get component library to load

2012-05-28 Thread Lance Java
Strange, can you add the following to one of your pages/components in the main app (that is working) System.out.println(getClass().getClassLoader().findResources("org/test/pages/TestPage.class")); System.out.println(getClass().getClassLoader().findResources("org/test/pages/TestPage.tml")); -- Vie

Re: img tag src value not get render on run time in lazy loading

2012-05-29 Thread Lance Java
The following is not valid XML / HTML: --> I guess Tapestry might be having troubles parsing the page. Comments should be surrounded by . If you want the image to load at a later stage, there are better ways to do this in javascript. 1. Don't render the in the initial page, and add the to the

Re: img tag src value not get render on run time in lazy loading

2012-05-29 Thread Lance Java
Nabble swallowed my HTML... I'll try again but will use [ ] instead of < > The following is not valid XML / HTML: [!- ${videoItem.image} --] I guess Tapestry might be having troubles parsing the page. Comments should be surrounded by [!-- and --]. If you want the image to load at a later stage,

Re: img tag src value not get render on run time in lazy loading

2012-05-29 Thread Lance Java
Gotcha ;) Tapestry parses the TML file into a DOM object on the serverside and I'm not 100% sure what it does with XML (HTML) comments. It possibly discards them. At any rate, I think you would be better to hide elements rather than declaring them as comments and somehow uncommenting them at a la

Re: Cannot get component library to load

2012-05-29 Thread Lance Java
> I had to change findResources to getResource as findResources isn't publicly visible, but it dumped this : Can you try getResources() instead of getResource() -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713491.html Sent

Re: Cannot get component library to load

2012-05-29 Thread Lance Java
> Yeah - that just returns an Enumeration of URLs for each call. Yes, with the added bonus that duplicate locations on the classpath will be exposed I'm baffled... I have no idea why this would work for the upload library but not yours... What container are you using? -- View this message in cont

Re: Cannot get component library to load

2012-05-29 Thread Lance Java
This might be caused by the location of your jar file "C:/Development/Projects/Test-Tapestry-Module" Where is the tapestry-upload.jar located? Is it inside a WAR? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713495.html Se

Re: Cannot get component library to load

2012-05-29 Thread Lance Java
Also, where are the tapestry jars? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713496.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Cannot get component library to load

2012-05-29 Thread Lance Java
In a webapp, there is a hierarchy of classloaders with the "web" classloader inheriting from the "application" classloader which in turn inherits from the "bootstrap" classloader. Tapestry adds another classloader to the mix to confuse things further. I think something is going on with your classlo

Re: Page navigation to predecessor pages plugin

2012-05-29 Thread Lance Java
Here are a couple of libraries https://bitbucket.org/zenios/tapestry-zbreadcrumbs/wiki/Home https://github.com/argoyle/tapestry-breadcrumbs -- View this message in context: http://tapestry.1045711.n5.nabble.com/Page-navigation-to-predecessor-pages-plugin-tp5713504p5713505.html Sent from the Tape

Re: About per-thread service

2012-05-30 Thread Lance Java
The code that does the magic is below. The HibernateSessionManager is configured as a per thread service. The Session is configured as a PropertyShadowBuilder which lazily calls HibernateSessionManager.getSession() on the per thread service. /** * The session manager manages sessions on a per-thr

RE: About per-thread service

2012-05-30 Thread Lance Java
Let me answer some different questions: Q. If I make multiple hibernate calls in a single request, how many hibernate sessions were created? A. 1 Q. Will a hibernate session be created for a request that does not use hibernate? A. No Q. Since there is only 1 instance of Session in the tapestry r

Re: counting visitors

2012-05-30 Thread Lance Java
I think that the best way to handle this would be to contribute a PageRenderRequestFilter to the PageRenderRequestHandler since you have a reference to the page name (and activation context) at this point. http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/services/PageRenderRequest

Re: T5 and Redis

2012-05-31 Thread Lance Java
You could follow the same pattern as used for a hibernate session. See this recent thread for how it's done http://tapestry.1045711.n5.nabble.com/About-per-thread-service-td5713515.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-and-Redis-tp5713546p5713548.html Sent

RE: Cannot get component library to load

2012-06-01 Thread Lance Java
This is starting to sound like an issue that should be fixed in tapestry rather than changing the way the jar is generated. It sounds like tapestry will act differently when referencing a classpath jar than if unzipping the jar and referencing a classpath directory. I think tapestry should act exa

Re: Popup a pdf or word document

2012-06-08 Thread Lance Java
The following TML will not be transformed by tapestry (replace "[]" with "<>") [param name="src" value="context:test.pdf" /] I *think* you want to do the following: [param name="src" value="${context:test.pdf}" /] See also: http://wiki.apache.org/tapestry/Tapestry5HowToCreateADynamicPDF http://ta

Re: Zone Refresh with dynamic context

2012-06-08 Thread Lance Java
Firstly, Tapestry.Initializer.zoneRefresh requires an "id" to be present in the json object. Secondly, each time "zoneRefresh" is called, a PeriodicalExecuter is created so you are likely creating more and more of these every time your zone is refreshed until you run out of memory. I think you ar

Re: Injecting Session into DAO

2012-06-08 Thread Lance Java
This conversation sounds like the "Anemic Domain Model vs. Rich Domain Model" argument where an ADM only contains data and a RDM contains data and services. I have always used an ADM and like Thiago, I sometimes add functions that do not require a database connection. I have never really understood

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Lance Java
Not really a tapestry question but I'm in a good mood ;) The findbugs maven plugin accepts an "excludeFilterFile" configuration parameter. This file can contain rules that you wish to exclude from the findbugs report. http://mojo.codehaus.org/findbugs-maven-plugin/usage.html http://findbugs.sourc

Re: Howto render a block and put it into a JSON reply?

2012-06-11 Thread Lance Java
If you would like to avoid using internal API's (eg MarkupWriterImpl and RenderQueueImpl) you can follow the method here: http://wiki.apache.org/tapestry/Tapestry5HowToGetAnHTMLStringFromARenderCommandParameter -- View this message in context: http://tapestry.1045711.n5.nabble.com/Howto-render-a-

Re: Howto render a block and put it into a JSON reply?

2012-06-11 Thread Lance Java
Sorry, I have just given you a solution that will only work for non-ajax requests. For ajax requests, take a look at how the RenderCommandComponentEventResultProcessor generates markup using a similar method. http://tapestry.apache.org/5.3/apidocs/src-html/org/apache/tapestry5/internal/services/R

Re: Howto render a block and put it into a JSON reply?

2012-06-11 Thread Lance Java
Try this out (untested). If it works, I'll add it to the wiki page public class AjaxRenderCommandMarkupRenderer { private final PageRenderQueue pageRenderQueue; private final AjaxFormUpdateController ajaxFormUpdateController; private final AjaxPartialResponseRenderer partialRenderer;

Re: BreadCrumbsModule error

2012-06-12 Thread Lance Java
Tapestry contributes MarkupRendererFilter's to the MarkupRenderer, one of which pushes a DocumentLinker onto the Environment. I haven't seen the zbreadcrumbs code but perhaps it also contributes a MarkupRendererFilter. Perhaps you need to specify "after:DocumentLinker" when adding to the OrderedCo

Re: BreadCrumbsModule error

2012-06-12 Thread Lance Java
Try this: configuration.add("ZBreadCrumbsDefaultStylesheet", injectDefaultStylesheet, "after:InjectDefaultStylesheet", "after:DocumentLinker"); -- View this message in context: http://tapestry.1045711.n5.nabble.com/BreadCrumbsModule-error-tp5713794p5713800.html Sent from the Tapestry - User mail

Re: BreadCrumbsModule error

2012-06-12 Thread Lance Java
I was wondering the same thing myself and thought you might have found a bug when using implicit and explicit orderings in separate modules. Here is how Tapestry initializes them: configuration.add("DocumentLinker", documentLinker); configuration.add("JavaScriptSupport", javaScript

Re: BreadCrumbsModule error

2012-06-12 Thread Lance Java
Correct. So if my suggestion works, I think we've found a bug -- View this message in context: http://tapestry.1045711.n5.nabble.com/BreadCrumbsModule-error-tp5713794p5713807.html Sent from the Tapestry - User mailing list archive at Nabble.com. --

Re: BreadCrumbsModule error

2012-06-12 Thread Lance Java
Yes, this could be that the two JVM's are calculating hashcodes differently which may cause a java.util.Set to iterate in a different order. -- View this message in context: http://tapestry.1045711.n5.nabble.com/BreadCrumbsModule-error-tp5713794p5713810.html Sent from the Tapestry - User mailing

Re: BreadCrumbsModule error

2012-06-12 Thread Lance Java
Im suggesting to change the zbreadcrumbs code Eg Clone the zbreadcrumbs github repo Tweak the code Compile and install into your local maven repo Run your app against the tweaked jar

Re: non blocking code in T5?

2012-06-13 Thread Lance Java
This is not a tapestry question but is a general java concurrency question 1. If you do not use synchronized (or one of the java.util.concurrent.* classes) then multiple threads can enter the method simultaneously. 2. If your method only reads from "shared" immutable fields, you do not need to wo

Re: Grid with split rows

2012-06-13 Thread Lance Java
You could write a mixin which manipulates the table's DOM after the grid has rendered. For each grid row you could create an extra row and move selected cells into the second row. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Grid-with-split-rows-tp5713853p5713857.html

Re: Grid with split rows

2012-06-13 Thread Lance Java
I don't think that is valid HTML (tr inside tr). I find that a lightbox can be a nice way of doing crud for a grid. When you click on a read only row, you show a bean editor in a lightbox http://www.opensourcehunter.com/2010/06/25/40-javascript-lightbox-scriptsincluded-jquery-and-mootools/ But c

Re: BreadCrumbsModule error

2012-06-14 Thread Lance Java
As I said before, it seems like the zbreadcrumbs MarkupRendererFilter is running before the DocumentLinker even though it should run after. I'd like you to test a theory that there is a bug in ordered configuration. I originally asked you to alter the zbreadcrumbs jar but I have found a way to tes

Re: BreadCrumbsModule error

2012-06-14 Thread Lance Java
For better or worse, this is a new exception. 1. Is this failure only happening on the server or does this now happen on localhost too? 2. You mentioned before that you copied the breadcrumbs code into your project. Did you delete all the files? I think one or two might still be hanging around

Re: BreadCrumbsModule error

2012-06-15 Thread Lance Java
> I was testing it with 0.0.3-Snap No, please try this code with the normal (non snapshot) zbreadcrumbs dependency. -- View this message in context: http://tapestry.1045711.n5.nabble.com/BreadCrumbsModule-error-tp5713794p5713918.html Sent from the Tapestry - User mailing list archive at Nabble.co

Re: Checklist disabled possible bug

2012-06-15 Thread Lance Java
You can always write a mixin to tweak the DOM generated by any component. You could write a mixin to add disabled="true" to all the checkboxes and attach it to the checklist. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Checklist-disabled-possible-bug-tp5713681p5713919.h

Element.getChildren() returns ArrayList

2012-06-15 Thread Lance Java
When manipulating the serverside DOM in a mixin etc, the only public API for accessing a node's children is via Element.getChildren(). The getChildren() method creates a new ArrayList, adds all the children and returns it which I think is inneficcient. I would have expected getChildren() to retur

Re: Adding confirmation step to form

2012-06-15 Thread Lance Java
I'm pretty sure that hidden fields will not be validated by tapestry. You can wrap non-hidden fields in a -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-confirmation-step-to-form-tp5713910p5713922.html Sent from the Tapestry - User mailing list archive at Nabble.co

Re: Element.getChildren() returns ArrayList

2012-06-15 Thread Lance Java
> Have you checked http://tapestryxpath.sourceforge.net I'm aware of the library but I haven't used it. I can only assume that it makes use of Element.getChildren() too (unless it accesses the private "firstChild" and "nextSibling" fields which I highly doubt). > Have you done any benchmarks to kn

Re: BreadCrumbsModule error

2012-06-16 Thread Lance Java
This is a different error to the document linker error you were originally complaining about. I'm guessing that if you comment out my code in your appmodule, you will still have this new exception. Something has changed

Javascript append to zone

2012-06-18 Thread Lance Java
Hi, I'm writing a push library on top of cometd and I'd like to be able to append some markup to a zone (ie a chat application) My tapestry javascript knowledge is not great and I'd like to know any things to watch out for if doing this (including possible memory leaks in the client). I see that

MultiMapConfiguration

2012-06-21 Thread Lance Java
Hi, I'm aware that there is an OrderedConfiguration and a MappedConfiguration but I would like a MultiMapConfiguration where I can contribute to a Multimap (guava's implementation here http://guava-libraries.googlecode.com/svn/tags/release03/javadoc/com/google/common/collect/Multimap.html) Has any

Re: MultiMapConfiguration

2012-06-21 Thread Lance Java
I have found a (slightly hacky) solution be using an OrderedConfiruration and adding a getTopic() to my Authorizer interface. public interface Authorizer { public String getTopic(); public boolean authorize(Context context); } public void contributeAuthorizers(OrderedConfiguration config) {

Announcement: Beta release of tapestry-cometd

2012-06-21 Thread Lance Java
I'm proud to announce the beta release of tapestry-cometd: A push implementation for Tapestry based on CometD Features: * Zero Javascript required * Fully configurable * Use Tapestry templates to format incoming messages * POJO messages (use strings or custom objects) * Built on top of the rock so

Re: Announcement: Beta release of tapestry-cometd

2012-06-21 Thread Lance Java
> The question is: how much of this can I look at before I build something right into 5.4? Licensing, copyright, liability, etc. I'm happy to release it under any license you'd like (Apache / MIT). I'd be honoured if you'd consider it as a tapestry submodule -- View this message in context: http

Re: Announcement: Beta release of tapestry-cometd

2012-06-21 Thread Lance Java
> Why do we need tapestry5-jquery as a dependency? Unfortunately, CometD does not have a core implementation. It has core javascript with abstract functions and it has dojo and jquery implementations but no core implementation as such. I would have loved to have not needed tapestry-jquery. -- Vi

Re: Announcement: Beta release of tapestry-cometd

2012-06-22 Thread Lance Java
CometD supports websockets http://cometd.org/documentation/2.x/howtos/websocket -- View this message in context: http://tapestry.1045711.n5.nabble.com/Announcement-Beta-release-of-tapestry-cometd-tp5714020p5714032.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: HashMap with Grid (or Loop)

2012-06-23 Thread Lance Java
The source parameter of loop must either be an array or implement Iterable. I think you want to use one of map.keySet(), map.values() or map.entrySet() On Saturday, 23 June 2012, William Lopes wrote: > So, I come here to ask how I make to use the HashMap> in > the Grid (or Loop case not be possib

Re: Updating multiple zones inside a loop

2012-06-25 Thread Lance Java
I *think* you want to render some blocks instead of the zone's body tml ${variable} ${variable} java @Property private String variable; @Inject Block redBlock; @Inject Block blueBlock; public void onSomeEvent(String variable) { this.variable = variable; ajaxResponseRenderer.

Eclipse: Can run against maven jar, can't run against local project

2012-06-26 Thread Lance Java
I have two maven projects in eclipse using the m2e plugin. Project A is a component library (jar) which includes a "Tapestry-Module-Classes" entry in the manifest. Project B is a webapp which uses Project A. Case 1: When I close Project A in eclipse. I am able to run the war (Project B) with no w

Re: Eclipse: Can run against maven jar, can't run against local project

2012-06-26 Thread Lance Java
I have a workaround which is to use a system property -Dtapestry.modules=foo.bar.MyModule I'd prefer it if tapestry could find my manifest file (located in src/main/resources/META_INF/MANIFEST.MF) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Eclipse-Can-run-against-mave

RE: Eclipse: Can run against maven jar, can't run against local project

2012-06-26 Thread Lance Java
I thought of this approach but I'd be scared that I'd accidentally commit the change to git (which I would never want to do). -- View this message in context: http://tapestry.1045711.n5.nabble.com/Eclipse-Can-run-against-maven-jar-can-t-run-against-local-project-tp5714087p5714090.html Sent from t

Re: Eclipse: Can run against maven jar, can't run against local project

2012-06-26 Thread Lance Java
> if it's your own application, what's the point of avoiding @SubModule I wasn't sure what would happen when running against a jar. Would the submodule be loaded twice? (once for @SubModule, once for manifest) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Eclipse-Can-run-

Re: Tapestry Tree Links with parameter

2012-06-26 Thread Lance Java
I didn't take the time to fully understand your code but there's a fairly extensive tree example at jumpstart http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/treefromdatabasewithzones You can generate event links etc by setting the "label" block parameter of a tree -- View this mes

Re: Tapestry scheduler specify exact time

2012-06-27 Thread Lance Java
You can pass a CronSchedule to the PeriodicExecutor which uses the same syntax as cron on unix http://en.wikipedia.org/wiki/Cron http://tapestry.apache.org/5.3.2/apidocs/org/apache/tapestry5/ioc/services/cron/CronSchedule.html -- View this message in context: http://tapestry.1045711.n5.nabble.co

Re: How to know when an Alert is dismissed

2012-06-27 Thread Lance Java
Tapestry published the "tapestry:dismiss-all" event when the alerts are dismissed. -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-know-when-an-Alert-is-dismissed-tp5714120p5714123.html Sent from the Tapestry - User mailing list archive at Nabble.com. --

<    10   11   12   13   14   15   16   17   >