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

2010-09-23 Thread Yohan Yudanara
Hi LLTYK and Thiago,

Thank you for your response. Yeah, it looks like I'm trying to do
something in AjaxFormLoop that is outside of its intended scenarios.

I was creating a form to input master(bunch of textfields, textareas,
datepickers, etc) and detail (using AjaxFormLoop) on the same page.
And I want to have a hyperlink (using AJAX ActionLink) to populate
detail rows (on AjaxFormLoop).

Now, I've decided to separate this form on two pages.
The first page is to input master (bunch of textfields) and the second
page is to input detail (only AJAX ActionLink to populate data and
AjaxFormLoop).

And I'm no longer having problem.

Thank you very much for your time and suggestion.

Best regards,
Yohan Yudanara

On Thu, Sep 23, 2010 at 6:19 PM, LLTYK  wrote:
>
> 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-AjaxFormLoop-entry-from-ActionLink-tp5557435p5562593.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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

2010-09-23 Thread Yohan Yudanara
Hi LLTYK :),

Thanks for the idea.
Yes, this could be the solution to preserve user input while
refreshing (not submitting) the form.
The drawback is: this will generate many traffic to the server.

Thank you for your help.

On Wed, Sep 22, 2010 at 6:07 PM, LLTYK  wrote:
>
> 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 ZoneUpdater mixin on all the form components, not to update the
> zone but to simply record changes serverside (returning void from the event
> handler). Something like this:
>  validate="required,minlength=3,maxLength=25"
>                  t:mixins="zoneUpdater" t:zone="thezone"
> t:clientEvent="keyup" event="change" />
> �...@log
>  public void onChangeFromTextField(String value)
>  {
>    this.value = value;
>  }

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Global events

2010-09-23 Thread Markus Joschko
> It bubbles up in the ancestor chain until the callback passed to the
> triggerEvent method says the event was handled.

Ah, missed that somehow. That helps returning multiple Zones but
leaves the ancestor problem.

>> Can you be more specific what I should pay attention for? Isn't
>> validation done when the page is fully rendered?
>
> No. It is done when the form is submitted (which is an event too). The form
> fields store commands in an object in the Environment that is put in a
> hidden field by Form. Later, when the form is submitted, Form executes these
> commands.

OK, went through it and I am not sure if I got everything, as there
are quite some concepts in it I am not very familiar with.

However I give it a try and transfer the logic to my situation:  You
propose to store an environment object in the page/component close to
the root and let all
components register there (e.g. in a map where the keys are events
they are interested in) during page rendering.
This map is then serialized and stored.
Later when the event is triggered the very first event handler looks
up that map, gets all registered components for that event and asks
them to
respond to that event?

Mhm, basically I build my own event bus. Shouldn't be necessary. But
maybe I am too blinded by my event approach and you meant something
different?

I also have thought about your performance argument. I doubt that this
is a huge problem. Tapestry has a static page structure. Therefore it
should be possible to go through all the components during page
construction
and register them for the events they listen on in an internal map on
page level. When a global event is fired, the registered components
can be simply looked up and notified. Virtually no performance impact.
Sounds rather simple. But ok, might not be the tapestry way of doing
things.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: PropertyEditContext not available from Environment

2010-09-23 Thread Jim O'Callaghan
Thanks for all your help Thiago.  I'm not trying to render all fields in the 
grid as form fields, just the one from my custom component X that's a property 
of bom Y, and a selection of other properties of bom Y that are plain Strings, 
Integers etc., which the grid handles perfectly just using t:param and input 
fields.  I have what I need working by creating a PropertyEditContext in the 
beginRender method of the custom component whenever it is being rendered as 
part of a grid, pushing it to the environment, and popping it in the 
afterRender method.  Hopefully this doesn't set off any alarm bells.

I like the idea of being able to use the overrides to achieve something 
similar, though it does put the onus on the developer to make the override 
available as a property in every page where a relevant grid occurs .  
I'll have a look into it when I'm not so stretched for time.  Thanks again.

Regards,
Jim.

-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Sent: 23 September 2010 17:27
To: Tapestry users
Subject: Re: PropertyEditContext not available from Environment

