Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Right syntax for messages with static and dynamic key parts

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

I have a quite simple question :-) How can I get messages if one part of key is static (fix) and the other one dynamic? For instance I have the following keys and messages in my property file
breadcrumb.overview=Overview
breadcrumb.step1=Step 1
breadcrumb.step2=Step 2
....

in a loop with ui:repeat I get variable "item" that has a property "name". If I try now

oror
nothing works. What is the right syntax?

Best regards.
Oleg.
 
Author
Posts: 130
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would have thought the first option would work. Try putting it into an outputText and see what you're getting, then go from there.
 
Oleg Varaksin
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jason Porter wrote:I would have thought the first option would work. Try putting it into an outputText and see what you're getting, then go from there.



No, It doesn't wotk. I've tried all variants. Simply output of item.name works (item.name is a String).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic