Re: T5: Testing service scope

2010-02-17 Thread Ulrich Stärk

Hmm, you are right.

The builder method for that service would be called multiple times though IIRC. Maybe somehow check 
that then?


Uli

On 17.02.2010 23:32 schrieb Martin Strand:

Hmm, why different instances? Wouldn't every thread see the same proxy
instance?

Martin

On Wed, 17 Feb 2010 12:17:35 +0100, Ulrich Stärk  wrote:


Querying the registry for the same service from different threads
should yield different instances
when using the perthread scope. Just test that. No need for a request
if your service doesn't
require one.

Uli

On 17.02.2010 11:42 schrieb Inge Solvoll:

Hi!

I recently encountered a bug in one of my services, where it had the
wrong
scope because I put the scope annotation on the interface rather than
on the
implementing class. I got the idea that I could manually create a T5 IOC
registry to do integration testing on my services. But how can I test
"perthread" scope on services in the test registry when there are no
real
requests? I'm assuming this requires mocking the Request object in
some way?

Inge


-
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: t5: beaneditform and timestamp

2010-02-17 Thread Thiago H. de Paula Figueiredo
On Wed, 17 Feb 2010 23:05:32 -0200, Angelo Chen  
 wrote:



Hi Thiago,


Hi!

changing from Timestamp to Date works, however, the default edit block  
for Date seems not working with time part, can't enter any time, try  
this:


Tapestry's DateField only handles dates. Try using the Chenille Kit's  
DateTimeField instead:  
http://www.chenillekit.org/demo/tapcomp/datetimefielddemo.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: t5: beaneditform and timestamp

2010-02-17 Thread Angelo Chen

Hi Thiago,

changing from Timestamp to Date works, however, the default edit block for
Date seems not working with time part, can't enter any time, try this:
2/19/2010 09:09:09 it does not work, any idea?

Thiago H. de Paula Figueiredo wrote:
> 
> On Wed, 17 Feb 2010 14:47:10 -0200, Stephan Windmüller  
>  wrote:
> 
>> Angelo Chen wrote:
>>
>>> Using following code to update an object:
>>>  < t:beaneditform t:id="user" submitlabel="message:create-user"  />
>>> but when click 'update', got following error:
>>>
>>> Could not find a coercion from type java.util.Date to type
>>> java.sql.Timestamp.
> 
> Timestamp is a Date subclass. Tapestry provides a view and edit blocks for  
> Date, so BeanEditForm knows how to handle it, but there's no  
> out-of-the-box coercion from Timestamp to Date. Just add one and it will  
> work. By the way, you shouldn't use Timestamp in an entity class field:  
> java.util.Date should be used in this case. Timestamp is just the Java  
> counterpart of the timestamp SQL type.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, software architect and developer, 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
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/t5%3A-beaneditform-and-timestamp-tp27625725p27633058.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: integrating a web services stack

2010-02-17 Thread Martin Strand

Same here - would have preferred #1 but implemented #2 because it was much 
simpler

On Wed, 17 Feb 2010 13:09:25 +0100, Peter Stavrinides 
 wrote:


Hi Uli,

I opted out of 3, since I don't use Spring, so thought it would be overkill 
bringing too much baggage. I would love to see an actual example of 1, it could 
be interesting... but I settled for a version of 2, from what I understood this 
was the simplest approach to get working.

Cheers,
Peter


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



Re: T5: Testing service scope

2010-02-17 Thread Martin Strand

Hmm, why different instances? Wouldn't every thread see the same proxy instance?

Martin

On Wed, 17 Feb 2010 12:17:35 +0100, Ulrich Stärk  wrote:


Querying the registry for the same service from different threads should yield 
different instances
when using the perthread scope. Just test that. No need for a request if your 
service doesn't
require one.

Uli

On 17.02.2010 11:42 schrieb Inge Solvoll:

Hi!

I recently encountered a bug in one of my services, where it had the wrong
scope because I put the scope annotation on the interface rather than on the
implementing class. I got the idea that I could manually create a T5 IOC
registry to do integration testing on my services. But how can I test
"perthread" scope on services in the test registry when there are no real
requests? I'm assuming this requires mocking the Request object in some way?

Inge


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



Re: Validating forms inside a loop

2010-02-17 Thread jose luis sanchez
Wow, you really saved my day !
Thanks !
El 17/02/2010, a las 23:09, Josh Canfield escribió:

> The problem is that you really only have one instance of the Form
> component, and so only one instance of the ValidationTracker. I poked
> around and wasn't able to find an easier way to do this.
> 
> Don't use ${} when passing the context.
>
> 
> I used the index of the loop for the context. You can modify to use
> the message.id
> 
>@Component(parameters = {"tracker=tracker"})
>private Form _edit;
> 
>@Persist(PersistenceConstants.FLASH)
>private Map _indexedTrackers;
> 
>/**
> * Holds the tracker created when the form is posted and we don't
> know which form is being processed
> */
>private ValidationTracker _tmpTracker;
> 
> @OnEvent(EventConstants.PREPARE_FOR_SUBMIT)
>void onPrepareForSubmitFromEdit(int index) {
>_formIndex = index;
>}
> 
> @OnEvent(value = EventConstants.VALIDATE_FORM)
>void validateForm() {
> // don't clear the errors here. Clear them after render, otherwise you
> lose edited value tracking
>if (name == null) {
>_edit.recordError("Sorry, name is mandatory");
>}
>}
> 
> public ValidationTracker getTracker() {
>if (_indexedTrackers == null) _indexedTrackers = new
> HashMap();
>if (_formIndex == null) {
>// it's a post and we haven't gotten to the part of the
> action where the fields are processed
>if (_tmpTracker == null) _tmpTracker = new ValidationTrackerImpl();
>return _tmpTracker;
>}
>if (_tmpTracker != null) {
>// We have a temp tracker and a form index so we have now
> processed the input fields
>// so we can store the temp in the map and clear it.
>_indexedTrackers.put(_formIndex, _tmpTracker);
>_tmpTracker = null;
>}
> 
>// Make sure we have a tracker for all the forms
>if (_indexedTrackers.get(_formIndex) == null)
> _indexedTrackers.put(_formIndex, new ValidationTrackerImpl());
> 
>return _indexedTrackers.get(_formIndex);
>}
> 
>public void setTracker(ValidationTracker tracker) {
>if (_indexedTrackers == null) _indexedTrackers = new
> HashMap();
>if (_formIndex == null) {
>// We don't know which form this is for. This gets called
> at the very end of the action
>// so you probably have a bug if this is getting called
>throw new RuntimeException("This shouldn't happen");
>}
>_indexedTrackers.put(_formIndex, tracker);
> // Remember the trackers for the render.
>setIndexedTrackers(_indexedTrackers);
>}
> 
>public void setIndexedTrackers(Map
> indexedTrackers) {
>_indexedTrackers = indexedTrackers;
>}
> 
> 
> 
> On Wed, Feb 17, 2010 at 9:16 AM, Jose Luis Sanchez
>  wrote:
>> Hi all.
>> 
>> I have a multiple form problem .. and after having search and thought many
>> on this, can't find a solution.
>> 
>> 
>> 
>> 
>> 
>> 
>> > clientValidation="false">
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Well, that's a sample of what i have.
>> 
>> I'll tell my usage :
>>  When the user clicks Reject, no clientValidation is done. That's why i
>> disabled clientvalidation.
>>  When the user clicks Accept, serverside validation is done against real
>> required fields, but as the form id
>>  is inside a loop, i can't get the validation to show the errors in it's own
>> form.
>> 
>> 
>>private Form edit;
>> 
>>@OnEvent(value=EventConstants.VALIDATE_FORM)
>>void validateForm() {
>>edit.clearErrors();
>>if (phone==null) edit.recordError("Sorry, phone is mandatory");
>>}
>> 
>>While this works, it shows errors on every form ( currently 3 form ), so
>> i see the famous red-banner thrice.
>> 
>> 
>> 
>> 
>> I can't add edit_0 nor edit_1, because while they are real names in rendered
>> tml, they are not before, so tapestry gives me an error.
>> 
>> Is there any way i can fix this ?
>> 
>> Thanks.
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> 
> 
> -- 
> --
> http://www.bodylabgym.com - a private, by appointment only, one-on-one
> health and fitness facility.
> --
> http://www.ectransition.com - Quality Electronic Cigarettes at a
> reasonable price!
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
> 
> -
> 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.

Re: Validating forms inside a loop

2010-02-17 Thread Josh Canfield
The problem is that you really only have one instance of the Form
component, and so only one instance of the ValidationTracker. I poked
around and wasn't able to find an easier way to do this.

Don't use ${} when passing the context.


I used the index of the loop for the context. You can modify to use
the message.id

@Component(parameters = {"tracker=tracker"})
private Form _edit;

@Persist(PersistenceConstants.FLASH)
private Map _indexedTrackers;

/**
 * Holds the tracker created when the form is posted and we don't
know which form is being processed
 */
private ValidationTracker _tmpTracker;

@OnEvent(EventConstants.PREPARE_FOR_SUBMIT)
void onPrepareForSubmitFromEdit(int index) {
_formIndex = index;
}

@OnEvent(value = EventConstants.VALIDATE_FORM)
void validateForm() {
// don't clear the errors here. Clear them after render, otherwise you
lose edited value tracking
if (name == null) {
_edit.recordError("Sorry, name is mandatory");
}
}

 public ValidationTracker getTracker() {
if (_indexedTrackers == null) _indexedTrackers = new
HashMap();
if (_formIndex == null) {
// it's a post and we haven't gotten to the part of the
action where the fields are processed
if (_tmpTracker == null) _tmpTracker = new ValidationTrackerImpl();
return _tmpTracker;
}
if (_tmpTracker != null) {
// We have a temp tracker and a form index so we have now
processed the input fields
// so we can store the temp in the map and clear it.
_indexedTrackers.put(_formIndex, _tmpTracker);
_tmpTracker = null;
}

// Make sure we have a tracker for all the forms
if (_indexedTrackers.get(_formIndex) == null)
_indexedTrackers.put(_formIndex, new ValidationTrackerImpl());

return _indexedTrackers.get(_formIndex);
}

public void setTracker(ValidationTracker tracker) {
if (_indexedTrackers == null) _indexedTrackers = new
HashMap();
if (_formIndex == null) {
// We don't know which form this is for. This gets called
at the very end of the action
// so you probably have a bug if this is getting called
throw new RuntimeException("This shouldn't happen");
}
_indexedTrackers.put(_formIndex, tracker);
// Remember the trackers for the render.
setIndexedTrackers(_indexedTrackers);
}

public void setIndexedTrackers(Map
indexedTrackers) {
_indexedTrackers = indexedTrackers;
}



On Wed, Feb 17, 2010 at 9:16 AM, Jose Luis Sanchez
 wrote:
> Hi all.
>
> I have a multiple form problem .. and after having search and thought many
> on this, can't find a solution.
>
>
> 
> 
> 
> 
>  clientValidation="false">
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>
> Well, that's a sample of what i have.
>
> I'll tell my usage :
>  When the user clicks Reject, no clientValidation is done. That's why i
> disabled clientvalidation.
>  When the user clicks Accept, serverside validation is done against real
> required fields, but as the form id
>  is inside a loop, i can't get the validation to show the errors in it's own
> form.
>
>
>    private Form edit;
>
>   �...@onevent(value=EventConstants.VALIDATE_FORM)
>    void validateForm() {
>        edit.clearErrors();
>        if (phone==null) edit.recordError("Sorry, phone is mandatory");
>    }
>
>    While this works, it shows errors on every form ( currently 3 form ), so
> i see the famous red-banner thrice.
>
>
>
>
> I can't add edit_0 nor edit_1, because while they are real names in rendered
> tml, they are not before, so tapestry gives me an error.
>
> Is there any way i can fix this ?
>
> Thanks.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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



Re: Distinguish action requests from page render requests

2010-02-17 Thread raulmt

Thanks, Thiago!

Although, thinking about it, I don't know if what I am doing is the best way
for accomplish what I want. The original requirement for my app was to be
capable of creating "user feedback messages" (like the ones Twitter has on
its settings page) on the client as a response for some actions. The ideal
case is to have a common way of showing these feedback messages in the
following contexts:

 * An Ajax request that triggers a component event, and we only need to tell
the client to show "some message" (like "the entity was saved"): for
accomplish this without dealing directly with a JSONObject and its script
property (expected on ZoneManager at the client), I created another class
(JavaScriptOnlyUpdate) that has methods like "error", "warn", "info" and
"success" and a ComponentEventResultProccessor that handles that type of
return value from an event handler (from Ajax Request) and creates a
JSONObject with its script property properly setted and passes it to the
masterEventResultProccessor (similar to what
AjaxLinkComponentEventResultProcessor does). This works great and the
resulting JSONObject is handled on the client by the ZoneManager so no extra
code on the client is needed. I think it is a correct way of accomplish the
objective.
 * An Ajax request that triggers a component event, we want to return some
content and besides tell the client to show "some message": this is where
things start to look no so pretty. The desired end result would be to return
a JSONObject with its content and script properties properly setted. Since a
component event is normally handled on the containing component page (for
example, a success of a form within a page) the uggly solution I have is a
component that has a JavaScriptOnlyUpdate object inside, is putted inside
the Block I want to return as a content response, and injected on the
containing page. Then, in the page event handler, I call some methods on
this component to "put" the necessary messages and then on the afterRender
of this component, it calls RenderSupport.addScript as needed.
 * A traditional (non-Ajax) component event request, like submitting a form,
that wants to show a message after it loads the response page: I used the
same component that the latter case, in a similar solution, but with some
modifications. The component detects if there is an Ajax or Traditional
request going on and if it is a traditional request, then it stores the
messages on a property with persist flash. Then, in the page request (to
which the client will be redirected), it can load the messages and call
afterRender as needed.
 * A traditional (non-Ajax) page request that wants to show a message on the
client: for this reason I wanted to distinguish component event requests
from page requests, because in the latter, I must NOT store the messages on
a persist flash property (because they will be used "right now", in the same
request.

The thing is I think that using this "special" component is not the right
way. Maybe a right way could be to create a service that can be injected
anywhere (not only on the render phase, like Environmental services) that
has these methods "error", "success" and so on, to show messages, and making
this service clever enough to deal with the current situation, to produce,
finally, a script executed on the client that shows the messages. 

So, in case of an Ajax request, I should intercept the JSONObject to be
finally returned and add to its script property the necessary JavaScript
code to show the messages. This could be done by decorating
JSONObjectEventResultProcessor.

But in case of traditional requests I don't know exactly how to handle it.
If it is a page render request, maybe decorating DocumentLinker service or
adding another Filter to the pipeline it belongs... but if it is a component
event request, I should store the messages, "passing them" to the next
request so they are rendered in the page render request, and I don't know
exaclty how to do this... maybe something to do with
ApplicationStateManager?

Am I missing something? Am I trying to crack a nut with a sledgehammer? Am I
on the right way in the last paragraphs?

Regards.
-- 
View this message in context: 
http://n2.nabble.com/Distinguish-action-requests-from-page-render-requests-tp4586507p4588101.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: What websites are using Tapestry 5?

2010-02-17 Thread Thiago H. de Paula Figueiredo
On Wed, 17 Feb 2010 15:57:27 -0200, Robin D. Wilson   
wrote:



Except connecting it directly into our home-grown CMS... ;-)


The rule implementation could do it, couldn't? ;)

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: How to return 404 manually

2010-02-17 Thread Josh Canfield
Yes.

There are several approaches depending on where you discover the
missing data, my favorite is the ErrorCodeResultProcessor (don't
remember where it came from)

// in app module

 public void contributeComponentEventResultProcessor(
@Traditional @ComponentInstanceProcessor
ComponentEventResultProcessor componentInstanceProcessor,
MappedConfiguration configuration) {

configuration.addInstance(ErrorCode.class,
ErrorCodeResultProcessor.class);
}

// new class

public class ErrorCodeResultProcessor implements
ComponentEventResultProcessor {

private final Response _response;

public ErrorCodeResultProcessor(Response response) {
_response = response;
}

public void processResultValue(ErrorCode value) throws IOException {
if (value != null) {
_response.sendError(value.getCode(), value.getStatus());
}
}

}


