use messages in a service
Hi All, I have a service which does not have access to the request cycle etc however I need to use the same messages used for the tapestry components, preferrably from the same Object/Service as the one available to pages. I've tried creating a setter method for the service but it isn't populated by hivemind. public void setMessages(Messages messages) { this.messages = messages; } Any suggestions? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: use messages in a service
anyone? Paul Stanton wrote: Hi All, I have a service which does not have access to the request cycle etc however I need to use the same messages used for the tapestry components, preferrably from the same Object/Service as the one available to pages. I've tried creating a setter method for the service but it isn't populated by hivemind. public void setMessages(Messages messages) { this.messages = messages; } Any suggestions? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: use messages in a service
hmm. I think it's going to be easier to write a new service that handles messages and picks up the messages from the application level properties file. it's unfortunate that i can't get the tapestry service from hivemind, but I don't have a request and would prefer not to attach to an arbitrary component in this case. Andreas thanks for the tips, at least i know there isn't an obvious solution! Andreas Andreou wrote: You need to inject ComponentMessagesSource which has provides a Messages getMessages(IComponent component) The problem is that you have to provide a component to that method, since that's how the correct resource bundle and also the correct locale (component.getPage().getLocale() is used ) is identified This ties your service to tapestry classes and also generally means that you'll have to have an active web request (i.e. your service won't be able to function if it's not directly triggered from a page or component call) So, 1) I'd suggest (if possible) building the message at the web layer - so, instead of having your service return a message, have it return a message key (and perhaps the message arguments). 2) if you dont mind tying to Tapestry and the service is called directly by a component pass the Message object as a parameter. On Jan 29, 2008 12:31 AM, Paul Stanton [EMAIL PROTECTED] wrote: anyone? Paul Stanton wrote: Hi All, I have a service which does not have access to the request cycle etc however I need to use the same messages used for the tapestry components, preferrably from the same Object/Service as the one available to pages. I've tried creating a setter method for the service but it isn't populated by hivemind. public void setMessages(Messages messages) { this.messages = messages; } Any suggestions? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
execute javascript from ajax eventlistener
Hi All. I have an Autocompleter, which has an 'onValueChanged' event listener. The event is being triggered and everything up to this point works as expected. What I'd like to do in this event listener is cause a javascript snippet to be executed on the client for example: @EventListener(targets = myAutocompleter, events = onValueChanged) public void doSomething() { // alert message on client getRequestCycle().getResponseBuilder().executeJavascript(alert('script executed');); } Obviously ResponseBuilder doesn't have an 'executeJavascript' method, but does anyone know of a way to achieve this functionality? I'm sure it's possible somehow. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ClassCastException in ExpressionBinding.setObject
Hi All, I've just logged a Jira issue: https://issues.apache.org/jira/browse/TAPESTRY-2157 It's trying to cast a class of type Page2 to type Page1 and getting an exception. Had anyone encountered this before? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: execute javascript from ajax eventlistener
Found a solution although it seems like a hack: java: getRequestCycle().getResponseBuilder().addStatusMessage(null, evalz, alert('executed');); js: dojo.event.topic.subscribe(evalz, function(msg){eval(msg.message);}); anyone got a better solution? p Paul Stanton wrote: Hi All. I have an Autocompleter, which has an 'onValueChanged' event listener. The event is being triggered and everything up to this point works as expected. What I'd like to do in this event listener is cause a javascript snippet to be executed on the client for example: @EventListener(targets = myAutocompleter, events = onValueChanged) public void doSomething() { // alert message on client getRequestCycle().getResponseBuilder().executeJavascript(alert('script executed');); } Obviously ResponseBuilder doesn't have an 'executeJavascript' method, but does anyone know of a way to achieve this functionality? I'm sure it's possible somehow. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
where is 4.1.4?
Hi, Can't find a download for 4.1.4: http://archive.apache.org/dist/tapestry/ does anyone have a copy? i need to roll back from 4.1.5. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: where is 4.1.4?
ah! ok, thanks. Andreas Andreou wrote: no 4.1.4 ever released :) 4.1.3 is the previous to 4.1.5 version On 2/15/08, Paul Stanton [EMAIL PROTECTED] wrote: Hi, Can't find a download for 4.1.4: http://archive.apache.org/dist/tapestry/ does anyone have a copy? i need to roll back from 4.1.5. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
updateComponent from JavaScript
Hi all, Is there something in the dojo library that i can call (in javascript) to request a component to update? I need to trigger this on a tapestry component, but the code must be called from the client side, ie not in java. Suggestions? Thanks, P. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: updateComponent from JavaScript
Thanks Andreas, that works great on Firefox, not sure why but not working with ie. The listener method is being called, but the component (contrib:TableView) is not its self does not change as it should. Your ClientLink is working perfectly though, I've tried the same thing using a button and an @EventListener and that doesn't work either. Andreas Andreou wrote: Hi - the 'traditional' way (without digging into internals) was to have an invisible DirectLink and trigger that with js. Recently, Igor added ClientLink to tacos latest snapshot ( http://tacos.sourceforge.net/tacos4.1/tacos-core/tapdocs/net.sf.tacos.Tacos/ClientLink/index.html ) which adds a js function (named anyway you declare) that does the ajax call - you then just call it whenever you like... On 2/20/08, Paul Stanton [EMAIL PROTECTED] wrote: Hi all, Is there something in the dojo library that i can call (in javascript) to request a component to update? I need to trigger this on a tapestry component, but the code must be called from the client side, ie not in java. Suggestions? Thanks, P. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T4 AutoCompleter onkeypress event never triggered
Hi all, I'm using the AutoCompleter component and noticed that hitting the enter key submits the form in IE. I've tried disabling keyCode 13 but since the component actually creates a select field, onkeypress, onkeydown and onkeyup are never triggered! Does anyone know of a way to disable enter key form submission on this component? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: updateComponent from JavaScript
gah .. have to go back to plain old JS. Paul Stanton wrote: Thanks Andreas, that works great on Firefox, not sure why but not working with ie. The listener method is being called, but the component (contrib:TableView) is not its self does not change as it should. Your ClientLink is working perfectly though, I've tried the same thing using a button and an @EventListener and that doesn't work either. Andreas Andreou wrote: Hi - the 'traditional' way (without digging into internals) was to have an invisible DirectLink and trigger that with js. Recently, Igor added ClientLink to tacos latest snapshot ( http://tacos.sourceforge.net/tacos4.1/tacos-core/tapdocs/net.sf.tacos.Tacos/ClientLink/index.html ) which adds a js function (named anyway you declare) that does the ajax call - you then just call it whenever you like... On 2/20/08, Paul Stanton [EMAIL PROTECTED] wrote: Hi all, Is there something in the dojo library that i can call (in javascript) to request a component to update? I need to trigger this on a tapestry component, but the code must be called from the client side, ie not in java. Suggestions? Thanks, P. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Stanton Gunn Software Pty Ltd Level 1, 24 Avalon Parade, Avalon, NSW 2107 Australia Office: +61 2 9918 3666 (ext 503) | Fax: +61 2 9918 7388 E-Mail: [EMAIL PROTECTED] Web: www.gunnsoft.com.au - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: updateComponent from JavaScript
Oh, ok, i'll try and update a div surrounding the table, otherwise back to JS i guess. Thanks. Andreas Andreou wrote: yea, I know noticed you're trying to update parts of a table... IE6 (not sure about IE7) has trouble updating parts of tables... There's a js trick to make this possible but it must be the first time i see someone needing this in Tapestry... perhaps most people either update the whole table, or just a div within a cell... On Thu, Feb 28, 2008 at 1:02 AM, Paul Stanton [EMAIL PROTECTED] wrote: gah .. have to go back to plain old JS. Paul Stanton wrote: Thanks Andreas, that works great on Firefox, not sure why but not working with ie. The listener method is being called, but the component (contrib:TableView) is not its self does not change as it should. Your ClientLink is working perfectly though, I've tried the same thing using a button and an @EventListener and that doesn't work either. Andreas Andreou wrote: Hi - the 'traditional' way (without digging into internals) was to have an invisible DirectLink and trigger that with js. Recently, Igor added ClientLink to tacos latest snapshot ( http://tacos.sourceforge.net/tacos4.1/tacos-core/tapdocs/net.sf.tacos.Tacos/ClientLink/index.html ) which adds a js function (named anyway you declare) that does the ajax call - you then just call it whenever you like... On 2/20/08, Paul Stanton [EMAIL PROTECTED] wrote: Hi all, Is there something in the dojo library that i can call (in javascript) to request a component to update? I need to trigger this on a tapestry component, but the code must be called from the client side, ie not in java. Suggestions? Thanks, P. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4 AutoCompleter onkeypress event never triggered
looking a bit deeper, the script for registering the onValueChanged event looks like this: tapestry.cleanConnectWidget(addrSearch, onValueChanged, formEvent1152711902); tapestry.formEvent1152711902=function(e){ // do some stuff }; tapestry.connectWidget(addrSearch, onValueChanged, formEvent1152711902);}); Does that mean I can do something similar to attach to a key event? like: tapestry.cleanConnectWidget(addrSearch, onKeyPress, checkMyKeyPress); tapestry.checkMyKeyPress = function(e){ return e.keyCode != 10; }; tapestry.connectWidget(addrSearch, onKeyPress, checkMyKeyPress); That doesn't work by the way, the event is never called, but is there a way Thanks, Paul. Paul Stanton wrote: Hi all, I'm using the AutoCompleter component and noticed that hitting the enter key submits the form in IE. I've tried disabling keyCode 13 but since the component actually creates a select field, onkeypress, onkeydown and onkeyup are never triggered! Does anyone know of a way to disable enter key form submission on this component? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4 AutoCompleter onkeypress event never triggered
Well that works for FireFox, but not IE. in IE the event listener is never triggered so I'm assuming it has trouble propagating the event handler from the container to the child. I worked out another solution yesterday though, it's pretty exhaustive but it works: 1. this function finds the text field which is dynamically created by the AutoCompleter component: function getTextField() { var elems = document.getElementsByTagName(input); for(var i = 0; i elems.length; i++) { var elem = elems[i]; if (elem.type == text elem.className == dojoComboBox) return elem; } return null; } 2. this procedure attaches the event handler to it, keep in mind this must be called AFTER ALL onload events handlers are finished: getTextField().onkeypress = function(event) { if (!event) event = window.event; if (event.keyCode == 13) { dojo.event.browser.stopEvent(event); return false; } }; Far from the preferred solution, but it works. p. Andreas Andreou wrote: I'd connect a key handler somewhere higher at the html hierarchy (perhaps at the containing div or form level) and do something like: dojo.event.connect(dojo.byId('container'), 'onkeydown', function(e) { if (e.keyCode==13) // or use e.target to refine the condition for ENTER trapping dojo.event.browset.stopEvent(e); } ); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: updateComponent from JavaScript
Andreas, thanks, calling updateComponent on a wrapping div works. by the way, i was updating the whole table before, that wasn't working. table jwcid=[EMAIL PROTECTED]:TableView... p. Paul Stanton wrote: Oh, ok, i'll try and update a div surrounding the table, otherwise back to JS i guess. Thanks. Andreas Andreou wrote: yea, I know noticed you're trying to update parts of a table... IE6 (not sure about IE7) has trouble updating parts of tables... There's a js trick to make this possible but it must be the first time i see someone needing this in Tapestry... perhaps most people either update the whole table, or just a div within a cell... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T4 - Forwarding to wrong page
I've got a strange problem: One of my pages (FinaliseReport) has a button which has it's own listener: input type=button jwcid=@Submit listener=listener:generateReport value=Generate Report/ When clicked, the listener does some processing then returns its self either via this or via requestCycle.getPage(name) - i've tried both. Now, some times the result is that the previous page is loaded and I can't figure out why. I've turned on logging, and injected a stack trace in RequestCycle.activate() - below. this is just a failed request from click to render you can see that FinaliseReport (the correct page) is activated twice, and then CustomiseReport (the incorrect page) is activated lastly. If anyone can figure out why tapestry is going crazy, please let me know. Thanks, Paul. 3441750 [http-80-Processor25] DEBUG org.apache.tapestry.engine.RequestCycle - Activating page [EMAIL PROTECTED] java.lang.Exception at org.apache.tapestry.engine.RequestCycle.activate(RequestCycle.java:589) at org.apache.tapestry.engine.DirectService.service(DirectService.java:109) at $IEngineService_11877e2ff00.service($IEngineService_11877e2ff00.java) at org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72) at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:241) at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54) at $WebRequestServicer_11877e2fed7.service($WebRequestServicer_11877e2fed7.java) at $WebRequestServicer_11877e2fed3.service($WebRequestServicer_11877e2fed3.java) at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61) at $ServletRequestServicer_11877e2feb9.service($ServletRequestServicer_11877e2feb9.java) at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55) at $ServletRequestServicerFilter_11877e2feb5.service($ServletRequestServicerFilter_11877e2feb5.java) at $ServletRequestServicer_11877e2febb.service($ServletRequestServicer_11877e2febb.java) at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52) at $ServletRequestServicerFilter_11877e2feb3.service($ServletRequestServicerFilter_11877e2feb3.java) at $ServletRequestServicer_11877e2febb.service($ServletRequestServicer_11877e2febb.java) at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53) at $ServletRequestServicerFilter_11877e2feb7.service($ServletRequestServicerFilter_11877e2feb7.java) at $ServletRequestServicer_11877e2febb.service($ServletRequestServicer_11877e2febb.java) at $ServletRequestServicer_11877e2fead.service($ServletRequestServicer_11877e2fead.java) at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126) at org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:171) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:619) 3441782 [http-80-Processor25] DEBUG org.apache.tapestry.engine.RequestCycle - Set attribute org.apache.tapestry.Form to [EMAIL PROTECTED]/$Border.borderForm] 3441782 [http-80-Processor25] DEBUG org.apache.tapestry.engine.RequestCycle - Set attribute org.mb.tapestry.base.IfValue to false 3441782 [http-80-Processor25] DEBUG org.apache.tapestry.engine.RequestCycle - Set attribute org.apache.tapestry.form.LinkSubmit to [EMAIL PROTECTED]/$Border.$BorderTab.$LinkSubmit_0] 3441782 [http-80-Processor25] DEBUG org.apache.tapestry.engine.RequestCycle - Removing attribute
Re: T4 - Forwarding to wrong page
Never mind, I figured it out. When using an explicit listener with @Submit, the forms listener is still called, after the submit's listener. The form's listener was overriding the desired result, so now my processing is done in the form's listener instead. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T4-AJAX executing client side script from an async listener
Hi all, I have a form which is handled via an async listener, which currently just does some component updates: ResponseBuilder builder = getRequestCycle().getResponseBuilder(); builder.updateComponent(dataPanes); builder.updateComponent(filterSubmit); But now I need to be able to execute some script on the client once the updates have completed. I'm assuming this can be achieved, but I can't figure out how. I've tried using the writeBodyScript method, but the builder's writer is null: builder.beginBodyScript(writer, getRequestCycle()); builder.writeBodyScript(writer, alert('here');, getRequestCycle()); builder.endBodyScript(writer, getRequestCycle()); If I change the listener to use JSON the writer is not null, but it still doesn't work, and my update component calls don't work. Any tips appreciated. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4-AJAX executing client side script from an async listener
yes it's 4.1.5, how would i do that andreas? I find the documentation on this stuff very limited. p Andreas Andreou wrote: Can't you conditionally include a @Script in the response? Also, that's on 4.1.5, right? On Fri, Mar 28, 2008 at 1:32 AM, Paul Stanton [EMAIL PROTECTED] wrote: Hi all, I have a form which is handled via an async listener, which currently just does some component updates: ResponseBuilder builder = getRequestCycle().getResponseBuilder(); builder.updateComponent(dataPanes); builder.updateComponent(filterSubmit); But now I need to be able to execute some script on the client once the updates have completed. I'm assuming this can be achieved, but I can't figure out how. I've tried using the writeBodyScript method, but the builder's writer is null: builder.beginBodyScript(writer, getRequestCycle()); builder.writeBodyScript(writer, alert('here');, getRequestCycle()); builder.endBodyScript(writer, getRequestCycle()); If I change the listener to use JSON the writer is not null, but it still doesn't work, and my update component calls don't work. Any tips appreciated. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T4 - Autocompleter without doing a full page re-render
Hi all, I'm using the @Autocompleter component and have noticed that at each interaction (lookup and selection) it essentially re-processes the whole wrapping page at the back end. In this case, I have a couple of sometimes large database lookups that are being re-queried and as a result the autocompleter appears slow and the server is working far harder than it needs to. Is there a way of avoiding this excess processing? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4 - Autocompleter without doing a full page re-render
thanks marcus, i'll see if i can use that without 'dirtying' my code too much. p. Marcus Schulte wrote: You can distinguish between a normal render and an ajax-render via getRequestCycle().getResponseBuilder().isDynamic(), hth, Marcus On 01/04/2008, Paul Stanton [EMAIL PROTECTED] wrote: Hi all, I'm using the @Autocompleter component and have noticed that at each interaction (lookup and selection) it essentially re-processes the whole wrapping page at the back end. In this case, I have a couple of sometimes large database lookups that are being re-queried and as a result the autocompleter appears slow and the server is working far harder than it needs to. Is there a way of avoiding this excess processing? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T4 - async - pre-submit client side handler
Hi guys, I've got a @Form which submits async, and a @Submit. I've also got an onclick js event handler which is causing me some grief, but only for IE: When the submit button is clicked, in Firefox the js is called, and then the form submits as per expected. however in IE the js is called but the form does not submit. If I remove the onclick attribute from the @Submit, the form is submitted but the crucial js processing has not been executed. I've tried using onmousedown instead of onclick and also onsubmit on the @Form, none of which help. It stinks of a dojo bug with ie to me. Any tips guys? thanks, p. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with @EventListener
don't double post please kk4Nabble wrote: Hi.. I am using tapestry 4.1 My html code is.. input id=supplimentalId class=button jwcid=@Submit value=Add/ and java code is @EventListener(elements = supplimentalId, events = onclick) public void watchText(IRequestCycle cycle) { // do something ((Dialog)getComponent(DialogContentSupplimental)).show(); } ie .. when i click on add button this dialog box must open. But the above method is not working.,ie @EventListener is never called. Is the above code correct? Have i missed anything? Please if anybody could help me, I ll be thankful. Regards, kavya - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: @EventListener
Kavya, The id should be part of the jwcid expression: input class=button jwcid=[EMAIL PROTECTED] value=Add/ the component will create the id attribute for you. Kavya K wrote: Hi.. My html code is.. input id=supplimentalId class=button jwcid=@Submit value=Add/ and java code is @EventListener(elements = supplimentalId, events = onclick) public void watchText(IRequestCycle cycle) { // do something ((Dialog)getComponent(DialogContentSupplimental)).show(); } ie .. when i click on add button this dialog box must open. But the above method is not working. Please if anybody could help me, I ll be thankfull. Regards, kavya - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4 - async - pre-submit client side handler
any ideas guys .. it seems dojo can't attach the ajax submit handler if i have an onclick on my button - therefore is there a way to pre-pend a handler after dojo has attached to the form aka registerForm? p. Paul Stanton wrote: Hi guys, I've got a @Form which submits async, and a @Submit. I've also got an onclick js event handler which is causing me some grief, but only for IE: When the submit button is clicked, in Firefox the js is called, and then the form submits as per expected. however in IE the js is called but the form does not submit. If I remove the onclick attribute from the @Submit, the form is submitted but the crucial js processing has not been executed. I've tried using onmousedown instead of onclick and also onsubmit on the @Form, none of which help. It stinks of a dojo bug with ie to me. Any tips guys? thanks, p. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dojo 1.0 with tapestry ajax components
Has anyone got tapestry ajax components working with Dojo 1.0? I've followed the tacos instructions to get dojo 1.0.2 loaded by tapestry (http://tacos.sourceforge.net/tacos4.1/tacos-dojo/index.html) but the tapestry components don't work with the new version of Dojo. Does anyone know what is required to get them to work, or is it just not possible? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T4 tapestry.form.submitAsync delayed?
I've noticed from watching client side and server side logs that when tapestry.form.submitAsync is called, it seems to go into a form of stack, and is the request is only eventually made once a previous async submit has responded. I'm fairly sure of this because I had a js function setting a timestamp on a form field and submitting the form async, then logging the value of the timestamp on the server. The server was getting the same timestamp over and over again, however the value at the time of calling tapestry.form.submitAsync was different. My question is, is there any way of controlling this stack and cancelling previous yet un-requested submits? p. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
4.1.2 without maven
just downloaded the latest framework, contrib and annotation jars hoping they would work with the libs I already have for 4.1.1 they don't where can I get the project .zip or something to list the required libs and their versions? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
@Dialog form with validation errors broken
4.1.1 with the following example (pseudo code) body a onclick=async:display dialog/ @Dialog hidden on load=true @Form async=false @DropdownDatePicker translator=translator:date,format=dd/MM// /@Form /@Dialog /body When I submit the dialog's form with an invalid date ('01/01/206') the page re-loads with the dialog already displayed INLINE essentially breaking the layout of the page. How is field validation supposed to work with ajax dialogs? Ideally, I'd like the dialog displayed with the field highlighted as if it weren't an ajax form. I understand this is a pretty tall order, but the current behaviour is just WRONG. It appears as if the Dialog component is not registered if there is a validation callback. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: @Dialog form with validation errors broken
further to that: In my system out I get: WARNING: Parameters: Invalid chunk ignored. At the bottom of my page I get: DEBUG: invalid date string: 206-01-01 In the Dialog form (which shouldn't be visible) the DropdownDatePicker component does not render, while the rest of the form does. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: @Dialog form with validation errors broken
OK, I've changed my form declaration from form jwcid=@Form listener=listener:save to form jwcid=@Form success=listener:save This stops the rendering issues and log messages, however how can I notify the user of their invalid entry? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.1 - ComponentClass and Component annotation question
hows the release coming? Jesse Kuhnert wrote: I think I'm going to start a vote to release it this week, so if that goes well possibly this week. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
4.1 programmatically define message key
Hi all, span jwcid=@If condition=ognl:value==1 span jwcid=@Insert value=message:message.1/ /span span jwcid=@If condition=ognl:value==2 span jwcid=@Insert value=message:message.2/ /span How would I write this without the If, with just one Insert programmatically selecting the appropriate message key? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 4.1 programmatically define message key
Thanks guys. Nick Westgate wrote: I'm not working with T4, but if you control value carefully: ognl:messages.message('message.' + value) Cheers, Nick. Kolesnikov, Alexander GNI wrote: I would actually have a method in the page class to retrieve this message, but I wonder if something like this will work: span jwcid=@Insert value=ognl:value == 1 ? messages.message('message1') : messages.message('message2')/ ? -Original Message- From: Paul Stanton [mailto:[EMAIL PROTECTED] Sent: 07 June 2007 09:19 To: Tapestry users Subject: 4.1 programmatically define message key Hi all, span jwcid=@If condition=ognl:value==1 span jwcid=@Insert value=message:message.1/ /span span jwcid=@If condition=ognl:value==2 span jwcid=@Insert value=message:message.2/ /span How would I write this without the If, with just one Insert programmatically selecting the appropriate message key? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 4.1 programmatically define message key
I couldn't get the ognl call to work. I got the exception: Method message failed for object [EMAIL PROTECTED] java.lang.NoSuchMethodException message(java.lang.String) Could be a 4.1.1 thing vs 4.1.2 getMessages().getMessage(String) in my java class works however, so I'll use that. Nick Westgate wrote: I'm not working with T4, but if you control value carefully: ognl:messages.message('message.' + value) Cheers, Nick. Kolesnikov, Alexander GNI wrote: I would actually have a method in the page class to retrieve this message, but I wonder if something like this will work: span jwcid=@Insert value=ognl:value == 1 ? messages.message('message1') : messages.message('message2')/ ? -Original Message- From: Paul Stanton [mailto:[EMAIL PROTECTED] Sent: 07 June 2007 09:19 To: Tapestry users Subject: 4.1 programmatically define message key Hi all, span jwcid=@If condition=ognl:value==1 span jwcid=@Insert value=message:message.1/ /span span jwcid=@If condition=ognl:value==2 span jwcid=@Insert value=message:message.2/ /span How would I write this without the If, with just one Insert programmatically selecting the appropriate message key? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the address shown. This email transmission may contain confidential information. This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly. Please delete it from your files if you are not the intended recipient. Thank you for your compliance. Copyright 2007 CIGNA == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
dojo dialog render issue
Hi All, I have 2 dojo dialogs, hidden by default which have been working fine. div jwcid=[EMAIL PROTECTED] hidden=ognl:truedialog/div I've now added a component to the page which delays the load time for the page somewhat and in firefox causes a funny render issue for the dialogs. The dialog's content is momentarily displayed (inline) at the bottom of my page, and the page's background colour is the transparent grey of the dialog. It seems to be only for the short period between when the page is rendered and onload event is triggered. when the page is finished loading it goes back to normal and everything functions fine. If I set the style of the dialog to display:none; the dialog does not behave properly, it does not display when dojo.html.show is called on it. This is because dojo caches the initial display setting when it first hides the component. I've looked at the code that dojo runs in the onload event hander: tapestry.widget.synchronizeWidgetState(myDialog, Dialog, {bgColor:black,bgOpacity:0.400059604645}, false); dojo.widget.byId(myDialog).hide();}); Does anyone know how to stop this behaviour and essentially render the compents as if they have already been registered and hidden with dojo? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dojo dialog render issue
How? Jesse Kuhnert wrote: Possibly - but I might need more information (ie expected vs. actual ) to get it set up correctly. p.s. Can you file a jira issue for it so I remember? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dojo dialog render issue
https://issues.apache.org/jira/browse/TAPESTRY-1560 how's 4.1.2 coming? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dojo dialog render issue
?? Paul Stanton wrote: https://issues.apache.org/jira/browse/TAPESTRY-1560 how's 4.1.2 coming? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
4.1.2 dojo gregorian.js
Hi, I've just installed 4.1.2 for the first time and run up my application (previously tested under 4.1.1). I did this simply by replacing my existing jars with the new versions (I don't use maven) so I've probably brought this on myself ;) I get the following warnings, the files can be found under the parent dir (/dojo-0.4.3/src/i18n/calendar/nls), shouldn't dojo look there automatically? 2007-06-25 15:24:36,093 WARN Asset:241 - Classpath resource '/dojo-0.4.3/src/i18n/calendar/nls/en-au/gregorian.js' does not exist. 2007-06-25 15:24:36,109 WARN Asset:241 - Classpath resource '/dojo-0.4.3/src/i18n/calendar/nls/en-au/gregorianExtras.js' does not exist. Any tips welcome. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 4.1.2 dojo gregorian.js
Anyone? Paul Stanton wrote: Hi, I've just installed 4.1.2 for the first time and run up my application (previously tested under 4.1.1). I did this simply by replacing my existing jars with the new versions (I don't use maven) so I've probably brought this on myself ;) I get the following warnings, the files can be found under the parent dir (/dojo-0.4.3/src/i18n/calendar/nls), shouldn't dojo look there automatically? 2007-06-25 15:24:36,093 WARN Asset:241 - Classpath resource '/dojo-0.4.3/src/i18n/calendar/nls/en-au/gregorian.js' does not exist. 2007-06-25 15:24:36,109 WARN Asset:241 - Classpath resource '/dojo-0.4.3/src/i18n/calendar/nls/en-au/gregorianExtras.js' does not exist. Any tips welcome. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 4.1.2 dojo gregorian.js
Thanks, looks like it missed the 4.1.2 boat :( andyhot wrote: Additionally, take a look at http://tapestry.apache.org/tapestry4.1/usersguide/localization.html#localization.accepted-locales It's always a good idea to limit those to the ones your app truly supports andyhot wrote: I had opened up a jira for this: https://issues.apache.org/jira/browse/TAPESTRY-1551 I'm not exactly sure if there's a way to tell dojo which locales exist in the server so as not to do those requests... The only hack i can offer you is to create those 2 classpath entries yourself, by copying the related files of the parent folder Paul Stanton wrote: Anyone? Paul Stanton wrote: Hi, I've just installed 4.1.2 for the first time and run up my application (previously tested under 4.1.1). I did this simply by replacing my existing jars with the new versions (I don't use maven) so I've probably brought this on myself ;) I get the following warnings, the files can be found under the parent dir (/dojo-0.4.3/src/i18n/calendar/nls), shouldn't dojo look there automatically? 2007-06-25 15:24:36,093 WARN Asset:241 - Classpath resource '/dojo-0.4.3/src/i18n/calendar/nls/en-au/gregorian.js' does not exist. 2007-06-25 15:24:36,109 WARN Asset:241 - Classpath resource '/dojo-0.4.3/src/i18n/calendar/nls/en-au/gregorianExtras.js' does not exist. Any tips welcome. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 4.1.2 dojo gregorian.js
Jesse, I just added: meta key=org.apache.tapestry.accepted-locales value=en/ to my .applicaiton file. This solves it for me, and is most likely an good improvement for my application for other reasons. Thanks, Paul. Jesse Kuhnert wrote: You can try replacing the default version of ajaxShellDelegate given to the Shell/ScriptIncludes with your own modified version. (source from http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/AjaxShellDelegate.java?view=markup ) Try dropping the locale parameter to djConfig and see if that does the trick or not. We can bug the ibm guys about it but I want to be very sure of the failures before doing that. On 6/27/07, Paul Stanton [EMAIL PROTECTED] wrote: Thanks, looks like it missed the 4.1.2 boat :( andyhot wrote: Additionally, take a look at http://tapestry.apache.org/tapestry4.1/usersguide/localization.html#localization.accepted-locales It's always a good idea to limit those to the ones your app truly supports andyhot wrote: I had opened up a jira for this: https://issues.apache.org/jira/browse/TAPESTRY-1551 I'm not exactly sure if there's a way to tell dojo which locales exist in the server so as not to do those requests... The only hack i can offer you is to create those 2 classpath entries yourself, by copying the related files of the parent folder Paul Stanton wrote: Anyone? Paul Stanton wrote: Hi, I've just installed 4.1.2 for the first time and run up my application (previously tested under 4.1.1). I did this simply by replacing my existing jars with the new versions (I don't use maven) so I've probably brought this on myself ;) I get the following warnings, the files can be found under the parent dir (/dojo-0.4.3/src/i18n/calendar/nls), shouldn't dojo look there automatically? 2007-06-25 15:24:36,093 WARN Asset:241 - Classpath resource '/dojo-0.4.3/src/i18n/calendar/nls/en-au/gregorian.js' does not exist. 2007-06-25 15:24:36,109 WARN Asset:241 - Classpath resource '/dojo-0.4.3/src/i18n/calendar/nls/en-au/gregorianExtras.js' does not exist. Any tips welcome. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
4.1.1 upgrade to 4.1.2 async listener no longer works
Hi, I've upgraded to 4.1.2 from 4.1.1 and am getting the following when I try to load one of my Dojo Dialogs (async). It seems tapestry is trying to call getPage with a null page name, but I'm not sure why formSubmit is being called at all (unless it's part of a rewind?) The trigger is being defined like so: input type=button jwcid=[EMAIL PROTECTED] label=show dialog/ The listener being called is defined like so: @EventListener(targets = {myButton}, events = onclick, async = true) public void showMyDialog() If i click my button i get the following exception wrapped in a error dialog (async): Failure invoking listener method 'public org.apache.tapestry.IPage MyPage.formSubmit()' on [EMAIL PROTECTED]: Parameter name must not be null. org.apache.hivemind.ApplicationRuntimeException Failure invoking listener method 'public org.apache.tapestry.IPage com.pds.pdsv3.tapestry.pages.veridical.VeridicalPage.formSubmit()' on [EMAIL PROTECTED]/Comparables]: Parameter name must not be null. component: [EMAIL PROTECTED]/Comparables] location: context:/WEB-INF/veridical/Comparables.page, line 5, column 81 1 ?xml version=1.0 encoding=UTF-8? 2 !DOCTYPE page-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN 3 http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; 4 5 page-specification class=com.pds.pdsv3.tapestry.pages.veridical.Comparables/ [ +/- ] Exception: http://localhost:8080/PDS/app Parameter name must not be null. java.lang.NullPointerException Parameter name must not be null. Stack Trace: * org.apache.hivemind.util.Defense.notNull(Defense.java:41) * org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:217) * $IRequestCycle_1138a7ba350.getPage($IRequestCycle_1138a7ba350.java) * $IRequestCycle_1138a7ba25a.getPage($IRequestCycle_1138a7ba25a.java) * MyPage.formSubmit(VeridicalPage.java:65) * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) * sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) * sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) * java.lang.reflect.Method.invoke(Method.java:597) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMethod(ListenerMethodInvokerImpl.java:276) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:221) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke(ListenerMethodInvokerImpl.java:157) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:80) * org.apache.tapestry.listener.SyntheticListener.actionTriggered(SyntheticListener.java:52) * org.apache.tapestry.listener.ListenerInvokerTerminator.invokeListener(ListenerInvokerTerminator.java:50) * $ListenerInvoker_1138a7ba23c.invokeListener($ListenerInvoker_1138a7ba23c.java) * org.apache.tapestry.form.Form.renderComponent(Form.java:200) * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725) * org.apache.tapestry.services.impl.DojoAjaxResponseBuilder.render(DojoAjaxResponseBuilder.java:625) * org.apache.tapestry.form.Form.rewind(Form.java:269) * org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:453) * org.apache.tapestry.form.Form.trigger(Form.java:280) * org.apache.tapestry.engine.DirectService.triggerComponent(DirectService.java:166) * org.apache.tapestry.engine.DirectService.service(DirectService.java:142) * $IEngineService_1138a7ba2ba.service($IEngineService_1138a7ba2ba.java) * org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72) * org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:237) * org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54) * $WebRequestServicer_1138a7ba28e.service($WebRequestServicer_1138a7ba28e.java) * org.apache.tapestry.services.impl.DisableCachingFilter.service(DisableCachingFilter.java:54) * $WebRequestServicerFilter_1138a7ba290.service($WebRequestServicerFilter_1138a7ba290.java) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 4.1.1 upgrade to 4.1.2 async listener no longer works
Thanks Jesse, I've changed it to @EventListener(targets = {myButton}, events = onclick, async = true, autoSubmit = false) public void showMyDialog() and the same exception is thrown. Any more info? Paul. Jesse Kuhnert wrote: Components implementing IFormComponent that are targeted with an @EventListener do now have their surrounding forms submitted automatically as part of the async request. If there is something in your logic that doesn't need/want this to happen you can set the autoSubmit = false parameter in the annotation and it will do the pure async request only without the form submission. http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html#EventListener On 7/3/07, Paul Stanton [EMAIL PROTECTED] wrote: Hi, I've upgraded to 4.1.2 from 4.1.1 and am getting the following when I try to load one of my Dojo Dialogs (async). It seems tapestry is trying to call getPage with a null page name, but I'm not sure why formSubmit is being called at all (unless it's part of a rewind?) The trigger is being defined like so: input type=button jwcid=[EMAIL PROTECTED] label=show dialog/ The listener being called is defined like so: @EventListener(targets = {myButton}, events = onclick, async = true) public void showMyDialog() If i click my button i get the following exception wrapped in a error dialog (async): Failure invoking listener method 'public org.apache.tapestry.IPage MyPage.formSubmit()' on [EMAIL PROTECTED]: Parameter name must not be null. org.apache.hivemind.ApplicationRuntimeException Failure invoking listener method 'public org.apache.tapestry.IPage com.pds.pdsv3.tapestry.pages.veridical.VeridicalPage.formSubmit()' on [EMAIL PROTECTED]/Comparables]: Parameter name must not be null. component: [EMAIL PROTECTED]/Comparables] location: context:/WEB-INF/veridical/Comparables.page, line 5, column 81 1 ?xml version=1.0 encoding=UTF-8? 2 !DOCTYPE page-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN 3 http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; 4 5 page-specification class=com.pds.pdsv3.tapestry.pages.veridical.Comparables/ [ +/- ] Exception: http://localhost:8080/PDS/app Parameter name must not be null. java.lang.NullPointerException Parameter name must not be null. Stack Trace: * org.apache.hivemind.util.Defense.notNull(Defense.java:41) * org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java :217) * $IRequestCycle_1138a7ba350.getPage($IRequestCycle_1138a7ba350.java) * $IRequestCycle_1138a7ba25a.getPage($IRequestCycle_1138a7ba25a.java) * MyPage.formSubmit(VeridicalPage.java:65) * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) * sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) * sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) * java.lang.reflect.Method.invoke(Method.java:597) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMethod( ListenerMethodInvokerImpl.java:276) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod (ListenerMethodInvokerImpl.java:221) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke( ListenerMethodInvokerImpl.java:157) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod (ListenerMethodInvokerImpl.java:80) * org.apache.tapestry.listener.SyntheticListener.actionTriggered( SyntheticListener.java:52) * org.apache.tapestry.listener.ListenerInvokerTerminator.invokeListener( ListenerInvokerTerminator.java:50) * $ListenerInvoker_1138a7ba23c.invokeListener($ListenerInvoker_1138a7ba23c.java) * org.apache.tapestry.form.Form.renderComponent(Form.java:200) * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java :725) * org.apache.tapestry.services.impl.DojoAjaxResponseBuilder.render( DojoAjaxResponseBuilder.java:625) * org.apache.tapestry.form.Form.rewind(Form.java:269) * org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java :453) * org.apache.tapestry.form.Form.trigger(Form.java:280) * org.apache.tapestry.engine.DirectService.triggerComponent( DirectService.java:166) * org.apache.tapestry.engine.DirectService.service(DirectService.java :142) * $IEngineService_1138a7ba2ba.service($IEngineService_1138a7ba2ba.java) * org.apache.tapestry.services.impl.EngineServiceOuterProxy.service( EngineServiceOuterProxy.java:72) * org.apache.tapestry.engine.AbstractEngine.service( AbstractEngine.java:237) * org.apache.tapestry.services.impl.InvokeEngineTerminator.service( InvokeEngineTerminator.java:54) * $WebRequestServicer_1138a7ba28e.service($WebRequestServicer_1138a7ba28e.java) * org.apache.tapestry.services.impl.DisableCachingFilter.service( DisableCachingFilter.java:54
Re: 4.1.1 upgrade to 4.1.2 async listener no longer works
Should I log this in Jira Jesse? Paul Stanton wrote: Thanks Jesse, I've changed it to @EventListener(targets = {myButton}, events = onclick, async = true, autoSubmit = false) public void showMyDialog() and the same exception is thrown. Any more info? Paul. Jesse Kuhnert wrote: Components implementing IFormComponent that are targeted with an @EventListener do now have their surrounding forms submitted automatically as part of the async request. If there is something in your logic that doesn't need/want this to happen you can set the autoSubmit = false parameter in the annotation and it will do the pure async request only without the form submission. http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html#EventListener On 7/3/07, Paul Stanton [EMAIL PROTECTED] wrote: Hi, I've upgraded to 4.1.2 from 4.1.1 and am getting the following when I try to load one of my Dojo Dialogs (async). It seems tapestry is trying to call getPage with a null page name, but I'm not sure why formSubmit is being called at all (unless it's part of a rewind?) The trigger is being defined like so: input type=button jwcid=[EMAIL PROTECTED] label=show dialog/ The listener being called is defined like so: @EventListener(targets = {myButton}, events = onclick, async = true) public void showMyDialog() If i click my button i get the following exception wrapped in a error dialog (async): Failure invoking listener method 'public org.apache.tapestry.IPage MyPage.formSubmit()' on [EMAIL PROTECTED]: Parameter name must not be null. org.apache.hivemind.ApplicationRuntimeException Failure invoking listener method 'public org.apache.tapestry.IPage com.pds.pdsv3.tapestry.pages.veridical.VeridicalPage.formSubmit()' on [EMAIL PROTECTED]/Comparables]: Parameter name must not be null. component: [EMAIL PROTECTED]/Comparables] location: context:/WEB-INF/veridical/Comparables.page, line 5, column 81 1 ?xml version=1.0 encoding=UTF-8? 2 !DOCTYPE page-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN 3 http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; 4 5 page-specification class=com.pds.pdsv3.tapestry.pages.veridical.Comparables/ [ +/- ] Exception: http://localhost:8080/PDS/app Parameter name must not be null. java.lang.NullPointerException Parameter name must not be null. Stack Trace: * org.apache.hivemind.util.Defense.notNull(Defense.java:41) * org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java :217) * $IRequestCycle_1138a7ba350.getPage($IRequestCycle_1138a7ba350.java) * $IRequestCycle_1138a7ba25a.getPage($IRequestCycle_1138a7ba25a.java) * MyPage.formSubmit(VeridicalPage.java:65) * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) * sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) * sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) * java.lang.reflect.Method.invoke(Method.java:597) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMethod( ListenerMethodInvokerImpl.java:276) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod (ListenerMethodInvokerImpl.java:221) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke( ListenerMethodInvokerImpl.java:157) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod (ListenerMethodInvokerImpl.java:80) * org.apache.tapestry.listener.SyntheticListener.actionTriggered( SyntheticListener.java:52) * org.apache.tapestry.listener.ListenerInvokerTerminator.invokeListener( ListenerInvokerTerminator.java:50) * $ListenerInvoker_1138a7ba23c.invokeListener($ListenerInvoker_1138a7ba23c.java) * org.apache.tapestry.form.Form.renderComponent(Form.java:200) * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java :725) * org.apache.tapestry.services.impl.DojoAjaxResponseBuilder.render( DojoAjaxResponseBuilder.java:625) * org.apache.tapestry.form.Form.rewind(Form.java:269) * org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java :453) * org.apache.tapestry.form.Form.trigger(Form.java:280) * org.apache.tapestry.engine.DirectService.triggerComponent( DirectService.java:166) * org.apache.tapestry.engine.DirectService.service(DirectService.java :142) * $IEngineService_1138a7ba2ba.service($IEngineService_1138a7ba2ba.java) * org.apache.tapestry.services.impl.EngineServiceOuterProxy.service( EngineServiceOuterProxy.java:72) * org.apache.tapestry.engine.AbstractEngine.service( AbstractEngine.java:237) * org.apache.tapestry.services.impl.InvokeEngineTerminator.service( InvokeEngineTerminator.java:54) * $WebRequestServicer_1138a7ba28e.service($WebRequestServicer_1138a7ba28e.java
4.1.1 (or 4.1.2) Dojo Dialog escaping pageBeginRender
Hi all, Currently I've got a couple of dialogs within a page. Each time a dialog is shown or hidden (via @EventLister annotation) the page's pageBeginRender method is called and this is more work than is necessary just do display a simple dialog. Is there a way to detect that the call is being made by the dialog request and in that case, not execute exhaustive code? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
4.1.1 Dialog disappears without request
Hi all. I can't test this under 4.1.2 because of my other issues (post - 4.1.1 upgrade to 4.1.2 async listener no longer works). I'm having another issue with my dialogs. This one is totally perplexing. What happens is this: 1. I click my add button, the dialog appears. 2. I click my cancel button, the dialog disappears. 3. I click my add button, the dialog appears for a second or two, then disappears of it's own accord. My debugging output: showDialog cancelDialog showDialog cancelDialog .. so the 2nd 'cancelDialog' shouldn't be called and is not triggered by user input, maybe dojo is calling it? why? My Java: @EventListener(targets = {myShowButton}, events = onclick, async = true) public void showDialog() { System.out.println(showDialog); ..do work .. setDialogHidden(false); getRequestCycle().getResponseBuilder().updateComponent(addDialog); } @EventListener(targets = myCancelButton, events = onclick, async = true) public void cancelDialog() { System.out.println(cancelDialog); ..do work .. setDialogHidden(true); getRequestCycle().getResponseBuilder().updateComponent(addDialog); } My Html: form jwcid=[EMAIL PROTECTED] listener=ognl:page.listeners.formSubmit input type=button jwcid=[EMAIL PROTECTED] label=Show Dialog/ /form div jwcid=[EMAIL PROTECTED] hidden=ognl:dialogHidden form jwcid=[EMAIL PROTECTED] success=listener:mySaveListener input type=button jwcid=[EMAIL PROTECTED] label=Cancel/ /form /div - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 4.1.1 Dialog disappears without request
Turns out this is fixed in 4.1.2. I had to do some funky stuff to get 4.1.2 working and it's not 100% yet, but I can't reproduce this particular issue in 4.1.2. So thanks for the suggestion, it did help me figure out another problem ;) Igor Drobiazko wrote: Hi Paul, just guessing: the might be some bug in @EventListener You could try to replace your Buttons by Submit and call your listener methods via action parameter: input type=submit jwcid=@Submit action=listener:showDialog/ Why do you prefer the combination of buttons + @EventListener? Your listener methods is triggered by clicking on a button, so you don't need the event listener? On 7/4/07, Paul Stanton [EMAIL PROTECTED] wrote: Hi all. I can't test this under 4.1.2 because of my other issues (post - 4.1.1 upgrade to 4.1.2 async listener no longer works). I'm having another issue with my dialogs. This one is totally perplexing. What happens is this: 1. I click my add button, the dialog appears. 2. I click my cancel button, the dialog disappears. 3. I click my add button, the dialog appears for a second or two, then disappears of it's own accord. My debugging output: showDialog cancelDialog showDialog cancelDialog .. so the 2nd 'cancelDialog' shouldn't be called and is not triggered by user input, maybe dojo is calling it? why? My Java: @EventListener(targets = {myShowButton}, events = onclick, async = true) public void showDialog() { System.out.println(showDialog); ..do work .. setDialogHidden(false); getRequestCycle().getResponseBuilder().updateComponent(addDialog); } @EventListener(targets = myCancelButton, events = onclick, async = true) public void cancelDialog() { System.out.println(cancelDialog); ..do work .. setDialogHidden(true); getRequestCycle().getResponseBuilder().updateComponent(addDialog); } My Html: form jwcid=[EMAIL PROTECTED] listener=ognl:page.listeners.formSubmit input type=button jwcid=[EMAIL PROTECTED] label=Show Dialog/ /form div jwcid=[EMAIL PROTECTED] hidden=ognl:dialogHidden form jwcid=[EMAIL PROTECTED] success=listener:mySaveListener input type=button jwcid=[EMAIL PROTECTED] label=Cancel/ /form /div - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 4.1.1 upgrade to 4.1.2 async listener no longer works
I've figured out why the exception is being thrown: my formSubmit method requires the submission control (Submit or LinkSubmit) to have set the tag and selected attributes/parameters. Now, my async button comes in without those set and the null pointer is thrown. So I've added an if null return block and the dialog appears as required, but ... ... that still doesn't explain why the autoSubmit parameter in the Annotation isn't stopping formSubmit from being called. I've also tried with a Submit component and a LinkSubmit using attributes in the markup to define the listener etc, still the form submit listener is called. So, could the issue be that autoSubmit attribute does not work? Seems like my only option (besides living with it for now) is to use a DirectLink which works fine as it's not associated with a form .. so I'll have to figure out how to style that like a button, or emulate it's behaviour in a button. Jesse, I've logged an issue in Jira for you. https://issues.apache.org/jira/browse/TAPESTRY-1630 Thanks, Paul. Paul Stanton wrote: Should I log this in Jira Jesse? Paul Stanton wrote: Thanks Jesse, I've changed it to @EventListener(targets = {myButton}, events = onclick, async = true, autoSubmit = false) public void showMyDialog() and the same exception is thrown. Any more info? Paul. Jesse Kuhnert wrote: Components implementing IFormComponent that are targeted with an @EventListener do now have their surrounding forms submitted automatically as part of the async request. If there is something in your logic that doesn't need/want this to happen you can set the autoSubmit = false parameter in the annotation and it will do the pure async request only without the form submission. http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html#EventListener On 7/3/07, Paul Stanton [EMAIL PROTECTED] wrote: Hi, I've upgraded to 4.1.2 from 4.1.1 and am getting the following when I try to load one of my Dojo Dialogs (async). It seems tapestry is trying to call getPage with a null page name, but I'm not sure why formSubmit is being called at all (unless it's part of a rewind?) The trigger is being defined like so: input type=button jwcid=[EMAIL PROTECTED] label=show dialog/ The listener being called is defined like so: @EventListener(targets = {myButton}, events = onclick, async = true) public void showMyDialog() If i click my button i get the following exception wrapped in a error dialog (async): Failure invoking listener method 'public org.apache.tapestry.IPage MyPage.formSubmit()' on [EMAIL PROTECTED]: Parameter name must not be null. org.apache.hivemind.ApplicationRuntimeException Failure invoking listener method 'public org.apache.tapestry.IPage com.pds.pdsv3.tapestry.pages.veridical.VeridicalPage.formSubmit()' on [EMAIL PROTECTED]/Comparables]: Parameter name must not be null. component: [EMAIL PROTECTED]/Comparables] location: context:/WEB-INF/veridical/Comparables.page, line 5, column 81 1 ?xml version=1.0 encoding=UTF-8? 2 !DOCTYPE page-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN 3 http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; 4 5 page-specification class=com.pds.pdsv3.tapestry.pages.veridical.Comparables/ [ +/- ] Exception: http://localhost:8080/PDS/app Parameter name must not be null. java.lang.NullPointerException Parameter name must not be null. Stack Trace: * org.apache.hivemind.util.Defense.notNull(Defense.java:41) * org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java :217) * $IRequestCycle_1138a7ba350.getPage($IRequestCycle_1138a7ba350.java) * $IRequestCycle_1138a7ba25a.getPage($IRequestCycle_1138a7ba25a.java) * MyPage.formSubmit(VeridicalPage.java:65) * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) * sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) * sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) * java.lang.reflect.Method.invoke(Method.java:597) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMethod( ListenerMethodInvokerImpl.java:276) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod (ListenerMethodInvokerImpl.java:221) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke( ListenerMethodInvokerImpl.java:157) * org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod (ListenerMethodInvokerImpl.java:80) * org.apache.tapestry.listener.SyntheticListener.actionTriggered( SyntheticListener.java:52) * org.apache.tapestry.listener.ListenerInvokerTerminator.invokeListener( ListenerInvokerTerminator.java:50) * $ListenerInvoker_1138a7ba23c.invokeListener($ListenerInvoker_1138a7ba23c.java) * org.apache.tapestry.form.Form.renderComponent
a generous 4.1.3 user needed
Hi all, If anyone is in a position to help, it would be greatly appreciated. Many of us tapestry 4.1 users don't use maven. As a result it's pretty hard for us to get access to the snapshot builds. It would be really handy if someone who uses maven and has an ftp server handy could make an up to date mirror of the snapshot build and it's dependencies. If there's a simpler way to achieve a snapshot without maven, please let me know. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 4.1.1 (or 4.1.2) Dojo Dialog escaping pageBeginRender
Jesse, It is my own application code that I want to avoid. The ResponseBuilder solution works great. Thanks. Jesse Kuhnert wrote: You can inject the ResponseBuilder service and call ResponseBuilder.isDynamic() to avoid doing things you don't want to have happen in one vs. another instance. To be clear, ~everything~ that happens in a dynamic request should be the same as what happens in a normal request. (except maybe for json stuff) The overhead on Tapestrys end has been reduced to pretty much nothing now though, so if there is any extra work going on it's in your own application code. It might be more ideal to try and do a direct rendering scheme at some point but I don't honestly think I'm going to try and do it for T4 - maybe T5 if Howard hasn't done it already. On 7/4/07, Paul Stanton [EMAIL PROTECTED] wrote: Thanks Renat, unfortunately the dialog needs to be initialised programmatically .. I need to dynamically stuff an object into it. I might be able to use JS for the close operation though. Renat Zubairov wrote: Hi You can show or hide dialog not from the Tapestry (read server-side) but directly with Javascript. It's pretty simple, you just need to call method show or hide on the DoJo dialog: script type=text/javascript function closeDialog() { dojo.widget.byId('DialogContent').hide(); } /script Renat On 04/07/07, Paul Stanton [EMAIL PROTECTED] wrote: Hi all, Currently I've got a couple of dialogs within a page. Each time a dialog is shown or hidden (via @EventLister annotation) the page's pageBeginRender method is called and this is more work than is necessary just do display a simple dialog. Is there a way to detect that the call is being made by the dialog request and in that case, not execute exhaustive code? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
captcha
Hi all, I need to get a captcha feature working on one form in one of our apps. I've seen that James Carman wrote one at some point (4.0?) but I can't find a download anywhere. I don't use maven .. does anyone know of a captcha component for tapestry, and where to download it from and any integration tips. Thanks in advance, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T3: enable/disable one column according to the other columns result
T5 or T4? T4 you can do: a jwcid=@DirectLink ... disabled=ognl:[condition]Passed/a Nazmul Bhuiyan wrote: Hi, I'm displaying a list of data in a table. e.g. IdStatus DirectLink 1 Passed Passed - Failed 2 FailedPassed - Failed I want to enable/disable 3rd column 'DirectLink' column according to the 2nd column 'Status'. Is there any one know how to do this? Thanks Naz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: captcha
I've downloaded the jar from: http://www.carmanconsulting.com/mvn/com/javaforge/tapestry/tapestry-captcha/0.1-SNAPSHOT/ can't find any usage or installation docs .. any help?? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hidden + translator
Hi all, Just like to say i think it's pretty silly that the 'hidden' component can't be assigned a translator. I've got a hidden that will be populated via javascript and the content describes an object. I've already got a translator for this object, so the obvious thing would be to use the translater. I'm going to use a textfield with 'style=display:none;' instead, but hidden would be preferable. i would have expected hidden to be able to do anything textfield can do, but still be a hidden. thoughts? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OpenLayers-Users] dragmakerer
Thanks Tim, Believe me I would if I could find time! I've noticed the drag marker demo does not work whatsoever in IE 6, however the drag feature one does. Is this due to recieve any attention soon or should I look into using the drag feature code instead? Obviously I understand that you have plenty of other things to do, and this is probably a low priority feature. Regards, Paul. Tim Schaub wrote: We need to make some improvements and write some tests for this still. If you are interested in seeing it done, you could take a look at how our test stuff works. Tim Paul Stanton wrote: Hi guys, I stumbled upon the dragmarker demo: http://dev.openlayers.org/sandbox/tschaub/feature/examples/drag-marker.html The objects it uses (Handler.Marker, Control.DragMarker) aren't in the svn trunk yet, does anyone know where they are at? ie are they going to be included soon? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
asset from byte array or stream
Hi all, I need a little help (4.1) I have an object with a byte array which contains data for a small image. I'm printing a summary of this object in a page and need to display the image as well. Is there a way I can create an asset and use it with the Image componet to display the image? something like: asset name=imageAsset stream=ognl:page.imageStream/ -or- asset name=imageAsset data=ognl:page.imageBytes/ ... img jwcid=@Image image=asset:imageAsset/ Any suggestions? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T4 - access hivemind registry from another servlet
Ok, so the tapestry servlet initializes and stores the hivemind registry for use within tapestry. My hivemind services and tapestry components and pages can find each other via injection or context method calls. That's fine, but now I've got separate servlet in which I need to have access to my hivemind services. What's the best way to do this? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4 - access hivemind registry from another servlet
ok thankyou, i've extended the servlet. Renat Zubairov wrote: Another way to extend Application servlet from tapestry and with your implementation and then just replace ApplicationServlet declaration inside web.xml with your new class. Logic is more or less the same. On 15/11/2007, Jili Lv [EMAIL PROTECTED] wrote: 1. Add a filter class : package com.example; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import org.apache.hivemind.Registry; public class HivemindRegistryPublishFilter implements Filter { private FilterConfig config; static public Registry getRegistry() { return _localRegistry.get(); } public void init(FilterConfig config) throws ServletException { this.config = config; } public void destroy() { } public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { try { // tapestry 4.1.2 servlet name is xxx. _localRegistry.set((Registry)config.getServletContext().getAttribute( org.apache.tapestry.Registry: + xxx)); chain.doFilter(request, response); } finally { _localRegistry.set(null); } } static protected ThreadLocalRegistry _localRegistry = new ThreadLocalRegistry(); } 2. configure web.xml filter filter-nameregistryFilter/filter-name filter-classcom.example.HivemindRegistryPublishFilter /filter-class /filter filter-mapping filter-nameregistryFilter/filter-name url-pattern/*/url-pattern /filter-mapping 3. now get Registry use com.example.HivemindRegistryPublishFilter.getRegistry() this is base on the hivetranse source code http://hivetranse.sourceforge.net/ 2007/11/15, Paul Stanton [EMAIL PROTECTED]: Ok, so the tapestry servlet initializes and stores the hivemind registry for use within tapestry. My hivemind services and tapestry components and pages can find each other via injection or context method calls. That's fine, but now I've got separate servlet in which I need to have access to my hivemind services. What's the best way to do this? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T4: Async submit client side listeners
Hi all, I've got a form which is submitted asynchronously as follows: form jwcid=[EMAIL PROTECTED] listener=listener:process async=true input jwcid=[EMAIL PROTECTED] selected=ognl:selected tag=tag value=go/ /form I can add javascript handling before the form is submitted by adding an onclick handler to the submit button, but is there a way to call javascript after the form is submitted - ie directly after async request has been made? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4: Async submit client side listeners
Thanks, event.connect should work. Andreas Andreou wrote: I think tapestry.form.submit(formId, submitName, parms) is called for async submit you can dojo.event.connect on it and do stuff when it finishes On Tue, Jun 3, 2008 at 7:19 AM, Paul Stanton [EMAIL PROTECTED] wrote: Hi all, I've got a form which is submitted asynchronously as follows: form jwcid=[EMAIL PROTECTED] listener=listener:process async=true input jwcid=[EMAIL PROTECTED] selected=ognl:selected tag=tag value=go/ /form I can add javascript handling before the form is submitted by adding an onclick handler to the submit button, but is there a way to call javascript after the form is submitted - ie directly after async request has been made? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
notice: users of autocompleter
I've recently noticed that the autocompleter runs the getValues method twice for every search string. Therefore you can improve performance by almost 50% by adding some simple caching, especially if your search is driven externally (ie DB). For example: public class MyAutocompleteModel implements IAutocompleteModel { private String lastFilter; private ListMyClass lastResult; ... public ListMyClass getValues(String filter) { if (EqualsUtils.equals(filter, lastFilter)) return lastResult; ListMyClass result = ..; // perform search lastFilter = filter; lastResult = result; return result; } ... } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tapestry 4.1 app
http://www.gunnsoft.com.au:8080/Budget/ I've been working on this for a while, and feel it's nearing stability. Feel free to have a play around. It's free. Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry 4.1 app
Sortable: i'd use the contrib.table component group, but that's not a priority. Security: an in house approach handled at two levels - firstly page level, so each request is subjected to a credentials check - and secondly at controller level so each controller method double checks that the procedure is being called by the appropriate user with the appropriate credentials. It's not as standardised as say Acegi, but simple and effective. Not sure what you mean re button label. The button either says Add Transaction or Edit Transaction. There is no confirmation, after you've clicked the button it's saved. Loïc Talbot wrote: Hi Paul, I've tried it and found that the button label was not changed to save when you edit a transaction (ok, so poor remark for such a work, sorry) :-) I have used tapestry 4.1.2 for a while and one of the main requirements was to have a sortable grid where you could also select which row to delete within the table. In your transaction list page, is it a big issue ? May I know what did you use for security layer ? acegi, servlet-filter ? Loïc - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hivemind eager loading of a service which references tapestry services is not possible
I'm trying to avoid Spring and use Hivemind to manage my Hibernate service. It's pretty basic stuff but one basic feature is proving very hard to achieve: eager load startup. In my case I need to reference WebContext (the tapestry component) in my initialisation procedure, but it seems to be 'unresolved' at that point and I get a NullPointerException. As a result, I'm starting to think there is a gap in how Tapestry and Hivemind are integrated, in that tapestry components cannot be referenced in eager loading services. It's possible that changing service loading order (in ApplicationServlet.init) solves this, and equally possible that I've missed an obvious alternative. I've got a thread with all the relevant details: http://www.tapestryforums.com/can-hivemind-call-something-after-all-set-objects-vt9931.html -- Paul Stanton Gunn Software PH: (02) 9918 3666 (ext 503) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
@Meta and @InjectMeta with a boolean type
I saw a neat solution to meta data using annotations in the Vlib example that comes bundled with Tapestry 4.1.1. *Code:* @Meta({anonymous-access=false, admin-page=false}) public abstract class VlibPage extends BasePage implements IErrorProperty, IMessageProperty, PageValidateListener, OperationsUser { ... @InjectMeta(anonymous-access) public abstract boolean getAllowAnonymousAccess(); @InjectMeta(admin-page) public abstract boolean isAdminPage(); ... public void pageValidate(PageEvent event) { if (isAdminPage()) ensureUserIsLoggedInAsAdmin(); if (!getAllowAnonymousAccess()) ensureUserIsLoggedIn(); } ... } Subclasses of VlibPage can over-ride the value for anonymous-access or admin-page using the same @Meta annotation: *Code:* @Meta( { page-type=Search, anonymous-access=true }) public abstract class Home extends VlibPage ... I thought I'd give it a go: base class for pages, defaults meta value to true *Code:* @Meta({meta-secure=true}) public abstract class BasePage extends org.apache.tapestry.html.BasePage implements PageValidateListener { @InjectMeta(meta-secure) public abstract boolean isMetaSecure(); ... public boolean isSecure() { return true; } ... public void pageValidate(PageEvent event) { System.out.println(this.getClass().getName() + - method: + isSecure() + - meta: + isMetaSecure()); } ... } home page over-rides meta value to false *Code:* @Meta({meta-secure=false}) public abstract class Home extends BasePage { @Override public boolean isSecure() { return false; } } list clients page over-rides value to true (for testing purposes) *Code:* @Meta({meta-secure=true}) public abstract class ListClients extends BasePage ... list projects page does not over-ride super value *Code:* public abstract class ListProjects extends BasePage unfortunately, it doesn't seem to work. The value always reads false. *Code:* $Home_84 - method:false - meta:false $ListProjects_95 - method:true - meta:false $ListClients_137 - method:true - meta:false I've stepped through some stacks and have found that the value is being correctly set to the String true and false in the components properties, but somewhere between ComponentPropertySourceImpl.getComponentProperty and my property injected method isMetaSecure, true is not being converted to boolean true. Has anyone come across this problem? Has anyone successfully used booleans in meta data via the page specification as opposed to class annotations? -- Paul Stanton Gunn Software PH: (02) 9918 3666 (ext 503) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: @Meta and @InjectMeta with a boolean type
If I change the accessor method boolean isMetaSecure to String getMetaSecure it works fine. So the problem can be defined as: @InjectMeta only works with String types. This is obvious after reading the documentation, but the Vlib example (written by howard?) is misleading as it suggests usage with booleans works. Paul Stanton wrote: I saw a neat solution to meta data using annotations in the Vlib example that comes bundled with Tapestry 4.1.1. *Code:* @Meta({anonymous-access=false, admin-page=false}) public abstract class VlibPage extends BasePage implements IErrorProperty, IMessageProperty, PageValidateListener, OperationsUser { ... @InjectMeta(anonymous-access) public abstract boolean getAllowAnonymousAccess(); @InjectMeta(admin-page) public abstract boolean isAdminPage(); ... public void pageValidate(PageEvent event) { if (isAdminPage()) ensureUserIsLoggedInAsAdmin(); if (!getAllowAnonymousAccess()) ensureUserIsLoggedIn(); } ... } Subclasses of VlibPage can over-ride the value for anonymous-access or admin-page using the same @Meta annotation: *Code:* @Meta( { page-type=Search, anonymous-access=true }) public abstract class Home extends VlibPage ... I thought I'd give it a go: base class for pages, defaults meta value to true *Code:* @Meta({meta-secure=true}) public abstract class BasePage extends org.apache.tapestry.html.BasePage implements PageValidateListener { @InjectMeta(meta-secure) public abstract boolean isMetaSecure(); ... public boolean isSecure() { return true; } ... public void pageValidate(PageEvent event) { System.out.println(this.getClass().getName() + - method: + isSecure() + - meta: + isMetaSecure()); } ... } home page over-rides meta value to false *Code:* @Meta({meta-secure=false}) public abstract class Home extends BasePage { @Override public boolean isSecure() { return false; } } list clients page over-rides value to true (for testing purposes) *Code:* @Meta({meta-secure=true}) public abstract class ListClients extends BasePage ... list projects page does not over-ride super value *Code:* public abstract class ListProjects extends BasePage unfortunately, it doesn't seem to work. The value always reads false. *Code:* $Home_84 - method:false - meta:false $ListProjects_95 - method:true - meta:false $ListClients_137 - method:true - meta:false I've stepped through some stacks and have found that the value is being correctly set to the String true and false in the components properties, but somewhere between ComponentPropertySourceImpl.getComponentProperty and my property injected method isMetaSecure, true is not being converted to boolean true. Has anyone come across this problem? Has anyone successfully used booleans in meta data via the page specification as opposed to class annotations? -- Paul Stanton Gunn Software PH: (02) 9918 3666 (ext 503) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: @Meta and @InjectMeta with a boolean type
Thanks Jesse! I'll upgrade as soon as 4.1.2 is released. http://www.tapestryforums.com/ Jesse Kuhnert wrote: Ah...I knew this sounded familiar. I think it's fixed in 4.1.2-snapshot https://issues.apache.org/jira/browse/TAPESTRY-1204 On 4/22/07, Paul Stanton [EMAIL PROTECTED] wrote: If I change the accessor method boolean isMetaSecure to String getMetaSecure it works fine. So the problem can be defined as: @InjectMeta only works with String types. This is obvious after reading the documentation, but the Vlib example (written by howard?) is misleading as it suggests usage with booleans works. Paul Stanton wrote: I saw a neat solution to meta data using annotations in the Vlib example that comes bundled with Tapestry 4.1.1. *Code:* @Meta({anonymous-access=false, admin-page=false}) public abstract class VlibPage extends BasePage implements IErrorProperty, IMessageProperty, PageValidateListener, OperationsUser { ... @InjectMeta(anonymous-access) public abstract boolean getAllowAnonymousAccess(); @InjectMeta(admin-page) public abstract boolean isAdminPage(); ... public void pageValidate(PageEvent event) { if (isAdminPage()) ensureUserIsLoggedInAsAdmin(); if (!getAllowAnonymousAccess()) ensureUserIsLoggedIn(); } ... } Subclasses of VlibPage can over-ride the value for anonymous-access or admin-page using the same @Meta annotation: *Code:* @Meta( { page-type=Search, anonymous-access=true }) public abstract class Home extends VlibPage ... I thought I'd give it a go: base class for pages, defaults meta value to true *Code:* @Meta({meta-secure=true}) public abstract class BasePage extends org.apache.tapestry.html.BasePage implements PageValidateListener { @InjectMeta(meta-secure) public abstract boolean isMetaSecure(); ... public boolean isSecure() { return true; } ... public void pageValidate(PageEvent event) { System.out.println(this.getClass().getName() + - method: + isSecure() + - meta: + isMetaSecure()); } ... } home page over-rides meta value to false *Code:* @Meta({meta-secure=false}) public abstract class Home extends BasePage { @Override public boolean isSecure() { return false; } } list clients page over-rides value to true (for testing purposes) *Code:* @Meta({meta-secure=true}) public abstract class ListClients extends BasePage ... list projects page does not over-ride super value *Code:* public abstract class ListProjects extends BasePage unfortunately, it doesn't seem to work. The value always reads false. *Code:* $Home_84 - method:false - meta:false $ListProjects_95 - method:true - meta:false $ListClients_137 - method:true - meta:false I've stepped through some stacks and have found that the value is being correctly set to the String true and false in the components properties, but somewhere between ComponentPropertySourceImpl.getComponentProperty and my property injected method isMetaSecure, true is not being converted to boolean true. Has anyone come across this problem? Has anyone successfully used booleans in meta data via the page specification as opposed to class annotations? -- Paul Stanton Gunn Software PH: (02) 9918 3666 (ext 503) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Stanton Gunn Software PH: (02) 9918 3666 (ext 503) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tapestry Forum
It would be great to get a few of you over at http://www.tapestryforums.com/ I've signed up as a moderator to help out with the spam issues, but the place could really benefit from your knowledge. Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry Forum
Kalle, Each to their own I guess, if you aren't interested by all means ignore. I am not trying to spam the list, just trying to build on the tapestry community. Personally I think forums are a more usable medium that mailing lists for a number of reasons. eg: * It is easier for new users to ask their first question * You can 'decorate' your messages (code blocks, quotes etc) making them more legible. * Posts are better categorised * You can ignore traffic until you are ready to read it I think many new tapestry users are uncomfortable with joining a mailing list and therefore don't get the help they need to get up and running. You don't have to agree... Paul. Kalle Korhonen wrote: We have the mailing lists for questions, they are archived and searchable and we have the wiki which I regard as a much better place to store how-tos etc. and other more static information. What do we need the forums for? Kalle On 4/23/07, Paul Stanton [EMAIL PROTECTED] wrote: It would be great to get a few of you over at http://www.tapestryforums.com/ I've signed up as a moderator to help out with the spam issues, but the place could really benefit from your knowledge. Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hivemind eager loading of a service which references tapestry services is not possible
Thanks Howard, I've altered the 'contribution element to the following: contribution configuration-id=tapestry.init.ApplicationSpecificationInitializer command after=tapestry.init.ApplicationSpecificationInitializer id=zzz object=service:application.zzz/ /contribution But now I get the error message: org.apache.hivemind.ApplicationRuntimeException: Error at context:/WEB-INF/hivemodule.xml, line 29, column 85: Module application has contributed to unknown configuration point tapestry.init.ApplicationSpecificationInitializer. The contribution has been ignored. It seems I don't have visibility of the tapestry configuration points. How I declare/reference the configuration point? Paul. Howard Lewis Ship wrote: What you do in this case, where you are reliant on information HiveMind doesn't have at Registry creation, is to hook into the ApplicationInitializers configuration point: http://tapestry.apache.org/tapestry4/tapestry/hivedocs/config/tapestry.init.ApplicationInitializers.html On 4/22/07, Paul Stanton [EMAIL PROTECTED] wrote: I'm trying to avoid Spring and use Hivemind to manage my Hibernate service. It's pretty basic stuff but one basic feature is proving very hard to achieve: eager load startup. In my case I need to reference WebContext (the tapestry component) in my initialisation procedure, but it seems to be 'unresolved' at that point and I get a NullPointerException. As a result, I'm starting to think there is a gap in how Tapestry and Hivemind are integrated, in that tapestry components cannot be referenced in eager loading services. It's possible that changing service loading order (in ApplicationServlet.init) solves this, and equally possible that I've missed an obvious alternative. I've got a thread with all the relevant details: http://www.tapestryforums.com/can-hivemind-call-something-after-all-set-objects-vt9931.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hivemind eager loading of a service which references tapestry services is not possible
Howard, At present this is all the output I'm getting, I haven't enabled Log4j/Logging yet though (haven't decided on the best way to do so). org.apache.hivemind.ApplicationRuntimeException: Unable to construct service tapestry.init.MasterInitializer: Failure invoking constructor for class $ApplicationInitializer_1122b245fc1: java.lang.ArrayStoreException location: jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps/TapestryStart/WEB-INF/lib/tapestry-framework-4.1.1.jar!/META-INF/tapestry.init.xml, line 27, column 60 org.apache.hivemind.ApplicationRuntimeException: Failure invoking constructor for class $ApplicationInitializer_1122b245fc1: java.lang.ArrayStoreException location: jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps/TapestryStart/WEB-INF/lib/tapestry-framework-4.1.1.jar!/META-INF/tapestry.init.xml, line 27, column 60 org.apache.hivemind.ApplicationRuntimeException: Failure invoking constructor for class $ApplicationInitializer_1122b245fc1: java.lang.ArrayStoreException java.lang.ArrayStoreException java.lang.System.arraycopy(Native Method) java.util.ArrayList.toArray(ArrayList.java:304) $ApplicationInitializer_1122b245fc1.init($ApplicationInitializer_1122b245fc1.java) sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) java.lang.reflect.Constructor.newInstance(Constructor.java:494) org.apache.hivemind.util.ConstructorUtils.invoke(ConstructorUtils.java:139) org.apache.hivemind.util.ConstructorUtils.invokeMatchingConstructor(ConstructorUtils.java:92) org.apache.hivemind.util.ConstructorUtils.invokeConstructor(ConstructorUtils.java:79) org.apache.hivemind.lib.chain.ChainBuilderImpl.createInstance(ChainBuilderImpl.java:109) org.apache.hivemind.lib.chain.ChainBuilderImpl.buildImplementation(ChainBuilderImpl.java:58) $ChainBuilder_1122b245fb8.buildImplementation($ChainBuilder_1122b245fb8.java) $ChainBuilder_1122b245fb7.buildImplementation($ChainBuilder_1122b245fb7.java) org.apache.hivemind.lib.chain.ChainFactory.createCoreServiceImplementation(ChainFactory.java:67) $ServiceImplementationFactory_1122b245fb6.createCoreServiceImplementation($ServiceImplementationFactory_1122b245fb6.java) $ServiceImplementationFactory_1122b245fb5.createCoreServiceImplementation($ServiceImplementationFactory_1122b245fb5.java) org.apache.hivemind.impl.InvokeFactoryServiceConstructor.constructCoreServiceImplementation(InvokeFactoryServiceConstructor.java:62) org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructCoreServiceImplementation(AbstractServiceModelImpl.java:108) org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation(AbstractServiceModelImpl.java:158) org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServiceImplementation(AbstractServiceModelImpl.java:140) org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualServiceImplementation(SingletonServiceModel.java:69) $ApplicationInitializer_1122b245fb4._service($ApplicationInitializer_1122b245fb4.java) $ApplicationInitializer_1122b245fb4.initialize($ApplicationInitializer_1122b245fb4.java) $ApplicationInitializer_1122b245fb3.initialize($ApplicationInitializer_1122b245fb3.java) org.apache.tapestry.ApplicationServlet.initializeApplication(ApplicationServlet.java:299) org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:198) Howard Lewis Ship wrote: Check your console; there is almost certainly additional output describing why the code failed. On 4/25/07, Paul Stanton [EMAIL PROTECTED] wrote: Thanks Marcus, I think I'm closer but it still doesn't work. I've updated my hivemodule.xml, so now the initializer part reads: contribution configuration-id=tapestry.init.ApplicationInitializers command id=zzz object=service:zzz/ /contribution But now I get the following exception: org.apache.hivemind.ApplicationRuntimeException: Unable to construct service tapestry.init.MasterInitializer: Failure invoking constructor for class $ApplicationInitializer_1122afa4f72: java.lang.ArrayStoreException location: jar:file:tapestry-framework-4.1.1.jar!/META-INF/tapestry.init.xml, line 27, column 60 Is there any documentation for this besides the hivedocs? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
continue from same point after log in
Hi All, I've just got something to work which is pretty fundamental to my app, but I've had to hack a little to get it working. I'd appreciate feedback/opinions on tidier alternatives if there are any. Basically, a user can browse the whole application except for small segments without logging in. When they hit a page that requires a valid session, they are redirected to the login page. Once they have logged in they should be returned to the page they were trying to access. It is acceptable for this to only work for GET requests, however service parameters (query string) must be retained. Here's how I've achieved it: TapestryUtils: public class TapestryUtils { public static HttpServletRequest getRequest(WebRequest request) { RequestRetriever d = new RequestRetriever(); request.describeTo(d); return d.getRequest(); } static class RequestRetriever implements DescriptionReceiver { HttpServletRequest request; public void describeAlternate(Object alternate) { this.request = (HttpServletRequest) alternate; } public HttpServletRequest getRequest() { return request; } ... } } BasePage: public abstract class AppPage extends BasePage { public void pageValidate(PageEvent event) { if (Boolean.parseBoolean(getSecure()) !getVisit().isAuthentic()) { Login page = getLoginPage(); HttpServletRequest request = TapestryUtils.getRequest(getRequestCycle().getInfrastructure().getRequest()); if (request.getMethod().equals(GET)) page.setForwardTo(request.getRequestURL() + ? + request.getQueryString()); throw new PageRedirectException(page); } } } Login public abstract class Login extends ApplicationPage { ... public abstract String getForwardTo(); public abstract void setForwardTo(String forwardTo); public IPage doSubmit() { User user = getUserService().getUserByUsername(getUsername()); if (user != null user.getPassword().equals(getPassword())) { getVisit().setUser(user); if (getForwardTo() == null) { Home page = getHomePage(); page.setMessage(user.getFullName() + successfully logged in.); return page; } throw new RedirectException(getForwardTo()); } setError(Invalid login. Please try again.); return this; } } Login.html: ... input type=hidden jwcid=[EMAIL PROTECTED] value=ognl:forwardTo/ ... -- Paul Stanton Gunn Software PH: (02) 9918 3666 (ext 503) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Some Basic Form Handling
http://tapestry.apache.org/tapestry4.1/components/form/form.html in html: form jwcid=@Form success=listener:doSubmit in java: public IPage doSubmit() {} Don Heninger wrote: I am a noob when it comes to tapestry but I am looking for some basic instruction on Form handling (not the BeanEditForm) in Tapestry 5. Can anyone point me in the right direction? Thanks, Don -- Paul Stanton Gunn Software PH: (02) 9918 3666 (ext 503) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: simple ajax text update help please
Not sure that helps .. you can see my html files so you should be able to tell what is rendered. my question is what other registration do I have to perform to be able to utilise the updateComponent method? How do I identify my node etc. Thanks in advance Jesse Kuhnert wrote: I probably need to add a ResponseBuilder.insertComponents() call pretty soon, but the basic reason why it's not updating is because the counter and B elements probably don't exist on your rendered page already. For it to update them it needs an element that it can find with something simple like this javascript: document.getElementById(counter) This is usually solved by doing something like: span jwcid=[EMAIL PROTECTED] countercomponent here/ /span You also shouldn't need to specify which form to submit (in 4.1.2 at least). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
page under web-inf subdirectory won't load
Hi, Here's how I would like to organise my templates: * security of storing my html files under web-inf * organisation of subdirectories * no page specifications So my desired structure is: name: Page1 and module/Page2 template: WEB-INF/Page1.html and WEB-INF/module/Page2.html java: com.pages.Page1.java and com.pages.module.Page2.java However, I find the only way for tapestry to find my template if it's under a module directory and has no .page specification is to store it outside of WEB-INF, which is not desirable. Is this expected behaviour in 4.1 or have I missed something? If it is expected, is there an intended resolution for later versions? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: instantiate abstract asset class
maybe my problem is more to do with hivemind: basically i have an asset class (developed by someone else) which is non abstract, but still needs to reference a hivemind service. How can I have the service injected? I've tried using setter method injection, but since the asset class is not registered with hivemind injection never occurs. help appreciated. thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
@Style load order
My Border component loads a base style. I'd like to be able to override CSS declarations with subsequent style sheets defined in pages which use the border component. This would be possible if I could only force the page's style to be rendered after the Border components style. CSS Overriding is an important feature and it makes sense that a border component would load the 'super' CSS declarations and pages would override/customise the 'super' CSS. Therefore I think all page CSS entries should be rendered after the Border component's CSS element. Is there currently a way to achieve this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: @Style load order
never mind, i worked it out. :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: page under web-inf subdirectory won't load
OK, so the strategy seems primed for a fairly limited approach; everything under web-inf or root. Why not also look under folders named the same as the package name (minus the value of 'org.apache.tapestry.page-class-packages') ? This is done in the root, so wouldn't it be just as simple to also do this under web-inf? ie class : com.pages.module.MyPage html: WEB-INF/module/MyPage.html that should 'just work' imho. Currently I have a stack of .page files with no content what so ever. It is annoying. Jesse Kuhnert wrote: There has been extensive work done recently in this specific area for 4.1.2. I still think I need to add at least one or two additional configuration options in the .application file to make unrelated sub-directory structures in the web context easily configurable but things should generally work as well as they possibly can right now. (though I was thinking of trying to add in some guessing sort of strategy for things but this will require a lot of thought to get right ) On 5/14/07, Paul Stanton [EMAIL PROTECTED] wrote: I'm using tapestry 4.1 Paul Stanton wrote: Hi, Here's how I would like to organise my templates: * security of storing my html files under web-inf * organisation of subdirectories * no page specifications So my desired structure is: name: Page1 and module/Page2 template: WEB-INF/Page1.html and WEB-INF/module/Page2.html java: com.pages.Page1.java and com.pages.module.Page2.java However, I find the only way for tapestry to find my template if it's under a module directory and has no .page specification is to store it outside of WEB-INF, which is not desirable. Is this expected behaviour in 4.1 or have I missed something? If it is expected, is there an intended resolution for later versions? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: page under web-inf subdirectory won't load
:O OK .. thanks When is 4.1.2 expected to have a production ready release? Jesse Kuhnert wrote: That ~is~ what happens in 4.1.2. ..so.Maybe you should just try that out. On 5/21/07, Paul Stanton [EMAIL PROTECTED] wrote: OK, so the strategy seems primed for a fairly limited approach; everything under web-inf or root. Why not also look under folders named the same as the package name (minus the value of 'org.apache.tapestry.page-class-packages') ? This is done in the root, so wouldn't it be just as simple to also do this under web-inf? ie class : com.pages.module.MyPage html: WEB-INF/module/MyPage.html that should 'just work' imho. Currently I have a stack of .page files with no content what so ever. It is annoying. Jesse Kuhnert wrote: There has been extensive work done recently in this specific area for 4.1.2. I still think I need to add at least one or two additional configuration options in the .application file to make unrelated sub-directory structures in the web context easily configurable but things should generally work as well as they possibly can right now. (though I was thinking of trying to add in some guessing sort of strategy for things but this will require a lot of thought to get right ) On 5/14/07, Paul Stanton [EMAIL PROTECTED] wrote: I'm using tapestry 4.1 Paul Stanton wrote: Hi, Here's how I would like to organise my templates: * security of storing my html files under web-inf * organisation of subdirectories * no page specifications So my desired structure is: name: Page1 and module/Page2 template: WEB-INF/Page1.html and WEB-INF/module/Page2.html java: com.pages.Page1.java and com.pages.module.Page2.java However, I find the only way for tapestry to find my template if it's under a module directory and has no .page specification is to store it outside of WEB-INF, which is not desirable. Is this expected behaviour in 4.1 or have I missed something? If it is expected, is there an intended resolution for later versions? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: page under web-inf subdirectory won't load
Wow, that's cool. I was expecting you to say when it's ready ... :) Jesse Kuhnert wrote: I'm not sure. My most reliable ognl tester had the nerve to go on some kind of honeymoon this week so the lack of reported issues may be a false positive. ...I think I really need to get this out the door now-ish though, so I think we'll do it next week. Just need to upgrade dojo to 0.4.3 this weekend. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: expert needed
Ok thanks guys, will try this approach now. Ben Acker wrote: I am using a similar approach to Phillip, but using the same method name for each page. We have the method implemented in a base page that is extended by the pages implementing the component. Anytime we need the method to do something different, we just overwrite it in that page. On 5/14/07, Phillip Rhodes [EMAIL PROTECTED] wrote: You can you use IListener as a parameter. On each page, you can bind your component to the specific page listener that you want invoked. This works good, as I am using this approach myself. - Original Message - From: Paul Stanton [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Monday, May 14, 2007 8:56:54 PM (GMT-0500) America/New_York Subject: expert needed Tapestry 4.1 I've got a set of anchors (a) which are common for a group of pages and are contained within a component, however on each page they need to do different things. Essentially they will either submit a form on the page with or without client side validation or perform a simple page link. Can I achieve this with a common component with event handling implemented on a page by page basis, or will I have to re-write the links for each page? Thanks for any hints. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: expert needed
Actually, I think something is missing .. how do I tell the links that I want to submit a form if a form is present? ie, I can implement the listener for each page, but in a couple of cases, this would mean the listener would be called without the required form data on the request. I'll see what I can do but I'm sceptical about the form portion. Ben Acker wrote: I am using a similar approach to Phillip, but using the same method name for each page. We have the method implemented in a base page that is extended by the pages implementing the component. Anytime we need the method to do something different, we just overwrite it in that page. On 5/14/07, Phillip Rhodes [EMAIL PROTECTED] wrote: You can you use IListener as a parameter. On each page, you can bind your component to the specific page listener that you want invoked. This works good, as I am using this approach myself. - Original Message - From: Paul Stanton [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Monday, May 14, 2007 8:56:54 PM (GMT-0500) America/New_York Subject: expert needed Tapestry 4.1 I've got a set of anchors (a) which are common for a group of pages and are contained within a component, however on each page they need to do different things. Essentially they will either submit a form on the page with or without client side validation or perform a simple page link. Can I achieve this with a common component with event handling implemented on a page by page basis, or will I have to re-write the links for each page? Thanks for any hints. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: expert needed
Basically I have a tab structure with 5 tabs, each is an individual page. The tabs are contained within my border component, the content with the tab is defined in the page template. Now 2 of the pages have no form, and 3 of the pages have a form. The behaviour of the tabs should be that clicking any tab while on a non-form page simply redirects to the tab's page (ala PageLink) while clicking the any tab while on a form page should submit/process the form, then redirect to the tab's page. That's the long and short of it. Ben Acker wrote: Could you tell me more about the what the pages are and what the links would do on each of the pages? That may help with finding a solution to your problem! -Ben On 5/22/07, Paul Stanton [EMAIL PROTECTED] wrote: Actually, I think something is missing .. how do I tell the links that I want to submit a form if a form is present? ie, I can implement the listener for each page, but in a couple of cases, this would mean the listener would be called without the required form data on the request. I'll see what I can do but I'm sceptical about the form portion. Ben Acker wrote: I am using a similar approach to Phillip, but using the same method name for each page. We have the method implemented in a base page that is extended by the pages implementing the component. Anytime we need the method to do something different, we just overwrite it in that page. On 5/14/07, Phillip Rhodes [EMAIL PROTECTED] wrote: You can you use IListener as a parameter. On each page, you can bind your component to the specific page listener that you want invoked. This works good, as I am using this approach myself. - Original Message - From: Paul Stanton [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Monday, May 14, 2007 8:56:54 PM (GMT-0500) America/New_York Subject: expert needed Tapestry 4.1 I've got a set of anchors (a) which are common for a group of pages and are contained within a component, however on each page they need to do different things. Essentially they will either submit a form on the page with or without client side validation or perform a simple page link. Can I achieve this with a common component with event handling implemented on a page by page basis, or will I have to re-write the links for each page? Thanks for any hints. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: expert needed
Hmm.. I guess what I don't get is how you can submit a form from a DirectLink component. Are you saying to move my form handling to within my border component and include it/exclude it based on current page? If my tabs all call a listener method via a DirectLink the request will be made without the form data included as that would be the same as just clicking a link as opposed to submitting a form. Maybe it would be simpler to just call a javascript method from each tab ie: a href=# onclick=function navigate(1); return false;Tab 1/a ... and implement the function on a page by page bases, either delegate to the form submit (if there is a form) or just navigate accordingly. Problem is that I then have to hack in the href from a PageLink or something to get the correct page url. Or maybe I could send in a form name to the Border component as a parameter and if it isn't null, do some form processing . There are a thousand 'dirty' ways to do it, I'm hoping there is a relatively tidy 'Tapestry' way to do it.. suggestions welcome. paul. Ben Acker wrote: Cool. I would just handle all of it within a listener method. You could use a direct link for your tabs and handle forms based upon which tab you're currently using. If the content within the tab is defined within your page anyway, you could just tack the listener method on the page and access it that way. Let me know if this doesn't help, I'm going to hit the hay right now, but can look at it first thing in the morning too. -Ben On 5/22/07, Paul Stanton [EMAIL PROTECTED] wrote: Basically I have a tab structure with 5 tabs, each is an individual page. The tabs are contained within my border component, the content with the tab is defined in the page template. Now 2 of the pages have no form, and 3 of the pages have a form. The behaviour of the tabs should be that clicking any tab while on a non-form page simply redirects to the tab's page (ala PageLink) while clicking the any tab while on a form page should submit/process the form, then redirect to the tab's page. That's the long and short of it. Ben Acker wrote: Could you tell me more about the what the pages are and what the links would do on each of the pages? That may help with finding a solution to your problem! -Ben On 5/22/07, Paul Stanton [EMAIL PROTECTED] wrote: Actually, I think something is missing .. how do I tell the links that I want to submit a form if a form is present? ie, I can implement the listener for each page, but in a couple of cases, this would mean the listener would be called without the required form data on the request. I'll see what I can do but I'm sceptical about the form portion. Ben Acker wrote: I am using a similar approach to Phillip, but using the same method name for each page. We have the method implemented in a base page that is extended by the pages implementing the component. Anytime we need the method to do something different, we just overwrite it in that page. On 5/14/07, Phillip Rhodes [EMAIL PROTECTED] wrote: You can you use IListener as a parameter. On each page, you can bind your component to the specific page listener that you want invoked. This works good, as I am using this approach myself. - Original Message - From: Paul Stanton [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Monday, May 14, 2007 8:56:54 PM (GMT-0500) America/New_York Subject: expert needed Tapestry 4.1 I've got a set of anchors (a) which are common for a group of pages and are contained within a component, however on each page they need to do different things. Essentially they will either submit a form on the page with or without client side validation or perform a simple page link. Can I achieve this with a common component with event handling implemented on a page by page basis, or will I have to re-write the links for each page? Thanks for any hints. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: expert needed
thanks nick. Nick Westgate wrote: Paul Stanton wrote: Hmm.. I guess what I don't get is how you can submit a form from a DirectLink component. I'm guessing you can't, unless you emulate what LinkSubmit does: http://tapestry.apache.org/tapestry4.1/components/form/linksubmit.html In my Tapestry 3 apps I actually used form submits exclusively exactly because of the problem you're having. Any link or button press should preserve form data and then validate or navigate. I structured this by having a form in my Border component, and the base class for all pages providing the root listener. Every link assigned a string which the listener processed. Each page handled it's own action strings (save etc) and the root listener handled various global actions like navigation (E.g. _PageName). Cheers, Nick. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: expert needed
Nick (or anyone), two questions: 1. If I define the form in the border component, why doesn't listener=listener:page.formSubmit work? It seems I have to define a listener in the border component that delegates to the page method? 2. How do I read the value of the 'tag' attribute of a LinkSubmit once the form is submitted? using this to decide which link was clicked sounds tidier than using the parameters attribute. Thanks again all of you. Nick Westgate wrote: Paul Stanton wrote: Hmm.. I guess what I don't get is how you can submit a form from a DirectLink component. I'm guessing you can't, unless you emulate what LinkSubmit does: http://tapestry.apache.org/tapestry4.1/components/form/linksubmit.html In my Tapestry 3 apps I actually used form submits exclusively exactly because of the problem you're having. Any link or button press should preserve form data and then validate or navigate. I structured this by having a form in my Border component, and the base class for all pages providing the root listener. Every link assigned a string which the listener processed. Each page handled it's own action strings (save etc) and the root listener handled various global actions like navigation (E.g. _PageName). Cheers, Nick. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: expert needed
Thanks, I've figured it out now, hadn't read the doc on 'selected' attribute :( Nick Westgate wrote: Isn't this just a field of your page base class? In T4 you can inherit, which should be great. In T3 I had to add the property to each .page file. Cheers, Nick. Paul Stanton wrote: thanks, listener=ognl:page.listeners.formSubmit works. anyone know how to read the 'tag' attribute once in the form submit listener? Nick Westgate wrote: I have no T4 project to test with, but in T3 I used OGNL expressions: getPage().listeners.submitForm getPage().submitTarget Cheers, Nick. Paul Stanton wrote: Nick (or anyone), two questions: 1. If I define the form in the border component, why doesn't listener=listener:page.formSubmit work? It seems I have to define a listener in the border component that delegates to the page method? 2. How do I read the value of the 'tag' attribute of a LinkSubmit once the form is submitted? using this to decide which link was clicked sounds tidier than using the parameters attribute. Thanks again all of you. Nick Westgate wrote: Paul Stanton wrote: Hmm.. I guess what I don't get is how you can submit a form from a DirectLink component. I'm guessing you can't, unless you emulate what LinkSubmit does: http://tapestry.apache.org/tapestry4.1/components/form/linksubmit.html In my Tapestry 3 apps I actually used form submits exclusively exactly because of the problem you're having. Any link or button press should preserve form data and then validate or navigate. I structured this by having a form in my Border component, and the base class for all pages providing the root listener. Every link assigned a string which the listener processed. Each page handled it's own action strings (save etc) and the root listener handled various global actions like navigation (E.g. _PageName). Cheers, Nick. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
updateComponent breaks rendering
Hi fellas, Tapestry 4.1.1 I'm trying to use ajax to update a common component without re-rendering the whole page, which works to some extent... Basically I call updateComponent on the top most div inside this component, as there are a number of sub components each of which need to update. However, when when the component is re-rendered it is broken (see attached). I think I could call updateComponent on the sub components individually to avoid ajax having to worry about form and nesting, however that's more work than should be necessary; I thought dojo/tapestry would 'know' about contained components and re-render them, not re-render the whole body of the top most div specified in the updateComponent call? is this a bug? is it fixed in 4.1.2? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: updateComponent breaks rendering
just curious, did you get two images attached to my original post or doesn't the message board allow attachments? Jesse Kuhnert wrote: Yes tapestry is aware of component containing logic and yes whatever problem you are having (attachments aren't allowed on the apache mailing lists so no one saw it ) is probably fixed in 4.1.2. On 5/25/07, Paul Stanton [EMAIL PROTECTED] wrote: Hi fellas, Tapestry 4.1.1 I'm trying to use ajax to update a common component without re-rendering the whole page, which works to some extent... Basically I call updateComponent on the top most div inside this component, as there are a number of sub components each of which need to update. However, when when the component is re-rendered it is broken (see attached). I think I could call updateComponent on the sub components individually to avoid ajax having to worry about form and nesting, however that's more work than should be necessary; I thought dojo/tapestry would 'know' about contained components and re-render them, not re-render the whole body of the top most div specified in the updateComponent call? is this a bug? is it fixed in 4.1.2? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.1 - ComponentClass and Component annotation question
where do i vote, i need it released desperately. Jesse Kuhnert wrote: I think I'm going to start a vote to release it this week, so if that goes well possibly this week. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML translator/validator
digester? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
thickbox or dojo alternative
Hello, I need to dynamically load a form into a dialog (not a popup) such as thickbox or a dojo dialog and then submit the parent page once the dialog form is submitted. The behaviour is as follows: 1. user clicks listed item on parent page 2. modal dialog is displayed populated with listed item's detail 3. user updates info clicks submit 4. form is submitted and parent page reloads -or- 1. user clicks new item link on parent page 2. modal dialog is displayed unpopulated 3. user adds info clicks submit 4. form is submitted and parent page reloads If anyone has done something similar I could use some pointers. Did you use a page or a component for the dialog content? did you use dojo, thickbox or other? any other info. Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: thickbox or dojo alternative
Thanks Renat, Very helpful. Renat Zubairov wrote: Hello, We are using the same scenario in our project http://code.google.com/p/bookie Check CategoryAdmin.html page for example: http://bookie.googlecode.com/svn/trunk/bookie-web/src/main/webapp/admin/CategoryAdmin.html Renat - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
scrolling window : dojo dialog vs thickbox
(4.1.1) I'm using a dojo dialog to dynamically display a form. I've noticed that when I scroll the page (browser scroll) while the form is displayed, the shadow does not take up the whole page (momentarily) ie you can see white at the top or bottom of the page instead of the tint. Also the dialog vibrates up and down as the page is scrolled, which is obviously some reposition calculation being run in the onscroll event handling. I've noticed that thickbox works 100% in this regard, it scrolls smoothly and the tint does not change. any one else noticed this? is there a dojo upgrade? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
dojo dialog to populate portion of form and submit
4.1.1 Firstly, I'm pretty sure what I'm trying to do is not possible, so read on with that in mind. My border component defines my form. This is necessary because I have a tabbed structure where the tabs are LinkSubmit's and need to be associated with a Form. My page has part of the form content always displayed, normally without ajax or anything dynamic. This part is a list of elements with checkboxes to enable/disable. When clicking on an element in the list, a dojo Dialog is displayed containing a previously existant yet hidden portion of the form to edit the attributes of the element along with a LinkSubmit to submit the whole form (border form) when the user is done. Note that I must continue the existing border's form as the dialog code needs to sit within the border, otherwise it would fall outside of the html element. I can't for the life of me get this to work. I think because the Dialog is re-rendered (updateComponent) the dialogs portion of the form is essentially detached from the border forms request cycle. No matter what I enter in the dialog, nothing comes back to the listener when the form is submitted. Is what I'm trying to do possible, or do I need to rip apart my border component so that I can embed a separate form in the dialog? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dojo dialog to populate portion of form and submit
I've just tried a javascript writeback hack (trying to keep it tapestry-ish, yet it's a hack for sure) basically, the dialog's form elements are Any's so they populate correctly, but don't submit to tapestry. then when the submit button is clicked they Any's values are sucked into some hidden (TextField with display:none in css) and the form is submitted. I figured this would take advantage of the ajax parts that work for me, and avoid what isn't working. the problem with this is that: 1. I need to make use of a converter to make sure that tapestry can find the appropriate object on rewind; i can't figure out how to use a converter on a plain old TextField or Hidden 2. If there are validation issues with the user input, the Any component needs to receive the validator message etc, not the invisible TextField. I'd love to be able to change my border component so that the LinkSubmit's can sit outside of the form (substitute them with something else) so that pages can define their own forms and where they begin/end, however that in it's self will be a hack and it means changing ten pages to include a hack vs changing 1 page to include a hack (if i can hack through this dialog issue). Any suggestions welcome. Paul. Paul Stanton wrote: 4.1.1 Firstly, I'm pretty sure what I'm trying to do is not possible, so read on with that in mind. My border component defines my form. This is necessary because I have a tabbed structure where the tabs are LinkSubmit's and need to be associated with a Form. My page has part of the form content always displayed, normally without ajax or anything dynamic. This part is a list of elements with checkboxes to enable/disable. When clicking on an element in the list, a dojo Dialog is displayed containing a previously existant yet hidden portion of the form to edit the attributes of the element along with a LinkSubmit to submit the whole form (border form) when the user is done. Note that I must continue the existing border's form as the dialog code needs to sit within the border, otherwise it would fall outside of the html element. I can't for the life of me get this to work. I think because the Dialog is re-rendered (updateComponent) the dialogs portion of the form is essentially detached from the border forms request cycle. No matter what I enter in the dialog, nothing comes back to the listener when the form is submitted. Is what I'm trying to do possible, or do I need to rip apart my border component so that I can embed a separate form in the dialog? Thanks, Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]