-->
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.  [ 1 post ] 
Author Message
 Post subject: Column width for component properties ?
PostPosted: Thu Oct 13, 2005 10:20 am 
Newbie

Joined: Thu Sep 30, 2004 4:36 am
Posts: 4
Location: Gent
Hi,

In our application we frequently need to read the column width of a string property (typically for validation and for measuring the width of an editable field in a GUI).
I already discovered that this information is available by navigation from the Configuration class, e.g. for a class 'Company' and property 'name'

[quote]
<property
column="COMPANYNAME"
length="64"
name="name"
type="string"
/>
[/quote]

we can find the value "64" using

[code]
Configuration
.getClassMapping("Company")
.getProperty("name")
.getColumnIterator()
.next()
.getLength()
[/code]

For properties of a Component instead of a PersistentClass, things seem
a bit different : if a property is a Component

prop.getType().isComponentType() == true

then I can access Component property names by casting the type

((AbstractComponentType)prop.getType()).getPropertyNames()

But that's as far as I got, from this point on I couldn't find any method
to obtain a Property and its columns.

Could anyone give me a hint here ?

Thanks a lot !

Daan Van Heghe


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

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.