Usage:
Object onActivate() {
if ( !found ) return new ErrorCode(404, "The requested
resource was not found!");
}

Good luck.

On Wed, Feb 17, 2010 at 2:15 AM, Vesa Marttila  wrote:
> Hi,
>
> I have a situation in which a resource is not found from the database and I
> would like to show a generic 404 page while preserving the original URL. Is
> this possible using Tapestry 5.1?
>
> Best regards,
> Vesa Marttila
>
> --
> Vesa Marttila 
> Mysema Ltd, Vilhonkatu 5 A, 00100 Helsinki, Finland
> Internet: http://www.mysema.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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



Re: Injecting Zone to component inside a loop

2010-02-17 Thread Thiago H. de Paula Figueiredo
On Wed, 17 Feb 2010 15:42:57 -0200, Raul Raja Martinez  
 wrote:



Hi Everyone,


Hi!

This is a T5 issue I'm having with Component that contain zones inside  
loops When attempting to inject the zone into its own container the zone  
instance injected is always the first zone in the first iteration in the  
loop,

instead of the actual zone for that container.


Even when put inside a Loop, there's only one instance of the component.  
It's rendered multiple times, but it's still the same Zone. In the event  
handler, to know which loop iteration triggered the event, use the Zone's  
context parameter.



Also when calling the handlers for the event links the client id for the
zone is always null.


It's not avaible because, while an event is being handled, the componente  
is not being rendered, and the client id is generated while rendering.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: Help : Dynamically Generated Checkboxes

2010-02-17 Thread Josh Canfield
Something like this.

You'll want is an ordered list of NewsLetterType. Ordered because you
are going to access them by index.

@Property
private List types;

@Property
private int typeIndex;

public boolean getTypeChecked() {
  NewsLetterType t = types.get(typeIndex);
  return subscriber.types.contains(t);
}

public void setTypeChecked(boolean checked) {
  NewsLetterType t = types.get(typeIndex);
  if ( checked ) subscriber.types.add(t);
  else subscriber.types.remove(t);
}

 ${type.name} 


I didn't compile this code so there are bound to be typos, but it
should get you started.


Josh

On Wed, Feb 17, 2010 at 2:08 AM, gdinBeli  wrote:
>
> Hi, I'm new to Tapestry5 and I'm try to create checkbox list which will
> change dynamically. Here is the thing: I'm making a newsletter modul. I'm
> using tapestry5 and hibernate. So I have something like this : Subscriber
> which has Set, also I've NewsletterType with
> Set, so please instruct me how to make a component (in
> tapestry5) which will be list of NewsletterTypes represented by checkbox
> list.  I 'd use on subscriber's registration page. I want to have
> functionality , when I change the number of NewsletterTypes so changes my
> checkbox list on page subscriber/registration.  Example of how this should
> look can be found on numerous sites. e.g. https://adage.com/register.php
>
> Thanks
> --
> View this message in context: 
> http://old.nabble.com/Help-%3A-Dynamically-Generated-Checkboxes-tp27621521p27621521.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
>
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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



RE: What websites are using Tapestry 5?

2010-02-17 Thread Robin D. Wilson
Except connecting it directly into our home-grown CMS... ;-)

--
Robin D. Wilson
Director of Web Development
KingsIsle Entertainment, Inc.
CELL: 512-426-3929
DESK: 512-623-5913
www.KingsIsle.com


-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Sent: Wednesday, February 17, 2010 11:50 AM
To: Tapestry users
Subject: Re: What websites are using Tapestry 5?

On Wed, 17 Feb 2010 15:46:29 -0200, Robin D. Wilson   
wrote:

> We needed to dynamically control the URLs we re-write to... So the  
> biggest change is to hook URLrewriter into our Content Management System  
> (home grown) so that it gets the rewrite rules from our database instead  
> of a config file.

Besides the 301-redirect, there's nothing you described that cannot be  
handled by Tapestry's out-of-the-box URL rewrite support.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: What websites are using Tapestry 5?

2010-02-17 Thread Thiago H. de Paula Figueiredo
On Wed, 17 Feb 2010 15:46:29 -0200, Robin D. Wilson   
wrote:


We needed to dynamically control the URLs we re-write to... So the  
biggest change is to hook URLrewriter into our Content Management System  
(home grown) so that it gets the rewrite rules from our database instead  
of a config file.


Besides the 301-redirect, there's nothing you described that cannot be  
handled by Tapestry's out-of-the-box URL rewrite support.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: What websites are using Tapestry 5?

2010-02-17 Thread Robin D. Wilson
We needed to dynamically control the URLs we re-write to... So the biggest 
change is to hook URLrewriter into our Content Management System (home grown) 
so that it gets the rewrite rules from our database instead of a config file.

We essentially have 2 requirements for URLrewriting:

1) requests for a 'pretty URL' (i.e., one that is essentially 'virtual' in our 
system) get pointed to the proper dynamic page in our CMS.

2) requests for an 'ugly URL' (i.e., one that is the actual path to the dynamic 
page - which includes a page ID or content ID in the URL) get rewritten (with a 
301 "permanent" redirect) to a friendly URL if one exists. This is to provide 
SEO support for our "pretty URLs"...

So, if a user requests:

https://www.wizard101.com/game/myfriendlyurl

They would get the content that actually goes with:

https://www.wizard101.com/home2/game/001231jasf012312310123

(I made that up, but 'home2' is actually the Tapestry template, and it gets the 
dynamic content for a content item designated by "game/001231jasf012312310123" 
from our database...)

Or, a request for:

https://www.wizard101.com/home2/game/001231jasf012312310123

Gets a 301 (permanently moved) redirect to:

https://www.wizard101.com/game/myfriendlyurl

(This last bit is because search engines score click-throughs based on the 
path, and we may have people out in the web somewhere who have linked to our 
old path, but we don't want to lose the SEO ranking for click-throughs to our 
new path... So it _must_ be a 301 redirect, or the old path gets the higher 
ranking for the click-through instead of our new 'friendly' URL... If we have 
multiple scoring URLs that point to the same page, the page will essentially be 
downgraded in score because click-thru traffic will be split between the 
different paths.)

--
Robin D. Wilson
Director of Web Development
KingsIsle Entertainment, Inc.
CELL: 512-426-3929
DESK: 512-623-5913
www.KingsIsle.com


-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Sent: Wednesday, February 17, 2010 10:06 AM
To: Tapestry users
Subject: Re: What websites are using Tapestry 5?

On Wed, 17 Feb 2010 13:51:28 -0200, Robin D. Wilson   
wrote:

> cluster on tomcat 6.0.20, Sun JDK 1.6. We also use URLrewriter, but we  
> modified it heavily to use our CMS database to get the new
> paths.

What exactly have you modified in the URL rewriting support? I'm curious  
about it. It can inspire us to improve our framework. :)

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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



Injecting Zone to component inside a loop

2010-02-17 Thread Raul Raja Martinez
Hi Everyone,

This is a T5 issue I'm having with Component that contain zones inside loops
When attempting to inject the zone into its own container the zone instance
injected is always the first zone in the first iteration in the loop,
instead of the actual zone for that container.
Also when calling the handlers for the event links the client id for the
zone is always null.
Here is the code in case someone can help and thanks in advance.

*Environment*

Tapestry 5.2.0
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)
Tomcat 6.0.18

*SidebarList.tml (Component where the loop is iterating)*
*
*
http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
${title}


*FavoriteToggle.tml*

${item.profile.fullName}
${message:none}




*FavoriteToggle.tml (Component where the zone is located)*
*
*
http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
xmlns:p="tapestry:parameter">
**
**

Remove Favorite

Add Favorite






*FavoriteToggle.java*

/**
 * Adds a graph entity as a favorite to the logged in channel
 */
public class FavoriteToggle {

/**
 * the object subject to be a favorite
 */
@Parameter(required = true, cache = false)
@Property
private Long favoriteId;

@Property
@Persist
private Channel channel;

@Property
private String uniqueId;

@Property
@Persist
private GraphEntity favorite;

@Inject
private ChannelManager channelManager;

@Inject
private EntityFactory entityFactory;

@Inject
private ComponentResources componentResources;

@Inject
private ApplicationContext applicationContext;

@InjectComponent
private Zone favoriteToggleZone; //this seems to not inject the right
zone but a zone from the first iteration

public void setChannelManager(ChannelManager channelManager) {
this.channelManager = channelManager;
}

@Inject
private Request request;

public void beginRender() {
uniqueId = UUID.randomUUID().toString();
Authentication currentUser =
SecurityContextHolder.getContext().getAuthentication();
String channelName = currentUser.getName();
channel = channelManager.get(channelName);
List favorites =
entityFactory.getByIds(GraphEntity.class, favoriteId);
favorite = favorites.get(0);
}

public Object onToggleFavorite(Long favoriteId) {
   //the zone client id is never available here
channelManager.toggleFavorites(channel.getId(), favoriteId);
return update(favoriteId);
}

private Object update(Long favoriteId) {
return request.isXHR() ? favoriteToggleZone.getBody() : this;
}

public boolean isChannelFavorite() {
return channel.containsFavorites(favorite);
}

}


Validating forms inside a loop

2010-02-17 Thread Jose Luis Sanchez

Hi all.

I have a multiple form problem .. and after having search and thought 
many on this, can't find a solution.







clientValidation="false">












Well, that's a sample of what i have.

I'll tell my usage :
  When the user clicks Reject, no clientValidation is done. That's why 
i disabled clientvalidation.
  When the user clicks Accept, serverside validation is done against 
real required fields, but as the form id
  is inside a loop, i can't get the validation to show the errors in 
it's own form.



private Form edit;

@OnEvent(value=EventConstants.VALIDATE_FORM)
void validateForm() {
edit.clearErrors();
if (phone==null) edit.recordError("Sorry, phone is mandatory");
}

While this works, it shows errors on every form ( currently 3 form 
), so i see the famous red-banner thrice.





I can't add edit_0 nor edit_1, because while they are real names in 
rendered tml, they are not before, so tapestry gives me an error.


Is there any way i can fix this ?

Thanks.


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



Res: Res: [T5.1] Request to Application Root path ignores t5 filters

2010-02-17 Thread Everton Agner
Thank you! :)


While this Bug isn't fixed, I'll dispatch app root requests to the Index/Start 
page.

> Bug report : TAP5-1018




De: Thiago H. de Paula Figueiredo 
Para: Tapestry users 
Enviadas: Quarta-feira, 17 de Fevereiro de 2010 14:55:58
Assunto: Re: Res: [T5.1] Request to Application Root path ignores t5 filters

On Wed, 17 Feb 2010 14:44:13 -0200, Everton Agner  
wrote:

> Nothing?

I've looked at the sources and I've found that RootPathDispatcher, the 
dispatcher that handles the root URL, doesn't invoke the ComponentEventHandler, 
which is the pipeline that invokes the ComponentEventFilter's. This is a bug, 
so please file a JIRA about it.

> One more thing... Tapestry automatically knows if there is a Start page or a 
> Index page? Or only the Start page (so I should change the @Symbol value 
> related to it)?

It looks for a page which name was defined in the tapestry.start-page-name 
configuration symbol. Index is its default value. Start was the hardwired index 
page name before the configuration symbol was created.

--Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
instructor
Owner, software architect and developer, 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


  

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

Re: t5: beaneditform and timestamp

2010-02-17 Thread Thiago H. de Paula Figueiredo
On Wed, 17 Feb 2010 14:47:10 -0200, Stephan Windmüller  
 wrote:



Angelo Chen wrote:


Using following code to update an object:
 < t:beaneditform t:id="user" submitlabel="message:create-user"  />
but when click 'update', got following error:

Could not find a coercion from type java.util.Date to type
java.sql.Timestamp.


Timestamp is a Date subclass. Tapestry provides a view and edit blocks for  
Date, so BeanEditForm knows how to handle it, but there's no  
out-of-the-box coercion from Timestamp to Date. Just add one and it will  
work. By the way, you shouldn't use Timestamp in an entity class field:  
java.util.Date should be used in this case. Timestamp is just the Java  
counterpart of the timestamp SQL type.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: Res: [T5.1] Request to Application Root path ignores t5 filters

2010-02-17 Thread Thiago H. de Paula Figueiredo
On Wed, 17 Feb 2010 14:44:13 -0200, Everton Agner  
 wrote:



Nothing?


I've looked at the sources and I've found that RootPathDispatcher, the  
dispatcher that handles the root URL, doesn't invoke the  
ComponentEventHandler, which is the pipeline that invokes the  
ComponentEventFilter's. This is a bug, so please file a JIRA about it.


One more thing... Tapestry automatically knows if there is a Start page  
or a Index page? Or only the Start page (so I should change the @Symbol  
value related to it)?


It looks for a page which name was defined in the tapestry.start-page-name  
configuration symbol. Index is its default value. Start was the hardwired  
index page name before the configuration symbol was created.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: t5: beaneditform and timestamp

2010-02-17 Thread Stephan Windmüller
Angelo Chen wrote:

> Using following code to update an object:
>  < t:beaneditform t:id="user" submitlabel="message:create-user"  />
> but when click 'update', got following error:
> 
> Could not find a coercion from type java.util.Date to type
> java.sql.Timestamp. 

Could you post the parts of your Java class which is handling the user?

- Stephan

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



Res: [T5.1] Request to Application Root path ignores t5 filters

2010-02-17 Thread Everton Agner
Nothing?





De: Everton Agner 
Para: Tapestry Users 
Enviadas: Terça-feira, 16 de Fevereiro de 2010 14:54:05
Assunto: [T5.1] Request to Application Root path ignores t5 filters

Hi,

I've noticed a weird behavior in two different T5.1 applications.

I've made a ComponentRequestFilter to handle Locale issues... And if I request 
[ /t5app/Start ]  page, my Filter code is executed. But, if I request the 
Application Root path [ /t5app or /t5app/ ] it ignores the Filter and avoids it.

Is that normal?

One more thing... Tapestry automatically knows if there is a Start page or a 
Index page? Or only the Start page (so I should change the @Symbol value 
related to it)?

Thanks!

Everton



  

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com


  

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

Re: What websites are using Tapestry 5?

2010-02-17 Thread Thiago H. de Paula Figueiredo
On Wed, 17 Feb 2010 13:51:28 -0200, Robin D. Wilson   
wrote:


cluster on tomcat 6.0.20, Sun JDK 1.6. We also use URLrewriter, but we  
modified it heavily to use our CMS database to get the new

paths.


What exactly have you modified in the URL rewriting support? I'm curious  
about it. It can inspire us to improve our framework. :)


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: What websites are using Tapestry 5?

2010-02-17 Thread Robin D. Wilson
www.wizard101.com
www.kingsisle.com

(Both are actually just different 'themes' on the same framework.)

We did some Tapestry customizations, and we did some optimization of the 
JavaScript frameworks. We use hibernate, and a tomcat
cluster on tomcat 6.0.20, Sun JDK 1.6. We also use URLrewriter, but we modified 
it heavily to use our CMS database to get the new
paths.

--
Robin D. Wilson
Director of Web Development
KingsIsle Entertainment, Inc.
CELL: 512-426-3929
DESK: 512-623-5913
www.KingsIsle.com

-Original Message-
From: Michael Martineau [mailto:m...@familypursuit.com] 
Sent: Wednesday, February 17, 2010 1:24 AM
To: users@tapestry.apache.org
Subject: What websites are using Tapestry 5?

Hi,

I'm trying to find a list of websites that use Tapestry 5.  I would like 
to take a look at them and see what sort of things they are able to do 
using Tapestry.  If any of you have a public website that is built on 
Tapestry 5, please send me a link.  Also, I'm interested to know if you 
built the website using mostly standard "out of the box" components, or 
did it require you to create a lot of custom components?  Did you use 
the packaged prototype/scriptaculous javascript library, or did you use 
some other library?  If you did, was it difficult to connect in?  Did 
you use hibernate or did you use some other ORM?  If you did, was it 
difficult to connect in?

I'm new to Tapestry and am evaluating whether I want to use it for my 
next project(s).  The component based architecture is very intriguing to 
me.  I've gone through the excellent tutorial which is what grabbed my 
attention the most and got me excited about using Tapestry.  However, 
for a Tapestry beginner, there is a rather large jump from the level the 
tutorial stops at and where the rest of the documentation ends up, with 
little in between.  While Tapestry at face value seems to make things 
really easy, I also get the feeling that it locks a developer into 
specific technologies unless he/she can spend an enormous amount of time 
really understanding how things work in order to customize it to work 
the way they want.  I know the documentation says I can customize 
things, but how is not very clear.

So before I get too deep, I would like to know if Tapestry 5 CAN be 
customized to do the sorts of things I want to do.  And, I want to know 
if it is EASY to customize.  Thus, reviewing other websites using 
Tapestry 5 (with additional feedback requested above) would be a great help.

Thanks,
Michael Martineau

-
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



t5: beaneditform and timestamp

2010-02-17 Thread Angelo Chen

Hi,

Using following code to update an object:

 < t:beaneditform t:id="user" submitlabel="message:create-user"  />

but when click 'update', got following error:

Could not find a coercion from type java.util.Date to type
java.sql.Timestamp. 

Any idea?

Thanks,

-- 
View this message in context: 
http://old.nabble.com/t5%3A-beaneditform-and-timestamp-tp27625725p27625725.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: AW: Cross Validation in dynamic Forms

2010-02-17 Thread Stephan Windmüller
Dominik Gätjens wrote:

> I read this thread but don't understand it. Do you have a code example for me?

The setup is complex. Follow these steps and let me know if there is
anything unclear:

1. Save controlNames of all fields

If your field has the id "myField", use this code:

-

private Map controlNames;

void onValidateFromMyField(Object value) {
if (controlNames == null) {
controlNames = new HashMap();
}

controlNames.put(paper, myField.getControlName());
}

-

Object is the current value you are iterating over, depending on your
page. Verify in onValidateForm that all controlNames are set.


2. Create your own component SimpleField:



