AjaxFormLoop insists on being a ? Or how to control where add row inserts.

2010-07-27 Thread LLTYK
I'm trying to use AjaxFormLoop with two rows per iteration, with "". It lays out fine, but when it comes down to adding a row, it stuffs it on top of the table header. Using it as one row with appears to work just fine, appending to the bottom of the table. Is there a way around the two row beha

Classloader problem, "loader constraint violation"

2010-08-06 Thread LLTYK
Any ideas? A search says "don't put the wrong things in the base package", but UploadFileWrapper isn't in any tapestry packages. 2010-08-06 15:56:57,343 [qtp1741911230-24] ERROR org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler - Processing of request failed with uncaught exc

Re: Classloader problem, "loader constraint violation"

2010-08-09 Thread LLTYK
The tapestry package is com.x.y.t5, with the component being in com.x.y.t5.components. I have a list of upload files, each with a label, so I figured I'd create a wrapper object with the label string and the upload object. -- View this message in context: http://tapestry-users.832.n2.nabble.com/

Re: Classloader problem, "loader constraint violation"

2010-08-09 Thread LLTYK
Not a literal label, each fileupload also takes in a textfield string, so each file gets a name. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Classloader-problem-loader-constraint-violation-tp5381992p5388717.html Sent from the Tapestry Users mailing list archive at Na

Triggering an ajax update on an inplace grid?

2010-08-20 Thread LLTYK
Is there any way to do that from the client side? I assume Grid already has some way to do ajax for inplace paging. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Triggering-an-ajax-update-on-an-inplace-grid-tp5444604p5444604.html Sent from the Tapestry Users mailing li

Re: Update Zone Outside of AjaxFormLoop

2010-08-30 Thread LLTYK
Forget zones, just count the rows with js. $$('.classYouStickOnEveryRow').length; Although the only way I know of to get js to run on zone load is to clumsily cram a script tag in each row. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Update-Zone-Outside-of-AjaxFor

Re: [T5] Prevent multiple form submits

2010-08-30 Thread LLTYK
I have a hidden div with a "Processing" message, then I listen for submit events and pop the div into view, blocking off the page until it redirects. Although I haven't figured out how to get to mesh will with client side validation, where I'd get an event but the form would not submit due to an e

If-test doesn't like testing a java.lang.Object for not null

2010-08-30 Thread LLTYK
So I have this: obj being null results in false just fine. But doing "obj = new Object()" makes it explode. Oddly enough, "obj = new Integer(1)" (and presumably any other subclass of Object), works just fine. An unexpected application exception has occurred. Render queue error in BeginRen

Re: If-test doesn't like testing a java.lang.Object for not null

2010-08-30 Thread LLTYK
I wasn't intending to use just an Object in the first place, so it seems to be non-issue. For now anyways, hopefully the comment I put in reminds not to stick a plain Object in there later on. obj was going to be return of some event handler, to redirect to some page. I set to to a plain Object

Re: [T5] Prevent multiple form submits

2010-08-31 Thread LLTYK
I am wondering how I should handle ajax form submit. ClickOnce looks neat but looks like it wouldn't work for that, and it looks like it might break with client side validation too. I think I can see the events I need to observe now, although I'm wondering how to hide my div again after an ajax su

Re: Versioned assets

2010-09-07 Thread LLTYK
What it should do is instead insert some sort of hash of the file's contents in the url. Then whenever your file changes the browser won't pick up the previous cached version, but if your app version changes and the file doesn't, the url remains the same. -- View this message in context: http://

Re: Ajax Radio Group

2010-09-07 Thread LLTYK
Chenillekit OnEvent mixin. It lets you listen for clicks or any js event, to in turn trigger an event on the server. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Ajax-Radio-Group-tp5496323p5506027.html Sent from the Tapestry Users mailing list archive at Nabble.com.

Re: AjaxFormLoop insists on being a ? Or how to control where add row inserts.

