Re: AjaxFormLoop Exception on 5.1.0.2 upgrade

2009-04-27 Thread zack1403

Thanks Joost! While I'm sorting through that to find out what youre doing
that I am missing, here is a question.  When my onAddRow event is throwing
an exception, shouldn't the transaction be rolled back? I would think that
is expected behavior but the transaction is being committed. When I refresh
the page the row is there. Is there a reason that isnt consistent with the
rest of tapestry transactions?

Zack


Joost Schouten (mailing lists) wrote:
> 
> sorry, I forgot the encoder for the AjaxFormLoop:
> 
> public ValueEncoder>
> getContactDetailEncoder() {
>   
>   final LegalEntityService service =
> serviceProvider.getService(LegalEntityService.class);
>   
>   return new 
> ValueEncoder>() {
> 
>   public String 
> toClient(AjaxFormLoopEntityHolder detail)
> {
>   return detail.getKey().toString();
>   }
> 
>   public AjaxFormLoopEntityHolder 
> toValue(String detailId)
> {
>   
>   AjaxFormLoopEntityHolder ret = 
> null;
>   
>   Long detailKey = Long.parseLong(detailId);
>   
>   for(AjaxFormLoopEntityHolder 
> holder : details) {
>   if(detailKey.equals(holder.getKey())) {
>   ret = holder;
>   break;
>   }
>   }
>   
>   return ret;
>   
>   }
>   };
>   }
> 
> On Tue, Apr 28, 2009 at 6:45 PM, Joost Schouten (mailing lists)
>  wrote:
>> Here is the code related to my AjaxFormLoop which works (besides a few
>> non T5 related persistance issues in my own code ;-)
>>
>>
>>
>>        *** java file **
>>
>>       �...@property
>>       �...@persist
>>        private List> details;
>>
>>       �...@property
>>        private AjaxFormLoopEntityHolder contactDetailRow;
>>
>>       �...@component(id = "contactDetailsAjaxLoop", parameters =
>> {"source=details",
>>                                                                          
>>                                      "value=contactDetailRow",
>>                                                                          
>>                                      "addRow=block:addRowBlock",
>>                                                                          
>>                                      "encoder=contactDetailEncoder"})
>>        private AjaxFormLoop contactDetailsAjaxLoop;
>>
>>       �...@component(id = "contactDetailForm", parameters =
>> {"zone=contactDetailsZone", "context=legalEntity.id"})
>>        private Form contactDetailForm;
>>
>>       �...@component(id = "addRowLink", parameters =
>> {"context=legalEntity.id"})
>>        private AddRowLink addRowLink;
>>
>>
>>       �...@component(id = "contactDetailsSubmit", parameters =
>> {"value=message:jsportal.controls.save"})
>>        private Submit contactDetailsSubmit;
>>
>>       �...@inject
>>       �...@property
>>        private Block addRowBlock;
>>
>>       �...@onevent(value=EventConstants.ADD_ROW)
>>                        private Object handleAddRow() throws Exception {
>>                                this.setEdit(true);
>>
>>                                ContactDetail contactDetail = new
>> ContactDetail();
>>                                contactDetail.setState(State.ACTIVE);
>>                                AjaxFormLoopEntityHolder detail = new
>> AjaxFormLoopEntityHolder(contactDetail, true, 0 -
>> System.currentTimeMillis());
>>                                details.add(detail);
>>
>>                                return detail;
>>        }
>>
>>       �...@onevent(value=EventConstants.REMOVE_ROW)
>>        private void handleRemoveRow(AjaxFormLoopEntityHolder detail)
>> throws Exception{
>>                              
>>  for(AjaxFormLoopEntityHolder holder : details) {
>>                                        if(detail.getKey() ==
>> holder.getKey()) {
>>                                                detail.setDeleted(true);
>>                                        }
>>                                }
>>        }
>>
>>       �...@onevent(component = "contactDetailForm", value =
>> EventConstants.PREPARE_FOR_SUBMIT)
>>                private void handleContactDetailPrepare(Long
>> legalEntityId) throws Exception {
>>                        loadLegalEntity(legalEntityId);
>>                }
>>
>>                private void loadLegalEntity(Long legalEntityId) throws
>> Exception {
>>                        LegalEntityService service =
>> serviceProvider.getService(LegalEntityService.class);
>>                        legalEn

Re: AjaxFormLoop Exception on 5.1.0.2 upgrade

2009-04-27 Thread Joost Schouten (mailing lists)
sorry, I forgot the encoder for the AjaxFormLoop:

public ValueEncoder>
getContactDetailEncoder() {

final LegalEntityService service =
serviceProvider.getService(LegalEntityService.class);

return new 
ValueEncoder>() {

public String 
toClient(AjaxFormLoopEntityHolder detail) {
return detail.getKey().toString();
}

public AjaxFormLoopEntityHolder 
toValue(String detailId) {

AjaxFormLoopEntityHolder ret = 
null;

Long detailKey = Long.parseLong(detailId);

for(AjaxFormLoopEntityHolder 
holder : details) {
if(detailKey.equals(holder.getKey())) {
ret = holder;
break;
}
}

return ret;

}
};
}

On Tue, Apr 28, 2009 at 6:45 PM, Joost Schouten (mailing lists)
 wrote:
> Here is the code related to my AjaxFormLoop which works (besides a few
> non T5 related persistance issues in my own code ;-)
>
>
>
>        *** java file **
>
>       �...@property
>       �...@persist
>        private List> details;
>
>       �...@property
>        private AjaxFormLoopEntityHolder contactDetailRow;
>
>       �...@component(id = "contactDetailsAjaxLoop", parameters = 
> {"source=details",
>                                                                               
>                                  "value=contactDetailRow",
>                                                                               
>                                  "addRow=block:addRowBlock",
>                                                                               
>                                  "encoder=contactDetailEncoder"})
>        private AjaxFormLoop contactDetailsAjaxLoop;
>
>       �...@component(id = "contactDetailForm", parameters =
> {"zone=contactDetailsZone", "context=legalEntity.id"})
>        private Form contactDetailForm;
>
>       �...@component(id = "addRowLink", parameters = 
> {"context=legalEntity.id"})
>        private AddRowLink addRowLink;
>
>
>       �...@component(id = "contactDetailsSubmit", parameters =
> {"value=message:jsportal.controls.save"})
>        private Submit contactDetailsSubmit;
>
>       �...@inject
>       �...@property
>        private Block addRowBlock;
>
>       �...@onevent(value=EventConstants.ADD_ROW)
>                        private Object handleAddRow() throws Exception {
>                                this.setEdit(true);
>
>                                ContactDetail contactDetail = new 
> ContactDetail();
>                                contactDetail.setState(State.ACTIVE);
>                                AjaxFormLoopEntityHolder detail = new
> AjaxFormLoopEntityHolder(contactDetail, true, 0 -
> System.currentTimeMillis());
>                                details.add(detail);
>
>                                return detail;
>        }
>
>       �...@onevent(value=EventConstants.REMOVE_ROW)
>        private void handleRemoveRow(AjaxFormLoopEntityHolder detail) throws 
> Exception{
>                                for(AjaxFormLoopEntityHolder 
> holder : details) {
>                                        if(detail.getKey() == holder.getKey()) 
> {
>                                                detail.setDeleted(true);
>                                        }
>                                }
>        }
>
>       �...@onevent(component = "contactDetailForm", value =
> EventConstants.PREPARE_FOR_SUBMIT)
>                private void handleContactDetailPrepare(Long legalEntityId) 
> throws Exception {
>                        loadLegalEntity(legalEntityId);
>                }
>
>                private void loadLegalEntity(Long legalEntityId) throws 
> Exception {
>                        LegalEntityService service =
> serviceProvider.getService(LegalEntityService.class);
>                        legalEntity = (LegalEntity) 
> service.get(LegalEntity.class, legalEntityId);
>                }
>
>               �...@onevent(component = "contactDetailForm", value = 
> EventConstants.SUCCESS)
>                private Object handleContactDetailSave() throws Exception {
>
>                        //do the persisting
>                }
>
>
>  AjaxFormLoopEntityHolder **
>
> package com.joostschouten.common.http.tapestrybase.model;
>
> public class AjaxFormLoopEntityHolder {
>
>                private T entity;
>                

Re: AjaxFormLoop Exception on 5.1.0.2 upgrade

2009-04-27 Thread Joost Schouten (mailing lists)
Here is the code related to my AjaxFormLoop which works (besides a few
non T5 related persistance issues in my own code ;-)



*** java file **

@Property
@Persist
private List> details;

@Property
private AjaxFormLoopEntityHolder contactDetailRow;

@Component(id = "contactDetailsAjaxLoop", parameters = 
{"source=details",

"value=contactDetailRow",

"addRow=block:addRowBlock",

"encoder=contactDetailEncoder"})
private AjaxFormLoop contactDetailsAjaxLoop;

@Component(id = "contactDetailForm", parameters =
{"zone=contactDetailsZone", "context=legalEntity.id"})
private Form contactDetailForm;

@Component(id = "addRowLink", parameters = {"context=legalEntity.id"})
private AddRowLink addRowLink;


@Component(id = "contactDetailsSubmit", parameters =
{"value=message:jsportal.controls.save"})
private Submit contactDetailsSubmit;

@Inject
@Property
private Block addRowBlock;

@OnEvent(value=EventConstants.ADD_ROW)
private Object handleAddRow() throws Exception {
this.setEdit(true);

ContactDetail contactDetail = new 
ContactDetail();
contactDetail.setState(State.ACTIVE);
AjaxFormLoopEntityHolder detail = new
AjaxFormLoopEntityHolder(contactDetail, true, 0 -
System.currentTimeMillis());
details.add(detail);

return detail;
}

@OnEvent(value=EventConstants.REMOVE_ROW)
private void handleRemoveRow(AjaxFormLoopEntityHolder detail) throws 
Exception{
for(AjaxFormLoopEntityHolder 
holder : details) {
if(detail.getKey() == holder.getKey()) {
detail.setDeleted(true);
}
}
}

@OnEvent(component = "contactDetailForm", value =
EventConstants.PREPARE_FOR_SUBMIT)
private void handleContactDetailPrepare(Long legalEntityId) 
throws Exception {
loadLegalEntity(legalEntityId);
}

private void loadLegalEntity(Long legalEntityId) throws 
Exception {
LegalEntityService service =
serviceProvider.getService(LegalEntityService.class);
legalEntity = (LegalEntity) 
service.get(LegalEntity.class, legalEntityId);
}

@OnEvent(component = "contactDetailForm", value = 
EventConstants.SUCCESS)
private Object handleContactDetailSave() throws Exception {

//do the persisting
}


 AjaxFormLoopEntityHolder **

package com.joostschouten.common.http.tapestrybase.model;

public class AjaxFormLoopEntityHolder {

private T entity;
private Long key;
private boolean newEntity = false;
private boolean deleted = false;

public AjaxFormLoopEntityHolder(T entity, boolean newEntity, 
Long key) {
this.entity = entity;
this.newEntity = newEntity;
this.key = key;
}

public T getEntity() {
return entity;
}

public void setEntity(T entity) {
this.entity = entity;
}

public Long getKey() {
return key;
}

public boolean isNew() {
return newEntity;
}

public boolean setDeleted(boolean deleted) {
return this.deleted = deleted;
}

public boolean isDeleted() {
return deleted;
}

}


*** The tml file ***









 

Re: AjaxFormLoop Exception on 5.1.0.2 upgrade

2009-04-27 Thread zack1403

Hmm, the jumpstart example you gave uses t:submitnotifier as well as all
examples (even nightly docs).  The example you gave is running on 5.0.18. 
You are sure that example works on upgrade to 5.1.0.2? Even at the simplest
form I am still getting my exception.  The simplest possible form I could
get down to is in my first post (page, tml, and exception).  This is
happening application-wide once I upgraded so it must be something that has
changed internal to tapestry.  Is there a new way to use AjaxFormLoop that I
am missing.  Does onAddRow still return an Object?

Zack


Joost Schouten (mailing lists) wrote:
> 
> The example at
> http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/tables/ajaxformloop1
> which I used as a guide worked well for me on 5.1.0.3.
> 
> In your examples you use the t:submitnotifier. I never really used it
> but maybe you do some DOM alterations in those event methods that
> Tapestry doesn't like.
> 
> Cheers,
> Joost
> 
> On Tue, Apr 28, 2009 at 3:59 PM, zack1403  wrote:
>>
>> Hey I hate to bump but this is a huge blocker for me.  Is there more
>> information I can give to try and help troubleshoot??
>>
>> --
>> View this message in context:
>> http://www.nabble.com/AjaxFormLoop-Exception-on-5.1.0.2-upgrade-tp23175801p23269752.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
>>
>>
> 
> -
> 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://www.nabble.com/AjaxFormLoop-Exception-on-5.1.0.2-upgrade-tp23175801p23270804.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: AjaxFormLoop Exception on 5.1.0.2 upgrade

2009-04-27 Thread Joost Schouten (mailing lists)
The example at 
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/tables/ajaxformloop1
which I used as a guide worked well for me on 5.1.0.3.

In your examples you use the t:submitnotifier. I never really used it
but maybe you do some DOM alterations in those event methods that
Tapestry doesn't like.

Cheers,
Joost

On Tue, Apr 28, 2009 at 3:59 PM, zack1403  wrote:
>
> Hey I hate to bump but this is a huge blocker for me.  Is there more
> information I can give to try and help troubleshoot??
>
> --
> View this message in context: 
> http://www.nabble.com/AjaxFormLoop-Exception-on-5.1.0.2-upgrade-tp23175801p23269752.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
>
>

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



Re: AjaxFormLoop Exception on 5.1.0.2 upgrade

2009-04-27 Thread zack1403

Hey I hate to bump but this is a huge blocker for me.  Is there more
information I can give to try and help troubleshoot??

-- 
View this message in context: 
http://www.nabble.com/AjaxFormLoop-Exception-on-5.1.0.2-upgrade-tp23175801p23269752.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: TextStreamResponse - TypeError

2009-04-27 Thread Geoffrey Wiseman
On Mon, Apr 27, 2009 at 5:20 PM, Howard Lewis Ship  wrote:

> Yes, the client-side logic expects a JSON response in a particular
> format; this format includes the content to put into the Zone, but
> also JavaScript libraries to include, and JavaScript to execute after
> the content is loaded ... and in 5.1 it may also include updates for
> other zones.
>

Ah, I see -- so TextResponseStream is not a way to render simpler content
for a zone update.  I had a single string, and a block seemed excessive, I
thought I'd check the alternatives.  I already shifted back to a block in
the meantime, so I'll stick with that.


> Another alternative: don't use the zone parameter of ActionLink, but
> provide your own JS to send the request and interpret the response,
> and update the Zone on the client side.
>

[nod].  Streamlined, but a lot more work.  ;)

Thanks,

  - Geoffrey
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/


Re: Getting a zone id when inside another zone

2009-04-27 Thread DH
What about giving the static id to the innerZone, like following:




DH
- Original Message - 
From: "Hugo Palma"
To: "Tapestry users" 
Sent: Monday, April 27, 2009 11:38 PM
Subject: Getting a zone id when inside another zone


>I have a template that looks something like this:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> The problem is figuring out the id of the innerZone in order to pass
> it to the form. Because the innerZone is itself inside a zone once the
> outerZone gets updated a new id is generated to the innerZone making
> the id i passed to the form an invalid one. I also tried something
> like:
> 
> 
> 
> but it doesn't work either.
> Any ideas on how i could make this work ?
> Thanks.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
>

Re: [wiki T5 howtos] Utf8 filter hints obsolete?

2009-04-27 Thread Christian Edward Gruber
Hah.  I didn't really notice, and I never bothered to remove the  
filters.  I guess I have some code to delete!


Christian.

On Apr 27, 2009, at 8:09 PM, Howard Lewis Ship wrote:


Post 5.0.14, Tapestry switched to a simpler system: the application
defined a single character set (default: 'UTF-8') for the entire
application. This solved some ugly problems with needed to know the
character set of the page before we could parse the URL to determine
the name of the page (!).

On Mon, Apr 27, 2009 at 5:03 PM, Christian Edward Gruber
 wrote:
I had some problems with UTF-8 characters in forms without them,  
but that
was around 5.0.14, and I can't remember if they were fixed after.   
I'll

re-test vanilla.  But it wasn't just about uploads.

Christian

On Apr 27, 2009, at 7:52 PM, Thiago H. de Paula Figueiredo wrote:

Em Mon, 27 Apr 2009 12:32:32 -0300, Christoph Lechleitner >

escreveu:


Hello everyone.


Hi!


But if I understand these issues ...
https://issues.apache.org/jira/browse/TAPESTRY-2537
https://issues.apache.org/jira/browse/TAPESTRY-2543
... correctly, those filter hacks should be totally obsolete in  
Tapestry

5.0.14 and above, right?
Does this include the 5.1 generation?


I've never used tapestry-upload, but my apps run with UTF-8 out of  
the box

for a long time already (including both 5.0.18 and 5.1).

So can somebody please confirm the obsoleteness of those filter  
hacks!?


Yes!

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Christian Edward Gruber
christianedwardgru...@gmail.com
http://www.geekinasuit.com/


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






--
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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



Christian Edward Gruber
christianedwardgru...@gmail.com
http://www.geekinasuit.com/


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



Re: [wiki T5 howtos] Utf8 filter hints obsolete?

2009-04-27 Thread Howard Lewis Ship
Post 5.0.14, Tapestry switched to a simpler system: the application
defined a single character set (default: 'UTF-8') for the entire
application. This solved some ugly problems with needed to know the
character set of the page before we could parse the URL to determine
the name of the page (!).

On Mon, Apr 27, 2009 at 5:03 PM, Christian Edward Gruber
 wrote:
> I had some problems with UTF-8 characters in forms without them, but that
> was around 5.0.14, and I can't remember if they were fixed after.  I'll
> re-test vanilla.  But it wasn't just about uploads.
>
> Christian
>
> On Apr 27, 2009, at 7:52 PM, Thiago H. de Paula Figueiredo wrote:
>
>> Em Mon, 27 Apr 2009 12:32:32 -0300, Christoph Lechleitner 
>> escreveu:
>>
>>> Hello everyone.
>>
>> Hi!
>>
>>> But if I understand these issues ...
>>> https://issues.apache.org/jira/browse/TAPESTRY-2537
>>> https://issues.apache.org/jira/browse/TAPESTRY-2543
>>> ... correctly, those filter hacks should be totally obsolete in Tapestry
>>> 5.0.14 and above, right?
>>> Does this include the 5.1 generation?
>>
>> I've never used tapestry-upload, but my apps run with UTF-8 out of the box
>> for a long time already (including both 5.0.18 and 5.1).
>>
>>> So can somebody please confirm the obsoleteness of those filter hacks!?
>>
>> Yes!
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java consultant, developer, and instructor
>> http://www.arsmachina.com.br/thiago
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>
> Christian Edward Gruber
> christianedwardgru...@gmail.com
> http://www.geekinasuit.com/
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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



Re: [wiki T5 howtos] Utf8 filter hints obsolete?

2009-04-27 Thread Christian Edward Gruber
I had some problems with UTF-8 characters in forms without them, but  
that was around 5.0.14, and I can't remember if they were fixed  
after.  I'll re-test vanilla.  But it wasn't just about uploads.


Christian

On Apr 27, 2009, at 7:52 PM, Thiago H. de Paula Figueiredo wrote:

Em Mon, 27 Apr 2009 12:32:32 -0300, Christoph Lechleitner > escreveu:



Hello everyone.


Hi!


But if I understand these issues ...
https://issues.apache.org/jira/browse/TAPESTRY-2537
https://issues.apache.org/jira/browse/TAPESTRY-2543
... correctly, those filter hacks should be totally obsolete in  
Tapestry

5.0.14 and above, right?
Does this include the 5.1 generation?


I've never used tapestry-upload, but my apps run with UTF-8 out of  
the box for a long time already (including both 5.0.18 and 5.1).


So can somebody please confirm the obsoleteness of those filter  
hacks!?


Yes!

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Christian Edward Gruber
christianedwardgru...@gmail.com
http://www.geekinasuit.com/


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



Re: [wiki T5 howtos] Utf8 filter hints obsolete?

2009-04-27 Thread Thiago H. de Paula Figueiredo
Em Mon, 27 Apr 2009 12:32:32 -0300, Christoph Lechleitner   
escreveu:



Hello everyone.


Hi!


But if I understand these issues ...
https://issues.apache.org/jira/browse/TAPESTRY-2537
https://issues.apache.org/jira/browse/TAPESTRY-2543
... correctly, those filter hacks should be totally obsolete in Tapestry
5.0.14 and above, right?
Does this include the 5.1 generation?


I've never used tapestry-upload, but my apps run with UTF-8 out of the box  
for a long time already (including both 5.0.18 and 5.1).



So can somebody please confirm the obsoleteness of those filter hacks!?


Yes!

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Exception while http://localhost:8080/myapp/index.pageForm

2009-04-27 Thread Thiago H. de Paula Figueiredo
Em Mon, 27 Apr 2009 12:26:31 -0300, wesleywj2   
escreveu:


that is the problem, typically when user close their browser, they will  
save  the state as index.pageForm, i don't know why. they will either  
hit the

refresh button or hit enter button on the address bar and cause this
exception to be thrown.


Have you disabled redirect-after-post?

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Getting a zone id when inside another zone

2009-04-27 Thread Joost Schouten (mailing lists)
I think there might be another problem at play here because when you
refresh your outer zone, your form and zone are both re-rendered. I
have numerous situations like this in my app which work fine. It more
sounds like the scripts passed along in the response JSON from your
outerZone are not handled correctly and thus not initializing the zone
properly. This can be due to some other javascript failing.

What is the exact behavior you are getting and what errors are occurring?

Cheers,
Joost

On Tue, Apr 28, 2009 at 3:38 AM, Hugo Palma  wrote:
> I have a template that looks something like this:
>
> 
>
> 
> 
>
> 
> 
> 
>
> The problem is figuring out the id of the innerZone in order to pass
> it to the form. Because the innerZone is itself inside a zone once the
> outerZone gets updated a new id is generated to the innerZone making
> the id i passed to the form an invalid one. I also tried something
> like:
>
> 
>
> but it doesn't work either.
> Any ideas on how i could make this work ?
> Thanks.
>
> -
> 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: TextStreamResponse - TypeError

2009-04-27 Thread Howard Lewis Ship
Yes, the client-side logic expects a JSON response in a particular
format; this format includes the content to put into the Zone, but
also JavaScript libraries to include, and JavaScript to execute after
the content is loaded ... and in 5.1 it may also include updates for
other zones.

But a  in your template with the desired text, @Inject the
Block into your page, and return the Block.

Alternately, you can return a JSONObject as the response, but you'd
need to know the Tapestry format expected by the client.

Another alternative: don't use the zone parameter of ActionLink, but
provide your own JS to send the request and interpret the response,
and update the Zone on the client side.

On Mon, Apr 27, 2009 at 2:12 PM, Geoffrey Wiseman
 wrote:
> Probably something really basic that I'm missing here -- I'm hoping one of
> you already knows the answer.  This is my first time trying
> TextStreamResponse for an ajax action link.
>
> The .tml has bits like this:
>        
>
>        
>             t:id="invite" context="${item.id}"
> zone="actionResults">invite
>        
>
> And the .java has this:
>    public StreamResponse onActionFromInvite( EventContext context ) {
>        return new TextStreamResponse("text/html","Action taken.");
>    }
>
> And I'm getting:
> Client exception processing response: TypeError: reply is null
>
> Anything leap out as obviously wrong, or am I going to have to diagnose
> further?
>
>  - Geoffrey
> --
> Geoffrey Wiseman
> http://www.geoffreywiseman.ca/
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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



TextStreamResponse - TypeError

2009-04-27 Thread Geoffrey Wiseman
Probably something really basic that I'm missing here -- I'm hoping one of
you already knows the answer.  This is my first time trying
TextStreamResponse for an ajax action link.

The .tml has bits like this:



invite


And the .java has this:
public StreamResponse onActionFromInvite( EventContext context ) {
return new TextStreamResponse("text/html","Action taken.");
}

And I'm getting:
Client exception processing response: TypeError: reply is null

Anything leap out as obviously wrong, or am I going to have to diagnose
further?

  - Geoffrey
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/


Re: Exceptions during registry startup

2009-04-27 Thread Howard Lewis Ship
Which version of T5?  I had thought that it would report problems at
startup a bit better.

Can you use the debugger to catch the NPE?  If so, add an issue with
the stack trace to the NPE and I'll make sure it gets reported better.

On Fri, Apr 24, 2009 at 3:24 AM, Alfie Kirkpatrick
 wrote:
> Hi, I am staring at an error in my log:
>
>
>
> 11:02:22.617 [main] ERROR o.a.t.i.s.T.RegistryStartup - An exception
> occurred during startup: java.lang.NullPointerException
>
>
>
> While this is undoubtedly the result of some very poor code on my part,
> the log doesn't really help me locate it!
>
>
>
> Is there a way to a) tell Tapestry to give the full stack trace, b) ask
> Tapestry to behave more strictly in this scenario, eg. by failing to
> load the entire app. At the moment this failure might only be exposed by
> a page buried deep in the site and might not be discovered until a long
> time after the error occurred, making it hard to track down.
>
>
>
> Trawled the list on this and didn't find anything so sorry if this has
> been covered already.
>
>
>
> Regards, Alfie.
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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



Re: tapestry5 on google appengine exception

2009-04-27 Thread ஸ்ரீராம் கீர்த்தி
Hedinges,
I did it this way.

(1) Create a google app engine application using the eclipse plugin
(2) Add tapestry-core, annotations, ioc, sl4j, log4j and all needed jars to
the war/WEB-INF/lib folder
(3) Write your tapestry helloworld program as you like (make sure you
changed the web.xml to include tapestry filter)

The above steps are common and you would have done it as well. Now if you
run this application now as a google web application (run as/debug as>google
web application), you will get the error that you posted.

Instead use jetty launcher and configure the webapp folder path to your
'war' folder path... now launch your app in jetty and everything will work
fine. Since it is still a google app engine project in eclipse, you can use
the eclipse plugin to upload it to your.appspot.com

- keerthy

On Sun, Apr 26, 2009 at 9:20 PM, hedinges  wrote:

>
> Are there any updates about this error?
>
> I am also trying to setup tapestry 5.0.18 on GAE but I am stuck with the
> same error.
>
>
> java.lang.NoClassDefFoundError:
> org/apache/tapestry5/corelib/components/Loop$1
>at
> org.apache.tapestry5.corelib.components.Loop.(Loop.java:42)
>at
> $Instantiator_120e316a405.newInstance($Instantiator_120e316a405.java)
>at
>
> org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.(InternalComponentResourcesImpl.java:85)
>at
>
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.(ComponentPageElementImpl.java:589)
>at
>
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.newChild(ComponentPageElementImpl.java:523)
>
> .
>
> Caused by: javassist.NotFoundException:
> org.apache.tapestry5.corelib.components.Loop$1
>at javassist.ClassPool.get(ClassPool.java:436)
>at
>
> org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:193)
> at javassist.Loader.findClass(Loader.java:340)
> ... 65 more
>
>
>
>
>
> james cai wrote:
> >
> > hi,
> >  I want to run a tapestry5 app on google appengine.but i got following
> > exception:
> >
> > HTTP ERROR: 500
> >
> > Could not initialize class org.apache.tapestry5.corelib.components.Loop
> >
> > RequestURI=/
> > Caused by:
> >
> > java.lang.NoClassDefFoundError: Could not initialize class
> > org.apache.tapestry5.corelib.components.Loop
> >   at
> $Instantiator_120893f4cc2.newInstance($Instantiator_120893f4cc2.java)
> >   at
> >
> org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.(InternalComponentResourcesImpl.java:132)
> >   at
> >
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.(ComponentPageElementImpl.java:545)
> >   at
> >
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.newChild(ComponentPageElementImpl.java:627)
> >   at
> >
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleEmbeddedComponent(ComponentAssemblerImpl.java:132)
> >   at
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:954)
> >   at
> >
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.runActions(ComponentAssemblerImpl.java:193)
> >   at
> >
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleEmbeddedComponent(ComponentAssemblerImpl.java:145)
> >   at
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:954)
> >   at
> >
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.runActions(ComponentAssemblerImpl.java:193)
> >   at
> >
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:88)
> >   at
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:159)
> >   at $PageLoader_120893f4c9e.loadPage($PageLoader_120893f4c9e.java)
> >   at
> >
> org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210)
> >   at
> >
> org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99)
> >   at $PagePool_120893f4c9d.checkout($PagePool_120893f4c9d.java)
> >   at
> >
> org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51)
> >   at
> $RequestPageCache_120893f4c9c.get($RequestPageCache_120893f4c9c.java)
> >   at
> $RequestPageCache_120893f4c95.get($RequestPageCache_120893f4c95.java)
> >   at
> >
> org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:69)
> >   at
> >
> $RequestExceptionHandler_120893f4c7f.handleRequestException($RequestExceptionHandler_120893f4c7f.java)
> >   at
> >
> org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42)
> >   at
> $RequestHandler_120893f4c82.service($RequestHandler_120893f4c82.java)
> >   at
> >
> org.apache.tapestry5.services.Tapest