public class SimpleField implements Field {

private String controlName;

public void setControlName(String controlName) {
this.controlName = controlName;
}

public String getControlName() {
return this.controlName;
}

[...]
}



Put it in your tml and inject it in your page code.


3. Use both in onValidateForm

Check the submitted values in onValidateForm. If a field should be
marked, set the controlName of the simpleField and record an error for it.

HTH
 Stephan

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



Hosting Apache Tapestry5.1 on GAE (Google Application Engine)

2010-02-17 Thread Muhammad Mohsen
I'd like to share my experience regarding the issue. I'm not a tapestry guru
but I just fought my way through hosting it on google application engine.

Here is my blogpost about hosting tapestry5.1 on Google application
engine
You'll find the application's link it but here it is
again
.

Please note that it has absolutely NOTHING but registering, logging in and
logging out !
That's as much as I've gone with tapestry so far. I had nothing in mind to
do !

Enjoy :)

-- 
Muhammad Mohsen Hussien
Jr. Java Software Engineer
HP Enterprise Services


Re: Distinguish action requests from page render requests

2010-02-17 Thread Thiago H. de Paula Figueiredo

On Wed, 17 Feb 2010 13:10:57 -0200, raulmt  wrote:


Hello,


Hi!

Is there a way to distinguish action (or component events) requests from  
the page render requests?


Yes. A @SetupRender method is only invoked on render requests. Another way  
is using what Tapestry itself does: inject ComponentEventLinkEncoder and  
use its decodePageRenderRequest(Request request) method: if it returns  
null, it's not a page render request. If  
decodeComponentEventRequest(Request request) returns null, it's not a  
action request.



As request.isXHR(), is there something like xx.isActionRequest() or
xx.isPageRequest()?


No. You can file a JIRA for this so committers can implement it.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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



Distinguish action requests from page render requests

2010-02-17 Thread raulmt

Hello,

Is there a way to distinguish action (or component events) requests from the
page render requests? I know that the request URL contains enough
information to figure it out... indeed, Tapestry has to do exactly that to
know which service must handle that. In fact, I found the method that does
this from the request path, but I didn't find if this information is stored
in some service (I only found a method that would parse the URL every time
it is called).

As request.isXHR(), is there something like xx.isActionRequest() or
xx.isPageRequest()? I need this to know when to use persist flash and
when not use it: I have a component that shows client messages (similar to
"alerts") but these messages to show, if they are generated in an action
request, they must be stored in a persist flash property (to recover them in
the next page request) but, if they are generated in an action request (or
also in XHR requests) they must be stored in a property without persist
flash... how can I know this?

Thanks.
-- 
View this message in context: 
http://n2.nabble.com/Distinguish-action-requests-from-page-render-requests-tp4586507p4586507.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: ZoneUpdater and Zone Race-Condition

2010-02-17 Thread kamiseq
ok, good point but you can hack it whit your own implementation of the page
request through prototype or jquery it is straight forward. but I would like
to hear from someone more experienced in T5 as well.

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


2010/2/17 Dominik Gätjens 

> to abort the ajax call sounds very very good. But i don't know where i can
> do this in Tapestry because Tapestry does the whole AJAX XMLHttpRequest
> thing
>
> -Ursprüngliche Nachricht-
> Von: kamiseq [mailto:kami...@gmail.com]
> Gesendet: Mittwoch, 17. Februar 2010 15:15
> An: Tapestry users
> Betreff: Re: ZoneUpdater and Zone Race-Condition
>
> maybe instead of timestamp you may try to return json/xml with pattern as
> key and data as value, so you will match key with what you actually are
> looking for. why can't you just abort the request if new char has been hit
>
> http://javascript.about.com/library/blajax11.htm
> 
>
> http://www.bennadel.com/blog/1002-XMLHttpRequest-Object-Has-An-Abort-Method.htm
>
> <
> http://www.bennadel.com/blog/1002-XMLHttpRequest-Object-Has-An-Abort-Method.htm
> >jquery
> :
>
> http://stackoverflow.com/questions/600494/jquery-automatically-abort-ajaxrequests-on-page-unload
>
> <
> http://stackoverflow.com/questions/600494/jquery-automatically-abort-ajaxrequests-on-page-unload
> >maybe
> you should wait few seconds after last char has been entered to give a time
> to enter next time before you send request
>
> pozdrawiam
> Paweł Kamiński
>
> kami...@gmail.com
> pkaminski@gmail.com
> __
>
>
> On 17 February 2010 14:00, Dominik Gätjens  >wrote:
>
> > Hello,
> >
> >
> >
> > I'm using the ZoneUpdater mixin from
> >
> http://tinybits.blogspot.com/2009/05/update-zone-on-any-client-side-event.htmltosend
>  an event at every keyup event on a textfield.
> >
> > This event triggers a webservice-method to fetch some data into a zone.
> >
> > if u type "ab"  the a fires an event and starts to rerender the Zone with
> > getData("a"). This takes a long time about 30-40 seconds. The second
> event
> > getData("ab") is much faster about 1 second. So what happen ist hat you
> see
> > the result from getData(ab) in the Zone and after a few seconds it
> changes
> > to the result of getData(a).
> >
> >
> >
> > I need any chance to abort the first request or to return the the data of
> > the second (getData(ab)) request again.
> >
> >
> >
> > I tried to cache the last result with a timestamp in the Session. But it
> > looks like that @Persist fields are restored at page actiavation and
> don't
> > reflect any changes made in the session.
> >
> >
> >
> > Here ist the important code:
> >
> >
> >
> > 
> >
> >   > event="keyup" t:zone="ligen"/>
> >
> >  
> >
> > 
> >
> >
> >
> > 
> >
> >  
> >
> >  ${liga.key}
> >
> >  
> >
> > 
> >
> >
> >
> >  @Property
> >
> >  private Liga liga;
> >
> >  @Property
> >
> >  @Persist
> >
> >  private String key
> >
> >
> >
> >
> >
> >  public Object onKeyup(String value) {
> >
> >key = value;
> >
> >return new MultiZoneUpdate("ligen", ligen.getBody());
> >
> >  }
> >
> >
> >
> >
> >
> >  public List getLigen() {
> >
> >if(key==null || key.equals("")) return new ArrayList();
> >
> >List list = ligaDAO.getLigenByKey(key);   //may need a
> lot
> > of time
> >
> >if(list==null){
> >
> >  list =  new ArrayList();
> >
> >}
> >
> >return list;
> >
> >  }
> >
> >
> >
> >
> >
> > Dominik
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


AW: ZoneUpdater and Zone Race-Condition

2010-02-17 Thread Dominik Gätjens
to abort the ajax call sounds very very good. But i don't know where i can do 
this in Tapestry because Tapestry does the whole AJAX XMLHttpRequest thing

-Ursprüngliche Nachricht-
Von: kamiseq [mailto:kami...@gmail.com] 
Gesendet: Mittwoch, 17. Februar 2010 15:15
An: Tapestry users
Betreff: Re: ZoneUpdater and Zone Race-Condition

maybe instead of timestamp you may try to return json/xml with pattern as
key and data as value, so you will match key with what you actually are
looking for. why can't you just abort the request if new char has been hit

http://javascript.about.com/library/blajax11.htm

http://www.bennadel.com/blog/1002-XMLHttpRequest-Object-Has-An-Abort-Method.htm

jquery
:
http://stackoverflow.com/questions/600494/jquery-automatically-abort-ajaxrequests-on-page-unload

maybe
you should wait few seconds after last char has been entered to give a time
to enter next time before you send request

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


On 17 February 2010 14:00, Dominik Gätjens wrote:

> Hello,
>
>
>
> I'm using the ZoneUpdater mixin from
> http://tinybits.blogspot.com/2009/05/update-zone-on-any-client-side-event.htmlto
>  send an event at every keyup event on a textfield.
>
> This event triggers a webservice-method to fetch some data into a zone.
>
> if u type "ab"  the a fires an event and starts to rerender the Zone with
> getData("a"). This takes a long time about 30-40 seconds. The second event
> getData("ab") is much faster about 1 second. So what happen ist hat you see
> the result from getData(ab) in the Zone and after a few seconds it changes
> to the result of getData(a).
>
>
>
> I need any chance to abort the first request or to return the the data of
> the second (getData(ab)) request again.
>
>
>
> I tried to cache the last result with a timestamp in the Session. But it
> looks like that @Persist fields are restored at page actiavation and don't
> reflect any changes made in the session.
>
>
>
> Here ist the important code:
>
>
>
> 
>
>   event="keyup" t:zone="ligen"/>
>
>  
>
> 
>
>
>
> 
>
>  
>
>  ${liga.key}
>
>  
>
> 
>
>
>
>  @Property
>
>  private Liga liga;
>
>  @Property
>
>  @Persist
>
>  private String key
>
>
>
>
>
>  public Object onKeyup(String value) {
>
>key = value;
>
>return new MultiZoneUpdate("ligen", ligen.getBody());
>
>  }
>
>
>
>
>
>  public List getLigen() {
>
>if(key==null || key.equals("")) return new ArrayList();
>
>List list = ligaDAO.getLigenByKey(key);   //may need a lot
> of time
>
>if(list==null){
>
>  list =  new ArrayList();
>
>}
>
>return list;
>
>  }
>
>
>
>
>
> Dominik
>
>

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