2010-09-08 Thread LLTYK
Well I finally tried it, and you need a correct addrow too: Add Row Worked great :) -- View this message in context: http://tapestry-users.832.n2.nabble.com/AjaxFormLoop-insists-on-being-a-tr-Or-how-to-control-where-add-row-inserts-tp5342543p5510163.html Sent from the Tapestr

Re: Versioned assets

2010-09-08 Thread LLTYK
Does putting it in the filename instead of the "directory" also have caveats? -- View this message in context: http://tapestry-users.832.n2.nabble.com/Versioned-assets-tp5421811p5512040.html Sent from the Tapestry Users mailing list archive at Nabble.com. ---

Re: form field validation

2010-09-08 Thread LLTYK
If you validate server side its easy with onValidateFromSoAndSoField(). Then you just check your parameter that enables validation and decide whether or not to do it. -- View this message in context: http://tapestry-users.832.n2.nabble.com/form-field-validation-tp5511922p5512116.html Sent fr

How to apply a css class to a tapestry component?

2010-09-13 Thread LLTYK
I try this: The class attribute disappears. Previously I've simply slapped the class onto a wrapping div or something and changed the css accordingly, but this problem pops up over and over and I'd like an easier solution to it. -- View this message in context: http://tapestry-users.832.n2.n

NPE in getSession of an anonymous Request class?

2010-09-16 Thread LLTYK
I was wondering where these anonymous request classes are created... they don't have debug line number information. Somehow getSession(false) is throwing a NullPointerException when a component tries to set a parameter to null. Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:

Re: NPE in getSession of an anonymous Request class?

