Re: datefield & timezone

2011-07-11 Thread Paul Stanton
From looking at the code, it seems like DateField will always have issues if the DateFormat parameter does not have the same TimeZone as the client's browser. The reason being, this server side java code in the context of the DateField component: return format.parse("01/07/2011").getTime() n

Re: A problem occur at loop of zone

2011-07-11 Thread Taha Hafeez
For some reason your request is not being submitted as an ajax request. You can verify it by @Inject private Request request; @Inject private Logger logger; void onYourEventHandler(){ logger.debug(request.isXHR()); } This may be because of a JavaScript error, so try debugging through firebug

Re: datefield & timezone

2011-07-11 Thread Paul Stanton
Sorry, I need to clarify the steps to reproduce: If load the page with a null value, the first selection from the widget works fine (ie 01/07/2011). If you use the widget again to select the same date, it doesn't work, the field now contains 02/07/2011. Regards, Paul. On 12/07/2011 12:44 P

Re: tapestry-jpa: JpaGridDataSource sort by a transient field

2011-07-11 Thread Tony Nelson
We solved a similar problem by creating a view that calculated the field instead of using a transient field. Then we just mapped the view as a read only object and all the sorting worked. -Tony On Jul 11, 2011, at 7:28 PM, Richard Yunhua Sang wrote: > Thanks for your reply, but I do want to so

datefield & timezone

2011-07-11 Thread Paul Stanton
Hi all, Tapestry 5.1... I've run into a problem with the datefield component and am about to look into patching it, but if anyone can offer some advice it would be appreciated. Our server is running in "Australia/Brisbane" timezone and some of our clients are in the "India/Mumbai" timezone.

Re: A problem occur at loop of zone

2011-07-11 Thread dick_hu
Taha Hafeez wrote: > > The template is not visible, are you using zone parameter of > actionlink(you > should prefer eventlink over actionlink). Only then will the request be > ajax > based. > > the Test.tml ${str} delete

Re: A problem occur at loop of zone

2011-07-11 Thread Taha Hafeez
The template is not visible, are you using zone parameter of actionlink(you should prefer eventlink over actionlink). Only then will the request be ajax based. regards Taha On Tue, Jul 12, 2011 at 7:32 AM, dick_hu wrote: > First show my test code > test.tml > > > ${str} > >

A problem occur at loop of zone