Re: ZoneUpdater and Zone Race-Condition

2010-02-17 Thread kamiseq
maybe instead of timestamp you may try to return json/xml with pattern as
key and data as value, so you will match key with what you actually are
looking for. why can't you just abort the request if new char has been hit

http://javascript.about.com/library/blajax11.htm

http://www.bennadel.com/blog/1002-XMLHttpRequest-Object-Has-An-Abort-Method.htm

jquery
:
http://stackoverflow.com/questions/600494/jquery-automatically-abort-ajaxrequests-on-page-unload

maybe
you should wait few seconds after last char has been entered to give a time
to enter next time before you send request

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__


On 17 February 2010 14:00, Dominik Gätjens wrote:

> Hello,
>
>
>
> I'm using the ZoneUpdater mixin from
> http://tinybits.blogspot.com/2009/05/update-zone-on-any-client-side-event.htmlto
>  send an event at every keyup event on a textfield.
>
> This event triggers a webservice-method to fetch some data into a zone.
>
> if u type "ab"  the a fires an event and starts to rerender the Zone with
> getData("a"). This takes a long time about 30-40 seconds. The second event
> getData("ab") is much faster about 1 second. So what happen ist hat you see
> the result from getData(ab) in the Zone and after a few seconds it changes
> to the result of getData(a).
>
>
>
> I need any chance to abort the first request or to return the the data of
> the second (getData(ab)) request again.
>
>
>
> I tried to cache the last result with a timestamp in the Session. But it
> looks like that @Persist fields are restored at page actiavation and don't
> reflect any changes made in the session.
>
>
>
> Here ist the important code:
>
>
>
> 
>
>   event="keyup" t:zone="ligen"/>
>
>  
>
> 
>
>
>
> 
>
>  
>
>  ${liga.key}
>
>  
>
> 
>
>
>
>  @Property
>
>  private Liga liga;
>
>  @Property
>
>  @Persist
>
>  private String key
>
>
>
>
>
>  public Object onKeyup(String value) {
>
>key = value;
>
>return new MultiZoneUpdate("ligen", ligen.getBody());
>
>  }
>
>
>
>
>
>  public List getLigen() {
>
>if(key==null || key.equals("")) return new ArrayList();
>
>List list = ligaDAO.getLigenByKey(key);   //may need a lot
> of time
>
>if(list==null){
>
>  list =  new ArrayList();
>
>}
>
>return list;
>
>  }
>
>
>
>
>
> Dominik
>
>


AW: Cross Validation in dynamic Forms

2010-02-17 Thread Dominik Gätjens
I read this thread but don't understand it. Do you have a code example for me?


Thanks

Dominik
-Ursprüngliche Nachricht-
Von: Stephan Windmüller [mailto:stephan.windmuel...@cs.tu-dortmund.de] 
Gesendet: Mittwoch, 17. Februar 2010 10:45
An: users@tapestry.apache.org
Betreff: Re: Cross Validation in dynamic Forms

Dominik Gätjens wrote:

> I'm building a dynamic form with textfields on the fly and need to do
> some cross validation. This all works pretty and i find two fields
> that are invalid together. 
> 
> But how can I report this error AND mark both fields as invalid? I
> don't have a component to call  Form.recordError(field, errorMessage)

I had the same problem and solved it using a simple field for which I
set the internal controlName property to the one of the validated
component. Please have a look at the thread

"Adding textfields to a form dynamically"

on this mailing list last week.

Regards
 Stephan

-
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



ZoneUpdater and Zone Race-Condition

2010-02-17 Thread Dominik Gätjens
Hello,

 

I'm using the ZoneUpdater mixin from 
http://tinybits.blogspot.com/2009/05/update-zone-on-any-client-side-event.html 
to send an event at every keyup event on a textfield. 

This event triggers a webservice-method to fetch some data into a zone. 

if u type "ab"  the a fires an event and starts to rerender the Zone with 
getData("a"). This takes a long time about 30-40 seconds. The second event 
getData("ab") is much faster about 1 second. So what happen ist hat you see the 
result from getData(ab) in the Zone and after a few seconds it changes to the 
result of getData(a).

 

I need any chance to abort the first request or to return the the data of the 
second (getData(ab)) request again.

 

I tried to cache the last result with a timestamp in the Session. But it looks 
like that @Persist fields are restored at page actiavation and don't reflect 
any changes made in the session.

 

Here ist the important code:

 



  

  



 



  

  ${liga.key}

  



 

  @Property

  private Liga liga;

  @Property

  @Persist

  private String key

 

 

  public Object onKeyup(String value) {

key = value;

return new MultiZoneUpdate("ligen", ligen.getBody());

  }

 

 

  public List getLigen() {

if(key==null || key.equals("")) return new ArrayList();

List list = ligaDAO.getLigenByKey(key);   //may need a lot of 
time

if(list==null){

  list =  new ArrayList();

}

return list;

  }

 

 

Dominik



Re: integrating a web services stack

2010-02-17 Thread Peter Stavrinides
Hi Uli,

I opted out of 3, since I don't use Spring, so thought it would be overkill 
bringing too much baggage. I would love to see an actual example of 1, it could 
be interesting... but I settled for a version of 2, from what I understood this 
was the simplest approach to get working.

Cheers,
Peter

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: "Piero Sartini" 
To: "Tapestry users" 
Sent: Tuesday, 16 February, 2010 22:59:51 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: integrating a web services stack

> That would be for RESTful web services only. Did you ever have to expose a
> service via SOAP?

You are right, this is useful for RESTful services only. Never had to
expose a SOAP service within a pure tapestry application, but a few
where I am doing this from an EJB backend. But that's overkill if you
don't have it in place already.

 Piero

-
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: T5: Testing service scope

2010-02-17 Thread Ulrich Stärk

I think that should work, yes.

Uli

On 17.02.2010 12:38 schrieb Inge Solvoll:

Ok, thanks!

One more stupid question: Each test method runs in its own thread, right? So
the only place where I need to use Runnable and Thread are inside test
methods that need to test if several threads don't share the same cached
value? Given that the registry is stored and cached globally in my test
superclass so all tests use the same registry instance.


On Wed, Feb 17, 2010 at 12:17 PM, Ulrich Stärk  wrote:


Querying the registry for the same service from different threads should
yield different instances when using the perthread scope. Just test that. No
need for a request if your service doesn't require one.

Uli

On 17.02.2010 11:42 schrieb Inge Solvoll:

  Hi!


I recently encountered a bug in one of my services, where it had the wrong
scope because I put the scope annotation on the interface rather than on
the
implementing class. I got the idea that I could manually create a T5 IOC
registry to do integration testing on my services. But how can I test
"perthread" scope on services in the test registry when there are no real
requests? I'm assuming this requires mocking the Request object in some
way?

Inge



-
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: What websites are using Tapestry 5?

2010-02-17 Thread Borut Bolčina
Hi,

we have an openid server currently serving over 150.000 registered users. We
are not advertising it as openid server, that is why it does not have
general interface such as myopenid.com, but this is just a matter of a few
pages with forms. It uses version 5.0.19.

-borut


2010/2/17 Michael Martineau 

> Hi,
>
> I'm trying to find a list of websites that use Tapestry 5.  I would like to
> take a look at them and see what sort of things they are able to do using
> Tapestry.  If any of you have a public website that is built on Tapestry 5,
> please send me a link.  Also, I'm interested to know if you built the
> website using mostly standard "out of the box" components, or did it require
> you to create a lot of custom components?  Did you use the packaged
> prototype/scriptaculous javascript library, or did you use some other
> library?  If you did, was it difficult to connect in?  Did you use hibernate
> or did you use some other ORM?  If you did, was it difficult to connect in?
>
> I'm new to Tapestry and am evaluating whether I want to use it for my next
> project(s).  The component based architecture is very intriguing to me.
>  I've gone through the excellent tutorial which is what grabbed my attention
> the most and got me excited about using Tapestry.  However, for a Tapestry
> beginner, there is a rather large jump from the level the tutorial stops at
> and where the rest of the documentation ends up, with little in between.
>  While Tapestry at face value seems to make things really easy, I also get
> the feeling that it locks a developer into specific technologies unless
> he/she can spend an enormous amount of time really understanding how things
> work in order to customize it to work the way they want.  I know the
> documentation says I can customize things, but how is not very clear.
>
> So before I get too deep, I would like to know if Tapestry 5 CAN be
> customized to do the sorts of things I want to do.  And, I want to know if
> it is EASY to customize.  Thus, reviewing other websites using Tapestry 5
> (with additional feedback requested above) would be a great help.
>
> Thanks,
> Michael Martineau
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: What websites are using Tapestry 5?