2010-09-17 Thread LLTYK
Well it boiled down to the commented out line below. I changed the forward to the requestGlobals one and it works. try { requestGlobals.getResponse().sendRedirect("nontapestrypage.html"); //request.getRequestDispatcher("nontapestrypage.html").forward(request, response);

Re: attach a client side xhr form submit listener

2010-09-20 Thread LLTYK
You can listen for the FORM_PREPARE_FOR_SUBMIT_EVENT or FORM_PROCESS_SUBMIT_EVENT in prototype, for before the zone gets updated. Or if you use a mixin on the form (or any component in the zone) the mixin initialization gets run on zone update with the new id. -- View this message in context: ht

Re: Radio button and submit

2010-09-20 Thread LLTYK
There's something missing here. How are you submitting the form? -- View this message in context: http://tapestry-users.832.n2.nabble.com/Radio-button-and-submit-tp5547402p5549978.html Sent from the Tapestry Users mailing list archive at Nabble.com. -

Re: Worthy FAQ?: What is the best way to return a zone update and a javascript as response to an XHR request

2010-09-21 Thread LLTYK
Putting a mixin on a component in the zone executes the mixin javascript on zone update. So you'd stick in your dialog close logic in a mixin. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Worthy-FAQ-What-is-the-best-way-to-return-a-zone-update-and-a-javascript-as-resp

Re: [T5.1] Preserve user input while refreshing form inside zone

2010-09-22 Thread LLTYK
The usual way to save input is to do a form submit. Link the form to the zone, and then submitting will trigger the update on the zone after sending the data to the server. However, this does not work if the form is not filled out and valid. In that case there's a longer way: I used the ZoneUpda

Re: [T5.1] Generate AjaxFormLoop entry from ActionLink

2010-09-22 Thread LLTYK
You just use AddRowLink and RemoveRowLink to add and remove. Alot easier than trying to refresh the whole thing. http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/ajaxformloop1 -- View this message in context: http://tapestry-users.832.n2.nabble.com/T5-1-Generate-AjaxFormLoop-en

Re: [5.1.0.5] Firing javascript from page class from mixin handler method

2010-09-22 Thread LLTYK
My favorite reply, a mixin on a component in a zone will get it's javascript run again on zone update. So you make a mixin that handles both disabling and enabling, it will run on page render, and run again whenever you update the zone. Oh, and use renderSupport.addScript, like in here: http://j

Re: [T5.1] Generate AjaxFormLoop entry from ActionLink

2010-09-23 Thread LLTYK
Put the form inside the zone as well, assuming there aren't a bunch of other fields with data in them. Also, if you're just discarding the old rows then you can just use a normal loop with a zone. -- View this message in context: http://tapestry-users.832.n2.nabble.com/T5-1-Generate-AjaxFormLoo

Silent js error (doesn't show up in browser error console or tapestry error console)

2010-09-23 Thread LLTYK
I am using the onblur validation disable script that's unsurprisingly broken since it's from 2009 (see mailing list post below). However, I'm worried about how the error appears to be thrown off into oblivion. The script breaks in a very subtle fashion. No indication of any javascript failure is

Is there a way to automatically generate validation constraints on standalone fields?

2010-09-28 Thread LLTYK
I'd like for something like to somehow know what validators (length,etc) to use. There seems to be a way to do this with annotations on the bean's fields, but I am using Cayenne which stores constraint information in an xml file, and do not want to duplicate this by adding annotations. So my

Re: count active users

2010-09-29 Thread LLTYK
Here's a different way. Implement HttpSessionListener (and put it in web.xml) and do this: public void sessionCreated(HttpSessionEvent event) { Set allHttpSessions = event.getSession().getServletContext().getAttribute("allSessions"); if (allHttpSessions == null) { allHttpSession

Re: [5.1.0.5] Delete Confirmation Mixin

2010-09-30 Thread LLTYK
I thought t:clientEvent should be just 'click', not 'onclick'. Unless prototype Event.observe takes both or something. In any case I think you're doing this the long way. Why not completely do the confirm in javascript instead of going to the server in both cases? So if they click cancel on the

Re: t5-components MultipleSelect use

2010-09-30 Thread LLTYK
Usually you inject it, when you're in a tapestry enhanced class. @Inject private PropertyAccess propertyAccess; I can't get to those links, though I get the feeling that project's abandoned in favor of Chenillekit. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Re-t

Re: Early steps getting Tapestry and Hibernate working via DAO

2010-10-01 Thread LLTYK
http://tapestry.apache.org/tapestry5/tapestry-hibernate/userguide.html Course I don't even use tapestry-hibernate at all, just the tapestry spring integration to inject spring/hibernate services. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Early-steps-getting-Tapest

Re: Is there any way to render the "get" method of form?

2010-10-05 Thread LLTYK
Here's a mixin, implement activation context and one GET request with the search terms in the context will be done: Search /** * Replace the context of a link with a value from a textfield */ @IncludeJavaScriptLibrary({"context:/js/mixins.js"}) public class LiveLinkContext { @Inje

Re: T5 - Refresh 1 second Ajax method

2010-10-14 Thread LLTYK
I don't think there's an existing howto floating around so you're gonna have to put something together. This jumpstart demo (that does something completely irrelevant) should give you an idea of how to use the t5 ajax integration (ignore 90% of it, just see how to create a zone and how to update

Re: Mixing zone updates and custom events.

2010-11-02 Thread LLTYK
The main reason I see for events suddenly stopping is the element you observed being inside the zone, and being trashed on zone reload. I feel like you should actually be using a mixin on the textfield, since that's probably where you want the keyup events. A mixin will automatically reinitialize

Re: Nested Form Submission

2010-11-08 Thread LLTYK
How about just using form fragments, they let you selectively send parts of a form (basically partial form submission like you're talking about). I'm guessing they may work for you (or may not, since it hides the inactive parts of the form) but I'm not sure what you are trying to do. -- View this

Re: Question about mixins

2010-11-08 Thread LLTYK
It sounds like something else is at work here, javascript timers should all get reset when the page changes. So either the page is not really changing or that mixin is somehow being called again on the second page. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Questio

Re: Question about mixins

2010-11-12 Thread LLTYK
Another approach I've taken was setting the actual javascript mixin object as a property of the element it's related to ('$(zoneid).periodicupdate=this'). So in the constructor of the mixin, you'd check whether that property existed already, call stop on the old one if present, then replace the ol

Re: grid containing multiple types of same interface

2010-11-24 Thread LLTYK
You manually create the grid model, which lets you specifically tell it to use the interface. -- View this message in context: http://tapestry-users.832.n2.nabble.com/grid-containing-multiple-types-of-same-interface-tp5769095p5770402.html Sent from the Tapestry Users mailing list archive at Nabb

Re: how do you gracefully shutdown run-jetty-run ?

2010-11-26 Thread LLTYK
There's a -DSTOP.PORT option, then you can use the --stop option in jetty to stop an already-running instance. http://docs.codehaus.org/display/JETTY/Securing+Jetty -- View this message in context: http://tapestry-users.832.n2.nabble.com/how-do-you-gracefully-shutdown-run-jetty-run-tp5711453p57

Re: Referencing and displaying image asset from Webapp

2010-12-14 Thread LLTYK
I don't think there's a tml shorthand. You'd use ContextAssetFactory in your java code: http://tapestry-users.832.n2.nabble.com/T5-How-to-load-image-Asset-from-filesystem-td2454924.html#a2455270 But that would generate the same /app/assets links, just not hardcoded. This filter issue remains a my

Re: Referencing and displaying image asset from Webapp

2010-12-14 Thread LLTYK
I don't think there's a tml shorthand. You'd use ContextAssetFactory in your java code: http://tapestry-users.832.n2.nabble.com/T5-How-to-load-image-Asset-from-filesystem-td2454924.html#a2455270 But that would generate the same /app/assets links, just not hardcoded. This filter issue remains a my

Re: Tapestry 5, jetty, jdbc drivers, class reloading

2010-12-15 Thread LLTYK
This is for jetty 7. Jetty 6 has different package names, different plugin names, etc. A chore to switch between the two but much of the syntax is the same. org.mortbay.jetty jetty-maven-plugin 7.2.0.v20101020

Re: T5 disable loading specified module

2010-12-21 Thread LLTYK
There is a tapestry.disable-default-modules. Took me a while to find it in the source code. Then you specify the modules you want to use manually with tapestry.modules (org.apache.tapestry5.upload.services.UploadModule,org.apache.tapestry5.spring.SpringModule). -- View this message in context: h

tapestry.disable-default-modules seems broken

2010-12-21 Thread LLTYK
If you specify this, it disables any modules on the classpath, leaving only the Tapestry stuff. I assumed that you'd be able to add other modules manually via tapestry.modules, but that also gets disabled. Is it supposed to be like that? -- View this message in context: http://tapestry-users.832

Re: T5.2.4 How to discard persistent fields when the user leaves a page ?

2010-12-27 Thread LLTYK
It's called discardPersistentFieldChanges: http://tapestry.1045711.n5.nabble.com/T5-Cleaning-page-s-persistent-field-td2419355.html -- View this message in context: http://tapestry-users.832.n2.nabble.com/T5-2-4-How-to-discard-persistent-fields-when-the-user-leaves-a-page-tp5867260p5869215.html

Re: Tapestry5 + Tomcat5 + Apache2

2011-01-11 Thread LLTYK
I think apache just isn't expecting urls to be in the js and isn't replacing it. I wonder if Chenillekit should be using toAbsoluteURI, wouldn't a relative path work just fine? As for the solution, well make your own copy of the mixin and fix it (I'd make it use a relative path instead). -- Vie

Re: Grid onAction Problem IEM6

2011-01-13 Thread LLTYK
Bad relative link in the css or something sending asset requests to the page itself? -- View this message in context: http://tapestry-users.832.n2.nabble.com/Grid-onAction-Problem-IEM6-tp5917903p5917932.html Sent from the Tapestry Users mailing list archive at Nabble.com. --

Re: Grid onAction Problem IEM6

2011-01-13 Thread LLTYK
I would log all HTTP requests to the server and see which one is triggering the error. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Grid-onAction-Problem-IEM6-tp5917903p5918246.html Sent from the Tapestry Users mailing list archive at Nabble.com.

Re: Grid / Ajax and checkbox

2011-01-13 Thread LLTYK
Well if you *must* use the ajax grid paging... then don't use tapestry checkboxes. Use ordinary html checkboxes that have onclick javascript handlers that ping the server with their new value. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Grid-Ajax-and-checkbox-tp59184

T5.2 - Activation context for ajax requests

2011-01-14 Thread LLTYK
So I am using Inge's ZoneUpdater. Previously in 5.1, the createEventLink in it results in a "?t:ac=1/2" being tacked onto the end of the event link. Afterwards, when the event is triggered, the page's onActivate(Integer,Integer) is called. This initializes some instance variables that are then use

Re: T5.2 - Activation context for ajax requests

2011-01-14 Thread LLTYK
I had an onPassivate. I realized something in my javascript was stripping the query parameters from the link from createEventLink. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Re-T5-2-Activation-context-for-ajax-requests-tp5921878p5922180.html Sent from the Tapestry U

Re: Grid onAction Problem IEM6

2011-01-18 Thread LLTYK
If you wanted a servlet request you'd do "return new HttpServletRequestFilter()". And then you'd change the the return type, and the request and response type (HttpServletResponse, etc). I don't think you need to do that anyways. Just log Request.getPath(). Usually this ends up being a url() ref

Re: Combine scripts doesn't work in 5.2.4?

2011-01-18 Thread LLTYK
The builtin tapestry stuff seems to combine itself into core.js if it's included as a stack. Maybe it works if you create a javascriptstack instead? Still a bug though. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Combine-scripts-doesn-t-work-in-5-2-4-tp5929290p593650

Re: Tapestry 5.2 Disable element id autogeneration

2011-01-19 Thread LLTYK
Put the submit button inside the zone as well, then it will link to the new id. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Tapestry-5-2-Disable-element-id-autogeneration-tp5938959p5939355.html Sent from the Tapestry Users mailing list archive at Nabble.com. ---

Re: Combine scripts doesn't work in 5.2.4?

2011-01-19 Thread LLTYK
The only example I've seen is in TapestryModule.java: public static void contributeJavaScriptStackSource(MappedConfiguration configuration) { configuration.addInstance(InternalConstants.CORE_STACK_NAME, CoreJavaScriptStack.class); configuration.addInstance("core-datefield"

Service order in a tapestry library?

2011-01-19 Thread LLTYK
I try to contribute a JavaScriptStack in a library module, and it ends up failing. The TapestryModule seems load after the libraries. I assume it would work fine if I put it in my AppModule instead. How would you use it in a library though? The contribution: public static void contributeJavaScr

Re: Resurrected: T5 Rendering a column as text box in a grid when the columnName is dynamic

2011-01-19 Thread LLTYK
Any tapestry identifiers in tml are not dynamically changeable. First step would be programmatically creating the bean model in the java code, and passing that to the grid. Customizing those dynamic blocks can be tricky though, probably involving PropertyEditBlocks in the appmodule or something.

Re: Service order in a tapestry library?

2011-01-19 Thread LLTYK
Nevermind, it was a maven classpath problem. It works fine regardless of the order of those "Adding module" statements. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Service-order-in-a-tapestry-library-tp5940301p5940531.html Sent from the Tapestry Users mailing list ar

Re: t5: 5.2.4 and IE8

2011-01-19 Thread LLTYK
I suspect you simply need to add noConflict to the end of the jquery js (without having to reminify). As long as it is in the same file it'll satisfy IE8. -- View this message in context: http://tapestry-users.832.n2.nabble.com/t5-5-2-4-and-IE8-tp5934819p5940730.html Sent from the Tapestry Users

JavaScriptStack demo

2011-01-19 Thread LLTYK
Here's an example of the 5.2 JavaScriptStack api. I used it to load Datatables (http://www.datatables.net/). The page: @Import( stack={"datatable"}) public class PageWithDatatable { void afterRender() { //connect datatable to tml here } } The AppModule: public static void contribu

Re: Dynamic Layout

2011-01-24 Thread LLTYK
You need to do it in Javascript (document.title = "Blah" + document.title). Or if you disable Tapestry javascript validation the layout will be rerendered as you expect. Tapestry doesn't seem to have a good place to hook into failed javascript validations though. As far as I can tell you'd hook i

Re: creating an InPlaceSelect control

2011-01-26 Thread LLTYK
Just use the chenillekit onevent mixin. Unfortunately it'll only pass the selected value as a string. So you'd have to translate the string back into your object. @OnEvent(component = "TheSelect", value = "change") void onSelected(String value) { } -- View this message in context:

Re: creating an InPlaceSelect control

2011-01-26 Thread LLTYK
Just a guess, but change your tml to have a context along with changing the event handler. t:mixins="ck/OnEvent" t:event="change" t:context="contextyoumakeup" -- View this message in context: http://tapestry-users.832.n2.nabble.com/creating-an-InPlaceSelect-control-tp5963248p5963981.html Sent

Re: how to return value to a onCompleteCallback() function?

2011-01-27 Thread LLTYK
Return a JSONObject. -- View this message in context: http://tapestry-users.832.n2.nabble.com/how-to-return-value-to-a-onCompleteCallback-function-tp5967095p5967228.html Sent from the Tapestry Users mailing list archive at Nabble.com.

Re: Struggling with Ajax in T5 ...

2011-01-31 Thread LLTYK
The key part of zone updater that does what you want is this: void afterRender() { String url = resources.createEventLink(event, context).toAbsoluteURI(); ... renderSupport.addScript("%sZoneUpdater = new ZoneUpdater(%s)", prefix, spec.toString()); } This is the interface from Tap

Re: Antwort: Tapestry 5 error "Caused by: java.lang.RuntimeException: Literal values are not updateable"

2011-02-07 Thread LLTYK
Because it's literal "false" and where changes would be stored is not specified. If you want to set it you have to have the parameter map to a property of the container. The example doesn't make clear what you are trying to do to begin with. -- View this message in context: http://tapestry-use

Re: How to fix the id attribute of a select component

2011-02-07 Thread LLTYK
When you load Tapestry components in an ajax request a new t:id is generated. Presumably because it's possible for a component with the same original id to still be on the page. I'm not sure how this relates to the client side id. -- View this message in context: http://tapestry-users.832.n2.nab

Re: How to fix the id attribute of a select component

2011-02-08 Thread LLTYK
The current "solution" is to use a mixin instead of onchange. Mixins will get the newly generated id passed in to their initialize(), where you would then attach an onchange listener with prototype observe. -- View this message in context: http://tapestry-users.832.n2.nabble.com/How-to-fix-the-i

Re: Annotation for Field Description

2011-02-08 Thread LLTYK
A more descriptive label would be easy, just add the keys to the properties file. More than that will probably delve into custom decorator or property block territory. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Annotation-for-Field-Description-tp6004837p6005098.html

Re: Dynamic combo box - Tapestry 5.2.2

2011-02-10 Thread LLTYK
I use the ZoneUpdater mixin to do this. http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html @Log void onChangeFromFirstSelect(String value) { //set options for second select } The zone encompasses all the selects. -- View this message in context: http://tapest

Spring beans in the AppModule?

2011-02-15 Thread LLTYK
I'm trying to use a spring bean in my AppModule: public static void contributeApplicationDefaults(MappedConfiguration configuration, @Inject SomeSpringBean someSpringBean) { configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en"); configuration.add(SymbolConstants.APPLICATION_V

Re: Tapestry 5 & JBoss 6 - Silently Fails

2011-02-16 Thread LLTYK
I'm on Jboss 5.1 here. Slightly different classpath converter. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Tapestry-5-JBoss-6-Silently-Fails-tp6021772p6031747.html Sent from the Tapestry Users mailing list archive at Nabble.com. -

Re: Tapestry 5 & JBoss 6 - Silently Fails

2011-02-16 Thread LLTYK
// supports virtual filesystem used by JBoss 5.x try { URLConnection connection = url.openConnection(); Object virtualFile = invokerGetter(connection, "getContent"); Object zipEntryHandler = invokerGetter(virtualFile, "getHandler"); URL realUrl = (

Re: Error after logout

2011-02-17 Thread LLTYK
The problem here is the session somehow being accessed after invalidate() is called. Maybe you tried to set an @Persist'd variable or something, and the actual change didn't propagate until after you called invalidate(). I do my invalidate in an ajax request. The other solution is to call invalid

RE: T5: UploadedFile problem

2011-02-22 Thread LLTYK
Hit your app with IE and it'll return something. Newer versions of IE actually return "c:\fakepath". -- View this message in context: http://tapestry-users.832.n2.nabble.com/T5-UploadedFile-problem-tp6052426p6053186.html Sent from the Tapestry Users mailing list archive at Nabble.com. -

Re: T5.2 mixin example

2011-02-23 Thread LLTYK
The wiki examples aren't terribly different, just change RenderSupport to JavaScriptSupport. And the addScript method may have changed slightly as well. var SomeMixin = Class.create(); SomeMixin.prototype = { initialize : function(element,zone) { Event.observe($(el

Re: T5.2 mixin example

2011-02-23 Thread LLTYK
See the ZoneUpdater code: http://tinybits.blogspot.com/2010/03/new-and-better-zoneupdater.html Disable the builtin actionlink behavior and do all you want your self (zoneupdater shows how to do the zone part, with context parameter for sending little bits of information). I assume "fire back any

Re: Radio Button Event ??

2011-02-23 Thread LLTYK
I'd do it in more or less pure javascript, since you will have to add a javascript listener to the radio button either way (either to trigger an event java side or to directly add/remove the disabled attribute from the fields). -- View this message in context: http://tapestry-users.832.n2.nabble

Can mixins add validation serverside?

2011-02-28 Thread LLTYK
I'd like to conditionally add some validation using a mixin, maxLength and required for example. Can a mixin somehow alter the validate attribute of a field? -- View this message in context: http://tapestry-users.832.n2.nabble.com/Can-mixins-add-validation-serverside-tp6073177p6073177.html Sent

Re: Pb in 'getOrCreateMethod()' ?

2011-02-28 Thread LLTYK
That setup sounds like something you shouldn't do. Two different instances of two different classes with the same name? -- View this message in context: http://tapestry-users.832.n2.nabble.com/Pb-in-getOrCreateMethod-tp6073648p6073867.html Sent from the Tapestry Users mailing list archive at Nab

Re: Can mixins add validation serverside?

2011-02-28 Thread LLTYK
With that I'd have to get the class of the parent of the property somehow... you guys tightly integrate the annotation support to do this with @Validate. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Can-mixins-add-validation-serverside-tp6073177p6073903.html Sent from

Re: Can mixins add validation serverside?

2011-02-28 Thread LLTYK
I in particular need to get the class of the parent of the property somehow. That's how I conditionally add validation. And the name of the property as well. It's a retread of what tapestry5-cayenne does, which seems castrated to me because it requires BeanEditor to provide this information to the

Re: JavaScript Stack aggregator

2011-02-28 Thread LLTYK
We can't really tell what you've forgotten if we haven't seen how you did it. -- View this message in context: http://tapestry-users.832.n2.nabble.com/JavaScript-Stack-aggregator-tp6074088p6074478.html Sent from the Tapestry Users mailing list archive at Nabble.com. ---

Re: Defining validation properties for a textfield embedded within another component

2011-02-28 Thread LLTYK
I'd think of a way to avoid using a bunch of css class names to begin with. Perhaps a better css selector would work with no changes to the class names. Maybe you could stamp the class you want on the div or whatever that contains all these fields. -- View this message in context: http://tapestr

Re: Invoke method after page is loaded; when method finishes, redirect to another page

2011-03-04 Thread LLTYK
Use a meta refresh (it'll probably have to be in the tag somehow). Or javascript, to hit the same url. @Inject private ComponentResources componentResources; @OnEvent("calculate") ResultPage calculate() { } public String getCalculateUrl() { return componentResources.createEventLink("calcul

Re: Handling form events inside components

2011-03-04 Thread LLTYK
One hacky way of doing it is with onValidateFromXXX. Before the actual value is copied over from a field to the java object, this method is called. Not to be confused with onValidateForm. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Handling-form-events-inside-componen

Re: Centralize error handling

2011-03-04 Thread LLTYK
My approach would be not to throw exceptions all the time. The exception handler is only used for fatal stuff, I don't throw stuff there by design. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Centralize-error-handling-tp6089256p6089399.html Sent from the Tapestry User

Re: Updating a Field on event in Tapestry5

2011-03-10 Thread LLTYK
Define "update another textfield". Are you putting some result from the server in it? Read up ZoneUpdater: http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/ajaxonevent Although it's annoyingly tricky to refresh form fields. The example refreshes some plain text. -- View this

Re: Uploading then displaying Images

2011-03-11 Thread LLTYK
Nobody's mentioned createEventLink. That's where you get the image url, create an event link pointing to the event handler that returns the stream response. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Uploading-then-displaying-Images-tp6159049p6161239.html Sent from t

Re: Disable Validation of a field

2011-03-17 Thread LLTYK
Do you still use the textfield even when the checkbox is checked? If not, you can make some js for the click event of the checkbox and simply disable the textfield in your js. I suspect this disables validation. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Disable-Vali

Re: Disable Validation of a field

2011-03-17 Thread LLTYK
You can use a FormFragment to hide and disable the field. Or you can remove the builtin required validation and manually decide whether it's required in onValidateForm. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Disable-Validation-of-a-field-tp6176353p6180826.html Se

Re: dynamically changing event link context on client side using js

2011-03-29 Thread LLTYK
I have a mixin that does this. It doesn't have to be a mixin though. I used the urlencoder from TAP5-637 since space characters and such tend to make things break. Basically you encoder a bunch of unique characters as the context of the url server side, then replace it with whatever value you want

Re: Dynamic combo box - Tapestry 5.2.2

2011-03-29 Thread LLTYK
The js file needs to be in the same package directory, but in the resources directory instead of the java directory. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Dynamic-combo-box-Tapestry-5-2-2-tp6011286p6218845.html Sent from the Tapestry Users mailing list archive a

How do I set the anchor of the current page?

2011-03-29 Thread LLTYK
So someone clicked something on my page, and whatever event handler returns null/is void. Is there a way to set the anchor in this case? I know there's a setAnchor on a Link, but that doesn't seem to be the easiest way (since all these event handlers weren't returning anything to begin with). -- V

Re: Logon notification

2011-03-30 Thread LLTYK
An HttpSessionListener... -- View this message in context: http://tapestry-users.832.n2.nabble.com/Logon-notification-tp6223363p6223518.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-ma

Re: Generating popup window after form success

2011-03-31 Thread LLTYK
So wait, is this form submit an ajax submit? Why wouldn't there always be a page refresh (and thus you can do that conditional javascript scenario you described). There's no way the transaction can be successful otherwise (unless you're submitting via ajax). -- View this message in context: http:

Re: updating a zone which does not exist...

2011-04-05 Thread LLTYK
I haven't used multizoneupdate, but it looks like you can specify the id of the destination, and the source doesn't have to be the exact same zone. Put your stuff in a block, then do new MultiZoneUpdate("myzone", myblock); And render the zone outside of the conditional so it's always there, with m

Re: Implementation mixin and persistence

2011-04-06 Thread LLTYK
Last time I did this I used a javascript cookie api. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Implementation-mixin-and-persistence-tp6243796p6246820.html Sent from the Tapestry Users mailing list archive at Nabble.com. -

Re: Required a sample program in Tapestry 4.1.3 which demonstrates AJAX Functionality

2011-04-12 Thread LLTYK
Here's an example of @EventListener I found floating around. Using the annotation magically adds a javascript method to a certain div on the page. @EventListener(elements = "FooJsEventSource", events = "foo") public void doFoo() { log.trace("doFoo"); } -- View this message

Re: Help required in using AJAX Functionality in Tapestry 4.1

2011-04-14 Thread LLTYK
I never looked into how to receive values back in T4 ajax, I only did the send part. Although doing a search on that annotation I mentioned before might help. -- View this message in context: http://tapestry-users.832.n2.nabble.com/Help-required-in-using-AJAX-Functionality-in-Tapestry-4-1-tp62715

  1   2   >