On Thu, 23 Sep 2010 12:50:47 -0300, Jim O'Callaghan  
 wrote:

> Thiago,

Hi!

> Are you saying the I can use  to get  
> around the problem?

Yes.

> Do I just build a list of PropertyOverrides in the page class for that,  
> and does it override all other overrides that the grid normally provides  
> by itself

Yes. You don't need a list of PropertyOverrides, just one. Grid (more  
specifically, GridCell) asks to the override if it provides a block for  
rendering the property (overrides.getOverrideBlock(blockId). If it returns  
null, it uses the BeanBlockSource service to get one.

> - I'm guessing this behavior is not what I want as I just want to affect  
> rendering for this specific field, <  value="bom.property"/>?

Use a  or  tag. I thought you were  
trying to render all grid cells as form fields.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informa��o Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: PropertyEditContext not available from Environment

2010-09-23 Thread Thiago H. de Paula Figueiredo
On Thu, 23 Sep 2010 12:50:47 -0300, Jim O'Callaghan  
 wrote:



Thiago,


Hi!

Are you saying the I can use  to get  
around the problem?


Yes.

Do I just build a list of PropertyOverrides in the page class for that,  
and does it override all other overrides that the grid normally provides  
by itself


Yes. You don't need a list of PropertyOverrides, just one. Grid (more  
specifically, GridCell) asks to the override if it provides a block for  
rendering the property (overrides.getOverrideBlock(blockId). If it returns  
null, it uses the BeanBlockSource service to get one.


- I'm guessing this behavior is not what I want as I just want to affect  
rendering for this specific field, < value="bom.property"/>?


Use a  or  tag. I thought you were  
trying to render all grid cells as form fields.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: PropertyEditContext not available from Environment

2010-09-23 Thread Jim O'Callaghan
Thiago,

Are you saying the I can use  to get around 
the problem?  Do I just build a list of PropertyOverrides in the page class for 
that, and does it override all other overrides that the grid normally provides 
by itself - I'm guessing this behavior is not what I want as I just want to 
affect rendering for this specific field, < ?

I had started creating my own PropertyEditContext in the component used for my 
custom type , but was running 
into issues with an internal null pointer when I got to validate.render() in my 
component's beginRender method.

What I was trying to do was something along the lines of:

boolean pECForGridRequired = 
(environment.peek(PropertyEditContext.class) == null);
PropertyEditContext pECForGrid = null;
if (pECForGridRequired){
pECForGrid = createPECForGrid();
environment.push(PropertyEditContext.class, pECForGrid);
}

... and mimicking the way the PEC is created when the component is used in a 
beanEditForm. Is this approach wrong-headed?

Regards,
Jim. 

-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Sent: 23 September 2010 14:11
To: Tapestry users
Subject: Re: PropertyEditContext not available from Environment

On Thu, 23 Sep 2010 09:25:14 -0300, Jim O'Callaghan  
 wrote:

> Thanks Thiago.  I'll file a JIRA after I come up with a workaround.  I  
> would have thought this was a common enough use case, an editable custom  
> field in a grid.

I was talking about creating a component that does that, not using this  
functionality. :)

By the way, I just remembered about the overrides parameter in Grid.  
You'll probably don't need to create another component, just make sure the  
overrides provide the edition block instead of the viewing one. Maybe we  
could even add a PropertyOverrides implementation that implements that to  
Tapestry . . .

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informa��o Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Adding palette to BeanEditForm

2010-09-23 Thread Peter Niederwieser

Found the problem. Should be  instead of .

Cheers,
Peter
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Adding-palette-to-BeanEditForm-tp2851150p2851352.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Global events

2010-09-23 Thread Thiago H. de Paula Figueiredo
On Thu, 23 Sep 2010 11:32:09 -0300, Markus Joschko  
 wrote:



Eventlink triggers an event in one component that is then bubbling up
the ancestor chain, or?


It bubbles up in the ancestor chain until the callback passed to the  
triggerEvent method says the event was handled.



Still only the ancestor chain. Even if you rethrow the event all the
time and do a manual aggregation.


You don't need to retrigger the event. See comment above.


You can use the Environment to
make components communicate in ways that triggering events can't. Look  
at how validation works for form fields.


