Re: [ANNOUNCEMENT] New Tapestry 5 book

2009-11-12 Thread Nikolaos Konstantinou
Same here, I would gladly buy a book about Tapestry in English.

On Thu, Nov 12, 2009 at 12:47 PM, Blower, Andy
andy.blo...@proquest.co.ukwrote:

 +3 (at least)

  -Original Message-
  From: Peter Stavrinides [mailto:p.stavrini...@albourne.com]
  Sent: 12 November 2009 09:15
  To: Tapestry users
  Subject: Re: [ANNOUNCEMENT] New Tapestry 5 book
 
  +1
 
 
  - Original Message -
  From: Ivano Luberti lube...@archicoop.it
  To: Tapestry users users@tapestry.apache.org
  Sent: Thursday, 12 November, 2009 10:21:35 GMT +02:00 Athens, Beirut,
  Bucharest, Istanbul
  Subject: Re: [ANNOUNCEMENT] New Tapestry 5 book
 
  +1
  If you need something signed with blood, drop me a copy of the document
  :-D
 
 
  Igor Drobiazko ha scritto:
   Good news. My publisher made the first step towards the translation.
  They
   contacted several publishers outside Germany to find one that is
  interested
   in translation. If some of them is interested then we will have the
  english
   version of the book.
  
   If you want to help me to make the translation possible make some
  noise
   here. The more comments here the more likely we will have a
  translation.
   I'll keep you informed about the progress.
  
   On Wed, Sep 16, 2009 at 7:28 PM, Igor Drobiazko
  igor.drobia...@gmail.comwrote:
  
  
   Hello folks,
  
   I am pleased to announce a new Tapestry 5 book. The book is written
  in
   German and is available as eBook on publisher's website:
  
  
   http://www.addison-
  wesley.de/main/main.asp?page=home/bookdetailsProductID=174975
  
  
   The hardcover version of the book will be available starting from
  Sep 28
   2009.
   I'll make another announcement when the hardcover version is
  released.
  
   Among other things the book covers :
  * Getting Started with Tapestry 5
  * Concepts of the framework
  * Localization/internationalization
  * Creating Forms
  * Generation of user interfaces for JavaBeans
  * Writing own components and mixins
  * Ajax
  * Writing tests for Tapestry applications
  * Hibernate and Spring integration
  * Dependency Injection and Tapestry IoC
  * AOP and bytecode manipuation
  
   Special thanks go to Howard and Ulrich Stärk. Howard gave me some
  hints on
   how to write a better book and wrote a foreword.
   Ulrich was responsible for the technical review of the book and
  helped me
   to improve the quality.
  
   Enjoy
  
   --
   Best regards,
  
   Igor Drobiazko
  
  
  
  
  
  
 
  --
  ==
  dott. Ivano Mario Luberti
  Archimede Informatica societa' cooperativa a r. l.
  Sede Operativa
  Via Gereschi 36 - 56126- Pisa
  tel.: +39-050- 580959
  tel/fax: +39-050-9711344
  web: www.archicoop.it
  ==
 
 
  -
  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: T4.1.3 Form submission

2007-11-16 Thread Nikolaos Konstantinou
So, the java page is

public abstract class RegistrationPage extends BasePage implements
IExternalPage, PageBeginRenderListener {
 public abstract IRoomQuote getRoomQuote();
public abstract void setRoomQuote(IRoomQuote roomQuote);
...
public void pageBeginRender(PageEvent event) {
System.out.println(RegistrationPage);
}

public void onSelectCountrySubmit(IRequestCycle cycle) {
System.out.println(onSelectCountryubmit);
RegistrationDetailPage registrationDetailPage =
(RegistrationDetailPage) cycle.getPage(RegistrationDetail);
registrationDetailPage.setCity(London);
registrationDetailPage.setRoomQuote(getRoomQuote());
cycle.activate(registrationDetailPage);
}
...
}

The html page
...
form jwcid=[EMAIL PROTECTED]
listener=listener:onSelectCountrySubmit
delegate=ognl:beans.validationDelegate
success=listener:onSelectCountrySubmit
updateComponents=selectCountry
method=get
stateful=false
input type=hidden jwcid=@Hidden value=ognl:roomQuote/
...
Please select your country:
 select jwcid=selectCountry
 onchange=javascript:this.form.submit();
   option value=1Greece/option
   option value=2USA/option
 /select

and at the .page:

page-specification class=com.dilos.web.page.RegistrationPage
...
property name=countryModel/
  property name=country/

  component id=selectCountry type=PropertySelection
binding name=model value=countryModel/
binding name=value value=country/
  /component
...
/page-specification