RE: T5.1 Property Expressions

2009-04-27 Thread Blower, Andy
Congratulations, you have raised the "JIRA Issue of the Beast" as a duplicate 
of Tap5-663 which I entered last week. ;-)

Well that's an easy way round the 666 superstition, just mark as a dup and 
close...

> -Original Message-
> From: Howard Lewis Ship [mailto:hls...@gmail.com]
> Sent: 27 April 2009 17:29
> To: Tapestry users
> Subject: Re: T5.1 Property Expressions
> 
> Congratulations, you have The JIRA Issue Of The Beast:
> 
> https://issues.apache.org/jira/browse/TAP5-666
> 
> 
> On Thu, Apr 23, 2009 at 10:37 AM, Andy Blower
>  wrote:
> >
> > I just tried out the new T5.1 property expressions for the first time
> and got
> > an error. I'm trying to replace this:
> >
> > ${linkTitle}
> >
> > public String getLinkTitle() {
> >        return getTitle(false);
> > }
> >
> > With this:
> >
> > ${getTitle(false)}
> >
> >
> > Which I should be able to do according to the Grammar as far as I can
> see,
> > since but I get this error when I try it:
> >
> > Caused by:
> > org.apache.tapestry5.internal.services.PropertyExpressionException:
> Node
> > false (within expression 'getTitle(false)') was type FALSE, but was
> expected
> > to be (one of) DECIMAL, DEREF, IDENTIFIER, INTEGER, INVOKE, LIST,
> SAFEDEREF,
> > STRING.
> >        at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
> tyConduitBuilder.unexpectedNodeType(PropertyConduitSourceImpl.java:925)
> >        at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
> tyConduitBuilder.subexpression(PropertyConduitSourceImpl.java:637)
> >        at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
> tyConduitBuilder.createMethodInvocation(PropertyConduitSourceImpl.java:
> 756)
> >        at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
> tyConduitBuilder.createMethodInvocation(PropertyConduitSourceImpl.java:
> 730)
> >        at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
> tyConduitBuilder.createGetter(PropertyConduitSourceImpl.java:711)
> >        at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
> tyConduitBuilder.createGetterAndSetter(PropertyConduitSourceImpl.java:4
> 36)
> >        at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
> tyConduitBuilder.createAccessors(PropertyConduitSourceImpl.java:419)
> >        at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$Proper
> tyConduitBuilder.createInstance(PropertyConduitSourceImpl.java:272)
> >        at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.build(
> PropertyConduitSourceImpl.java:1206)
> >        at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.create
> (PropertyConduitSourceImpl.java:1081)
> >        at
> >
> $PropertyConduitSource_120d3f0182d.create($PropertyConduitSource_120d3f
> 0182d.java)
> >        at
> >
> org.apache.tapestry5.internal.bindings.PropBindingFactory.newBinding(Pr
> opBindingFactory.java:49)
> >        at
> $BindingFactory_120d3f0182e.newBinding($BindingFactory_120d3f0182e.java
> )
> >        at
> $BindingFactory_120d3f01826.newBinding($BindingFactory_120d3f01826.java
> )
> >        at
> >
> org.apache.tapestry5.internal.services.BindingSourceImpl.newBinding(Bin
> dingSourceImpl.java:81)
> >        ... 107 more
> >
> >
> > --
> > View this message in context: http://www.nabble.com/T5.1-Property-
> Expressions-tp23197478p23197478.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
> >
> >
> 
> 
> 
> --
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> Director of Open Source Technology at Formos
> 
> -
> 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.1 Property Expressions

