• Post Reply Bookmark Topic Watch Topic
  • New Topic

JFS converter backed with a database  RSS feed

 
DeAlton Jones
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am still new to Java so bear with me.

I am looking to make a custom converter to be backed by a database

ex. -report that generates a code
-database contains code
-web page to display name of code

any ideas would be helpful
[ April 04, 2006: Message edited by: DeAlton Jones ]
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please elaborate it a bit. Pardon, Couldn't really get you.
 
DeAlton Jones
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for not being very descriptive.
Let me try again.

What I would like to do is to have a custom convertor get a value in the form of a code from a report that is being generated, and inturn lookup in a database its corresponding name to display its name instead of its code.

Hope that helps.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by DeAlton Jones:
What I would like to do is to have a custom convertor get a value in the form of a code from a report that is being generated, and inturn lookup in a database its corresponding name to display its name instead of its code.


What you are asking is something else. JSF converters are meant for datatype conversions, I believe.

However, you can do this too. But we wouldn't say it a converter. Every converter in JSF must implement Converter interface, and have to implement two abstract methods getAsObject(), getAsString().Your case is not qualifying for converter.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF doesn't address this kind of thing. You have to do it on your own.
[ April 06, 2006: Message edited by: Adeel Ansari ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!