Can you be more specific what I should pay attention for? Isn't
validation done when the page is fully rendered?


No. It is done when the form is submitted (which is an event too). The  
form fields store commands in an object in the Environment that is put in  
a hidden field by Form. Later, when the form is submitted, Form executes  
these commands.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Global events

2010-09-23 Thread Markus Joschko
>> Actually, you can reach all the component's ancestor, if you do not
>> return anything in the event handler.

That's not what I want as this is the problem: Only the ancestors.

>> You can use eventlink to hit multiple components, but only one handler
>> can return the final result.

Eventlink triggers an event in one component that is then bubbling up
the ancestor chain, or?
So all the limitations I am talking about apply here. Feel free to correct me.

> In addition, you could pass some object in the event context that would
> aggregate

Still only the ancestor chain. Even if you rethrow the event all the
time and do a manual aggregation.

> In my humble opinion, triggering an event for all components in a page would
> be a bad thing with probably bad performance.

This might be true. But what is the alternative. I don't get what you
want to tell me with the Environment reference.
I have not used it actively but what I understand:
a) It works in a parent/child relationship.
b) Components must be "rendered"  to have a look into the environment.

-> In my case that means: the event is catched by the page, an
environment object is setup and all components are rendered to
   work with the environment. This can't be more efficient then going
through the components to search for specific event handlers and
only do partial renderings.

> You can use the Environment to
> make components communicate in ways that triggering events can't. Look at how 
> validation works for form fields.

Can you be more specific what I should pay attention for? Isn't
validation done when the page is fully rendered? I talk about partial
renderings and events. I'll have a look anyway.

Thanks,
 Markus



>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Global events

2010-09-23 Thread Thiago H. de Paula Figueiredo
On Thu, 23 Sep 2010 11:07:13 -0300, Christophe Cordenier  
 wrote:



Actually, you can reach all the component's ancestor, if you do not
return anything in the event handler.
You can use eventlink to hit multiple components, but only one handler
can return the final result.

see  
http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/EventLink.html


In addition, you could pass some object in the event context that would  
aggregate
In my humble opinion, triggering an event for all components in a page  
would be a bad thing with probably bad performance. You can use the  
Environment to make components communicate in ways that triggering events  
can't. Look at how validation works for form fields.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Global events

2010-09-23 Thread Christophe Cordenier
Actually, you can reach all the component's ancestor, if you do not
return anything in the event handler.
You can use eventlink to hit multiple components, but only one handler
can return the final result.

see 
http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/EventLink.html


2010/9/23 Markus Joschko :
>> I would chose to get the list of Zones from the page either by
>> implementing the event handler in it or by triggering an event from
>> the component...
>
> Yep, and here we are back to my original mail where I ask whether it
> might be a useful addition to tapestry
> to reach all components in a page with an event.
> Currently you only reach components that are ancestors (at least that
> is what I understand from the documentation) and you only reach one
> event handler (if you not rethrow the event and aggregate the result
> in every handler).
>
>>
>>
>> -- Forwarded message --
>> From: Markus Joschko 
>> Date: 2010/9/23
>> Subject: Re: Global events
>> To: Tapestry development 
>>
>>
>> Ok, sorry. I thought the dev list is for questions regarding
>> development of tapestry in contrast to questions regarding the usage.
>>
>> The MultiZoneUpdate indeed solves one part: Delivering the content of
>> multiple zones to the client.
>> But how should the event handler know, which zones to return in the
>> MultiZoneUpdate? I can only think of three ways:
>> a) Zones configured as parameters. However with deeply nested
>> components that can lead to long chains of getters to reference the
>> zones.
>> b) Zones received as results of an event -> however the current event
>> mechanism is limited to one receiver/result.
>> c) Hardcoded. Only listed for completeness.
>>
>> Regards,
>>  Markus
>>
>> On Thu, Sep 23, 2010 at 2:31 PM, Christophe Cordenier
>>  wrote:
>>> Hi !
>>>
>>> Please, use the user mailing list for this kind of question.
>>>
>>> Anyway, i think that the MultiZoneUpdate should solve your problem.
>>>
>>> 2010/9/23 Markus Joschko :
 Hi,
 just wanted to ask what you guys think about a global server side
 event functionality in tapestry.
 Currently the events triggered by triggerEvent on ComponentResource
 just bubble up and halt when the first handler returns non null.
 It would be nice to have a event mechanism where matching handlers in
 all components on a page (not only the ancestors)
 are triggered, the results are collected and passed to the event
 triggering method.

 The use case I have in mind is a page which has three components that
 each display different aspects of a group of users  (one component
 listing all users of a group with details, one component with birth
 dates of the users and one component with twitter messages from the
 users).
 The "list of users" component has a delete button which deletes a
 specific user. This results into an Ajax request to the server and
 triggers a zone update of the user list. However the birthday and the
 twitter lists still show the previously deleted user, because the
 components on the server side aren't informed that they also need to
 refresh their zones.
 Ideally they have had received a server side event and contributed
 their zones to the Ajax event result.

 What do you think? Should I add a JIRA for this?

 Regards,
  Markus

 -
 To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: dev-h...@tapestry.apache.org