The problem is that the roomQuote object is null when the listener
onSelectCountrySubmit is invoked. I see in the console that when I
change the value of the drop-down list, the form is submitted (because
of the onChange), I see first the RegistrationPage that is in the
PageBeginRender and then the listener, but then the getRoomQuote is
null. What am I doing wrong?


On Nov 16, 2007 3:00 PM, Andreas Andreou [EMAIL PROTECTED] wrote:
 Well, you must be doing something wrong... is it possible to
 show some code?


 On Nov 16, 2007 2:38 PM, nkonstantinou [EMAIL PROTECTED] wrote:
  Hi all,
 
  I'm facing this problem with T4.1.3. I have a page with a Form and I
  want to submit a value of the roomQuote object to the next page. The
  problem is that the page is reloading itself when the form is
  submitted having as a result to lose the object's (roomQuote) value.
  More specifically, I want to carry this object with me when I submit
  the form.
 
  I use a System.out.println() on the listener that is on the submit
  button of the form, and my object is null in the listener, so the
  value is lost BEFORE(?) submitting the Form. What is the best
  practice? I'm stuck!
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
 Tapestry / Tacos developer
 Open Source / JEE Consulting

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Form submission fails only after the 1st time, T4.1.3 bug?

2007-10-15 Thread Nikolaos Konstantinou
I am facing this strange behaviour if Tapestry 4.1.3:

I have a form, declared in the .page as:

  component id=quoteForm type=Form
binding name=listener value=listener:quoteSubmit/
binding name=delegate value=beans.validationDelegate/
binding name=method value='get'/
binding name=success value=listener:quoteSubmit/
  /component

In the .xhtml file, I place a PropertySelection component (model and value
are ok).
  component id=selectCountry type=PropertySelection
binding name=model value=countrySelectionModel/
binding name=value value=selectedCountryId/
  /component

The problem is that I want to submit the form when the user changes the
value of the drop-down list.
Till Tapestry 3.0 -- as far as I'm aware of -- there was a
submitOnChange=true  that worked fine.

How can this be done in Tapestry 4.1.*?
I tried writing
onchange=javascript:this.form.submit(); at the PropertySelection component


select jwcid=selectCountry onchange=javascript:this.form.submit();

but it only works once(!). What I mean is that the first time the user
selects something, everything works, the form gets submitted and the page
gets refreshed.
When I try for the second time, I get a blank screen without any debug
message and sometimes (after small modifications) the The connection to the
server was reset message! Shouldn't Tapestry produce some kind of a
warning?

The listener code is

public IPage quoteSubmit(IRequestCycle cycle) {

System.out.println(SelectedCountryId:  + getSelectedCountryId());

System.out.println(nkons Debug check QUOTE_SUBMIT  +
getSelectedSubmitComponent());
if (QUOTE_SUBMIT.equals(getSelectedSubmitComponent())) {

.
  return some_other_page;
   } else {
this.setSelectedLocationId(null);
return this;
}

The application server is jboss 4.2.1
I would appreciate any ideas


Re: Form submission fails only after the 1st time, T4.1.3 bug?

2007-10-15 Thread Nikolaos Konstantinou
Hello,

I managed to solve it. The problem was the line at the listener:
this.setSelectedLocationId(null);
that was setting the selectedLocation to null. Why I asked before was
because I was facing a behaviour without any produced messages, so I didn't
know where to begin. In the beginning of the listener I had a
System.out.println(SelectedCountryId:  + getSelectedCountryId());
that wasn't printing anything (not even a null exception).
I found the solution ad hoc after all but anyway, thanks for the quick reply

On 10/15/07, Patrick Klein [EMAIL PROTECTED] wrote:

 Hello,

 javascript: is not needed, just
 onChange=this.form.submit();

 Regards,
 Patrick
  I am facing this strange behaviour if Tapestry 4.1.3:
 
  I have a form, declared in the .page as:
 
component id=quoteForm type=Form
  binding name=listener value=listener:quoteSubmit/
  binding name=delegate value=beans.validationDelegate/
  binding name=method value='get'/
  binding name=success value=listener:quoteSubmit/
/component
 
  In the .xhtml file, I place a PropertySelection component (model and
 value
  are ok).
component id=selectCountry type=PropertySelection
  binding name=model value=countrySelectionModel/
  binding name=value value=selectedCountryId/
/component
 
  The problem is that I want to submit the form when the user changes the
  value of the drop-down list.
  Till Tapestry 3.0 -- as far as I'm aware of -- there was a
  submitOnChange=true  that worked fine.
 
  How can this be done in Tapestry 4.1.*?
  I tried writing
  onchange=javascript:this.form.submit(); at the PropertySelection
 component
 
 
  select jwcid=selectCountry onchange=javascript:this.form.submit();
 
  but it only works once(!). What I mean is that the first time the user
  selects something, everything works, the form gets submitted and the
 page
  gets refreshed.
  When I try for the second time, I get a blank screen without any debug
  message and sometimes (after small modifications) the The connection to
 the
  server was reset message! Shouldn't Tapestry produce some kind of a
  warning?
 
  The listener code is
 
  public IPage quoteSubmit(IRequestCycle cycle) {
 
  System.out.println(SelectedCountryId:  +
 getSelectedCountryId());
 
  System.out.println(nkons Debug check QUOTE_SUBMIT  +
  getSelectedSubmitComponent());
  if (QUOTE_SUBMIT.equals(getSelectedSubmitComponent())) {
  
  .
return some_other_page;
 } else {
  this.setSelectedLocationId(null);
  return this;
  }
 
  The application server is jboss 4.2.1
  I would appreciate any ideas
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Nikolaos Konstantinou
PhD Student - Research Assistant
Homepage: http://www.cn.ntua.gr/~nkons


Re: DirectLink problem

2007-10-10 Thread Nikolaos Konstantinou
Thanks for the tip, now it worked :)

Like you said, I had to assign a listener and transfer the code to the java
page. It worked but I understand there is a problem with ognl; theoretically
the previous approach should also work. Thanks a lot anyway :)