2009-04-27 Thread Michael Prescott
Reminds me of some washroom graffiti I saw, reading:

668 - the neighbour of the beast

On Mon, Apr 27, 2009 at 12:28 PM, Howard Lewis Ship wrote:

> Congratulations, you have The JIRA Issue Of The Beast:
>
> https://issues.apache.org/jira/browse/TAP5-666
>
>
> On Thu, Apr 23, 2009 at 10:37 AM, Andy Blower
>  wrote:
> >
> > I just tried out the new T5.1 property expressions for the first time and
> got
> > an error. I’m trying to replace this:
> >
> > ${linkTitle}
> >
> > public String getLinkTitle() {
> >return getTitle(false);
> > }
> >
> > With this:
> >
> > ${getTitle(false)}
> >
> >
> > Which I should be able to do according to the Grammar as far as I can
> see,
> > since but I get this error when I try it:
> >
> > Caused by:
> > org.apache.tapestry5.internal.services.PropertyExpressionException: Node
> > false (within expression 'getTitle(false)') was type FALSE, but was
> expected
> > to be (one of) DECIMAL, DEREF, IDENTIFIER, INTEGER, INVOKE, LIST,
> SAFEDEREF,
> > STRING.
> >at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.unexpectedNodeType(PropertyConduitSourceImpl.java:925)
> >at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.subexpression(PropertyConduitSourceImpl.java:637)
> >at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createMethodInvocation(PropertyConduitSourceImpl.java:756)
> >at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createMethodInvocation(PropertyConduitSourceImpl.java:730)
> >at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createGetter(PropertyConduitSourceImpl.java:711)
> >at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createGetterAndSetter(PropertyConduitSourceImpl.java:436)
> >at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createAccessors(PropertyConduitSourceImpl.java:419)
> >at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createInstance(PropertyConduitSourceImpl.java:272)
> >at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.build(PropertyConduitSourceImpl.java:1206)
> >at
> >
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.create(PropertyConduitSourceImpl.java:1081)
> >at
> >
> $PropertyConduitSource_120d3f0182d.create($PropertyConduitSource_120d3f0182d.java)
> >at
> >
> org.apache.tapestry5.internal.bindings.PropBindingFactory.newBinding(PropBindingFactory.java:49)
> >at
> $BindingFactory_120d3f0182e.newBinding($BindingFactory_120d3f0182e.java)
> >at
> $BindingFactory_120d3f01826.newBinding($BindingFactory_120d3f01826.java)
> >at
> >
> org.apache.tapestry5.internal.services.BindingSourceImpl.newBinding(BindingSourceImpl.java:81)
> >... 107 more
> >
> >
> > --
> > View this message in context:
> http://www.nabble.com/T5.1-Property-Expressions-tp23197478p23197478.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
> >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
> Director of Open Source Technology at Formos
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5.1 Property Expressions