>>>
>>>
>>>
>>> --
>>> Regards,
>>> Christophe Cordenier.
>>>
>>> Committer on Apache Tapestry 5
>>> Co-creator of wooki @wookicentral.com
>>>
>>> -
>>> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: dev-h...@tapestry.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: dev-h...@tapestry.apache.org
>>
>>
>>
>>
>> --
>> Regards,
>> Christophe Cordenier.
>>
>> Committer on Apache Tapestry 5
>> Co-creator of wooki @wookicentral.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Regards,
Christophe Cordenier.

Committer on Apache Tapestry 5
Co-creator of wooki @wookicentral.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apac

Re: Global events

2010-09-23 Thread Markus Joschko
> I would chose to get the list of Zones from the page either by
> implementing the event handler in it or by triggering an event from
> the component...

Yep, and here we are back to my original mail where I ask whether it
might be a useful addition to tapestry
to reach all components in a page with an event.
Currently you only reach components that are ancestors (at least that
is what I understand from the documentation) and you only reach one
event handler (if you not rethrow the event and aggregate the result
in every handler).

>
>
> -- Forwarded message --
> From: Markus Joschko 
> Date: 2010/9/23
> Subject: Re: Global events
> To: Tapestry development 
>
>
> Ok, sorry. I thought the dev list is for questions regarding
> development of tapestry in contrast to questions regarding the usage.
>
> The MultiZoneUpdate indeed solves one part: Delivering the content of
> multiple zones to the client.
> But how should the event handler know, which zones to return in the
> MultiZoneUpdate? I can only think of three ways:
> a) Zones configured as parameters. However with deeply nested
> components that can lead to long chains of getters to reference the
> zones.
> b) Zones received as results of an event -> however the current event
> mechanism is limited to one receiver/result.
> c) Hardcoded. Only listed for completeness.
>
> Regards,
>  Markus
>
> On Thu, Sep 23, 2010 at 2:31 PM, Christophe Cordenier
>  wrote:
>> Hi !
>>
>> Please, use the user mailing list for this kind of question.
>>
>> Anyway, i think that the MultiZoneUpdate should solve your problem.
>>
>> 2010/9/23 Markus Joschko :
>>> Hi,
>>> just wanted to ask what you guys think about a global server side
>>> event functionality in tapestry.
>>> Currently the events triggered by triggerEvent on ComponentResource
>>> just bubble up and halt when the first handler returns non null.
>>> It would be nice to have a event mechanism where matching handlers in
>>> all components on a page (not only the ancestors)
>>> are triggered, the results are collected and passed to the event
>>> triggering method.
>>>
>>> The use case I have in mind is a page which has three components that
>>> each display different aspects of a group of users  (one component
>>> listing all users of a group with details, one component with birth
>>> dates of the users and one component with twitter messages from the
>>> users).
>>> The "list of users" component has a delete button which deletes a
>>> specific user. This results into an Ajax request to the server and
>>> triggers a zone update of the user list. However the birthday and the
>>> twitter lists still show the previously deleted user, because the
>>> components on the server side aren't informed that they also need to
>>> refresh their zones.
>>> Ideally they have had received a server side event and contributed
>>> their zones to the Ajax event result.
>>>
>>> What do you think? Should I add a JIRA for this?
>>>
>>> Regards,
>>>  Markus
>>>
>>> -
>>> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: dev-h...@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Regards,
>> Christophe Cordenier.
>>
>> Committer on Apache Tapestry 5
>> Co-creator of wooki @wookicentral.com
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: dev-h...@tapestry.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: dev-h...@tapestry.apache.org
>
>
>
>
> --
> Regards,
> Christophe Cordenier.
>
> Committer on Apache Tapestry 5
> Co-creator of wooki @wookicentral.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 given in any js debugger, nor in the tapestry popup error
console. Only sign is that the ajax form submit fails (and it proceeds to do
a normal form submit).