On 10/10/07, andyhot [EMAIL PROTECTED] wrote:

 Not sure why this fails - I'd also try

 parameters=ognl:{selectedCountryId, selectedLocationId == -1 ?
 otherCityId : selectedLocationId,
 checkIn == null ? null : checkIn.time, checkOut == null ? null :
 checkOut.time, adultsPerRoom}

 but I'd really go with simplifying the ognl expression of this direct
 link, i.e.
 moving the code into the java.

 PS. listener=ognl:listeners.goToLocationSearch should be updated to
 listener=listener:goToLocationSearch (faster  cleaner)

 Nikolaos Konstantinou wrote:
  I 'm having this peculiar problem with the page I'm trying to create
 (I'm
  using Tapestry 4.1.3. When the page loads, I get a Tapestry Exception
  Unable to read OGNL expression 'parsed OGNL expression' of
  [EMAIL PROTECTED]: source is null for getProperty(null,
  selectedCountryId) [context:/WEB-INF/Home.xhtml, line 130]
 
  The mystery is that the error is traced at the DirectLink component;
  Tapestry does not have any problem with the Hidden component, arising
  suspicions that the problem is not actually that selectedCountryId is
 null
  (it should have a problem with the Hidden component) but that there's
  something I'm not doing right with the DirectLink component. What could
 be
  the case?
 
  Line 96:
  form action=# jwcid=quoteForm
input type=hidden jwcid=@Hidden
  value=ognl:selectedCountryId/
 
  ...
  Line 130:
  a href=LocationSearch.xhtml
id=pickdestsearchlink
onclick='
 document.getElementById
  (pickdestsearch).checked=checked'
jwcid=@DirectLink
listener=ognl:
  listeners.goToLocationSearch
parameters=ognl:new
  java.lang.Object[] {selectedCountryId, selectedLocationId == -1 ?
  otherCityId : selectedLocationId, checkIn == null ? null : checkIn.time,
  checkOut == null ? null : checkOut.time, adultsPerRoom}
 
Search for a destinationbr/
  using keywords/a
 
 
  http://www.cn.ntua.gr/%7Enkons
 
 

 --
 Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
 Tapestry / Tacos developer
 Open Source / JEE Consulting


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Nikolaos Konstantinou
PhD Student - Research Assistant
Homepage: http://www.cn.ntua.gr/~nkons


OGNL Null Problem

2007-09-26 Thread Nikolaos Konstantinou
Hi all,

this is my first email at this list but I'll get right to the point:

My task is to upgrade a web application from Tapestry 3.0 to Tapestry 4.1.2.
The problem I encounter is that the OGNL expression :

a href=# jwcid=@ExternalLink page=ListRoomQuotes
  parameters=ognl:new java.lang.Object[] { null, '999',
  checkIn == null ? null : checkIn.time,
  checkOut == null ? null : checkOut.time,
  adultsPerRoom}

...was validated OK in Tapestry 3.0 but 4.1.2 throws a

org.apache.tapestry.BindingException: Unable to parse OGNL expression ...

After some searching I realize that OGNL version 2.6.9 needs special
handling for null values.

I need to keep the null values in OGNL because the urls produced are
filtered by apache mod_rewrite rules so a tweak like passing 'null' as a
literal wouldn't help.

I also tried ognl:{} but I still get exceptions. Any ideas?

I would sincerely appreciate any help/suggestion