2009-04-27 Thread Howard Lewis Ship
Congratulations, you have The JIRA Issue Of The Beast:

https://issues.apache.org/jira/browse/TAP5-666


On Thu, Apr 23, 2009 at 10:37 AM, Andy Blower
 wrote:
>
> I just tried out the new T5.1 property expressions for the first time and got
> an error. I’m trying to replace this:
>
> ${linkTitle}
>
> public String getLinkTitle() {
>        return getTitle(false);
> }
>
> With this:
>
> ${getTitle(false)}
>
>
> Which I should be able to do according to the Grammar as far as I can see,
> since but I get this error when I try it:
>
> Caused by:
> org.apache.tapestry5.internal.services.PropertyExpressionException: Node
> false (within expression 'getTitle(false)') was type FALSE, but was expected
> to be (one of) DECIMAL, DEREF, IDENTIFIER, INTEGER, INVOKE, LIST, SAFEDEREF,
> STRING.
>        at
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.unexpectedNodeType(PropertyConduitSourceImpl.java:925)
>        at
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.subexpression(PropertyConduitSourceImpl.java:637)
>        at
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createMethodInvocation(PropertyConduitSourceImpl.java:756)
>        at
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createMethodInvocation(PropertyConduitSourceImpl.java:730)
>        at
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createGetter(PropertyConduitSourceImpl.java:711)
>        at
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createGetterAndSetter(PropertyConduitSourceImpl.java:436)
>        at
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createAccessors(PropertyConduitSourceImpl.java:419)
>        at
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createInstance(PropertyConduitSourceImpl.java:272)
>        at
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.build(PropertyConduitSourceImpl.java:1206)
>        at
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.create(PropertyConduitSourceImpl.java:1081)
>        at
> $PropertyConduitSource_120d3f0182d.create($PropertyConduitSource_120d3f0182d.java)
>        at
> org.apache.tapestry5.internal.bindings.PropBindingFactory.newBinding(PropBindingFactory.java:49)
>        at 
> $BindingFactory_120d3f0182e.newBinding($BindingFactory_120d3f0182e.java)
>        at 
> $BindingFactory_120d3f01826.newBinding($BindingFactory_120d3f01826.java)
>        at
> org.apache.tapestry5.internal.services.BindingSourceImpl.newBinding(BindingSourceImpl.java:81)
>        ... 107 more
>
>
> --
> View this message in context: 
> http://www.nabble.com/T5.1-Property-Expressions-tp23197478p23197478.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
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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



