RE: Using JavaScript during Ajax request

2018-09-27 Thread Davide Vecchi
> // Your code here > > } > } > > > Op 27/09/2018 om 10:59 schreef Davide Vecchi: >> Hello everybody, >> >> I am having exactly the same problem described in the thread linked >> below, that is the exception >> >> &

Using JavaScript during Ajax request

2018-09-27 Thread Davide Vecchi
Hello everybody, I am having exactly the same problem described in the thread linked below, that is the exception "No object of type org.apache.tapestry5.services.javascript.JavaScriptSupport is available from the Environment" that occurs only if the event handler is handling an Ajax request:

Retrieving elements after a zone update changed their id.

2017-07-27 Thread Davide Vecchi
Hi everybody, We are using Tapestry 5.4.3 (successfully migrated from 5.3.8, just for the record). I am writing Selenium tests for this webapp and I am having a problem related to the fact that after a zone update Tapestry changes the client id of the elements, like explained in detail under

Generic advice for upgrading from 5.3.8 to 5.4

2017-06-13 Thread Davide Vecchi
Hi everybody, We want to upgrade from 5.3.8 to 5.4 and we would like to do some preparation and figure out as much as possible what changes might be needed - if any - so any bit of advice, generic or specific, and any pointer to related posts or articles would be very welcome. F.ex., I have

RE: Creating an org.apache.tapestry5.dom.Document from client-side page source

2017-04-06 Thread Davide Vecchi
maybe even the java xml libraries. But not the tapestry dom libraries. On 6 Apr 2017 17:16, "Davide Vecchi" <d...@amc.dk> wrote: > Thanks Thiago, I will look into your suggestion, I actually think > htmlparser is even already used somewhere else in the application. &

RE: Creating an org.apache.tapestry5.dom.Document from client-side page source

2017-04-06 Thread Davide Vecchi
en you can do whatever you want with it, including using XPath through tapestry-xpath, which I cannot recommend enough. On Thu, Apr 6, 2017 at 12:20 PM, Davide Vecchi <d...@amc.dk> wrote: > Hi everybody > > I am writing a Selenium test to test a Tapestry 5.3.8 web app, and in &g

RE: Creating an org.apache.tapestry5.dom.Document from client-side page source

2017-04-06 Thread Davide Vecchi
org> Subject: Re: Creating an org.apache.tapestry5.dom.Document from client-side page source Why on earth would you do that? On 6 Apr 2017 16:20, "Davide Vecchi" <d...@amc.dk> wrote: Hi everybody I am writing a Selenium test to test a Tapestry 5.3.8 web app, and in that test

Creating an org.apache.tapestry5.dom.Document from client-side page source

2017-04-06 Thread Davide Vecchi
Hi everybody I am writing a Selenium test to test a Tapestry 5.3.8 web app, and in that test I retrieved the whole client-side page source into a String. It's a regular HTML page generated by Tapestry. Nothing special about it, it starts with http://www.w3.org/1999/xhtml;> and it ends