This is in Tapestry 5.1.0.5. The error occurs at tapestry.js:1295, where the
broken script doesn't set this.translator. This error seems to bubble up the
stack, but disappears at some point, apparently uncaught.

I'm wondering if this is some kind of bug and that it should be caught (the
tapestry error console has caught and displayed js errors before).


Here's the post with the script:
http://tapestry.1045711.n5.nabble.com/Disabling-onBlur-field-validation-td2416314.html#a2416314
Here's a demo, with the script pasted into disable-onblur-validation.js
http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
  xmlns:p="tapestry:parameter">

About application ...




@IncludeJavaScriptLibrary("context:/js/disable-onblur-validation.js")
public class Test
{
  @Property
  @Validate("required")
  private String foo;
  
  @Component
  private Zone hi;
  Object onSuccess()
  {
return hi.getBody();
  }
}
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Silent-js-error-doesn-t-show-up-in-browser-error-console-or-tapestry-error-console-tp5563130p5563130.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Fwd: Global events

2010-09-23 Thread Christophe Cordenier
I would chose to get the list of Zones from the page either by
implementing the event handler in it or by triggering an event from
the component...


-- Forwarded message --
From: Markus Joschko 
Date: 2010/9/23
Subject: Re: Global events
To: Tapestry development 


Ok, sorry. I thought the dev list is for questions regarding
development of tapestry in contrast to questions regarding the usage.

The MultiZoneUpdate indeed solves one part: Delivering the content of
multiple zones to the client.
But how should the event handler know, which zones to return in the
MultiZoneUpdate? I can only think of three ways:
a) Zones configured as parameters. However with deeply nested
components that can lead to long chains of getters to reference the
zones.
b) Zones received as results of an event -> however the current event
mechanism is limited to one receiver/result.
c) Hardcoded. Only listed for completeness.

Regards,
 Markus

On Thu, Sep 23, 2010 at 2:31 PM, Christophe Cordenier
 wrote:
> Hi !
>
> Please, use the user mailing list for this kind of question.
>
> Anyway, i think that the MultiZoneUpdate should solve your problem.
>
> 2010/9/23 Markus Joschko :
>> Hi,
>> just wanted to ask what you guys think about a global server side
>> event functionality in tapestry.
>> Currently the events triggered by triggerEvent on ComponentResource
>> just bubble up and halt when the first handler returns non null.
>> It would be nice to have a event mechanism where matching handlers in
>> all components on a page (not only the ancestors)
>> are triggered, the results are collected and passed to the event
>> triggering method.
>>
>> The use case I have in mind is a page which has three components that
>> each display different aspects of a group of users  (one component
>> listing all users of a group with details, one component with birth
>> dates of the users and one component with twitter messages from the
>> users).
>> The "list of users" component has a delete button which deletes a
>> specific user. This results into an Ajax request to the server and
>> triggers a zone update of the user list. However the birthday and the
>> twitter lists still show the previously deleted user, because the
>> components on the server side aren't informed that they also need to
>> refresh their zones.
>> Ideally they have had received a server side event and contributed
>> their zones to the Ajax event result.
>>
>> What do you think? Should I add a JIRA for this?
>>
>> Regards,
>>  Markus
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: dev-h...@tapestry.apache.org
>>
>>
>
>
>
> --
> Regards,
> Christophe Cordenier.
>
> Committer on Apache Tapestry 5
> Co-creator of wooki @wookicentral.com
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: dev-h...@tapestry.apache.org
>
>

-
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org




