Upgrade from T4 to T4.1: Javascript problem
Hi, I was just trying to upgrade from T4 to T4.1 (4.1.6). When Javascript is enabled, the page will be blank. With Javascript disabled in the browser, the page renders just fine. I replaces the ajaxDelegate in the Shell component with an empty render method. This works, but of course I get Javascript errors, that Tapestry is not defined. I'm not sure why the Page is blank. I guess that Tapestry hides the content and waits for the whole DOM tree to be available before it shows the content, but the last steps fails. Can this be? Thanks and Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Upgrade from T4 to T4.1: Javascript problem
Hi Andreas Andreou wrote: No, this shouldn't be the cause of this... Does this happen on FF? Does firebug show any resources not loading? It happens on Firefox and IE. No, firebug reports nothing suspicious. I think I saw someone reporting a similar problem, but there was no further response. Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T4] Validation Problem
Hi, I'm using a required validator on a TextField and use the form delegate to check whether there is an error in the TextField. If so, I render an error message. However, this message is rendered before the input-field is rendered. The problem starts when I have this TextField in a For loop. Now a validation error message is shown an the next TextField, instead of the TextField that really has the problem. Interestingly, if the last TextField is wrong, the first TextField gets the error message. Anyone knows a solution? Thanks and regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4] Validation Problem
Hi again, a colleague of mine gave me a hint: Look at FieldLabel. FieldLabel handles exactly the same problem and uses preRender(). I could solve it analogous. Regards, Christian Christian Haselbach wrote: Hi, I'm using a required validator on a TextField and use the form delegate to check whether there is an error in the TextField. If so, I render an error message. However, this message is rendered before the input-field is rendered. The problem starts when I have this TextField in a For loop. Now a validation error message is shown an the next TextField, instead of the TextField that really has the problem. Interestingly, if the last TextField is wrong, the first TextField gets the error message. Anyone knows a solution? Thanks and regards, Christian - 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: Only one user request at the same time
Hi Quoting spot_ [EMAIL PROTECTED]: how can I make shure, that only one request of a user is processed at the same time. In other words: I want to dismiss a request of a user, if a request of the same user is already running at the moment. There is no clear answer to this question. And you probably have to think hard about what you really want to achieve. To prevent a form to be submitted twice, you could use a ticket service. This would also prevent to have the form to be submitted again, even if the first request has been completely processed. But it would not help against having two different forms submitted at the same time (without having substantial additional logic in the ticket service). But I think you are trying to implement logic at the wrong level. The underlying services need to be able to cope with concurrent requests. A resulting error can then be reported back to the user. Regards, Christian -- Christian Haselbach TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschüftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n in javascript
Quoting learner [EMAIL PROTECTED]: onclick=javascript:return confirm('${message:key_in_my_property_file}'); i try to use key in javascript like above but failed. how to use key in javascript? There are several thing to consider here. 1) You cannot use the message service directly from Javascript, but you can create Javascript with the message service (the difference is subtle, but important). 2) I do not know of any ${message: } notation (which Tapestry version are you using?) I only know the message: prefix binding, which is not usable here. 3) If you are using this in a template, you must use the ognl: prefix. Try the following: a jwcid=@Any onclick=ognl:'javascript:return confirm(\'' + messages.getMessage('key_in_prop') + '\')' Or for less confusing string escapes do: a jwcid=@Any onclick=ognl:myLocalizeJavascript And in the corresponding class: --- @Message(key_in_prop) public String getJsMessage(); public String getMyLocalizedJavascript() { return String return confirm(' + getJsMessage() + '); } Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4 creating dynamic styles for divs
On Thu, Aug 02, 2007 at 06:32:06PM -0700, kael20 wrote: I have an issue where I need to create the style for a div based on the properties of an object in my database. This object contains top, left, width, and height which are important to create this particular div. Is there anyway that I can apply these attributes dynamically to a div using a component or something else? You mean like this? div jwcid=@Any style=ognl:'width:'+mywidth+';height:'+myhight ... /div Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4] Event for every request to clear data
On Thu, Aug 02, 2007 at 10:12:14AM -0500, Ben Dotte wrote: Is there any reason you can't use a threaded HiveMind service? That is usually the approach I take when I have a shared resource that should only live for the duration of a request. Thanks for the tip. I'm not quite sure if this works as I think. So the request is done in a new thread, the service is created for this thread and is discarded when the request finishes, right? That would work for me, if this is the way things go. Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T4] Event for every request to clear data
Hello, currently, we have a bean that is registered for a lot of pages which holds some information that is only releveant for the scope of the request. So I thought it woule be more appropriate to make an ASO out of it with scope request (which does not exist). The reason behind this is the fact, that this object realy is used for inter-component and -service communication. So I thought about making this an ASO with session scope and registering a service to a listener that fires at the end of a request to clear the data. So is there something analogous to ResetEventHub? Or am I looking in the wrong direction here? Thanks. Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Christoph Stock Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help needed for persistent properties initialization in components (4.1.2)
On Sun, May 27, 2007 at 03:02:49PM -0400, Jesse Kuhnert wrote: property name=registryCenter persist=session initial-value=ognl: new ch.mycompany.RegistryCenter() / But it is important to keep in mind the semantics of initial-value. It is evaluated when the component is first created and when it _returns_ to the pool (and not when it is fetched from the pool). Hence, if you write an initilization function that uses data from the current session, you will not get what you expect. Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What are benefits of pure HTML templates?
Quoting Igor Lobanov [EMAIL PROTECTED]: Anyway, Jonathan's suggestion about ease of CSS use is the most appealing to me, because nowadays CSS finally became the most powerful facility for determining style and position of elements on a page. I've got to say that this is not so important to me, because I normally do my CSS editing in Firebug. And it is also possible to edit CSS in a life system. Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What are benefits of pure HTML templates?
Quoting Lobanov Igor [EMAIL PROTECTED]: Considering all of these, decision to use pure HTML templates looks like completely arbitrary and the matter of taste of Mr. Howard Lewis Ship. However I suppose I missed an important point here, so I would be very grateful if somebody shed light on this issue for me. First of all, why wouldn't you want to use pure HTML templates? What are the benefits of using something else or even something new? Even though I (almost) never look at the templates using a special html editor or browser, there are two advantages: 1) If your editor knows about html (and most editors do), it will support you correctly. 2) You do not need to learn yet another thing. And you can also use this mechanism to generate other doctypes which are similar enough to html. Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T-4.0] LinkFactoryImpl caches context path
Hi, LinkFactoryImpl seems to cache the context path from the first request. This causes EngineServiceLink to have the context path of the first request and not of the current request. Is there an easy way to have the current context path in EngineServiceLink? I know it is a bit unusual to have different context paths for different requests. Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T-4.0] LinkFactoryImpl caches context path
On Tue, May 08, 2007 at 11:08:29AM +0200, Christian Haselbach wrote: LinkFactoryImpl seems to cache the context path from the first request. This causes EngineServiceLink to have the context path of the first request and not of the current request. Is there an easy way to have the current context path in EngineServiceLink? Oh, got that wrong. Tapestry uses the servlet path, not the context path, to create the url. However, regardless of that I need a mechanism to construct different urls for different requests. The request object is manipulated to reflect the true origin it comes from. Hence, the context path (or the servlet path) is set accordingly. But this does not work, because tapestry caches the servlet path, which is then used to create the url. Any ideas how to let Tapestry create the urls depending on the current context path? Thanks. Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T-4.0] LinkFactoryImpl caches context path
On Tue, May 08, 2007 at 11:24:33AM +0200, Christian Haselbach wrote: Oh, got that wrong. Tapestry uses the servlet path, not the context path, to create the url. On a closer look, I had it right the first time. The context path is cached and used. I guess I have to use a custom LinkFactory implementation. How do I override the used LinkFactory implementation in the hivemind configuration? Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to set value of @Option component
On Tue, May 08, 2007 at 06:48:03PM +0800, li li wrote: Hi li li, I cannot read your mail, because you send it in html only. Anyway, guessing from your subject: You must wrap Options components in a Select component. There you can set the value parameter. HTH Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: retrive value from html to java
On Tue, Apr 24, 2007 at 07:08:44AM -, ana ben wrote: tr jwcid=[EMAIL PROTECTED] source=ognl:session.menu.tools value=ognl:tool element=tr tdspan jwcid=@Insert id=toolnumber value=ognl:tool.product.pnumberTool Number/span/td Can any one tell me how to retrive the pnumber value from the html in java file. You mean what the equivalent of the ognl expression tool.product.pnumber in java would be? Well, this depends on what realy is behind the properties tool and product. But probably it is equivalent to getTool().getProduct().getPnumber(). Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tapestry 4.0.2: How do I get a new page object?
On Tue, Apr 17, 2007 at 10:39:38AM +0200, Holger Stolzenberg wrote: How about: @InjectPage(PageName) public abstract IPage getNewPageObject(); This will not necessarily give you a new instance as the OP wanted. Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tapestry 4.0.2: How do I get a new page object?
On Tue, Apr 17, 2007 at 02:22:19PM +0530, Karthik N wrote: this is done both when a new page is created and before an existing page is retired to the pool now the problem is that when the same page object is returned, our retirement/creation logic is affected I have no idea what the purpose of your strategy is, but it seems to me that you are trying something that is not compatible with the lifecycle of tapestry pages. hence we're looking for a way to create a new instance of the page even though the cycle might already have instantiated the page once before You can instantiate a page by hand, but this will undermine the caching strategy of tapestry. My guess is, that you are better off rethinking your method of resolution. Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tapestry 4.0.2: How do I get a new page object?
On Tue, Apr 17, 2007 at 11:30:03AM +0200, Christian Haselbach wrote: You can instantiate a page by hand, but this will undermine the caching strategy of tapestry. My guess is, that you are better off rethinking your method of resolution. Perhaps you can put your things into points like prepareForRender() and cleanupAfterRender()? Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tapestry 4.0.2: How do I get a new page object?
On Tue, Apr 17, 2007 at 03:02:15PM +0530, Karthik N wrote: would you happen to know how i could achieve that? It is not that easy and it would be a horrible hack. If you want to do it non the less, have a look at PageSource.getPage() to get an idea what needs to be done. However, it would probably make more sense to try and fit your initilization and destruction into the lifecycle of the tapestry objects instead of working around (and against) the framework. If you could be more specific about your real problem, it might be possible to show you an alternative. Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tapestry 4.0.2: How do I get a new page object?
Quoting Karthik N [EMAIL PROTECTED]: I have a requirement however where I want newPage to be a different instance than this In that case you should probably rethink the requirement. Why do you want to have a different instance? The concept of the page is that you have an instance to render for the user and then it is returned to the page pool. Any ideas how this can be achieved? You could turn off the cache, but this is most certainly not what you want. Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Rendering raw data in pages
On Sun, Mar 25, 2007 at 11:02:50AM +0200, fdegrassi wrote: I already did it using a service, what i do not like of it is that services are (obviously) stateless, not pooled, so i can't use them in While they are not pooled, they are not necessarily stateless. Services have access to the session and to ASOs just as everything else. It certainly makes sense for tapestry to pool pages, but it would not make sense to pool services in that sense, because there is nothing tapestry has to do, like parsing the template, wiring the components. Hence, I do not see the advantage of (ab)using a page to render a png. What should tapestry pool here, and how should it know how to do it? Other markups (like SVG) would be another case. There is a lot of reuse potential. Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4] Adding body of a sub-component w/o using a template
On Sun, Mar 04, 2007 at 03:29:04AM +0200, andyhot wrote: You can't dynamically change the component structure Well, I do not really want to change it dynamically, so this is not the problem. Now, i still can't understand your use case, so i can't offer any help there (what's the meaning of influence its body w/o using a template), but Let me refrase this: When using a template I can give a subcomponent a body. How can I do it w/o using a template? I have a LinkSubmit subcomponent, which I want to have render its content with a certain body. While I can define this body using a template, the template looks ugly (in this case, not in general). It is better understandable when written programmatically. perhaps you can build a custom component and pass parameters to it... Sure, but that would be mostly a rewriting of LinkSubmit. I rather hoped I could reuse LinkSubmit. The use case is pretty simple: A specialized LinkSubmit component. Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T4] Adding body of a sub-component w/o using a template
Hello, is it possible to add a body to a sub-component w/o using a template? I tried to inject the sub-component (which is specified in the jwc) into the class and than use addBody(). However, doing this during render adds a new body during each render. Doing it during finishLoad is not possible, because i cannot access the sub-component. Any ideas? Thanks in advance. Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4] Adding body of a sub-component w/o using a template
On Thu, Mar 01, 2007 at 08:56:58PM +0200, andyhot wrote: Can you give an example of what you're trying to accomplish ? In this case I want to render customized LinkSubmit. For that I have LinkSubmit as subcomponent, but want to influence its body w/o using a template. With the addBody function I can add the custom renderer, but I cannot find the right way to do it, as I explained formerly. Regards, Christian -- Christian Haselbach - [EMAIL PROTECTED] - +49 176 2082 5804 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring Geschäftsführer: Henrik Klagges, Gerhard Müller, Eike Reinel Amtsgericht München, HRB 135082 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Euro symbol
Zitat von Ron Piterman [EMAIL PROTECTED]: The is comming from the java currency format object: NumebrFormat.getCurrencyInstance(); Just a guess. You are using a number format without specifying the locale. Hence, the default locale for your platform is used which propably includes the encoding latin9. The code which denotes the euro symbol in latin9 denotes the currency symbol in latin1 and (IIRC) in UTF-8. Thus, you see the currency symbol, not the expected euro symbol. Regards, Christian. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamic image assets?
Zitat von Brian Long [EMAIL PROTECTED]: component id=subscriberImage type=Image binding name=image value=getAsset('ognl:subscriber.pathToImage ') /component Try binding name=image value=getAsset(subscriber.pathToImage) The value is already an ognl expression (if not declared otherwise). However, this will still depend on named assets in the page. I.e., there must be an asset named like what subsriber.pathToImage evaluates to. You probably want your asset genereated differently (e.g., by a custom method). Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamic image assets?
Zitat von Brian Long [EMAIL PROTECTED]: the pathToImage returned by my subscriber dataobject is exactly that, a path to the image. I'd like to use this in the asset component instead of the path: asset name=subscriber path=ognl:subscriber.pathToImage / Right, thats why I meant the parameter binding. component id=subscriberImage type=Image binding name=image value=getAsset('subscriber') /component Change to: component id=subscriberImage type=Image binding name=image value=subscriberAsset /component And impelement IAsset getSubscriberAsset() in the corresponding class (i.e., the page class if the component is in a page). There you can, for example, create the asset with an injected asset factory. http://tapestry.apache.org/tapestry4/tapestry/apidocs/org/apache/tapestry/asset/AssetFactory.html Regards, Christian P.S.: You might do what getSubscriberAsset() does in ognl, but perhaps its better to make small steps. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Components inside For component
On Mon, Oct 30, 2006 at 08:46:41PM +, pipothebit wrote: I add rols and delete (throught index property of For component) but my rol values are not set during post, and when i go to save it to database all items of rols List are empty (state is not saved). I do not really understand what you are doing, but there are different ways to manipulate state according to elements in a For loop. Assuming you render something like a button for each element, you could use the current value (assigned via value) or the index (assigned via index parameter) to associate the rendered button with the element, so you know for which element the button has been pressed. Another way, if things are more complicated, is to use hand tailored setters and getters which take into account what the current element in the loop is, backed by a persisted property. Lets say you have a property elementChecked (a set) and iterate with the For component over elements: span jwcid=@For source=ognl:elements value=ognl:element ... /span In this component you have a checkbox accessing a property elementCheck. For this property define the getter and setter as follows: public boolean isElementCheck() { this.getElementChecked().contains(getElement()); } public void setElementCheck(boolean checked); if (checked) { this.getElementChecked().add(getElement()); } else { this.getElementChecked().remove(getElement()); } } Well, elementChecked does not need to be persistent, if you do not need it after the rewind. Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Upload file size limit in 4.0.2
Hello, we wanted the set the file size limit for upload files to a different value, but this is not possible as noted in the following bug report: http://issues.apache.org/jira/browse/TAPESTRY-995 Unfortunately, updating is not an option right now. Is there a work-around? Thanks. Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: For component ConcurrentModificationException during rewind.
Zitat von Gareth [EMAIL PROTECTED]: I have gotten around the problem by, in the listener for onDelete, I flag the row for deletion, and then in the PageBeginRender method, I check to see that it is not rewinding - i.e. it is about to start rendering the response, and if the deletion flag is set, remove the corresponding row. You could use the action parameter instead of the listener parmeter in the submit component. This should be called after the loop has been rewinded. See http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/Submit.html Or you could create a new list, initialized with the original list, to run the for loop. This might be expensiv, depending on the size of the list. Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Insert Components depending on SubClass
Quoting Skorpien126 [EMAIL PROTECTED]: In another Component I read the array. This one should entry a the Non-worker component or the Worker-Component for each object depending on which object i want to visualize. Is there a way realize that?!?! You can use the If component to choose how to display something. Assuming your Person Class has a method isWorker() that is true iff the person instance is a worker and your component stores a Person instance in a component property called person, you can write the following in the html template (untested code follows): span jwcid=@If condition=ognl:person.worker span jwcid=@WorkerDisplayComponent worker=ognl:person /span span jwcid=@Else span jwcid=@NonWorkerDisplayComponent nonWorker=ognl:person /span WorkerDisplayComponent here is a component that has a parameter worker and NonWorkerDisplayComponent is a component that has a parameter nonWorker. HTH Ciao Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tapestry - spring integration
Quoting Anders Cessner [EMAIL PROTECTED]: I´ve browsed through some of the mails sent to this mailing list earlier and have learned some tricks to keep those lazy load exceptions away, for example, but didnt really get how exactly do i configure tapestry and spring so i can inject the spring beans to tapestry page objects? That's not too hard. You can follow these instructions: http://wiki.apache.org/tapestry/Tapestry4Spring (we basically used this approach (first variant) in our current project). Or you can take a look at this: http://howardlewisship.com/tapestry-javaforge/tapestry-spring/ I don't know about it, but I would guess that this is the above approach put into a library. Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OGNL in javascript
Quoting Deon Visagie [EMAIL PROTECTED]: I want to put an ognl expression in my onclick event of a link e.g: onclick=ognl:'javascript: document.getElementById('userId').value=' + user.Id I'd say there is a syntax error with the single quotes, which occure in the getElementById call. If escaping these does not work you can try something like onclick=ognl:makeJavascript() and implement String makeJavascript() in the coressponding class to return the desired string. Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Invalidate session
Quoting Bryan Lewis [EMAIL PROTECTED]: This has been discussed a few times before. For example, Yes, I have googled a bit and found some small discussions. But they were not to helpful. As you say, Tapestry doesn't allow the exception to bubble up to the user, but it does put a worrisome stack trace in the log. The Tapestry developers weren't highly motivated to fix this minor annoyance :-) so Well, it is more than an annoyance when you deploy in Tomcat 5.5.15, where the exception reporter gets a null pointer exception from the session.getID(). The user will get a tomcat error report and not the logout page. I just ignored it for a while, and then worked around it in my custom Engine. It's not pretty but hey, it's a work-around. Thanks. Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]