2010-02-17 Thread Thiago H. de Paula Figueiredo
On Wed, 17 Feb 2010 08:56:22 -0200, Markus Joschko  
 wrote:


I use query parameters instead of the context for this communication,  
so no

encoding must be done.


True. But that means you have to treat them manually? E.g. run them
through the coercer.


Yes. Maybe we could add a @QueryParameter annotation that does that  
automatically.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: T5: Testing service scope

2010-02-17 Thread Inge Solvoll
Ok, thanks!

One more stupid question: Each test method runs in its own thread, right? So
the only place where I need to use Runnable and Thread are inside test
methods that need to test if several threads don't share the same cached
value? Given that the registry is stored and cached globally in my test
superclass so all tests use the same registry instance.


On Wed, Feb 17, 2010 at 12:17 PM, Ulrich Stärk  wrote:

> Querying the registry for the same service from different threads should
> yield different instances when using the perthread scope. Just test that. No
> need for a request if your service doesn't require one.
>
> Uli
>
> On 17.02.2010 11:42 schrieb Inge Solvoll:
>
>  Hi!
>>
>> I recently encountered a bug in one of my services, where it had the wrong
>> scope because I put the scope annotation on the interface rather than on
>> the
>> implementing class. I got the idea that I could manually create a T5 IOC
>> registry to do integration testing on my services. But how can I test
>> "perthread" scope on services in the test registry when there are no real
>> requests? I'm assuming this requires mocking the Request object in some
>> way?
>>
>> Inge
>>
>>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: Testing service scope

2010-02-17 Thread Ulrich Stärk
Querying the registry for the same service from different threads should yield different instances 
when using the perthread scope. Just test that. No need for a request if your service doesn't 
require one.


Uli

On 17.02.2010 11:42 schrieb Inge Solvoll:

Hi!

I recently encountered a bug in one of my services, where it had the wrong
scope because I put the scope annotation on the interface rather than on the
implementing class. I got the idea that I could manually create a T5 IOC
registry to do integration testing on my services. But how can I test
"perthread" scope on services in the test registry when there are no real
requests? I'm assuming this requires mocking the Request object in some way?

Inge



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



Re: What websites are using Tapestry 5?

2010-02-17 Thread Markus Joschko
> I use query parameters instead of the context for this communication, so no
> encoding must be done.

True. But that means you have to treat them manually? E.g. run them
through the coercer.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, software architect and developer, 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: How to return 404 manually [Solved]

2010-02-17 Thread Vesa Marttila

Vesa Marttila wrote:
I have a situation in which a resource is not found from the database 
and I would like to show a generic 404 page while preserving the 
original URL. Is this possible using Tapestry 5.1?


I figured out a solution for this.

First inject org.apache.tapestry5.services.Response and then call 
response.sendError(404, "Page not found!").


Thank you anyway (other solutions are still appreciated).

--
Vesa Marttila 
Mysema Ltd, Vilhonkatu 5 A, 00100 Helsinki, Finland
Internet: http://www.mysema.com

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



Re: T5: Testing service scope

2010-02-17 Thread Thiago H. de Paula Figueiredo
On Wed, 17 Feb 2010 08:42:38 -0200, Inge Solvoll   
wrote:



Hi!


Hi!


But how can I test
"perthread" scope on services in the test registry when there are no real
requests? I'm assuming this requires mocking the Request object in some  
way?


Only if your service or some of its dependencies use the Request.  
Perthread scope means per thread, not per request. ;)


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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



T5: Testing service scope

2010-02-17 Thread Inge Solvoll
Hi!

I recently encountered a bug in one of my services, where it had the wrong
scope because I put the scope annotation on the interface rather than on the
implementing class. I got the idea that I could manually create a T5 IOC
registry to do integration testing on my services. But how can I test
"perthread" scope on services in the test registry when there are no real
requests? I'm assuming this requires mocking the Request object in some way?

Inge


Re: What websites are using Tapestry 5?

2010-02-17 Thread Thiago H. de Paula Figueiredo
On Wed, 17 Feb 2010 08:32:14 -0200, Markus Joschko  
 wrote:



The only thing were we stumbled was the the communication between
javascript and the server when you leave the tapestry zone mechanism
(e.g. drag&drop). Tapestrys custom URL encoder makes it hard to create
links on the client side. However we didn't spend much time on this
issue but went ahead with the first workaround we found.


I use query parameters instead of the context for this communication, so  
no encoding must be done.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: What websites are using Tapestry 5?

2010-02-17 Thread Thiago H. de Paula Figueiredo
On Wed, 17 Feb 2010 05:24:16 -0200, Michael Martineau  
 wrote:



Hi,


Hi!

I'm trying to find a list of websites that use Tapestry 5.  I would like  
to take a look at them and see what sort of things they are able to do  
using Tapestry.


As mentioned by Robin, there's a list in  
http://wiki.apache.org/tapestry/PoweredByTapestry. I just added a website  
there, www.pronutricionista.com.br. :)


Also, I'm interested to know if you built the website using mostly  
standard "out of the box" components, or did it require you to create a  
lot of custom components?


We use the out of the box components a lot, but also use custom components  
as a way of reusing code. Creating a component in Tapestry is very easy  
and fast, so we create new ones just to not repeat a piece of HTML.


Did you use the packaged prototype/scriptaculous javascript library, or  
did you use some other library?


I use it. I used a jQuery color picker in www.pronutricionista.com.br  
without problems.


If you did, was it difficult to connect in?  Did you use hibernate or  
did you use some other ORM?  If you did, was it difficult to connect in?


I use Hibernate. Tapestry already provides Tapestry-Hibernate. Even  
without using it, it's very easy to use them together.



The component based architecture is very intriguing to me.


Why? Component-driven frameworks like Tapestry, Wicket and JSF are the  
most used in recommended for some years already. Components favor reuse.


While Tapestry at face value seems to make things really easy, I also  
get the feeling that it locks a developer into specific technologies


Which techonologies? Why do you get this feeling? Tapestry is based on  
Tapestry-IoC, but integrating it with Spring, for example, is almost  
seamless. You can use jQuery alongside Prototype.


unless he/she can spend an enormous amount of time really understanding  
how things work in order to customize it to work the way they want.


To do heavy customization, you'll need to understand Tapestry-IoC well,  
but that's not hard and it's better documented than Tapestry itself.


I know the documentation says I can customize things, but how is not  
very clear.


The documentation needs improvement, no doubt about it. On the other hand,  
there are many very interesting posts in this mailing list. I learn a lot  
from it.


So before I get too deep, I would like to know if Tapestry 5 CAN be  
customized to do the sorts of things I want to do.



And, I want to know if it is EASY to customize.


Even without knowing whant you want, but knowing Tapestry well, I'll tell  
you that almost anything can be customized in Tapestry, as it's built and  
configured on an IoC framework that allows you to override almost any  
Tapestry code easily.


It is. ;)

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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: What websites are using Tapestry 5?

2010-02-17 Thread Markus Joschko
If you look for an extensible component based web framework, you won't
be disappointed by Tapestry in the long run.
There are many extension points to contribute your code into the
framework and that makes it a real powerful environment
for developing webapps.

Our website is http://www.pagesms.com
While we focus more on the javascript based product then on the
website, we enjoyed the power of tapestry while developing.
Some facts:
 * We have two designs for the page (different areas). A combination
of layouts and components makes it easy to reuse pages /components
while theming them differently
 * Custom "inplace" editor based on a beanmodel. Including support for
token based CSRF protection.
 * Usage of drag&drop functionality
 * Integration of external javascript files like RPX or uservoice
 * DB is a custom integration of Amazons SimpleDB. Straightforward as
there are no transactions to take care about.

We used a lot of build-in stuff but also wrote a decent amount of
custom components/mixins. For all javascript we used the build-in
prototype library.
The only thing were we stumbled was the the communication between
javascript and the server when you leave the tapestry zone mechanism
(e.g. drag&drop). Tapestrys custom URL encoder makes it hard to create
links on the client side. However we didn't spend much time on this
issue but went ahead with the first workaround we found.