-- 
Regards,
Christophe Cordenier.

Committer on Apache Tapestry 5
Co-creator of wooki @wookicentral.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Adding palette to BeanEditForm

2010-09-23 Thread Peter Niederwieser

I'm trying to add a palette as an additional field to a BeanEditForm.
Something along the lines:







However, I'm always getting:

java.lang.RuntimeException: The data type for property 'kpis' is null

Does this mean I have to switch to a hand-coded form to make this work? T5.2

Cheers,
Peter
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Adding-palette-to-BeanEditForm-tp2851150p2851150.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: PropertyEditContext not available from Environment

2010-09-23 Thread Thiago H. de Paula Figueiredo
On Thu, 23 Sep 2010 09:25:14 -0300, Jim O'Callaghan  
 wrote:


Thanks Thiago.  I'll file a JIRA after I come up with a workaround.  I  
would have thought this was a common enough use case, an editable custom  
field in a grid.


I was talking about creating a component that does that, not using this  
functionality. :)


By the way, I just remembered about the overrides parameter in Grid.  
You'll probably don't need to create another component, just make sure the  
overrides provide the edition block instead of the viewing one. Maybe we  
could even add a PropertyOverrides implementation that implements that to  
Tapestry . . .


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: PropertyEditContext not available from Environment

2010-09-23 Thread Jim O'Callaghan
Thanks Thiago.  I'll file a JIRA after I come up with a workaround.  I would 
have thought this was a common enough use case, an editable custom field in a 
grid.  It'll probably jump out at me when I get more familiar with the core 
code.

Regards,
Jim.

-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Sent: 23 September 2010 13:03
To: Tapestry users
Subject: Re: PropertyEditContext not available from Environment

On Thu, 23 Sep 2010 07:22:43 -0300, Jim O'Callaghan  
 wrote:

> Thanks Thiago.  Can you clarify one last thing for me.  I had a look at  
> the sources you mentioned and am wondering if I have to create a  
> PropertyEditContext from scratch before pushing it to the environment,  
> or is there somewhere (factory / util class) I can source it from?

As far as I know, no. I haven't tried to do anything like you're doing,  
tough.

> It seems like a good bit of code to have to duplicate per custom  
> component?

Few components needs that. You can file a JIRA for this enhancement.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informa��o Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: PropertyEditContext not available from Environment

2010-09-23 Thread Thiago H. de Paula Figueiredo
On Thu, 23 Sep 2010 07:22:43 -0300, Jim O'Callaghan  
 wrote:


Thanks Thiago.  Can you clarify one last thing for me.  I had a look at  
the sources you mentioned and am wondering if I have to create a  
PropertyEditContext from scratch before pushing it to the environment,  
or is there somewhere (factory / util class) I can source it from?


As far as I know, no. I haven't tried to do anything like you're doing,  
tough.


It seems like a good bit of code to have to duplicate per custom  
component?


Few components needs that. You can file a JIRA for this enhancement.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: Textfield disabled return a null value

2010-09-23 Thread Cucchietti Denis
Thanks pablo but i want that the field stay visible but disabled ;-)

Thanks for your answer !

-Message d'origine-
De : Pablo dos Reis [mailto:pablodosr...@gmail.com]
Envoyé : jeudi 23 septembre 2010 00:30
À : Tapestry users
Objet : Re: Textfield disabled return a null value

*Another option is you change the style.display to none
or use the method hide() of prototype

element.hide();
*

2010/9/22 Cucchietti Denis 

> Hi Katia,
>
> Thanks for your answer i have used an hidden field and its works!
>
> -Message d'origine-
> De : Katia Aresti Gonzalez [mailto:katiaare...@gmail.com]
> Envoyé : mardi 21 septembre 2010 17:42
> À : Tapestry users
> Objet : Re: Textfield disabled return a null value
>
> Why do you need to disable the autocomplete field this way ?
> What happens if the user makes a mistake and chooses à wring value ?
>
>
> A quick answer can be to use a hidden and fill it with the value in
> JavaScript. This hidden value will be mapped with the java class. So when
> submitting you will have your value
> But I don't see the point of disabling this way
>
> ...
>
>
>
>
> 2010/9/21 Cucchietti Denis 
>
> > Hi Katia,
> >
> > Yes its after submitting.
> >
> > It's on an autocomplete textfield. When the user select a value into the
> > autocomplete list I have added some javascript in order to disable the
> > textfield. But when I submit the form the textfield is null :-/.
> >
> > Is there another mean to forbid the user to change the value of the
> > textfield?
> >
> > Thanks ;-)
> >
> > -Message d'origine-
> > De : Katia Aresti Gonzalez [mailto:katiaare...@gmail.com]
> > Envoyé : mardi 21 septembre 2010 17:10
> > À : Tapestry users
> > Objet : Re: Textfield disabled return a null value
> >
> > Do you mean after submitting ?
> >
> > When a field is disabled on HTML, this field's value is not submitted.
> >
> > where is this field's value coming from ?
> >
> >
> >
> > 2010/9/21 Cucchietti Denis 
> >
> > > Hi everybody !
> > >
> > > I have a little problem :
> > >
> > > I want to get a value from a field which is disabled but in my
> page.java
> > > the property is null even if the textfield is not empty.
> > >
> > > The problem is that I don't want that the user modify the textfield...
> > >
> > > Thanks for your help in advance !
> > >
> > >
> > >
> > >
> > > 
> > >
> > > Ce message et les pi?ces jointes sont confidentiels et r?serv?s ?
> l'usage
> > > exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le
> > secret
> > > professionnel. Si vous recevez ce message par erreur, merci d'en
> avertir
> > > imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne
> > > pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos
> > Origin
> > > ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les
> > > meilleurs efforts soient faits pour maintenir cette transmission
> exempte
> > de
> > > tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa
> > > responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant
> > d'un
> > > virus transmis.
> > >
> > > This e-mail and the documents attached are confidential and intended
> > solely
> > > for the addressee; it may also be privileged. If you receive this
> e-mail
> > in
> > > error, please notify the sender immediately and destroy it. As its
> > integrity
> > > cannot be secured on the Internet, the Atos Origin group liability
> cannot
> > be
> > > triggered for the message content. Although the sender endeavours to
> > > maintain a computer virus-free network, the sender does not warrant
> that
> > > this transmission is virus-free and will not be liable for any damages
> > > resulting from any virus transmitted.
> > >
> >
> >
> > Ce message et les pièces jointes sont confidentiels et réservés à l'usage
> > exclusif de ses destinataires. Il peut également être protégé par le
> secret
> > professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> > immédiatement l'expéditeur et de le détruire. L'intégrité du message ne
> > pouvant être assurée sur Internet, la responsabilité du groupe Atos
> Origin
> > ne pourra être recherchée quant au contenu de ce message. Bien que les
> > meilleurs efforts soient faits pour maintenir cette transmission exempte
> de
> > tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa
> > responsabilité ne saurait être recherchée pour tout dommage résultant
> d'un
> > virus transmis.
> >
> > This e-mail and the documents attached are confidential and intended
> solely
> > for the addressee; it may also be privileged. If you receive this e-mail
> in
> > error, please notify the sender immediately and destroy it. As its
> integrity
> > cannot be secured on the Internet, the Atos Origin group liability cannot
> be
> > triggered for the message content. Although the sender endeavours to
> > maintain a computer virus-free network, the sender does not warrant that
> > this transmission

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-AjaxFormLoop-entry-from-ActionLink-tp5557435p5562593.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: throw new PageRedirectException

2010-09-23 Thread Martin Strand
On Thu, 23 Sep 2010 04:43:28 +0200, asianCoolz   
wrote:



IEngineService pageService = getPageService();

   String pageName = "NextTapestryPage";
   ILink link = pageService.getLink(false, pageName);
   throw new RedirectException(link.getAbsoluteURL());



if page is IPage, and i set parameter to the page.setExtraParameter(abc);
how to get absoluteurl for this IPage? rathan than "string" that you  
suggested

for pageName.


I haven't used Tapestry 4 for a while, but I'm pretty sure that you can  
pass all the parameters to getLink(...) in an array, starting with the  
page name:


IPage page = ...;
Object abc = ...;
String pageName = page.getName();
ILink link = pageService.getLink(false, new Object[] {pageName, abc,  
moreParameters(), etc} );