Re: Tapestry upgrade

2009-04-27 Thread Howard Lewis Ship
I believe Jesse did considerable work to OGNL (to speed it up, using
bytecode manipulation) between the two releases.

The conflict between two overloadings of getMessage() is a problem.
OGNL simply doesn't have syntax to let you select which of the two you
want to invoke, and it looks like its invoking the "wrong" one.

I would change the name of the new method, say to "retrieveMessage()"
or "resolveMessage()".

On Mon, Apr 27, 2009 at 9:03 AM,   wrote:
> Hi
>
> I’m trying to upgrade from tapestry 4.0.2 to 4.1.6 and am seeing some strange 
> behaviour.
>
> Basically we have our own implementation of org.apache.hivemind.Messages 
> which extends org.apache.hivemind.impl.AbstractMessages now in our 
> implementation we have a method called 
> getMessage(org.springframework.context.MessageSourceResolvable key) and in 
> our tapestry pages we’re using 
> ognl:messages.getMessage(request.getAttribute(‘message’)) which worked fine 
> in 4.0.2 because ognl called the 
> .apache.hivemind.impl.AbstractMessages.getMessage(String key) which is what 
> we want but in 4.1.6 it’s trying to convert the String 
> ‘welcome.problem.session.expired’ into 
> org.springframework.context.MessageSourceResolvable. I guess because it’s 
> trying to call getMessage(org.springframework.context.MessageSourceResolvable 
> key) in our implementation.
>
> I also have the same problem with a component of ours that has a parameter 
> named key to which we pass in ‘literal:welcome.username’ and in the component 
> we call messages.getMessage(key) which results in the same error. ‘Unable to 
> read OGNL expression: Unable to convert type java.lang.String of 
> welcome.username to type of 
> org.springframework.context.MessageSourceResolvable’. I’m a little confused 
> as to why it doesn’t call the correct method with the String parameter.
>
> However if I call messages.getMessage(‘welcome.username’) hard coding the 
> msgkey it works fine.
>
> Does that mean that in the new ognl/tapestry implementation we cannot pass a 
> component parameter/object(which is String) to an overloaded method?
>
> Any advice on how to rectify this would be greatly appreciated.
>
> Regards
>
> Howard Kelsey
>
>
>
> --
> This email and any files transmitted with it are confidential and proprietary 
> to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received 
> in error, use is prohibited. Please destroy, and notify sender. Sender does 
> not waive confidentiality or privilege. Internet communications cannot be 
> guaranteed to be timely, secure, error or virus-free. Algorithmics does not 
> accept liability for any errors or omissions. Any commitment intended to bind 
> Algorithmics must be reduced to writing and signed by an authorized signatory.
> --
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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



Tapestry upgrade

2009-04-27 Thread Howard.Kelsey
Hi 

I’m trying to upgrade from tapestry 4.0.2 to 4.1.6 and am seeing some strange 
behaviour. 

Basically we have our own implementation of org.apache.hivemind.Messages which 
extends org.apache.hivemind.impl.AbstractMessages now in our implementation we 
have a method called 
getMessage(org.springframework.context.MessageSourceResolvable key) and in our 
tapestry pages we’re using 
ognl:messages.getMessage(request.getAttribute(‘message’)) which worked fine in 
4.0.2 because ognl called the 
.apache.hivemind.impl.AbstractMessages.getMessage(String key) which is what we 
want but in 4.1.6 it’s trying to convert the String 
‘welcome.problem.session.expired’ into 
org.springframework.context.MessageSourceResolvable. I guess because it’s 
trying to call getMessage(org.springframework.context.MessageSourceResolvable 
key) in our implementation. 

I also have the same problem with a component of ours that has a parameter 
named key to which we pass in ‘literal:welcome.username’ and in the component 
we call messages.getMessage(key) which results in the same error. ‘Unable to 
read OGNL expression: Unable to convert type java.lang.String of 
welcome.username to type of 
org.springframework.context.MessageSourceResolvable’. I’m a little confused as 
to why it doesn’t call the correct method with the String parameter.

However if I call messages.getMessage(‘welcome.username’) hard coding the 
msgkey it works fine. 

Does that mean that in the new ognl/tapestry implementation we cannot pass a 
component parameter/object(which is String) to an overloaded method?

Any advice on how to rectify this would be greatly appreciated.

Regards 

Howard Kelsey


 
--
This email and any files transmitted with it are confidential and proprietary 
to Algorithmics Incorporated and its affiliates ("Algorithmics"). If received 
in error, use is prohibited. Please destroy, and notify sender. Sender does not 
waive confidentiality or privilege. Internet communications cannot be 
guaranteed to be timely, secure, error or virus-free. Algorithmics does not 
accept liability for any errors or omissions. Any commitment intended to bind 
Algorithmics must be reduced to writing and signed by an authorized signatory.
--