2011-07-11 Thread dick_hu
First show my test code test.tml ${str} delete test.java public class Test { @Property @Persist(PersistenceConstants.SESSION) private List strs; @Property private String str; @Pr

Re: tapestry-jpa: JpaGridDataSource sort by a transient field

2011-07-11 Thread Taha Hafeez
Imagine the implementation if(there_is_a_transient_field) { populate_all_data(); sort_yourself_based_on_sort_constraint(); paginate(); } else { pass_the_paging_and_sort_constraints_to_jpa(); } Instead you already have a JPAGridDataSource and you can have your own JPAInMemoryGridDataSo

Re: tapestry-jpa: JpaGridDataSource sort by a transient field

2011-07-11 Thread Richard Yunhua Sang
Hi Taha, I have no problem to write a new GridDataSource to do such thing; but as I said, it would be good to have this function in JPAGridDataSource. e.g. @Entity public class Student { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String fir

Re: tapestry-jpa: JpaGridDataSource sort by a transient field

2011-07-11 Thread Taha Hafeez
Hi Richard, Internally JPAGridDataSource does not handle sorting itself, instead it delegates it to JPA and transient values are unknown to JPA. If you want to handle transient values, you will have to write you own implementation of GridDataSource where in you can retrieve all the rows from the d

TAPS-146: Provide some way to get the component that fired an event

2011-07-11 Thread Taha Hafeez
Hi I was looking at https://issues.apache.org/jira/browse/TAP5-146 and had an idea. What if you could push a service (say EventContext, or some other name as it is already in use) onto the environment which contains the component triggering the action. This can easily be done in ComponentEventRequ

Re: tapestry-jpa: JpaGridDataSource sort by a transient field

2011-07-11 Thread Richard Yunhua Sang
HI Igor, I have a small Maven project to demonstrate this problem, can I send it as a zip file to your personal gmail address? Thanks, Yunhua On Mon, Jul 11, 2011 at 5:19 PM, Igor Drobiazko wrote: > Can you please provide more details? Perfectly some source code to > reproduce > the issue. > >

Re: tapestry-jpa: JpaGridDataSource sort by a transient field

2011-07-11 Thread Richard Yunhua Sang
Thanks for your reply, but I do want to sort the result by transient field in Grid. It would be appreciated that the JPAGridDataSource is able to sort the result within JVM. On Mon, Jul 11, 2011 at 5:29 PM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > On Mon, 11 Jul 2011 18:06:17

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Thiago H. de Paula Figueiredo
On Mon, 11 Jul 2011 17:46:58 -0300, Ray Nicholus wrote: It seems like zone updates on form elements are quite difficult to perfect in tapestry. Yep, not easy. Putting a whole form inside a zone is trivial, though. I simply want to update a select via a zone update I guess Tapestry shou

Re: tapestry-jpa: JpaGridDataSource sort by a transient field

2011-07-11 Thread Thiago H. de Paula Figueiredo
On Mon, 11 Jul 2011 18:06:17 -0300, Richard Yunhua Sang wrote: Hi there, Hi! I am using a Grid with JpaGridDataSource; when I click sort icon on a transient field of an entity, I get following exception: I don't think any GridDataSource implementation backed by a database would be abl

Re: tapestry-jpa: JpaGridDataSource sort by a transient field

2011-07-11 Thread Igor Drobiazko
Can you please provide more details? Perfectly some source code to reproduce the issue. On Mon, Jul 11, 2011 at 11:06 PM, Richard Yunhua Sang wrote: > Hi there, > > I am using a Grid with JpaGridDataSource; when I click sort icon on a > transient field of an entity, I get following exception: >

Re: Javascript library not loaded into the page via @Import

2011-07-11 Thread Josh Canfield
I think something ate your message. I don't see any javascript. Are you seeing javascript errors in your browsers javascript console? There is no reason this shouldn't work so please provide a small code sample that shows your problem. Thanks, Josh On Mon, Jul 11, 2011 at 1:11 PM, bogdan_cm wr

tapestry-jpa: JpaGridDataSource sort by a transient field

2011-07-11 Thread Richard Yunhua Sang
Hi there, I am using a Grid with JpaGridDataSource; when I click sort icon on a transient field of an entity, I get following exception: Caused by: java.lang.IllegalArgumentException: Unable to resolve attribute [name] against path at org.hibernate.ejb.criteria.path.AbstractPathImpl.unknownAttri

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
It seems like zone updates on form elements are quite difficult to perfect in tapestry. I simply want to update a select via a zone update and I'm finding myself attempting to work around the framework to get this to happen. I have a counter variable in my loop that is used when rendering all of

Re: Javascript library not loaded into the page via @Import

2011-07-11 Thread bogdan_cm
Current configuration that works: Layout Template sample (MemberPagesLayout.tml): ; http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> Alternative Reality - your secret life ...

Re: how to use asset from component library in template?

2011-07-11 Thread nillehammer
Hi stephanos2k, By the way, the stylesheet in my library references some images [background-image: "/images/error.png"], what's the best way to make this work when using the library? CSS files are assets that are not parsed like templates. So dynamic insertion of asset paths won't work here. To

Re: Javascript library not loaded into the page via @Import

2011-07-11 Thread Howard Lewis Ship
Obviously, you are having a problem that nobody else is seeing. A look at your Java code and component templates would be a good start. On Mon, Jul 11, 2011 at 12:00 PM, bogdan_cm wrote: > Thanks for the reply. > > The sure way of determining that my js is not making it into the page is > that i'

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Thiago H. de Paula Figueiredo
On Mon, 11 Jul 2011 15:54:02 -0300, Ray Nicholus wrote: Note: I just noticed that the select component page for the select element includes an example that illustrates updating a select inside of a form via a zone update. I'm essentially trying to do the same thing, only with dynamical

Re: Javascript library not loaded into the page via @Import

2011-07-11 Thread bogdan_cm
Thanks for the reply. The sure way of determining that my js is not making it into the page is that i'm not seeing the side effect. My js will modify the width/height of the jpg images on the page. Currently, to make it work I have copied the javascript into the header of the Layout page. But i

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
Note: I just noticed that the select component page for the select element includes an example that illustrates updating a select inside of a form via a zone update. I'm essentially trying to do the same thing, only with dynamically generated selects. On Mon, Jul 11, 2011 at 1:48 PM, Ray Nicholus

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
Actually, in this case, I have a zone including a form field inside a loop, there are no nested zones. I was worried that I would have to revert to custom javascript, but I'm hoping that isn't true. I'm not quite sure why this doesn't work, but once the 2nd select in the form (the one inside the

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Thiago H. de Paula Figueiredo
On Mon, 11 Jul 2011 15:34:58 -0300, Ray Nicholus wrote: No, indeed it looks like I cannot use a submit button here. Surely I can't be the first person who wanted to update a select via a zone update inside of a loop. Isn't there a straightforward way to make this happen? As I've writ

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Josh Canfield
:) I guess it depends on what you consider simple. As my co-worker often says "It's just SMOPs" (http://en.wikipedia.org/wiki/Small_matter_of_programming) You need to provide more information for us to understand what you are getting hung up on. On Mon, Jul 11, 2011 at 11:16 AM, Ray Nicholus wr

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread George Christman
Please post your code and I'll help you. -- View this message in context: http://tapestry.1045711.n5.nabble.com/updating-a-zone-inside-of-an-ajaxformloop-tp4575519p4576086.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
No, indeed it looks like I cannot use a submit button here. Surely I can't be the first person who wanted to update a select via a zone update inside of a loop. Isn't there a straightforward way to make this happen? On Mon, Jul 11, 2011 at 1:16 PM, Ray Nicholus wrote: > Eh, it may be because I

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
It sounds like I can't use a submit button at all in this case. If I update the first select this in turn updates the 2nd select via a zone update. Then, when I choose a new value in the 2nd select and hit submit, my newly selected value is not persisted. Instead, the default value of the select

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
Eh, it may be because I'm not updating the correct currentSetting object. The behavior I want to support is fairly simple, but seems to be quite complex to get working in Tapestry, unless I'm missing something. On Mon, Jul 11, 2011 at 1:12 PM, Ray Nicholus wrote: > It sounds like I can't use a

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Josh Canfield
> Sorry for not noticing that. IFIAK you wont be able to use loop > variable(value parameter in loop or ajaxforloop) during a non-submission > ajax call. You can use the variable, you just can't count on it being set for you when you're using it out of context of the loop. Encode enough informatio

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Josh Canfield
> I guess I'm confused about why I need to worry about any of this.  Without > the zone parameter, I have no problem changing values of my selects. You have to worry about it because without the zone parameter you aren't doing an ajax request back to your component when the select changes. When yo

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
Ouch. That's not good news. What can I do to make this work? Just to restate again, after changing the value of the first select, I need to update the options in the second select in the same row. Then, when I submit, I need all values reflected in the UI to be persisted. I am using Hibernate,

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread George Christman
could you post your code? Also, are you using hibernate? -- View this message in context: http://tapestry.1045711.n5.nabble.com/updating-a-zone-inside-of-an-ajaxformloop-tp4575519p4575918.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Taha Hafeez
Sorry for not noticing that. IFIAK you wont be able to use loop variable(value parameter in loop or ajaxforloop) during a non-submission ajax call. In case of a loop, the context of each iteration(i.e the loop variable) is stored in hidden fields in the form. A value-encoder is used to convert the

Re: Trying to use tapestry-breadcrumbs

2011-07-11 Thread Joakim Olsson
That sounds really strange. I'm using it with Jetty as well and I have never seen that behavior. Did you try Tapestry 5.2.5 that the library has as it's dependency? Can you package up the project and send it to me? Then maybe I can see where things go wrong. Regards, Joakim On Mon, Jul 11, 201

Re: Trying to use tapestry-breadcrumbs

2011-07-11 Thread Luana
Hi, thanks for your answers. I was trying to test with the latest tapestry version (5.3.0) and it worked a little better. It works in a randomly way, for example: - In debug mode, the breadCrumb is null and the dispatch method is never called. - In run mode, the breadCrumb works b

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
I'm not sure what variable you are talking about. Do you mean "currentSetting"? There is no "currentSettings" variable. If so, currentSetting is the variable set by the ajaxformloop so there is nothing for me to initialize there. On Mon, Jul 11, 2011 at 12:04 PM, Taha Hafeez wrote: > My first

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Taha Hafeez
My first question was where have you initialized currentSettings. Say you have initialized it in onPrepare(), then during an ajax call, this method is not called and so currentSettings is not initialized for that request. If you are setting it in setupRender() of the main component, then as only an

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
I'm also not quite sure how I can set a unique ID to my zone and then retrieve this zone id in the previous select. On Mon, Jul 11, 2011 at 11:45 AM, George Christman wrote: > I think your going to want to set a unique id for your > fileMetadataSelectZone > Zone example > > and your going to nee

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
I do not need to persist the "currentSettings" variable? On Mon, Jul 11, 2011 at 11:45 AM, George Christman wrote: > I think your going to want to set a unique id for your > fileMetadataSelectZone > Zone example > > and your going to need to persist autoImportFileMetadataModel selectModel. > > -

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
Hello Taha, I guess I'm confused about why I need to worry about any of this. Without the zone parameter, I have no problem changing values of my selects. However, I need the zone so that I can change the available options in the 2nd select after the value changes in the first select. Shouldn't

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread George Christman
I think your going to want to set a unique id for your fileMetadataSelectZone Zone example and your going to need to persist autoImportFileMetadataModel selectModel. -- View this message in context: http://tapestry.1045711.n5.nabble.com/updating-a-zone-inside-of-an-ajaxformloop-tp4575519p45757

Re: updating a zone inside of an ajaxformloop

2011-07-11 Thread Taha Hafeez
Hi Ray, Where are you initializing currentSetting.fileMetadataTyp?e and is this value @Persisted as you are using it across multiple requests. regards Taha On Mon, Jul 11, 2011 at 9:19 PM, Ray Nicholus wrote: > Here is a fragment of some template code inside of a tapestry form: > > value="cur

updating a zone inside of an ajaxformloop

2011-07-11 Thread Ray Nicholus
Here is a fragment of some template code inside of a tapestry form: .. As soon as I add the zone parameter to the 1st select & reload, I get a NPE when I attempt to change the value in the 1st select. It claims that the currentSe

Re: how to use asset from component library in template?

2011-07-11 Thread stephanos2k
> Have you tried ? /Could not convert 'classpath:/com/mycompany/style.css' into a component parameter binding: Error parsing property expression 'classpath:/com/mycompany/style.css': Unable to parse input at character position 11./ (v5.3) > Better yet, why don't you use @Import? Well, this is a

Re: how to use asset from component library in template?

2011-07-11 Thread Thiago H. de Paula Figueiredo
On Mon, 11 Jul 2011 10:18:42 -0300, stephanos2k wrote: I'm in the middle of moving assets from one "monolithic" Tapestry app to a 'common' base library assets. Of course now I have to adapt my asset paths, but it's somewhat awkward: new asset path: /com/mycompany/style.css/ old l

Re: Ajax callback for checkbox component?

2011-07-11 Thread Tony Nelson
Is the ZoneUpdater mixin hosted anywhere? I grabbed the latest copy from http://tinybits.blogspot.com/2011/03/zoneupdater-jquery-edition.html because I'm using tapestry5-jquery and made two small improvements (IMHO) to it. 1 - The ability to add the mixin to a that when clicked submits the va

Re: Grinder stress test

2011-07-11 Thread atcach
This made the Trick ! Thank you very much !! Regards ! -- View this message in context: http://tapestry.1045711.n5.nabble.com/Grinder-stress-test-tp4564501p4575010.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

how to use asset from component library in template?

2011-07-11 Thread stephanos2k
I'm in the middle of moving assets from one "monolithic" Tapestry app to a 'common' base library assets. Of course now I have to adapt my asset paths, but it's somewhat awkward: new asset path: /com/mycompany/style.css/ old layout path: /com.appname.components.Layout.tml/ Now when I wa

Re: Javascript library not loaded into the page via @Import

2011-07-11 Thread Josh Canfield
> However, after launching the app, when I look in the page source the library > does not exist. Somehow Tap is not complaining about not finding the file, > but it does not include it in the page. How are you determining that it's not including the js in the page? If you are running in productio

Re: use of ActivationRequestParameter

2011-07-11 Thread Taha Hafeez
Hi Bob, There is already a section http://tapestry.apache.org/annotations.html but it points to the javadoc. Instead it would be better if this page contained a description/example of each annotation and a pointer to the annotation's javadoc. It is a good idea for a blog post "Tapestry Annotation

Re: use of ActivationRequestParameter

2011-07-11 Thread Bob Harner
Angelo, If you can think of where in the documentation you would tend to look for this, I will make sure it gets added there. Bob Harner On Jul 11, 2011 1:18 AM, "Angelo C." wrote: > hi taha, > > right, you and Tiago, always come to my mind when I post a question, see who > answer my question:)

Javascript library not loaded into the page via @Import

2011-07-11 Thread bogdan_cm
Hi all, In my Tap app I have a simple js file which contains: This library resides under: Web-Content/assets/js/test.js The page for which I want to import this library has the following annotation above the class declaration: @Import(library="context:/assets/js/test.js") public class Memb

Re: Ajax callback for checkbox component?

2011-07-11 Thread Michael Gentry
The ZoneUpdater mixin also works for checkboxes: ... mrg On Mon, Jul 4, 2011 at 8:11 AM, Dmitriy Vsekhvalnov wrote: > For checkbox or for select component? :) > > I'm using ZoneUpdater mixin for selects, all my selects looks like: > >                                                    t:c