Re: Read only bindings - How do I set their value from a mixin?

2013-03-15 Thread Lance Java
That would apply to all grids. I want a DisablePaging mixin that I can use on a case by case basis -- View this message in context: http://tapestry.1045711.n5.nabble.com/Read-only-bindings-How-do-I-set-their-value-from-a-mixin-tp5720446p5720469.html Sent from the Tapestry - User mailing list ar

Re: Read only bindings - How do I set their value from a mixin?

2013-03-18 Thread Lance Java
Just bumping this thread again. Has anyone given any thought to my idea that literal: and symbol: bindings could use a ThreadLocal for their value so that a mixin could update the value? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Read-only-bindings-How-do-I-set-the

Re: group of requred fields

2013-03-18 Thread Lance Java
Yes, and if your read the javadoc for FieldValidator it says "Responsible for validation of a single field." http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/FieldValidator.html Since you need to validate a group of fields, you will need to use the form's validate event. eg onValida

Re: group of requred fields

2013-03-18 Thread Lance Java
Here's an example http://jumpstart.doublenegative.com.au/jumpstart/examples/input/morevalidation -- View this message in context: http://tapestry.1045711.n5.nabble.com/group-of-requred-fields-tp5720512p5720518.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

Re: GridDataSource, Nested Grid

2013-03-19 Thread Lance Java
No, the GridCollapse mixin expects that each table it collapses has exactly the same headers. The first time it encounters a grid, it copies it's headers to the parent grid. For all other grids, it moves the rows to the parent grid. It's probably easiest if your return a "source" parameter with 1 e

Re: GridDataSource, Nested Grid

2013-03-19 Thread Lance Java
This might be better (not tested): public GridDataSource getPeople() { Person emptyPerson = new Person(null, null, null, .); GridDataSource delegate = new HibernateGridDataSource(hibernateSession, Person.class); return new NeverEmptyGridDataSource(delegate, emptyPerson); } publ

Re: Read only bindings - How do I set their value from a mixin?

2013-03-19 Thread Lance Java
Since I'm ultimately trying to apply a mixin to a symbol: binding on the grid, a new binding won't help me. I'm asking for the core code to be changed for literal: and symbol: bindings. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Read-only-bindings-How-do-I-set-their-

Re: HashMap as a Grid source - once again

2013-03-19 Thread Lance Java
Are you sure you want to generate a grid from a Map and not a List>? -- View this message in context: http://tapestry.1045711.n5.nabble.com/HashMap-as-a-Grid-source-once-again-tp5720533p5720534.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

Re: HashMap as a Grid source - once again

2013-03-19 Thread Lance Java
The grid is ultimately driven by it's source (GridDataSource) and it's model (BeanModel). If a model is not provided, the grid will auto-generate one from GridDataSource.getRowType(). You will most likely create a custom BeanModel. Or, you could wrap your maps in a bean with getters and setters.

Re: HashMap as a Grid source - once again

2013-03-19 Thread Lance Java
No, that won't even compile ;) If you want to avoid all the fuss of a custom BeanModel, you will need to use a List instead of a List>. -- View this message in context: http://tapestry.1045711.n5.nabble.com/HashMap-as-a-Grid-source-once-again-tp5720533p5720539.html Sent from the Tapestry - Use

Re: css to grid in .java

2013-03-19 Thread Lance Java
If the "lean" parameter is false, tapestry will add the property name to each td, allowing you to style columns differently with CSS. If you want full customisation, check out my GridDecorator here: http://tapestry-stitch.uklance.cloudbees.net/griddecoratordemo -- View this message in context:

Re: HashMap as a Grid source - once again

2013-03-19 Thread Lance Java
> So without the custom model, you can't use a HashMap with the grid Correct! > But then a logical question is how to set up this model without an actual > bean? BeanModel is an interface, so implement it ;) > model = beanModelSource.createDisplayModel(Set.class, null); > Would this work? No, c

Re: HashMap as a Grid source - once again

2013-03-19 Thread Lance Java
You don't need to implement a GridDataSource, tapestry will happily coerce a collection to a GridDataSource. I think the question you should be asking yourself is why do you have a list of HashMaps in the first place? A list of beans is a much clearer API. -- View this message in context: htt

Re: HashMap as a Grid source - once again