Re: Fix for TAP5-624, Support for javascript callbacks on zone update

2009-04-27 Thread Hugo Palma
I agree. The most common use case where i've missed this feature is
for handling different results that can come from some server side
execution.
With the current fix i would have to parse the returned JSON on the
client side and code all logic there.

If addScript() support was added to XHR requests i could implement
this logic on the page class where it makes sense.

On Fri, Apr 24, 2009 at 2:09 PM, Blower, Andy
 wrote:
> Having just updated our app to use T5.1.0.4, I checked out the changes made 
> for TAP5-624 to support javascript callbacks on a zone update. I'm a bit 
> surprised at the solution for this which is to fire a client side event. I 
> thought that it would have used the JSON object returned for partial page 
> renders which already has a script: element, allowing addScript() or 
> something similar to be used.
>
> Is there a reason that this isn't possible or isn't a good idea? It seemed an 
> obvious thing to me since the facility is already there but just needs 
> exposing to users.
>

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



Getting a zone id when inside another zone

2009-04-27 Thread Hugo Palma
I have a template that looks something like this:










The problem is figuring out the id of the innerZone in order to pass
it to the form. Because the innerZone is itself inside a zone once the
outerZone gets updated a new id is generated to the innerZone making
the id i passed to the form an invalid one. I also tried something
like:



but it doesn't work either.
Any ideas on how i could make this work ?
Thanks.

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



Re: tapestry5 on google appengine exception

2009-04-27 Thread Jun Tsai
You can deploy on appspot.woks fine.

2009/4/26 hedinges 

>
> Are there any updates about this error?
>
> I am also trying to setup tapestry 5.0.18 on GAE but I am stuck with the
> same error.
>
>
> java.lang.NoClassDefFoundError:
> org/apache/tapestry5/corelib/components/Loop$1
>at
> org.apache.tapestry5.corelib.components.Loop.(Loop.java:42)
>at
> $Instantiator_120e316a405.newInstance($Instantiator_120e316a405.java)
>at
>
> org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.(InternalComponentResourcesImpl.java:85)
>at
>
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.(ComponentPageElementImpl.java:589)
>at
>
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.newChild(ComponentPageElementImpl.java:523)
>
> .
>
> Caused by: javassist.NotFoundException:
> org.apache.tapestry5.corelib.components.Loop$1
>at javassist.ClassPool.get(ClassPool.java:436)
>at
>
> org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:193)
> at javassist.Loader.findClass(Loader.java:340)
> ... 65 more
>
>
>
>
>
> james cai wrote:
> >
> > hi,
> >  I want to run a tapestry5 app on google appengine.but i got following
> > exception:
> >
> > HTTP ERROR: 500
> >
> > Could not initialize class org.apache.tapestry5.corelib.components.Loop
> >
> > RequestURI=/
> > Caused by:
> >
> > java.lang.NoClassDefFoundError: Could not initialize class
> > org.apache.tapestry5.corelib.components.Loop
> >   at
> $Instantiator_120893f4cc2.newInstance($Instantiator_120893f4cc2.java)
> >   at
> >
> org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.(InternalComponentResourcesImpl.java:132)
> >   at
> >
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.(ComponentPageElementImpl.java:545)
> >   at
> >
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.newChild(ComponentPageElementImpl.java:627)
> >   at
> >
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleEmbeddedComponent(ComponentAssemblerImpl.java:132)
> >   at
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:954)
> >   at
> >
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.runActions(ComponentAssemblerImpl.java:193)
> >   at
> >
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleEmbeddedComponent(ComponentAssemblerImpl.java:145)
> >   at
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:954)
> >   at
> >
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.runActions(ComponentAssemblerImpl.java:193)
> >   at
> >
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:88)
> >   at
> >
> org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:159)
> >   at $PageLoader_120893f4c9e.loadPage($PageLoader_120893f4c9e.java)
> >   at
> >
> org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210)
> >   at
> >
> org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:99)
> >   at $PagePool_120893f4c9d.checkout($PagePool_120893f4c9d.java)
> >   at
> >
> org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51)
> >   at
> $RequestPageCache_120893f4c9c.get($RequestPageCache_120893f4c9c.java)
> >   at
> $RequestPageCache_120893f4c95.get($RequestPageCache_120893f4c95.java)
> >   at
> >
> org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:69)
> >   at
> >
> $RequestExceptionHandler_120893f4c7f.handleRequestException($RequestExceptionHandler_120893f4c7f.java)
> >   at
> >
> org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42)
> >   at
> $RequestHandler_120893f4c82.service($RequestHandler_120893f4c82.java)
> >   at
> >
> org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:782)
> >   at
> $RequestHandler_120893f4c82.service($RequestHandler_120893f4c82.java)
> >   at
> >
> org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:771)
> >   at
> $RequestHandler_120893f4c82.service($RequestHandler_120893f4c82.java)
> >   at
> >
> org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> >   at
> $RequestHandler_120893f4c82.service($RequestHandler_120893f4c82.java)
> >   at
> >
> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> >   at
> >
> org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> >   at
> >
> org.apache.tapestry5.ioc.internal.util.Co

[wiki T5 howtos] Utf8 filter hints obsolete?

2009-04-27 Thread Christoph Lechleitner
Hello everyone.

I am evaluating T5[.1] as one possible direction to go after T4.
Unfortunately the state of the "documentation" still is quite an
argument against Tapestry.
Well, to help fixing that everlasting flaw:

The wiki page ...
http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding
... suggests some filters to avoid (Utf8) encoding problems, especially
with forms using file upload fields resp. tapestry-upload.

But if I understand these issues ...
https://issues.apache.org/jira/browse/TAPESTRY-2537
https://issues.apache.org/jira/browse/TAPESTRY-2543
... correctly, those filter hacks should be totally obsolete in Tapestry
5.0.14 and above, right?
Does this include the 5.1 generation?

If so, I am going to put an according remark in the wiki page myself,
but not unless I can be 100% sure.

So can somebody please confirm the obsoleteness of those filter hacks!?

Regards,

Christoph



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



Re: Exception while http://localhost:8080/myapp/index.pageForm

2009-04-27 Thread wesleywj2

that is the problem, typically when user close their browser, they will save
the state as index.pageForm, i don't know why. they will either hit the
refresh button or hit enter button on the address bar and cause this
exception to be thrown. what's really uneasy is the exception shows up all
the app server information. i know i can turn the app to production mode,
but it just doesn't look nice. is there any way to throw custom exception
page when it hits this error?

please advice,
wesley



