-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: meta element values - Metadata API
PostPosted: Sun Jan 16, 2005 8:34 pm 
Newbie

Joined: Thu Jan 06, 2005 6:27 pm
Posts: 10
The metadata API does not seem to provide a way to get to the value in the meta element.

<property name="state" type="string">
<meta attribute="displayWidget">dropDown</meta>
</property>

I would like to get the name-value pair for the above meta element for the "state" property. Is there a way to do this?

Basically, I want to use the mapping file to also hold other configuration data, in this case, I want to display the state as a drop-down list. Since the DTD does not restrict the attribute values for the meta element, I can legally extend it's use in this manner but I want to get to it using the Hibernate API. Is there a way?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 17, 2005 4:51 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes - Configuration and look for types with getMetaAttributes on them

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: MetaAttribute.getName() usless?
PostPosted: Mon Jan 17, 2005 4:45 pm 
Newbie

Joined: Thu Jan 06, 2005 6:27 pm
Posts: 10
Thanks, I can get to the meta tag now.

Is there a use for the getName() method of MetaAttribute? It seems redundant. If not, in what way can one use it?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 17, 2005 5:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
why is it redundant ?

is getName() on Class redundant becuase you can do Class.forName(name) ?....can't follow ya'

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 17, 2005 9:22 pm 
Newbie

Joined: Thu Jan 06, 2005 6:27 pm
Posts: 10
For the meta element example shown in the first post above, what would the value of getName() be?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.