Actually, the PropertyLayout#typicalLength() is intended as a UI hint as to
the size of the text box... how many characters would typically be in that
field, and thence how wide to render the text field.  That's where the name
comes from, and why it's in the XxxLayout annotation.

The Property#maxLength() is the absolute maximum length, so is part of the
domain.  Alternatively, maxLength is also derived from the JDO
@Column#length() annotation.

Now the caveats.

* First, as already noted these only apply to strings

* Second, the typicalLength was only really something we considered for the
object forms, not for column widths of tables.  And even saying that, when
we restyled the Wicket viewer to use bootstrap3, we decided that it was
cleaner to have all text boxes rendered the same size.  (How many
characters can be entered still depends on the maxLength of course).

So, what that means is we don't really have a way to control the column
width through the metamodel.

What you may be able to do though is to use CSS, modifying the
WEB-INF/application.css file to adjust the "width: NN%".  I don't have time
at the moment, but I'll try to follow up with some further guidance on this
later today.

thx
Dan






On 9 March 2016 at 07:35, Stephen Cameron <[email protected]>
wrote:

> I don't think that is the way to think of about it. A string has length but
> the other datatypes don't. That is the Naked Object heritage.
>
> Having said that, there is now quite a bit of flexibility in tweeking the
> views that a viewer creates, as described here:
>
> https://isis.apache.org/guides/ugfun.html#_ugfun_object-layout
>
> .
>
> On Wed, Mar 9, 2016 at 5:53 PM, Shan Wijesinghe <[email protected]
> >
> wrote:
>
> > Stephen it says here maxLength() applicable only to String. Say I have
> > int,double or even another object inside my table. Then how can I give a
> > length to such a column. Thanks.
> >
> > On Wed, Mar 9, 2016 at 12:19 PM, Stephen Cameron <
> > [email protected]
> > > wrote:
> >
> > > https://isis.apache.org/guides/rgant.html#_rgant-Property_maxLength
> > >
> > > On Wed, Mar 9, 2016 at 5:02 PM, Shan Wijesinghe <
> > [email protected]
> > > >
> > > wrote:
> > >
> > > > Hi all,
> > > >         what is the way to chance the layout of tables like spacing
> of
> > > > columns. ( is there a way to specify length of column similar to
> > > > typicalLength() attribute which only work for Strings )
> > > >
> > > > thanks and regards,
> > > > Dilshan.
> > > >
> > >
> >
>

Reply via email to