RE: NPE in dispatchComponentEvent of a page class (which doesn't have such method)

2017-03-23 Thread Davide Vecchi
e root cause might be that the context of your event link does not contain the value that it should. Check the network inspector in your browser to see what’s sent to the server. Christian > Am 22.03.2017 um 15:41 schrieb Davide Vecchi <d...@amc.dk>: > > Hi everybody, > &g

NPE in dispatchComponentEvent of a page class (which doesn't have such method)

2017-03-22 Thread Davide Vecchi
Hi everybody, I'm using Tapestry 5.3.8 . I am at a complete loss trying to figure out why I always get a NullPointerException when I click on a grid row of a certain page. I'm describing the situation here and if anyone has *any* thought, feeling, suggestion, observation, things to check or

RE: Multi selection dropdown in Tapestry

2017-03-15 Thread Davide Vecchi
Probably the asker wants something to the effect of the 'multiple' attribute of the HTML 'select' tag, see http://www.w3resource.com/html/attributes/html-multiple-attribute.php . A working example is under "Multi Select Option" at https://www.hscripts.com/tutorials/html/form-combobox.php .

FW: Implementing a "bottomless" grid

2017-02-15 Thread Davide Vecchi
into this library though, because it seems to have many very useful features and a very consistent and easy way to use them. -Original Message- From: Davide Vecchi Sent: Wednesday, February 15, 2017 12:41 To: Tapestry users <users@tapestry.apache.org> Subject: FW: Implem

FW: Implementing a "bottomless" grid

2017-02-15 Thread Davide Vecchi
to know that. Thanks Davide -Original Message- From: Davide Vecchi Sent: Monday, February 13, 2017 09:41 To: 'Tapestry users' <users@tapestry.apache.org> Subject: RE: Implementing a "bottomless" grid Hi David, Thanks for the information, that might be just what I am l

RE: Implementing a "bottomless" grid

2017-02-13 Thread Davide Vecchi
t least give you an idea on what you need to do. If you want the grid to be in it's own scrollbar, you should put it in a and then set the height to be some fixed height, and give it the style overflow-y: scroll;. Thanks, David. On Sat, Feb 11, 2017 at 2:58 AM, Davide Vecchi <d...@a

Implementing a "bottomless" grid

2017-02-10 Thread Davide Vecchi
Hi everybody, Before starting to code this myself, I'm trying to find out if there already exists some component or mixin to apply to the grid to do something similar, or if Tapestry has support for this in other ways. Also, any thought about this subject would be welcome. By "bottomless" I

File chooser dialog with look and feel of the operating system.

2016-11-01 Thread Davide Vecchi
Hi everybody, I need to implement a dialog to choose a file or folder in a Tapestry page. Ideally I would like the dialog to be a system dialog, like the one I get when using the "" component (http://tapestry5-jquery.com/components/docsajaxupload), which on Windows is the standard Windows

RE: FW: Null pointer on sort with 5.3.8 that didn't occur with 5.3.7

2016-06-30 Thread Davide Vecchi
Thanks for the pointers, creating a BeanModel and adding my extra columns to it sounds like the right way to go. As an emergency solution for now I'm just going through all grids and adding the t:add columns into t:excludeSort in order to avoid the crashes on sorting. Then I will work on the

FW: Null pointer on sort with 5.3.8 that didn't occur with 5.3.7

2016-06-29 Thread Davide Vecchi
I changed my plan of finding out what causes this difference between 5.3.7 and 5.3.8. Instead I will go with some re-design, using some suggestions I got here. However I am still very interested in knowing whether my way of defining these t:add columns (pasted below) in general has something

RE: Null pointer on sort with 5.3.8 that didn't occur with 5.3.7

2016-06-28 Thread Davide Vecchi
, 2016 at 3:43 PM, Davide Vecchi <d...@amc.dk> wrote: > Thanks, those are interesting options to change my design, which I > will probably have to do. > > But at this stage I need to focus on why the outcome of defining > columns in that way is different in 5.3.8, because it

RE: Null pointer on sort with 5.3.8 that didn't occur with 5.3.7

2016-06-28 Thread Davide Vecchi
eate a display model for your data > source, use .include (or similar) to whitelist the desired attributes > in the generated model and model.add to get your synthetic columns defined. > > -- > Chris > > On Tue, Jun 28, 2016 at 3:13 PM, Davide Vecchi <d...@amc.dk>

RE: Null pointer on sort with 5.3.8 that didn't occur with 5.3.7

2016-06-28 Thread Davide Vecchi
umn) is not available. It can happen if the column is manually added to the model. Was the column sortable with Tapestry 5.3.7? How is this column defined? Best regards, Cezary On Mon, Jun 27, 2016 at 4:43 PM, Davide Vecchi <d...@amc.dk> wrote: > Hi everybody > > For now I cannot

Null pointer on sort with 5.3.8 that didn't occur with 5.3.7

2016-06-27 Thread Davide Vecchi
Hi everybody For now I cannot post code to reproduce this problem because it only occurs with one columns of a specific grid from a big application and so far I wasn't able to extract the code to reproduce the error into a runnable example. But after posting this I will keep trying and if I

RE: Encoding a space in querystring param using standard percent encoding

2016-05-20 Thread Davide Vecchi
Felix, that's brilliant, thanks a lot, it solved my problem. I had no idea that request.getParameter and @ActivationRequestParameter use different encoding schemes. Thanks -Original Message- From: Felix Gonschorek [mailto:fe...@netzgut.net] Sent: Friday, May 20, 2016 14:11 To:

Encoding a space in querystring param using standard percent encoding

2016-05-20 Thread Davide Vecchi
Hi everybody , In order to have a Tapestry page correctly receive an @ActivationRequestParameter , the value in the querystring must be sent encoded in the Tapestry way (f.ex. using Tapestry's URLEncoder service), so f.ex. a space char becomes $0020 , a "&"becomes $0026 etc. However this

RE: Changing Grid.currentPage persistency to flash

2016-05-02 Thread Davide Vecchi
ou can control the behavior of @Persist inside the Grid using "Persistence Strategy Inheritance" ( http://tapestry.apache.org/persistent-page-data.html ) without having to alter the component itself. -- Chris On Mon, May 2, 2016 at 11:12 AM, Davide Vecchi <d...@amc.dk> wrote: &g

RE: Hyphens in URL possible?

2016-05-02 Thread Davide Vecchi
The JavaDoc for service interface org.apache.tapestry5.services.linktransform.PageRenderLinkTransformer seems to suggest it can be used for that. However this is just a guess and a pointer if you want to look at it, because I have no previous knowledge or experience with that. I'm sure you are

Changing Grid.currentPage persistency to flash

2016-05-02 Thread Davide Vecchi
Hi everybody I see that the instance field that holds the current page number of a grid (org.apache.tapestry5.corelib.components.Grid.currentPage) is annotated with @Persist . This has the probably desirable effect that f.ex. if I am on webpage A and it has a grid and I browse to its page #2

RE: Calling a Link target from server-side code

2016-04-29 Thread Davide Vecchi
ct: Re: Calling a Link target from server-side code Hey ! You can trigger event with the ComponentResources service : *componentResources.triggerEvent(String eventType, Object[] contextValues, ComponentEventCallback callback);* I hope it'll help you. Charles Le jeu. 28 avr. 2016 à 17:29, Davide

Calling a Link target from server-side code

2016-04-28 Thread Davide Vecchi
Hi everybody, This is the scenario: I am in a component, and I have a string that contains an event name, f.ex. String eventName = "myEvent"; (but in reality it's not a constant). So I also have a server-side event handler method for that event (in another component or in a

Documentation about Tapestry.ajaxRequest

2016-02-22 Thread Davide Vecchi
Hi everybody, Where can I find some documentation about Tapestry.ajaxRequest Javascript function ? I searched for quite a while but I still cannot find it. I'm mostly interested in knowing which parameters it can take and what it does. I inferred some of that info by looking at how it's used

RE: Making a grid's checkbox column preserve its checked state across pages

2016-02-19 Thread Davide Vecchi
The way in which I was thinking to handle this for now was to act client-side on the change of a checkbox and send its checked state to the server via Ajax, without POSTing the form. The idea of saving the states in the client instead is interesting, I had not thought about it and I will

Making a grid's checkbox column preserve its checked state across pages

2016-02-19 Thread Davide Vecchi
Hi everybody, The following is my scenario, I'm looking for suggestions about good ways to go about it. Many of my pages have grids, and many of these grids have columns whose content in each row is a checkbox. If the grid has many rows and so it gets divided into grid pages and it gets a

RE: Retrieving the Class of an enum backing a Grid column

2015-12-10 Thread Davide Vecchi
Great, it’s exactly there, thanks a lot. So here is the code that works for me: BeanModel dataModel = getDataModel();// : The data model of the grid. PropertyModel pm = dataModel.get(columnName); Class columnClass = pm.getPropertyType(); Cheers Davide -Original

Retrieving the Class of an enum backing a Grid column

2015-12-09 Thread Davide Vecchi
Hi everybody, I'm writing a custom component to be used by the Grid component, such that - in a very few words - when the user clicks on an icon placed in the header of a column whose datatype is an Enumeration, I show a dropdown containing all the existing members of that enumeration.

RE: Make Tapestry add an id to the tag of the grid

2015-09-22 Thread Davide Vecchi
advice is the solution. -Original Message- From: Thiago H de Paula Figueiredo Sent: Monday, September 21, 2015 23:32 To: Tapestry users <users@tapestry.apache.org> Subject: Re: Make Tapestry add an id to the tag of the grid On Mon, 21 Sep 2015 11:36:52 -0300, Davide Vecchi wrote:

RE: Make Tapestry add an id to the tag of the grid

2015-09-18 Thread Davide Vecchi
Hi, thanks for the suggestion. It's a good option, I will have to slightly twist it because the tags already have a class - namely class="t-data-grid" - but I can add multiple class names there and jQuery should be able to pick them up. Good idea. -Original Message- Sent: Friday,

RE: Make Tapestry add an id to the tag of the grid

2015-09-18 Thread Davide Vecchi
By the way is TAP5-1569 ( https://issues.apache.org/jira/browse/TAP5-1569 ) the fix for this issue ? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org

Make Tapestry add an id to the tag of the grid

2015-09-18 Thread Davide Vecchi
Hi everybody, I have the same need described in the thread at http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/How-to-add-table-id-into-the-Grid-td2417082.html : although in my .tml I do have a t:id attribute in the tag, the resulting HTML does not have an id attribute in

RE: Exception Parameter 'translate' of component is bound to null on a field that has no 'translate' attribute.

2015-05-04 Thread Davide Vecchi
Great, thanks, that solves my problem. My confusion was that I had not realized that I would get the same exception even without contributing or referencing any translator, because I was binding my TextField to a Date and not to a String so a translator was needed in any case. My goal is

RE: Customized display/edit blocks for components other than the grid

2015-04-30 Thread Davide Vecchi
. -Original Message- From: Thiago H de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: Monday, April 27, 2015 21:30 To: Tapestry users Subject: Re: Customized display/edit blocks for components other than the grid On Mon, 27 Apr 2015 12:04:48 -0300, Davide Vecchi d...@amc.dk wrote: Hi

RE: Customized display/edit blocks for components other than the grid

2015-04-30 Thread Davide Vecchi
, 30 Apr 2015 08:35:05 -0300, Davide Vecchi d...@amc.dk wrote: Ok, thanks for the explanation. Right now we can't update to 5.4 but when we do we will explore the possibility you mentioned. For now we have just slightly changed our requirements and we can use the Tapestry Translator

Exception Parameter 'translate' of component is bound to null on a field that has no 'translate' attribute.

2015-04-30 Thread Davide Vecchi
I have implemented a simple Translator for dates, but I am at a loss trying to understand why I get a RenderQueueException Parameter 'translate' of component XXX is bound to null. This parameter is not allowed to be null while actually the TextField component mentioned in that exception

Customized display/edit blocks for components other than the grid

2015-04-27 Thread Davide Vecchi
Hi everybody, I would like to define a custom numeric datatype, f.ex. monetary, for the purpose of annotating fields and accessor methods with something like @DataType(monetary) so that such fields would be rendered and edited according to a custom format. I actually tried that by contributing

Server-side validation without submit

2014-09-16 Thread Davide Vecchi
Hello everybody, I have a form and I would like to validate some of its fields server-side without waiting for the user to submit the form (so f.ex I would validate a field when it loses the focus, or something like that; this is not important). I can manually code Ajax calls myself, to make

RE: Server-side validation without submit

2014-09-16 Thread Davide Vecchi
You could use the observe mixin here: http://tapestry-stitch.uklance.cloudbees.net/observedemo Thanks a lot, it looks great, I'll definitely try to use it. Cheers

RE: Server-side validation without submit

2014-09-16 Thread Davide Vecchi
That is right, I just want to show validation errors. I do not need to add dynamic fields to the form. -Original Message- From: Lance Java [mailto:lance.j...@googlemail.com] Sent: Tuesday, September 16, 2014 14:46 To: Tapestry users Subject: Re: Server-side validation without submit

RE: FW: FW: Customizing the grid to alter its own content

2014-07-22 Thread Davide Vecchi
Thanks, I had actually solved by using Element.text() that creates a Text node, which matches your suggestion. I don't have the problem anymore, and thanks for the assistance, despite me not doing a good job in explaining myself. Just for clarity, my concern was only that I'm now replacing the

RE: FW: FW: Customizing the grid to alter its own content

2014-07-22 Thread Davide Vecchi
Thanks, now I get it. My mistake was actually that I had misunderstood how XML / HTML is parsed into the Tapestry DOM. Now it makes a lot of sense. Although I had already gone for the same solution Thiago mentioned (removing a child and adding a new Text child), for some reason I was convinced

RE: FW: Customizing the grid to alter its own content

2014-07-21 Thread Davide Vecchi
Figueiredo [mailto:thiag...@gmail.com] Sent: Thursday, July 10, 2014 19:36 To: Tapestry users Subject: Re: FW: Customizing the grid to alter its own content On Thu, 10 Jul 2014 11:55:57 -0300, Davide Vecchi d...@amc.dk wrote: As usual, thanks a lot for the great assistance, and in particular

FW: FW: Customizing the grid to alter its own content

2014-07-21 Thread Davide Vecchi
Arg, sorry, it looks like Element.raw(String) is what I'm looking for. I had missed it, I'm going to try it right now. -Original Message- From: Davide Vecchi Sent: Monday, July 21, 2014 11:42 To: 'Tapestry users' Subject: RE: FW: Customizing the grid to alter its own content

FW: FW: Customizing the grid to alter its own content

2014-07-21 Thread Davide Vecchi
I cannot use Element.raw(String) because although it returns an Element, the node it creates is a Raw node, not an Element node; the Element it returns is just the parent of the new Raw. My situation is that I have an Element which contains a child Element, and I want to either replace the

RE: Customizing the grid to alter its own content

2014-07-21 Thread Davide Vecchi
/stitch/demo/pages/GridDecoratorDemo.java On 7 Jul 2014 13:39, Davide Vecchi d...@amc.dk wrote: Hello everybody, I would like to customize the Tapestry grid (org.apache.tapestry5.corelib.components.Grid) to make it change the content originally provided in the source parameter, so

RE: Customizing the grid to alter its own content

2014-07-21 Thread Davide Vecchi
Element.raw(...) or Element.text(...) On 21 Jul 2014 13:09, Davide Vecchi d...@amc.dk wrote: Thanks, that looks like a really good way to use DOM rewriting to alter grids. However if I'm looking at it correctly I think that in GridCellDecorator.decorate I would still need to be able to set

RE: FW: FW: Customizing the grid to alter its own content

2014-07-21 Thread Davide Vecchi
think it was OK of me to ask about Element. -Original Message- From: Thiago H de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: Monday, July 21, 2014 14:31 To: Tapestry users Subject: Re: FW: FW: Customizing the grid to alter its own content On Mon, 21 Jul 2014 08:42:46 -0300, Davide

RE: FW: Customizing the grid to alter its own content

2014-07-10 Thread Davide Vecchi
I'm trying to use DOM rewriting for the purpose of modifying the content of some grid cells. I modified GridCell class adding a void afterRender(MarkupWriter writer) method, and in it I can retrieve the Element (org.apache.tapestry5.dom.Element) containing the value I want to modify.

RE: FW: Customizing the grid to alter its own content

2014-07-10 Thread Davide Vecchi
Right, in my case that Node is a Text. The following is what I'm doing in afterRender method; it seems to work just fine although I don't know if that's the recommended approach in DOM rewriting. As usual, thanks a lot for the great assistance, and in particular for pointing me to DOM

Customizing the grid to alter its own content

2014-07-07 Thread Davide Vecchi
Hello everybody, I would like to customize the Tapestry grid (org.apache.tapestry5.corelib.components.Grid) to make it change the content originally provided in the source parameter, so that the modified content is rendered in the grid instead of the original. As an example, I could make the

RE: Customizing the grid to alter its own content

2014-07-07 Thread Davide Vecchi
Hi, Thanks for the quick feedback ! Yes, I would like to make this change so that it is used by every grid in my application.

RE: Customizing the grid to alter its own content

2014-07-07 Thread Davide Vecchi
[mailto:thiag...@gmail.com] Sent: Monday, July 7, 2014 15:35 To: Tapestry users Subject: Re: Customizing the grid to alter its own content On Mon, 07 Jul 2014 10:00:55 -0300, Davide Vecchi d...@amc.dk wrote: Hi, Hi! Thanks for the quick feedback ! Yes, I would like to make this change so

FW: Customizing the grid to alter its own content

2014-07-07 Thread Davide Vecchi
I forgot to answer your question Another question: do you want to do this for every column, regardless of the type of its value (String, Date, boolean, etc) or not? If yes, then you may use Tapestry DOM rewriting. The answer is actually yes, so I will look into Tapestry DOM rewriting.

RE: Handling Ajax requests when decorating the RequestExceptionHandler

2014-06-26 Thread Davide Vecchi
I believe I'm actually decorating; this is a trimmed version of the code: --- In AppModule.java : @Match(RequestExceptionHandler) public static RequestExceptionHandler decorateRequestExceptionHandler(final Logger logger, final

RE: Handling Ajax requests when decorating the RequestExceptionHandler

2014-06-26 Thread Davide Vecchi
Is this method invoking super.handleRequestException()? If yes, you don't have to do anything. Actually no, the method is not invoking super.handleRequestException() . I coded it along the lines of Version 3: Decorating the RequestExceptionHandler at

Handling Ajax requests when decorating the RequestExceptionHandler

2014-06-24 Thread Davide Vecchi
Hi, I'm decorating the RequestExceptionHandler in order to handle exceptions and then redirecting to the previous page (the one I find in the Referer HTTP header). This works fine for normal page requests but I would like to handle also the case of Ajax requests. The JavaDoc of

RE: Redirecting to a page from a MethodAdvice implementation

2014-06-19 Thread Davide Vecchi
I'm not sure if the following is what the hints above meant, however it works, in case it can be useful to others. Thanks for the help. - package myproject.tapestry.services; import org.apache.tapestry5.plastic.MethodAdvice; public interface

Redirecting to a page from a MethodAdvice implementation

2014-06-18 Thread Davide Vecchi
Hello, I have the following class to handle the execution of methods that are annotated with a custom @ExceptionDisplay annotation. Everything works as expected, but I would like to redirect to a page. I'm using PageRenderLinkSource and Response to do that. I inject them in the same way I

RE: Redirecting to a page from a MethodAdvice implementation

2014-06-18 Thread Davide Vecchi
Hi, Sorry, I don't understand. Do you mean that I'm right that PageRenderLinkSource and Response should be only injected into pages or components ? Could you elaborate a little bit about including Tapestry-IoC services and objects instantiated using ObjectLocator.autobuild() ?

RE: Updating a zone from a property method

2014-03-27 Thread Davide Vecchi
That's not a workaround, it's a matter of what is called first. In theory it could be both things, however I realized that you're right that it's not a workaround when I compare it to the structure outlined by Geoff, which sounds like the proper structure. It was sounding to me like a

RE: Updating a zone from a property method

2014-03-26 Thread Davide Vecchi
Hi, thanks for the clarifications. If these values are used in the initial page rendering, as it's the case here, you don't need to @Persist them at all. The values of the fields will be kept until the request is finished. (Just a detail) I was thinking @Persist because if I had to calculate

RE: Updating a zone from a property method

2014-03-26 Thread Davide Vecchi
Nope, it looks like none of the methods executed during the Rendering Phases or the Page Life Cycle can update a zone. Which makes sense considering what I have been explained here about updating zones. Considering that, I realized that my kind of problem is not that much about zones. I would

RE: Updating a zone from a property method

2014-03-26 Thread Davide Vecchi
Thanks for the pointers about onException and @Cached, I didn't know either. @Cached would allow me to avoid wrapping the getter body in an if (this.myValue == null). onException would help my case only if it was possible to update a zone from that method even if the exception that triggered

Updating a zone from a property method

2014-03-25 Thread Davide Vecchi
I have a zone to show possible errors that might occur in a get* method called by Tapestry during page rendering to retrieve the value for a property (String myValue in the example below). So in this getMyValue() method I set the error message into another property (@Property String

Updating a zone from a property method

2014-03-25 Thread Davide Vecchi
I have a zone to show possible errors that might occur in a get* method called by Tapestry during page rendering to retrieve the value for a property (String myValue in the example below). So in this getMyValue() method I set the error message into another property (@Property String

RE: Updating a zone from a property method

2014-03-25 Thread Davide Vecchi
Sorry for the double post. After I posted the first one I realized I had unsubscribed from the mailing list some time ago, so I subscribed and sent the question again. I thought the one I had sent while unsubscribed wouldn't show up (it hadn't at that time). My apologies. -Original

RE: Updating a zone from a property method

2014-03-25 Thread Davide Vecchi
Hi, You're trying to use AjaxResponseRenderer during the initial render of the zone, which is a normal, full-page, non-AJAX request, not when the zone is being updated during an AJAX request. In addition, your getter, which is the method that sets the error message, is only invoked

Cannot pass string containing spaces into component event.

2013-10-18 Thread Davide Vecchi
In a Tapestry-generated web page I have some Javascript like this: var arg = 'StringWithoutSpaces'; // Works only if no spaces in this string. var sLink = '/mypage.mycomponent:myevent/' + encodeURIComponent(arg); alert(sLink); // Just for debug.

RE: Getting Block content as String

2013-10-10 Thread Davide Vecchi
Thanks for all the info, good learning tool for me. Getting the HTML in a non-ajax action (ie your action) is not (easily) possible since tapestry doesn't render anything to the MarkupWriter in the action request. Instead, tapestry returns a 304 redirect and the render happens in the

RE: Getting Block content as String

2013-10-09 Thread Davide Vecchi
a better picture. On Tue, 08 Oct 2013 11:07:30 -0300, Davide Vecchi d...@amc.dk wrote: I have an instance of org.apache.tapestry5.Block and I would like to get this block's content as a String. When I inspect that Block instance, I see the block content that I need to get: there is a field

RE: Getting Block content as String

2013-10-09 Thread Davide Vecchi
Thiago: thanks for the clarification. I actually went for some redesign; I gave up trying to get the block content, although it still feels a bit weird to me, probably just because I'm new to Tapestry. Where the data is coming from is just a block that I had put in the template with the exact

Getting Block content as String

2013-10-08 Thread Davide Vecchi
I have an instance of org.apache.tapestry5.Block and I would like to get this block's content as a String. When I inspect that Block instance, I see the block content that I need to get: there is a field called elements which is an ArrayList with 3 elements. One of them is an