Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Accessing a Hashtable by key from template

Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

This may not even be possible in Tapestry, but am hoping I'm just mangling the syntax:
[Edit: This is Tapestry5]

I'm attempting to draw a fairly complex t:grid which features a column containing a checkbox. The default values of the checkbox depend on the result of some legacy business logic, and so are not stored in the entity class.

What I've done is create a Hashtable property in the page class of type Hashtable<MyEntity, Boolean>. In my t:grid, I'd like to reference this hashtable and set the checkbox default check state based on the contents of the value in the Hashtable.


That works fine, but I don't know how/if I can get to this data from my template:

Of course I get an exception due to that syntax (and the dot notation looks for a property called currentEntity). I've done something very similar in JSF in the past which worked well, so am hoping this is simply a syntax issue.

Seriously Rick? Seriously? You might as well just read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!