2013-03-19 Thread Lance Java
Turns out you don't need to implement a BeanModel or a GridDataSource. I've added a demo to tapestry-stitch which does exactly what you want. The demo can be seen here: http://tapestry-stitch.uklance.cloudbees.net/mapgriddemo Now, the question remains... do you really want a collection of Maps?

Re: HashMap as a Grid source - once again

2013-03-19 Thread Lance Java
> Actually, it would partially work: it would returns a working BeanModel implementation so that you can add properties (PropertyModel instances) to it. Yeah, I figured that out in my demo. I used beanModelSource.createDisplayModel(Object.class, messages) and a MapPropertyConduit -- View this

Re: Keep component's state between requests

2013-03-19 Thread Lance Java
You can bind your component parameter to an activation context on your page. You can also use @Persist(PersistanceConstants.CLIENT) which will use a request parameter with a component specific name. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Keep-component-s-state

Re: Renders 2 rows using the Grid component

2013-03-19 Thread Lance Java
You could also do this with a GridDecorator / GridRowDecorator http://tapestry-stitch.uklance.cloudbees.net/griddecoratordemo -- View this message in context: http://tapestry.1045711.n5.nabble.com/Renders-2-rows-using-the-Grid-component-tp5720560p5720566.html Sent from the Tapestry - User mail

Re: For Nabble users

2013-03-21 Thread Lance Java
That's actually really annoying for me. Most workplaces don't allow personal email but they do allow Nabble. Sure I can always use my phone but writing code and copy / paste etc is really annoying on a phone. On 21 March 2013 16:31, Thiago H de Paula Figueiredo wrote: > Hi! > > Due to many heada

Re: Read only bindings - How do I set their value from a mixin?

2013-03-22 Thread Lance Java
There are a couple of things wrong with your solution 1. You've implemented a variant binding (isVariant = false) but you have a no-op implemetation of set(Object value) This means that the value is 10 in your mixin, but the the value in the underlying grid component is still 25 (no change) 2. Yo

Re: Read only bindings - How do I set their value from a mixin?

2013-03-22 Thread Lance Java
Hi Barry, I'm not sure you understand a Thread Local, it's guaranteed to be thread safe since it's local to a thread I would appreciate it if a tapestry committer could chime in with their thoughts. Thanks, Lance On 22 Mar 2013 20:52, "Barry Books" wrote: > The method is isInvariant so returni

Re: For Nabble users

2013-03-22 Thread Lance Java
Sorry, wasn't aware of the extra work it was creating. I'm happy for a solution that keeps you guys focused. Thanks for your continued tapestry support. Cheers, Lance

Re: Read only bindings - How do I set their value from a mixin?

2013-03-23 Thread Lance Java
Ah, sorry, I see where you are coming from. Tapestry has a special type of thread local which is cleaned up after each request. It's called a PerThreadValue. That's what I was ultimately referring to. On 23 Mar 2013 01:30, "Barry Books" wrote: > My impression was Thread Local gives you an instanc

Can't build tapestry 5.3

2013-03-25 Thread Lance Java
I'm trying to build tapestry from source by 1. Cloning https://git-wip-us.apache.org/repos/asf/tapestry-5.git 2. switching to 5.3 3. running gradlew build But I'm getting the following error: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':plastic:test'. >

Re: Can't build tapestry 5.3

2013-03-25 Thread Lance Java
ders and try again. > > On Mon, Mar 25, 2013 at 2:04 PM, Lance Java >wrote: > > > I'm trying to build tapestry from source by > > 1. Cloning https://git-wip-us.apache.org/repos/asf/tapestry-5.git > > 2. switching to 5.3 > > 3. running gradlew build > >

Re: Testify - Unable to locate asset

2013-03-26 Thread Lance Java
TapestryTester has two constructors http://tapestrytestify.sourceforge.net/apidocs/com/formos/tapestry/testify/core/TapestryTester.html Which one are you using? Are you passing in a context path? On 26 March 2013 09:19, Stephan Windmüller < stephan.windmuel...@tu-dortmund.de> wrote: > Hello! >

Re: Read only bindings - How do I set their value from a mixin?

2013-03-26 Thread Lance Java
FYI, I've created a Jira ticket and attached a patch based on PerThreadValue for literal, message and symbol bindings. The patch includes a unit test and a selenium test. https://issues.apache.org/jira/browse/TAP5-2099 Could one of the tapestry comitters please take a look? Thanks, Lance. On 2

Re: Wizard Component

2013-03-26 Thread Lance Java
If you want to avoid @Persist, you might want to consider using one big form on a single page. You can then use javascript (and maybe a bit of ajax) to show/hide small segments of your form at a time. On 26 March 2013 13:50, Chris Cureau wrote: > To follow up on what Thiago has said... I've had

Re: Can't build tapestry 5.3

2013-03-26 Thread Lance Java
ipping the plastic tests the same way, in case > that helps narrow things down. > > Have you scanned through > http://tapestry.apache.org/building-tapestry-from-source.html to make > sure you didn't miss anything? > > > > On Mon, Mar 25, 2013 at 6:56 PM, Lance Java >

Re: Read only bindings - How do I set their value from a mixin?

2013-03-26 Thread Lance Java
> As I've said in the dev mailing list... this should be fixed in the way Tapestry handles parameters Damn!! Wish I'd read this before I started > To me it's clear how to make it do what I want. The question how should the symbol binding work In my opinion, if a binding is invariant, I think a Per

Re: Read only bindings - How do I set their value from a mixin?

2013-03-26 Thread Lance Java
I think that the ParameterWorker is outside of my comfort zone. I'll leave it the tapestry dev team's capable hands. Feel free to use the selenium test from my patch. On 26 March 2013 16:57, Lance Java wrote: > > As I've said in the dev mailing list... this shoul

Re: Configuring pages to be "invisible"

2013-03-29 Thread Lance Java
You can annotate your pages with @WhitelistAccessOnly so that they can only be accessed by the whitelist (eg localhost). This is how tapestry "hides" the PageCatalog and ServiceStatus pages. http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/WhitelistAccessOnly.html On 2

Re: date field as 3 drop down fields

2013-04-17 Thread Lance Java
Unfortunately, java.text.SimpleDateFormat is not thread safe so can't be declared as static. You'll need to use a local variable each time to be thread safe unfortunately. On 17 Apr 2013 05:06, "Jeshurun Daniel" wrote: > One more time with the links > > http://apache-tapestry-mailing-list-archive

Re: Live support solution

2013-04-22 Thread Lance Java
Hi, sorry for the late response, I've been on holiday. I'm the author of tapestry-cometd. Tapestry-cometd has to fool tapestry into thinking there is a "real" request /response when a push is initiated. It does this via a FakeHttpServletRequest (and Response). Note that not all methods are implem

Re: Live support solution

2013-04-22 Thread Lance Java
e can go to the details of that user and > don't lose the chat. > > The client side is just a page for the moment (so no specials there, just > a simple chat reciever-sender like on your wiki). > > Greets > Runesmacher > -Oorspronkelijk bericht- From: Lance Java >

Re: Live support solution

2013-04-22 Thread Lance Java
Also, do you have a security framework that might be getting in the way? Perhaps this framework is returning a login page Link because it can't find the session on the Fake request. On 22 Apr 2013 16:56, "Lance Java" wrote: > I get the feeling that your push action is returning

Re: Live support solution

2013-04-23 Thread Lance Java
t putting the chat > in the sidebar is just impossible becous of this? > > -Oorspronkelijk bericht- From: Lance Java > Sent: Monday, April 22, 2013 6:14 PM > To: Tapestry users > Subject: Re: Live support solution > > Also, do you have a security framework that might be get

Re: Live support solution

2013-04-23 Thread Lance Java
I've created an issue here https://github.com/uklance/tapestry-cometd/issues/55

Re: Live support solution

2013-04-23 Thread Lance Java
er} > > > > > and in java > > void onUser(String user){ >system.out.println(user) > } > > this also gives the encodeURL error. (is this the same error as what you > said?) > > any other idea on how to do this? > > -Oorspronkelijk b

Re: Live support solution

2013-04-23 Thread Lance Java
Unfortunately, the bug in tapestry-cometd means that context.getCount() will always be 0. I will need to fix this bug. This is executing your redirect logic in the push event which is then failing. I'll try to get you a fix over the weekend. I've detailed the bug fix quite thoroughly in the issue

Re: @BeginRender equivalent for component AJAX events

2013-04-24 Thread Lance Java
The ZoneRefresh mixin fires the "refresh" event passing the (optional) context parameter. So, add a handler to the containing page / component. Eg: void onRefresh(Foo context) {...} If you return a Block, this will be rendered (zone.getBody() renders by default).

Re: trying to set app version using manifest.mf

2013-04-24 Thread Lance Java
If you are running through your IDE (eg from class folders instead of .jar/.war) then you will not be able to get the version since maven has not packed the artifacts. This might help: http://stackoverflow.com/questions/2712970/how-to-get-maven-artifact-version-at-runtime

Re: @BeginRender equivalent for component AJAX events

2013-04-24 Thread Lance Java
Far from being a gory detail, it's part of the public API for the mixin, very similar to AutoComplete's "provideCompletions" event. The mixin should ideally declare the event using @Events("refresh") and should have a mention in the javadoc too.

Re: Firing ajax request while returning a StreamResponse

2013-04-24 Thread Lance Java
Split it into 2 phases: Phase 1: Submit form Do the work (webservice + version increment) Generate a link to the generatePDF event Return the page to be re-rendered Phase 2: Re-render the page Use javascript to download the PDF once the page has loaded.

Re: Firing ajax request while returning a StreamResponse

2013-04-24 Thread Lance Java
m just not sure what the > appropriate way of doing this is, or how to do it at that. I'm assuming you > would need some sort of business logic to prevent people from just using > that same URL over and over again. How would you tigger the script on > return? > >

Re: multiple select

2013-04-25 Thread Lance Java
Take a look at Checklist and Palette http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Palette.html http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Checklist.html

Re: div block ID name collisions with 3rd party libraries

2013-04-26 Thread Lance Java
Most tapestry components take the approach of using the "id" parameter (not to be confused with t:id) if one is provided. If an "id" is not provided, a clientId is generated which is guaranteed not to clash with other id's on the page. public class MyComponent implements ClientElement { @Enviro

RE: div block ID name collisions with 3rd party libraries

2013-04-26 Thread Lance Java
It's invalid html to have two elements with the same id so it will need to be fixed. Have you considered styling your CSS by "class" instead of by "id"?

RE: div block ID name collisions with 3rd party libraries

2013-04-26 Thread Lance Java
I suggest that component authors use the code I gave you. I also suggest to style by class instead of by id since the clientId should be a dynamic, runtime value that is not known at build time. If components have a static clientId, they can not (legally) be used in a loop.

Re: Live support solution

2013-04-28 Thread Lance Java
I've just committed changes to tapestry-cometd to support page activation context in push events. I've deployed version 0.9.16 to my github maven repository. Please increase your dependency version and give it a whirl. Cheers, Lance.

Re: Tepestry equivalent of a jsp:useBean?

2013-04-28 Thread Lance Java
You might find this page useful http://tapestry.apache.org/tapestry-for-jsf-users.html On 28 April 2013 10:43, Chris Poulsen wrote: > Hi, > > You could get/set the bean instance in a page field before rendering the > page. Then you would only perform the expensive get once. > > Or you could use

Re: Tapesty form target external url (ie custom url)

2013-04-29 Thread Lance Java
You have a few options 1. Return a java.net.URL from your onSuccess() event - This will only work if your external URL allows GET. You can use the query part of the URL to pass request parameters 2. Use javascript to post a form to the external URL - Redirect after your onSuccess() event to a pag

Re: Live support solution

2013-04-29 Thread Lance Java
Unfortunately, CometD doesn't expose the HttpSession in a public API so I can't pass it to tapestry in the FakeHttpServletRequest. You can use the following code to get a session attribute: @Inject BayeuxServer bayeuxServer; HttpTransport transport = (HttpTransport) bayeuxServer.getCurrent

Re: Live support solution

2013-04-30 Thread Lance Java
Hmm... Your use case is really needing the entire server spec in your push event innit? It seems as if you are generating links in your push event's block, correct? Unfortunately, FakeHttpServletResponse does not have an implementation for encodeURL which is required by AbstractLink to generate li

Re: Live support solution

2013-04-30 Thread Lance Java
It's fine in the sidebar, you just need to understand the limitations of trying to hack tapestry to function outside of the normal request / response flow. CometD requires that the HttpSession is created before the push occurs. Perhaps you could initialize your httpsession scoped list in the setup

Re: SessionListener interacting with Tapestry services?

2013-05-01 Thread Lance Java
The DAO reference will never be null. It might be a proxy that points to a null implementation. The proxy will instantiate the DAO implementation the first time a method is invoked on the proxy. You can use @EagerLoad to load your DAO at app startup to avoid lazy loading. On 1 May 2013 11:07, "Joh

Re: SessionListener interacting with Tapestry services?

2013-05-01 Thread Lance Java
I think I might've answered a question you didn't ask! If you want to do something complex in your listeners constructor with the DAO, don't! Instead, create a new IOC service and delegate your methods through to it in your session listener

Re: SessionListener interacting with Tapestry services?

2013-05-02 Thread Lance Java
public class HttpServletListenerHelperImpl implements HttpServletListenerHelper { private SomeDao someDao; public SessionListenerHelperImpl(SomeDao someDao) { doSomeFunkyInitializationWithDao(someDao);

Re: [5.3] Mixin Base Class Affecting Initializer Parameters When In A Loop

2013-05-02 Thread Lance Java
Do you realise that there is only 1 instance of the component and also 1 instance of the mixin? And that the same component/mixin is fired for all 5 iterations through the loop? It's part of tapestry's "static structure, dynamic behaviour". I think if you make sure to initialize all fields in setu

Re: Dynamically add fields to form

2013-05-03 Thread Lance Java
Disclaimer: I've never used FormInjector before I *think* you can do this but it will require a little trick. The FormInjector adds a trigger() function to it's DOM element. The trigger() function fires a serverside event passing the "context" attribute. In your use case, the context is not known

Re: loop pagination - T5 Bootstrap

2013-05-05 Thread Lance Java
The only core tapestry component which supports paging is the grid. If you're rendering a table, then use a grid http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Grid.html If you'd an example of a custom paging, take a look at my gallery component in tapestry-stit

Re: loop pagination - T5 Bootstrap

2013-05-07 Thread Lance Java
Sorry for my previous answer… I didn't realise that this tapestry-bootstrap mixin existed. After looking at the source here: https://github.com/trsvax/tapestry-bootstrap/blob/master/src/main/java/com/trsvax/bootstrap/mixins/Pager.java It seems to me that this mixin does not do 'true' paging since

Re: Usage of Tapestry Services from outside of Tapestry.

2013-05-07 Thread Lance Java
tapestry-hibernate provides a singleton hibernate session which can be looked up from the registry. This singleton is a proxy to a lazy-loaded, per-thread hibernate session instance. All service methods invoked on the thread will share the same hibernate session. You must call either Registry.clea

Re: Dynamically add fields to form

2013-05-07 Thread Lance Java
Perhaps, as George mentioned, this is better handled by a single form with two submit buttons. You can use the onSelectedFromX() event to flag which submit button was pressed.

Re: Submit form is very slow in IE

2013-05-09 Thread Lance Java
Here's a suggestion: Never create a page with 2500 checkboxes, 180 propertySelction components and 350 text fields!!! No human can possibly comprehend a form like that. You could add filters (ie a search box) and / or paging to the form to make it more usable.

RE: Submit form is very slow in IE

2013-05-09 Thread Lance Java
Surely a tabgroup or a select pull down could filter the fields based on a category or some other grouping? Failing that, I'd look at the javascript that is executing and the number of clientside objects being created. Do you attach hundreds of onchange listeners to hundreds of fields? Sometimes,

Re: Submit form is very slow in IE

2013-05-09 Thread Lance Java
Why don't you ask your "full time operator" what he thinks of 2500 checkboxes on a single page? I bet he's got something to say about it :)

Re: strange markup being injected

2013-05-10 Thread Lance Java
Have you configured a non-standard XMLReader? Take a look at the docs here http://www.saxproject.org/apidoc/org/xml/sax/helpers/XMLReaderFactory.html#createXMLReader() Tapestry's template parsing is done by SaxTemplateParser / XMLtokenStream which ultimately delegates to an XMLReader created via

RE: Submit form is very slow in IE

2013-05-10 Thread Lance Java
on to check 200 checkboxes once, then uncheck few for this column if needed. Do you think that will help if I filter the 2500 checkboxes into 50/100 pages? > > Anyway, thank you for all your help. From Thiago's reply, it seems there is no code level solution for IE7 and IE8. > > ---

Re: Tapestry5 force eager load

2013-05-10 Thread Lance Java
You can annotate individual service builder methods in AppModule with @EagerLoad. There's also ServiceBindingOptions.eagerLoad() available for bind(). Not sure if there's a global option.

Re: Tapestry Hibernate Session usage

2013-05-14 Thread Lance Java
Questions about the 'magic' hibernate session proxy seem to crop up a bit so I've raised a Jira to improve the docs. https://issues.apache.org/jira/browse/TAP5-2115

Re: Customize autocomplete mixin match list?

2013-05-16 Thread Lance Java
You could extend the AutoComplete mixin and override generateResponseMarkup.

Re: Symbol value random characters

2013-05-16 Thread Lance Java
${project.version} is a reserved property in maven. I'm guessing maven is using its own value instead of your filter. Check by inspecting appversion.properties in your jar/war.

Re: Symbol value random characters

2013-05-16 Thread Lance Java
Tapestry provides a random hex string default value for the application version. I'm guessing that's what you're seeing. There must be some circumstances under which tapestry can't find the override in your property file.

Re: tapestry-Jquery datatables rowclick event

2013-05-16 Thread Lance Java
I've not used the jquery datatable but have solved this problem with the grid here: http://tapestry-stitch.uklance.cloudbees.net/griddecoratordemo If it's not supported out of the box with datagrid, you could do something similar (perhaps adding a "data-" attribute to each row).

Re: How to use Spring MVC resources static images in tapestry

2013-05-16 Thread Lance Java
You will need to tell tapestry to ignore the "/images" path so that another servlet (spring) can handle it. http://tapestry.apache.org/configuration.html#Configuration-ConfiguringIgnoredPaths

Re: How to use Spring MVC resources static images in tapestry

2013-05-16 Thread Lance Java
Does your webapp have a context path? You may need to use

Re: How to use Spring MVC resources static images in tapestry

2013-05-17 Thread Lance Java
Of course you need to map spring's servlet / filter (whatever it is) to a url pattern in web.xml. Unfortunately the current generation of servlet containers are not mind readers :) This question is now off topic, please continue on an appropriate spring mailing list.

Re: T5 and AppEngine 1.7.3 dev server IllegalStateException

2013-05-17 Thread Lance Java
A much better option is to fix the bug with a RequestFilter. Wrap the response in a custom implementation that sets a flag to true when redirect() is called and returns the correct value in isComitted()

Re: Adding search service in Tapestry app

2013-05-18 Thread Lance Java
Unfortunately, hibernate's Search.getFullTextSession(...) casts the session to a concrete type which fails if you pass the session singleton provided by tapestry-hibernate. Instead, you must do something like the following in your AppModule @Scope(ScopeConstants.PERTHREAD) public static FullTextS

Re: Logging advice on non interface service

2013-05-19 Thread Lance Java
decorate != advise You'll need to read the docs here http://tapestry.apache.org/tapestry-ioc-decorators.html On 18 May 2013 15:02, "Boris Horvat" wrote: > Hm...strange this method of mine is not invoked, any idea as to why? > > > On Sat, May 18, 2013 at 3:57 PM, Boris Horvat >wrote: > > > I do

RE: FormFragment checkbox not working

2013-05-21 Thread Lance Java
You have many @Persist annotations which I think are unnecessary. As a rule, if it's in the database, you don't need to store it in the session. Instead, pass an id (or ids) in the URL via the page activation context and look up the entities each time. There's a caveat to this rule that you often

Re: Extend a mixin class as a component?

2013-05-22 Thread Lance Java
You can extend the mixin and then create a component which includes the extended mixin.

Re: Tapestry template encoding and GAE

2013-05-22 Thread Lance Java
I think you've hit the nail on the head and that this relates to TAP5-1778. As a work around, can you put your special chars in a language specific properties file? By default, prop files are treated as UTF-8. You can also override the PropertiesFileParser if you need. Another option is to overri

Re: Tapestry template encoding and GAE

2013-05-22 Thread Lance Java
Yes, patching the bug would require a copy of TemplateParserImpl (71 lines) and SaxTemplateParser (1197 lines) The great thing about tapestry / tapestry IOC is that you can workaround a bug like until a fix is provided in a later release. Much better than rebuilding a custom version of tapestry f

Re: dwr java chat demo in t5

2013-05-22 Thread Lance Java
Hi, as a previous dwr committer myself, I was keen to provide dwr reverse ajax / tapestry integration. After speaking to the dwr team, I found that the push mechanism in dwr was not considered bulletproof and was directed towards cometd For this reason, I have created tapestry-cometd, a push libr

Re: dwr java chat demo in t5

2013-05-23 Thread Lance Java
tapestry-cometd is built using the cometd integration in atmosphere. Atmosphere supports a variety of push mechanisms including WebSockets, Server Side Events (SSE), Long-Polling, HTTP Streaming (Forever frame) and JSONP. Out of the box, tapestry-cometd is configured to use org.cometd.websocket.se

Re: Tapestry template encoding and GAE

2013-05-23 Thread Lance Java
You underestimate tapestry :) Tapestry's PropertiesFileParserImpl assumes UTF-8 properties files and performs a native2ascii transformation on the fly http://tapestry.apache.org/current/apidocs/src-html/org/apache/tapestry5/internal/services/messages/PropertiesFileParserImpl.html#line.79

