client id problem with nested components

2013-03-12 Thread nquirynen
Hi, I have a component TabPanel with the following parameter: @Property @Parameter(value = prop:resources.id, defaultPrefix = BindingConstants.LITERAL) private String clientId; which value I use as id=${clientId} in the .tml If I put multiple instances of this

RE: how to adjust row height of tapestry grid component

2013-02-25 Thread nquirynen
This is not really a Tapestry problem but a CSS issue.. If you don't know what CSS classes are applied to some element in your html, use something like FireBug, or Chrome to inspect this. You can see what CSS rules are applied and what is overridden. Then you can easily override these rules if

Form fields based on List

2013-02-15 Thread nquirynen
Hi, I have a form where a part of it consists of a List. I tried to do the following: *.java* @Property private ListCoordinateDto coordinates; @Property private CoordinateDto coordinate; @Property private int loop = 0; *.tml* t:loop t:source=coordinates t:value=coordinate

Re: Form fields based on List

2013-02-15 Thread nquirynen
Hi, I solved it by adding the encoder parameter as you suggested: t:loop t:source=coordinates t:value=coordinate t:encoder=encoder t:index=loop public ValueEncoderCoordinateDto getEncoder() { return new ValueEncoderCoordinateDto() { @Override

Re: Form fields based on List

2013-02-15 Thread nquirynen
Now for validation purposes I need to be able to access these created fields in my onValidate method. Any idea how I can achieve this? I saw ComponentResources.getEmbeddedComponent(), but have not had success with that yet. Any pointers? -- View this message in context:

Re: T5.3 Select Component onValueChanged never fired

2013-01-21 Thread nquirynen
Did you use the zone parameter for your select? Here you find the documentation with an example: http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Select.html http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Select.html Could

Re: Radiogroup with Enum value and option with NULL value

2013-01-18 Thread nquirynen
Hi, Thanks Taha, I solved it in the following way: I don't really want to add something to my Language enum. I replaced it with a dummy html radio input as you suggested. To make it a part of the whole radiogroup I had to add the name attribute. Now I also had to add the value attribute with an

Radiogroup with Enum value and option with NULL value

2013-01-17 Thread nquirynen
Hi, I have a RadioGroup with options based on an enum (Language). *.tml* t:radiogroup t:value=selectedLanguage t:loop t:source=languages t:value=loopLanguage t:radio t:value=language / ${format:labeled=language.description} /t:loop /t:radiogroup *.class* @Property

Importing javascript library failing

2012-12-19 Thread nquirynen
Hi, I made a simple Chart component using Google charts api. (I also use tapestry5-jquery) I have the following in this component: (stripped down) @SetupRender void setup() { javascriptSupport.importJavaScriptLibrary(https://www.google.com/jsapi;); }

Re: Importing javascript library failing

2012-12-19 Thread nquirynen
I forgot to mention that in the component I add the javascript file containing the initializer method drawCharts like this: @Import(library = context:/JQuery/charts.js) If I put this on the page containing this component instead on the component it does work from the first submit. (Probably

Re: Switching assets based on something different than language

2012-12-19 Thread nquirynen
Maybe you can make an implementation of AssetSource -- View this message in context: http://tapestry.1045711.n5.nabble.com/Switching-assets-based-on-something-different-than-language-tp5718854p5718856.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Tapestry + Hibernate optimistic locking

2012-12-05 Thread nquirynen
Just for the interested: After some more research I found that setting the version manually (which is not recommended by Hibernate) didn't work because of what is described here: https://forum.hibernate.org/viewtopic.php?p=2293177sid=2969aa867c7086b4a3c7a68bda853690#p2293177 It's a really old

Re: Tapestry + Hibernate optimistic locking

2012-12-03 Thread nquirynen
Thanks for the example (and JumpStart in general). You point on doing the commit in onValidate makes sense, so i changed that. I removed the manual version check as you suggest (which ofcourse makes sense). So I actually ended up having what I had at the start of making this mail thread. So I

Tapestry + Hibernate optimistic locking

2012-11-30 Thread nquirynen
Hi, I'm not sure if this question belongs here, but thought it might have been something that others came along too. I have a Tapestry application using Hibernate. Now I am trying to add Hibernate's optimistic locking using a Timestamp. In my Tapestry page I have an activation context to

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread nquirynen
Hi, Thanks for the explanation. Yes with I understand its not working I meant my approach is failing. I understand optimistic locking is working, but just don't know how to make use of it. So you mean I have to use Persist instead of activation context? -- View this message in context:

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread nquirynen
Nice idea and seems to work. I changed to Integer version, because as you all said it is recommended and timestamp is sligthly less safe. So I have this now: Index.class public class Index { @Inject private PersonRepository personRepo; @Property private

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread nquirynen
Doesn't seem to work. It does work if I do the following: .tml - t:hidden t:value=version / .class -- @Property private Integer version; void setupRender() { version = person.getVersion() } void onSuccess() { if(version == person.getVersion) { // do update }

Re: Tapestry + Hibernate optimistic locking

2012-11-30 Thread nquirynen
Thanks for the ideas, I will look into this :) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-optimistic-locking-tp5718413p5718431.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: JS does not work within t:block?

2012-11-26 Thread nquirynen
When do you run the javascript? Is the content of the blocks rendered when you apply this javascript? Maybe you should make a simple mixin which you assign to the input fields. -- View this message in context:

Re: Form server side validation in zone

2012-11-20 Thread nquirynen
Hmm I'm not sure I understand what you mean with, or how to achieve something like that: Lance Java wrote ValidationTracker is an environmental so you could wrap the existing ValidationTracker and push() the wrapper onto the environment and keep track of the fields this way. Can you give me

Re: Form server side validation in zone

2012-11-20 Thread nquirynen
ValidationTrackerImpl is final, so I cannot extend this class. But I found ValidationTrackerWrapper class, maybe I should extend this? I'm trying something like this: public class ValidationFieldTracker extends ValidationTrackerWrapper { private ListField fields; public

Form server side validation in zone

2012-11-15 Thread nquirynen
Hi, I have a form where I do some server side validation on submit. This form is in a zone and gets submitted with ajax. Now if I want the fields with errors to be decorated accordingly, I have to update this zone. If I don't want to update the full zone, but just decorate these fields with

Re: Form server side validation in zone

2012-11-15 Thread nquirynen
- More client side validation feeling - avoid unnecessary rerendering, database queries, etc. - some elements in the zone that were visually altered with javascript get reset to their initial state - ... It's not a big problem, but it would surely be better if I could avoid these problems. But

Re: Best practice activation context and later ajax calls

2012-11-13 Thread nquirynen
Ok it works with the onPassivate in this case: void onActivate(int policyId) { if(policy == null) { policy = policyRepository.get(policyId); } } int onPassivate() { return policy.getId();

Re: Showing a Block condirionally

2012-11-13 Thread nquirynen
I think you just need to pass a parameter to your component that defines wheter to show that part yes or not. So in your component: @Parameter @Property private boolean showRight; in .tml: t:if test=showRight t:delegate to=right/ p:else /p:else /t:if --

Best practice activation context and later ajax calls

2012-11-12 Thread nquirynen
Hi I have a page with an activation context: void onActivate(int policyId) { policy = policyRepository.get(policyId); } Now I have a component on this page which does AJAX requests. At this point the policy variable set in the activation context is null. Now I can 'solve' this by using

Re: Tapestry Grid Link for Popup Window

2012-11-07 Thread nquirynen
Hi, If you are using tapestry5-jquery (http://tapestry5-jquery.com/), they have a mixin that does this: Reveal (http://tapestry5-jquery.com/mixins/docsreveal) If you don't want to use tapestry5-jquery, you could always search for a javascript 'popup' that fits your needs and create your own

catch events from Form in component

2012-11-07 Thread nquirynen
Hi, I'm working on an ajax multistep form wizard component for in our webapplication. I pass the different 'views' as informal parameters and delegate them to the right place. In my component I have these view blocks surrounded with a Form component. Now I would like to catch the Form events into

Re: catch events from Form in component

2012-11-07 Thread nquirynen
Ok I think I found the answer: Event bubbling Now my bigger problem is that I can't give the Form component inside the Wizard component a dynamic id, because component ids are static. What I was trying: (doesn't work) Wizard.tml t:Form t:id=${formId} ... /t:Form Wizard.java

Re: catch events from Form in component

2012-11-07 Thread nquirynen
Hi Robert, Thanks, that solves my problem, didn't know it would be so easy :) -- View this message in context: http://tapestry.1045711.n5.nabble.com/catch-events-from-Form-in-component-tp5717772p5717782.html Sent from the Tapestry - User mailing list archive at Nabble.com.

ajaxResponseRenderer in event

2012-11-05 Thread nquirynen
Hi, I have a problem with executing some javascript after an ajax call to a tapestry event. *Test.class* public class Test { @Inject private ComponentResources componentResources; @Inject private AjaxResponseRenderer ajaxResponseRenderer;

Re: ajaxResponseRenderer in event

2012-11-05 Thread nquirynen
I have no client code, so yea that's why it probably doesn't work... First my code was like this: I had a callback function on the ajax request in my .tml: which works. But I wanted to remove javascript from my .tml files and while doing this I thought AjaxResponseRenderer.addCallback would

Re: ajaxResponseRenderer in event

2012-11-05 Thread nquirynen
I think I found it: *$.tapestry.utils.loadScriptsInReply(r);* I put this in the ajax request callback function and looks like its working now. So now my Test page code looks like: public class Test { @Inject private ComponentResources componentResources;

Re: How to increase text field size.

2012-10-11 Thread nquirynen
What do you mean with height; more rows? Then you can use a TextArea with rows and cols attributes. If you just want visual height of the text TextField then you'll need CSS. Why can't you use CSS? -- View this message in context:

Re: Change textfield focus on zone update

2012-10-09 Thread nquirynen
Well I'm afraid you just can't set focus on a hidden element. So you have to try to set the focus after it is visible. Maybe use of Tapestry.ZONE_UPDATED_EVENT as lance firstly suggested might work. $('formZone').observe(Tapestry.ZONE_UPDATED_EVENT, function(event) { // set the focus });

Zone update after ajax request to component event

2012-09-28 Thread nquirynen
Hi, I have a component (grid) where I added a javascript onclick event on my rows where I do an ajax (jquery) request to a component event: $.get('${onRowClickEventLink}'); This all works fine, but I also want to update some zones after this event so I added this to the event method: void

Re: Zone update after ajax request to component event

2012-09-28 Thread nquirynen
Yep I use tapestry5-jquery :) Ok so I added the following code to my javascript click events callback: if (responseJSON.zones) { // perform multi zone update $.each(responseJSON.zones, function(zoneId) { $('#' + zoneId).tapestryZone(applyContentUpdate, responseJSON.zones[zoneId]); });

Re: refreshing zone without highlighting it

2012-09-12 Thread nquirynen
Hi, I'm not sure what periodic zone updater you are talking about, but I remember with the Zone component the update parameter was by default highlight. You could set it to show to get rid of the yellow highlighting. Not sure if this helps you with your problem though. Greetings, Nathan --

Re: How to add JUnit Tests in default tapestry pom?

2012-06-08 Thread nquirynen
Normally that's all you have to do. Are you sure you used @Test annotation on your test method? -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-add-JUnit-Tests-in-default-tapestry-pom-tp5713713p5713714.html Sent from the Tapestry - User mailing list archive at

Re: Change the label of component id

2012-06-01 Thread nquirynen
Maybe try integer=your error message or field specific: valueNumeric-integer=your error message Did not test them though -- View this message in context: http://tapestry.1045711.n5.nabble.com/Change-the-label-of-component-id-tp5713562p5713572.html Sent from the Tapestry - User mailing list

Spring security access denied redirect

2012-05-16 Thread nquirynen
I use tapestry-spring-security in my Tapestry app. I added @Secured(ROLE_SYSADMIN) in one of my pages and also in my AppModule I added: public static void contributeApplicationDefaults(MappedConfigurationString, String configuration) {

Re: Tapestry.ZONE_UPDATED_EVENT issue

2012-05-16 Thread nquirynen
Your jquery selector is wrong I think it has to be $('#mediaZone'). So with the # as it's the id attribute. Also I always use jqueries bind function. Not sure if thats the problem though. $('#mediaZone').bind(Tapestry.ZONE_UPDATED_EVENT, function(event) { ... } -- View this message in

Sidepanel with pagespecific items

2012-05-02 Thread nquirynen
Hi, In my current project I want to add some kind of side bar with some extra functions/data in the form of icons with a panel that slides open (javascript). These items can be global or more page specific. Example: Search: visible on every page Notes: visible on specific pages, containing data

Re: Sidepanel with pagespecific items

2012-05-02 Thread nquirynen
Hi, Thanks that's what I needed. I have now the global items in my Layout component. And I can add some from within a Page as a parameter. My code at the moment (simplified): *Layout.tml:* div id=sidePanel [items that are shown on every page] t:delegate to=sidePanelContent / /div

Implement chat function

2012-03-30 Thread nquirynen
Hi, For our current project we need a kind of customer service chat function. A logged in user can see if there is an admin online and can start a one-to-one chat (simple text). Is there already something made for Tapestry like this? Or who can help me with some pointers on how to start working

Add validation conditionally

2012-03-28 Thread nquirynen
Hi, I use the t:validate attribute to assign client side validation to a input field. Now what I want to do: if a specific radio input has been checked? I need to add a validator to another input element. If it is unchecked the validator should be removed. I can add the attribute via javascript,

RE: Add validation conditionally

2012-03-28 Thread nquirynen
Hi, But the difficult part is how to set the RadioInputChecked value when its getting (un)checked. I could catch it in javascript and do an ajax request to an Event and then set this value. But this all looks so much for such a simple problem. If someone has a better idea please share -- View

Re: Zone update triggers update on parent Zone

2012-03-14 Thread nquirynen
Ok, thanks for the explanation, also on the constructing of zone updates. I tested it with the time and your right. Is there any way I can know if in the ZONE_UPDATED_EVENT of the inner zone (zone1) comes from a zone1 or zone2 update? Because I have javascript code in the zone1 update event,

Re: Zone update triggers update on parent Zone

2012-03-14 Thread nquirynen
Found a solution for my problem (not sure if it's a good solution, but it works): In the update event of the parent zone (zone1 in my example) I added an if statement to know if it's not just an inner zone that's getting updated: $('#zone1').bind(Tapestry.ZONE_UPDATED_EVENT, function(event) {

Zone update triggers update on parent Zone

2012-03-06 Thread nquirynen
Hi, I have this construction in my .tml (simplified): t:Zone t:id=zone1 id=zone1 t:Zone t:id=zone2 id=zone2 t:Form t:id=form t:zone=zone2 t:Submit / /t:Form /t:Zone /t:Zone In my page class: @InjectComponent private Zone Zone2; public void onSubmitFromForm() {

Percent sign in message properties file

2012-02-28 Thread nquirynen
Hi all, In a .properties file of a page I have: test=% I just want to show the percent symbol, but then I get this error: org.apache.tapestry5.ioc.internal.util.TapestryException Conversion = '%' I have tried different things like with as results: Change properties file to UTF8, unicode

Call event from javascript

2011-12-23 Thread nquirynen
Hi, I read somewhere that it is possible to do in javascript a simple get request like: (jquery) $.getJSON('pageName:eventName/arg'); and in Tapestry page: JSONObject onEventName(String arg) { JSONObject obj; ... return obj; } I'm trying this, but it never gets into the event

Re: Call event from javascript

2011-12-23 Thread nquirynen
Ok nevermind, I fixed my problem :) ! Some simplified code of what I've done: @Inject private Request request; // to access GET and/or POST variables // Event handler method which returns the JSON based on request parameters StreamResponse onGetData() { return new

Re: Call event from javascript

2011-12-23 Thread nquirynen
Ok thanks for the ideas, that's even better ;) Nathan -- View this message in context: http://tapestry.1045711.n5.nabble.com/Call-event-from-javascript-tp5096654p5097330.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: tapestry, hibernate and timeout

2011-11-28 Thread nquirynen
I think this is a MySQL / Hibernate issue, not Tapestry. I think you need to configure your connection pooling. Example: http://community.jboss.org/wiki/HowToConfigureTheC3P0ConnectionPool http://community.jboss.org/wiki/HowToConfigureTheC3P0ConnectionPool -- View this message in context:

Re: Console app with Tapestry IoC configuration

2011-09-23 Thread nquirynen
Steve Eynon wrote: I believe the @Inject is working just fine - you just have to access the service *after* the class has been constructed! Yep that was my problem. Thanks for the explanation! -- View this message in context:

Re: Console app with Tapestry IoC configuration

2011-09-21 Thread nquirynen
I have made a new project and have now this: *Main.java* public static void main(String[] args) { RegistryBuilder builder = new RegistryBuilder(); builder.add(AppModule.class); Registry registry = builder.build(); registry.performRegistryStartup();

Re: Console app with Tapestry IoC configuration

2011-09-21 Thread nquirynen
Removed the static (shouldnt be there anyway), but still the same problem :/ if I do registry.getService(PolicyValueProviderSource.class) and pass this as a parameter to my DocumentGenerator's constructor it does work. Is this the way to go then? (my knowledge of Tapestry IoC is very

Console app with Tapestry IoC configuration

2011-09-20 Thread nquirynen
Hi, I'm making an application using Tapestry IoC configuration (contributions). So in my AppModule I have: *public void contributePolicyValueProviderSource(MappedConfigurationlt;String, PolicyValueProvidergt; config) { ... }* and in code I do: *@Inject private PolicyValueProviderSource

GridPager's zone

2011-05-12 Thread nquirynen
Hey, I have a page with a grid which is in a zone. I have also above this zone some filters; they all update the zone with AJAX: onChange=$('frmFilter').fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT); And in the onSubmit i return zone.getBody(); This all works fine. But now I only need the

Beandisplay - set CSS class to specific items

2011-05-12 Thread nquirynen
Hi, I have a beandisplay where I'd like to set the css class of for example an integer field where value 100. Is this possible? Or any hints on how i might achieve this would be appreciated as I have no clue. Thanks! -- View this message in context:

Generic beaneditorform

2011-03-28 Thread nquirynen
I have a page where i can edit 1 object that has been selected to edit. This object can be a different datatype everytime depending on some properties set in the page. //Here i get the right object public Object getObject() { return dao.getDaoForEntityType(entityType).get(objectId); }

Select dropdown in grid

2011-03-21 Thread nquirynen
I have a grid where i can choose which row i want to edit. When chosen a row it renders the row with a select in one of the columns instead of the objects value. This select contains all possible values for this property. After choosing an option you can click a actionlink in the row to save this

Tapestry5 - Grid with variable row type

2011-03-15 Thread nquirynen
Hi, I have a page where i load a list of objects depending on some other variables. This list of objects can be of the type of 1 of several type of entity objects. So I have declared it as : private List tableData; and t:grid source=tableData ... This works, but the problem is when