throw new RedirectException(link.getAbsoluteURL());

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: PropertyEditContext not available from Environment

2010-09-23 Thread Jim O'Callaghan
Thanks Thiago.  Can you clarify one last thing for me.  I had a look at the 
sources you mentioned and am wondering if I have to create a 
PropertyEditContext from scratch before pushing it to the environment, or is 
there somewhere (factory / util class) I can source it from?  It seems like a 
good bit of code to have to duplicate per custom component?

Regards,
Jim.

-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Sent: 23 September 2010 01:44
To: Tapestry users
Subject: Re: PropertyEditContext not available from Environment

On Wed, 22 Sep 2010 19:48:08 -0300, Jim O'Callaghan  
 wrote:

> Thanks for the reply Thiago. Could you give me a pointer on where / how  
> in the cycle to push and then pop the PropertyEditContext into / out of  
> the Environment, or point to any resource I could work through as an  
> example?  A bit lost on this.

The documentation for the Environment is here:  
http://tapestry.apache.org/tapestry5.1/guide/env.html. I suggest you to  
take a look at the BeanEditor and Grid sources.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informa��o Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Tapestry 5.2.1 upgrade woes

2010-09-23 Thread P . Stavrinides
Hi, 

To follow up on this issue, after I trawled through every module removing any 
dated references I still could not get rid of the error, but after much toil 
found the problem, which was with transitive dependencies from chenillekit, I 
tried upgrading the library, but still no luck... is chenillekit compatible 
with 5.2.1 yet? Am I referencing the correct repo? I was already using 1.2.0 
production version, I tried to move to a snapshot, but the info on the site, 
found here: http://www.chenillekit.org/mvnrepo.html points to an inactive 
snapshot repo, I tried 
https://nexus.codehaus.org/content/repositories/snapshots/org/chenillekit/chenillekit-tapestry/1.3.0-SNAPSHOT/
 but there are also issues there, eventually I had to remove chennelkit 
temporarily and it now runs, but unfortunately I can't complete my upgrade 
without it.

Please let me know If there is a version / repo out there compatible with 
5.2.1, if there isn't then I am forced to roll back once again.

Thanks,
Peter









- Original Message -
From: "P Stavrinides" 
To: "Tapestry users" 
Sent: Wednesday, 22 September, 2010 18:26:11 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: Tapestry 5.2.1 upgrade woes

Indeed, my bad, I do combine a few maven modules that use Tapestry IoC, and I 
simply missed a spot.

Thanks Thiago,
Peter


- Original Message -
From: "Thiago H. de Paula Figueiredo" 
To: "Tapestry users" 
Sent: Wednesday, 22 September, 2010 18:19:06 GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: Tapestry 5.2.1 upgrade woes

On Wed, 22 Sep 2010 12:13:11 -0300,  wrote:

> Hi,

Hi!

> java.lang.NoClassDefFoundError:  
> org/apache/tapestry5/internal/services/RequestPathOptimizer

You seem to have two versions of Tapestry in the classpath at the same  
time.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Upload breaks ZoneUpdater

2010-09-23 Thread Inge Solvoll
:)

On Thu, Sep 23, 2010 at 8:07 AM, Kalle Korhonen
wrote:

> Bah. Tripped myself up with a client regexp validation that was
> associated to the upload component, which caused the page init to
> partially fail. Why is it always the smallest things that take the
> longest?
>
> Kalle
>
>
> On Wed, Sep 22, 2010 at 8:53 AM, Kalle Korhonen
>  wrote:
> > How odd. I have a conventional non-ajax form with one field that's
> > using Inge's ZoneUpdater for checking value's uniqueness and
> > displaying the results in a zone. As soon as I add the Upload
> > component (the standard, non-ajax one), the zone update breaks saying
> > "Ajaz Zone  does not have an associated Tapestry.ZoneManager
> > object". The Upload component doesn't add any complex Javascript or
> > otherwise do anything special, so I don't quite understand what can
> > cause it to break. Obviously the upload component changes the form's
> > enctype to multipart, but could that be the cause for failure and why?
> > Anyone run into this?
> >
> > Kalle
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>