Onno Scheffers-3 wrote:
> 
> You should type the url of your page in the browser and not the url of
> your
> component:
> http://localhost:8080/myapp/index
> 
> Typing an URL in the browser typically causes a GET-request instead of a
> POST-request. The form-component is part of the page and will
> automatically
> POST its query-parameters to http://localhost:8080/myapp/index.pageForm
> when
> the form is submitted in the browser.
> 
> 
> - Onno
> 
> 
> 
> On Mon, Apr 27, 2009 at 11:03 AM, wesleywj2  wrote:
> 
>>
>> hi,
>>
>> when i type this url in my browser and hit enter,
>> http://localhost:8080/myapp/index.pageForm
>> it throws "Forms require that the request method be POST and that the
>> t:formdata query parameter have values." exception. index is my
>> first/login
>> page, where pageForm is the id of my form. why it throws error? anyway to
>> intercept it? and show other page other than the standard exception page?
>>
>> please advice,
>> wesley
>> --
>> View this message in context:
>> http://www.nabble.com/Exception-while-http%3A--localhost%3A8080-myapp-index.pageForm-tp23252483p23252483.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
>>
>>
> 
> 
> -- 
> *
> Winston
> Churchill
> - "The best argument against democracy is a five-minute conversation
> with
> the average voter."
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Exception-while-http%3A--localhost%3A8080-myapp-index.pageForm-tp23252483p23258838.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: HTTP Streaming (Ajax) / Comet Integration

2009-04-27 Thread Peter Stavrinides
Comet is still a very hacky technology stack with no solid / mature 
infrastructure let alone standards, though HTML 5 will change that. If this 
doesn't bother you then Jetty and Tomcat both have built in Comet support, 
though be forewarned that using a reverse proxy has issues and Comet misused 
has the potential to bring a web server to its knees.

I am using DWR, a decent JavaScript and Comet framework. DWR attempts to 
compensate somewhat for the fact that web servers are not entirely ready for 
Comet. If you use Apache in front ->mod_jk (or AJP) to Tomcat, then possibly 
avoid comet (see: http://www.mbaworld.com/docs/aio.html). If you intend to use 
standalone Jetty or Tomcat with APR or Nio connector then DWR is worthwhile, I 
found this out the hard way.

Peter



- Original Message -
From: superoverdr...@gmx.de
To: users@tapestry.apache.org
Sent: Sunday, 26 April, 2009 14:41:08 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: HTTP Streaming (Ajax) / Comet Integration

What about supporting Comet (http://en.wikipedia.org/wiki/Comet_(programming)) 
in Tapestry5 ?

If you use lots of Ajax on a website, this can slow down everything 
tremendously...therefore a Comet HTTP Streaming Server that does not disconnect 
will support lots of simulataneous connections on a single server.

Has anyone any experience on Comet in combination with Tapestry5?

Thanks!

Toby


-
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: Fix for TAP5-624, Support for javascript callbacks on zone update

2009-04-27 Thread Blower, Andy
Anyone have an opinion on this? (just wondering if it got lost among the 
Tapestry is beautiful discussion... ;-)

> -Original Message-
> From: Blower, Andy [mailto:andy.blo...@proquest.co.uk]
> Sent: 24 April 2009 14:09
> To: 'Tapestry users'
> Subject: Fix for TAP5-624, Support for javascript callbacks on zone
> update
> 
> Having just updated our app to use T5.1.0.4, I checked out the changes
> made for TAP5-624 to support javascript callbacks on a zone update. I'm
> a bit surprised at the solution for this which is to fire a client side
> event. I thought that it would have used the JSON object returned for
> partial page renders which already has a script: element, allowing
> addScript() or something similar to be used.
> 
> Is there a reason that this isn't possible or isn't a good idea? It
> seemed an obvious thing to me since the facility is already there but
> just needs exposing to users.


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



Re: Exception while http://localhost:8080/myapp/index.pageForm

2009-04-27 Thread Onno Scheffers
You should type the url of your page in the browser and not the url of your
component: 
http://localhost:8080/myapp/index

Typing an URL in the browser typically causes a GET-request instead of a
POST-request. The form-component is part of the page and will automatically
POST its query-parameters to http://localhost:8080/myapp/index.pageForm when
the form is submitted in the browser.


- Onno



On Mon, Apr 27, 2009 at 11:03 AM, wesleywj2  wrote:

>
> hi,
>
> when i type this url in my browser and hit enter,
> http://localhost:8080/myapp/index.pageForm
> it throws "Forms require that the request method be POST and that the
> t:formdata query parameter have values." exception. index is my first/login
> page, where pageForm is the id of my form. why it throws error? anyway to
> intercept it? and show other page other than the standard exception page?
>
> please advice,
> wesley
> --
> View this message in context:
> http://www.nabble.com/Exception-while-http%3A--localhost%3A8080-myapp-index.pageForm-tp23252483p23252483.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
>
>


-- 
*
Winston 
Churchill
- "The best argument against democracy is a five-minute conversation
with
the average voter."


Exception while http://localhost:8080/myapp/index.pageForm

2009-04-27 Thread wesleywj2

hi,

when i type this url in my browser and hit enter,
http://localhost:8080/myapp/index.pageForm
it throws "Forms require that the request method be POST and that the
t:formdata query parameter have values." exception. index is my first/login
page, where pageForm is the id of my form. why it throws error? anyway to
intercept it? and show other page other than the standard exception page?

please advice,
wesley
-- 
View this message in context: 
http://www.nabble.com/Exception-while-http%3A--localhost%3A8080-myapp-index.pageForm-tp23252483p23252483.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: Web framework evaluation - What is beautiful in Tapestry?

2009-04-27 Thread Kristian Marinkovic
what i like most:

- the tapestry ioc container

- component development: it is so easy to create components
even complex ones. JSF needs at least 5-6 artifacts (java, xml, jsp) 
to create a component. T5 apps tend to have more component
reuse and a reduced amount of duplicate gui code (jsf 2.0 is getting
better here as well)

- it is easy to learn: i trained our developers (from novice to 
experienced
java developers) and it took them just about 2-3 days to become 
productive.
although its quite hard to find the right explanation from the docs.

- you can change almost every aspect of the framework and adapt it 
to your needs as much as you need it. 







Christian Edward Gruber  
26.04.2009 18:32
Bitte antworten an
"Tapestry users" 


An
"Tapestry users" 
Kopie

Thema
Re: Web framework evaluation - What is beautiful in Tapestry?







Just for the record, component-oriented MVC is much more consistent 
with the SmallTalk-style MVC, so in some ways it is more "pure".  The 
"model 1" and "model 2" MVC that such systems as Struts implement are 
actually "page-at-a-time" and therefore are much less flexible.

Christian.

On 26-Apr-09, at 11:53 , Otho wrote:

> Another great point is the component orientation which makes for a 
> much more natural flow of coding compared to pure MVC.

Christian Edward Gruber
e-mail: christianedwardgru...@gmail.com
weblog: http://www.geekinasuit.com/


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




Re: Web framework evaluation - What is beautiful in Tapestry?

2009-04-27 Thread Otho
These were the ones I meant of course. I have admittedly not the slightest
idea about smalltalk beside the fact that it exists.

2009/4/26 Christian Edward Gruber 

> Just for the record, component-oriented MVC is much more consistent with
> the SmallTalk-style MVC, so in some ways it is more "pure".  The "model 1"
> and "model 2" MVC that such systems as Struts implement are actually
> "page-at-a-time" and therefore are much less flexible.
>
> Christian.
>
> On 26-Apr-09, at 11:53 , Otho wrote:
>
>  Another great point is the component orientation which makes for a much
>> more natural flow of coding compared to pure MVC.
>>
>
> Christian Edward Gruber
> e-mail: christianedwardgru...@gmail.com
> weblog: http://www.geekinasuit.com/
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>