Re: Why is AssetPathConverter not called for javascript stacks

2013-05-23 Thread Lance Java
I think the easiest way would be to decorate the JavaScriptStackSource service. Wrap the default implementation with a version which decorates getStack(String name) to return a custom JavaScriptStack implementation. The custom JavaScriptStack will provide wrappers for: List getJavaScriptLibraries(

Re: dwr java chat demo in t5

2013-05-23 Thread Lance Java
The supported browsers section on the atmosphere page can be ignored as this refers to atmosphere.js which is not used by the cometd integration. Only the supported servers section is relevant. Best to check the cometd docs for supported browsers at www.cometd.org

Re: Sort functionality in custom Grid headers

2013-05-23 Thread Lance Java
Put your header labels in a messages prop file with key propertyName-label http://tapestry.apache.org/localization.html

Re: Tawus AjaxUpload can't be built.

2013-05-23 Thread Lance Java
Looks like the library is referencing a nonexistent version of tapestry. I'm no Gradle guru but in maven, this can be resolved by specifying a different version of the tapestry dependencies in your pom and the "nearest resolution wins" strategy comes into play. If the equivalent doesn't work in Gr

Re: JQuery tab widget - page in tab - setupRender not being called

2013-05-23 Thread Lance Java
> call the other pages setupRender() methods directly. What you are doing sounds really dodgy to me and against the tapestry principles. Why aren't you using a component?

Re: validate regexp=^[A-Za-z0-9 ']+$ in template problem

2013-05-23 Thread Lance Java
Your regex looks fine to me, perhaps tapestry is having troubles parsing the string to a list of validators. I wonder if the space character is the cause? Tapestry allows you to specify regexes in prop files. Try this: template: prop file: firstname-regexp=^[A-Za-z0-9 ']+$ On 23 May 2013 13:50,

Re: validate regexp=^[A-Za-z0-9 ']+$ in template problem

2013-05-23 Thread Lance Java
Ah, so use ' in place of '

Re: Sort functionality in custom Grid headers

2013-05-23 Thread Lance Java
That's a bit more difficult. By providing a header block, you are overriding the default header which contains the sorting logic. I see 2 options: 1. Include the sort link / image in your custom header block (see GridColumns component for inspiration) 2. Decorate the default header with a mixin.

Re: Why is AssetPathConverter not called for javascript stacks

2013-05-23 Thread Lance Java
> I would then get 'cdn' urls for the different scripts that make up the stack, and not the stack url itself Oops, I think you're right > I did try to implement my own proposed solution with Advice That's a lot of messy byte code manipulation for a single method interface. I'm a bit old fashio

Re: dwr java chat demo in t5

2013-05-24 Thread Lance Java
You would do this by the topic (eg: "/chat/user1"). You can add custom Authorizers for topic security.

Re: Page Url rewriting in tapestry

2013-05-27 Thread Lance Java
Not sure if this will help but thought it might be of interest. I've written a ComponentEventLinkEncoder which looks for "special" URL prefixes. If a "special" folder is found on the URL, it is removed from the URL and passed on to the normal tapestry component rendering. The "special" folder (whic

Re: Can tapestry run on Android

2013-05-28 Thread Lance Java
Tapestry uses ASM under the hood for it's runtime byte code manipulation magic. I'm pretty sure that this would fail on dalvik.

Re: Can tapestry run on Android

2013-05-28 Thread Lance Java
I see that there is an ASMDEX project, this is probably the easiest option to get plastic working on dalvik http://asm.ow2.org/doc/tutorial-asmdex.html You must be note that the tapestry build includes a repackaged copy of the ASM libraries https://github.com/apache/tapestry-5/tree/master/plasti

<    5   6   7   8   9   10   11   12   13   14   >