-Markus


On Wed, Feb 17, 2010 at 9:56 AM, Christophe DUFOUR
 wrote:
> Hi, we have a simple presentation web site built with T5 hosted on GAE :
> http://www.dooapp.com/
>
> We are about building an other one bigger and more complicated but it's not
> public for now.
>
> And as long as I know, this website is built with T5 :
> https://www.pole-emploi.fr/ but I didn't built it.
>
> Christophe DUFOUR
> http://www.dooapp.com
>
>
> On Wed, Feb 17, 2010 at 9:11 AM, Robin Komiwes  wrote:
>
>> By the way, this could also helps you:
>> http://wiki.apache.org/tapestry/PoweredByTapestry
>>
>> On Wed, Feb 17, 2010 at 8:39 AM, martijn.list > >wrote:
>>
>> > Michael Martineau wrote:
>> >
>> >> I'm trying to find a list of websites that use Tapestry 5.  I would like
>> >> to take a look at them and see what sort of things they are able to do
>> using
>> >> Tapestry.  If any of you have a public website that is built on Tapestry
>> 5,
>> >> please send me a link.
>> >>
>> >
>> > I known Lithium uses T5 for their forum software
>> >
>> > http://www.lithium.com/
>> >
>> > Lithium is used by large companies like:
>> >
>> > RIM:
>> http://supportforums.blackberry.com/t5/Java-Development/bd-p/java_dev
>> > )
>> >
>> > Lenovo: http://forums.lenovo.com/t5/
>> >
>> > HP: http://h30434.www3.hp.com/t5/Welcome-to-the-Forum/ct-p/about
>> >
>> >
>> > Martijn
>> >
>> >
>> >
>> > -
>> > 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: What websites are using Tapestry 5?

2010-02-17 Thread Thiago H. de Paula Figueiredo
On Wed, 17 Feb 2010 06:11:12 -0200, Robin Komiwes   
wrote:



By the way, this could also helps you:
http://wiki.apache.org/tapestry/PoweredByTapestry


I would like to ask everybody that has a public website written in  
Tapestry to add a reference to it in that wiki page. Please specify the  
Tapestry version you're using.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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



How to return 404 manually

2010-02-17 Thread Vesa Marttila

Hi,

I have a situation in which a resource is not found from the database 
and I would like to show a generic 404 page while preserving the 
original URL. Is this possible using Tapestry 5.1?


Best regards,
Vesa Marttila

--
Vesa Marttila 
Mysema Ltd, Vilhonkatu 5 A, 00100 Helsinki, Finland
Internet: http://www.mysema.com

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



Help : Dynamically Generated Checkboxes

2010-02-17 Thread gdinBeli

Hi, I'm new to Tapestry5 and I'm try to create checkbox list which will
change dynamically. Here is the thing: I'm making a newsletter modul. I'm
using tapestry5 and hibernate. So I have something like this : Subscriber
which has Set, also I've NewsletterType with
Set, so please instruct me how to make a component (in
tapestry5) which will be list of NewsletterTypes represented by checkbox
list.  I 'd use on subscriber's registration page. I want to have
functionality , when I change the number of NewsletterTypes so changes my
checkbox list on page subscriber/registration.  Example of how this should
look can be found on numerous sites. e.g. https://adage.com/register.php

Thanks
-- 
View this message in context: 
http://old.nabble.com/Help-%3A-Dynamically-Generated-Checkboxes-tp27621521p27621521.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: Cross Validation in dynamic Forms

2010-02-17 Thread Stephan Windmüller
Dominik Gätjens wrote:

> I'm building a dynamic form with textfields on the fly and need to do
> some cross validation. This all works pretty and i find two fields
> that are invalid together. 
> 
> But how can I report this error AND mark both fields as invalid? I
> don't have a component to call  Form.recordError(field, errorMessage)

I had the same problem and solved it using a simple field for which I
set the internal controlName property to the one of the validated
component. Please have a look at the thread

"Adding textfields to a form dynamically"

on this mailing list last week.

Regards
 Stephan

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



Re: What websites are using Tapestry 5?

2010-02-17 Thread Bård Magnus Kvalheim
Hi,
We're recently soft-launced Movellas - http://movellas.com

Movellas is a place for young authors to write, publish and read mobile
novels(movellas).

Components
We have mainly built composite components, but some of our own;
* Image component to generate src for db images
* String related for template like: nl2br, capitalize,abbreviate ...
* url assets

Development enviroment
Eclipse, maven, jetty

Spring, JPA, hibernate. Pretty easy integration although we are currently
using programmatic transactions and facades for 'db' operations in tapestry.
Will probably test tynamo tapestry-jpa module soon.

Javascript libraries
We're using a few and have written 'adapter components' for them. Not too
difficult I would say.

The learning curve was a bit steep in the beginning. I still find the
configuration, filters, dispatchers etc. a bit hard to grasp, some more
introductionary documentation and examples could go a long way.

During development I never felt I had to make compromises. I could usually
find help in documentation or forum (did a fair bit of google searching as
well).

All in all I found it to a really productive framework once I got the hang
of it - and the class reloading is a timesaver for development.

Best
Magnus

2010/2/17 Robin Komiwes 

> By the way, this could also helps you:
> http://wiki.apache.org/tapestry/PoweredByTapestry
>
> On Wed, Feb 17, 2010 at 8:39 AM, martijn.list  >wrote:
>
> > Michael Martineau wrote:
> >
> >> I'm trying to find a list of websites that use Tapestry 5.  I would like
> >> to take a look at them and see what sort of things they are able to do
> using
> >> Tapestry.  If any of you have a public website that is built on Tapestry
> 5,
> >> please send me a link.
> >>
> >
> > I known Lithium uses T5 for their forum software
> >
> > http://www.lithium.com/
> >
> > Lithium is used by large companies like:
> >
> > RIM:
> http://supportforums.blackberry.com/t5/Java-Development/bd-p/java_dev
> > )
> >
> > Lenovo: http://forums.lenovo.com/t5/
> >
> > HP: http://h30434.www3.hp.com/t5/Welcome-to-the-Forum/ct-p/about
> >
> >
> > Martijn
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>


Re: What websites are using Tapestry 5?

2010-02-17 Thread Christophe DUFOUR
Hi, we have a simple presentation web site built with T5 hosted on GAE :
http://www.dooapp.com/

We are about building an other one bigger and more complicated but it's not
public for now.

And as long as I know, this website is built with T5 :
https://www.pole-emploi.fr/ but I didn't built it.

Christophe DUFOUR
http://www.dooapp.com


On Wed, Feb 17, 2010 at 9:11 AM, Robin Komiwes  wrote:

> By the way, this could also helps you:
> http://wiki.apache.org/tapestry/PoweredByTapestry
>
> On Wed, Feb 17, 2010 at 8:39 AM, martijn.list  >wrote:
>
> > Michael Martineau wrote:
> >
> >> I'm trying to find a list of websites that use Tapestry 5.  I would like
> >> to take a look at them and see what sort of things they are able to do
> using
> >> Tapestry.  If any of you have a public website that is built on Tapestry
> 5,
> >> please send me a link.
> >>
> >
> > I known Lithium uses T5 for their forum software
> >
> > http://www.lithium.com/
> >
> > Lithium is used by large companies like:
> >
> > RIM:
> http://supportforums.blackberry.com/t5/Java-Development/bd-p/java_dev
> > )
> >
> > Lenovo: http://forums.lenovo.com/t5/
> >
> > HP: http://h30434.www3.hp.com/t5/Welcome-to-the-Forum/ct-p/about
> >
> >
> > Martijn
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>


Re: What websites are using Tapestry 5?

2010-02-17 Thread Robin Komiwes
By the way, this could also helps you:
http://wiki.apache.org/tapestry/PoweredByTapestry

On Wed, Feb 17, 2010 at 8:39 AM, martijn.list wrote:

> Michael Martineau wrote:
>
>> I'm trying to find a list of websites that use Tapestry 5.  I would like
>> to take a look at them and see what sort of things they are able to do using
>> Tapestry.  If any of you have a public website that is built on Tapestry 5,
>> please send me a link.
>>
>
> I known Lithium uses T5 for their forum software
>
> http://www.lithium.com/
>
> Lithium is used by large companies like:
>
> RIM: http://supportforums.blackberry.com/t5/Java-Development/bd-p/java_dev
> )
>
> Lenovo: http://forums.lenovo.com/t5/
>
> HP: http://h30434.www3.hp.com/t5/Welcome-to-the-Forum/ct-p/about
>
>
> Martijn
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>