• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Tapestry Question

 
Bartender
Posts: 1973
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm trying to get a "simple" connection working between a Dao class and returning the List back to the HTML so I can display it.

I have the following component id defined:

<component id="eachEntry" value="For">
// bindings here
</component>

However, when Tapestry parses this, I get an "Unexpected component within page-specification" error.

Working though the example in Chapter 7 of "Enjoying web development with Tapestry" yields no such error.

Any ideas or suggestions would be greatly appreciated.

Tapestry is confusing how it "connects" the html to the Java file especially with all the abstract definitions and the things going on behind the scenes. A bit opaque.

Thanks.

mike
 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Working though the example in Chapter 7 of "Enjoying web development with Tapestry" yields no such error.


Probably because you are missing the page specification file (.page) where you specify the type of the component. But you could as well do

<component id="eachEntry@For" value="For">



Tapestry is confusing how it "connects" the html to the Java file especially with all the abstract definitions and the things going on behind the scenes. A bit opaque.



Give Apache Wicket a try - you might be pleasantly surprised. It borrows couple of good ideas from Tapestry while adding its own and offers a nice programming model. So you will be fine + none of the tapestry magic that leaves you confused exists !
 
author
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or maybe try Tapestry 5 - there are no XML page descriptors there, no abstract methods anymore. Tapestry 4 required a kind of special frame of mind: once you understood the trick with abstract methods, everything was easy.
Tapestry 5 streamlines a lot of things and makes them much easier and more natural.
It is also extremely easy to create a skeleton project with it - just one Maven command. And then you can get this project into Eclipse or NetBeans and extend it as you like.
 
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic