I'd just create a wrapper object that can point to either a db entity, or
an enum instance.
eg:
public class Wrapper {
private MyEnum myEnum;
private DbEntity dbEntity;
public String getKey() {
return myEnum != null ? myEnum.name() :
String.valueOf(dbEntity.getId());
}
publ
Sloshed hey hehehe :)
I'm doing something with a select atm, so here's my 2c on howto do what
you want, but I'm using Objects rather than simple enums, but you can make
a List of your ENUMTYPE or something equally (un)elegant i guess.
In page class you're going to need this stuff
pri
Hello,
Thanks. I had a look before it. Apparently, I can make it work with a
simple Enum.
Hope I didn't overlook but it doesn't talk about the scenario I'm talking
about.
Thanks!
Niks
On Thu, Oct 23, 2014 at 8:23 PM, George Christman
wrote:
> Have you seen the following example?
>
>
> http:/
Have you seen the following example?
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Select.html
On Oct 23, 2014 2:10 PM, "Sloshed Techie" wrote:
> Hi,
>
> Good Afternoon!
>
> Thanks. Due to some constraints for using only Enum. can you please
> elaborate the s
Hi,
Good Afternoon!
Thanks. Due to some constraints for using only Enum. can you please
elaborate the step 1.
It should be something like the values for select box should be loaded as
per the values defined in Enum but with the selected enum value( which is
stored in database), should be the def
1. You can either put all your values in your enum and store the string in
the database or 2. build a simple lookup table in the database containing
your enum values and create a relationship with your primary table. I would
recommend option 2. There would be no need for a value encoder then.
It w
On Thu, 23 Oct 2014 05:05:00 -0200, Chris Poulsen
wrote:
I don't know what you are trying to achieve, but you can always provide
your own select model, if you need something more flexible than what the
standard coercions provide. (if that was the question?)
That's correct, but I guess a Val
I don't know what you are trying to achieve, but you can always provide
your own select model, if you need something more flexible than what the
standard coercions provide. (if that was the question?)
--
Chris
On Thu, Oct 23, 2014 at 12:36 AM, Sloshed Techie
wrote:
> Hello,
>
> Have just start
Hello,
Have just started with tapestry and web designing. I try to implement
combobox
where carstype referring to enum.The selected value gets stored in database.
I need a solution where my combobox has the first value as database
value and other
values from ENUM.
Any efficient solution fo