Please, unsubscribe for now. Dan thanks for your support throughout the POC. Thanks
[email protected] -----Original Message----- From: Jeroen van der Wal [mailto:[email protected]] Sent: Tuesday, September 02, 2014 2:02 PM To: users Subject: Re: How can I order the columns (properties of an object) of an collection in the wicketviewer I see you have a Person.layout.json file too. These two don't work well together, either choose annotations or the layout file. I prefer the latter. Cheers, Jeroen On Tue, Sep 2, 2014 at 2:58 PM, <[email protected]> wrote: > >Excuse me for not being clear: > > My problem is that the other properties of Person appear in columns > after gender ("geslacht") although I have made annotations for them to > appear before gender: > > F.I. > > firstName() has @MemberOrder(sequence="10") but appears after > getGenderForTables() that has @MemberOrder(sequence="55") > > See [2] > > I don't understand why this is ... > > > > [2] > > > https://github.com/johandoornenbal/socrates/blob/master/dom/src/main/j > ava/nl/socrates/dom/party/Person.java > > > Not sure I follow on this... > > ... the second property listed, getGenderForTables(), is annotated > with @Hidden(where=Where.OBJECT_FORMS), so it *is* going to appear in > a table, with a column name of "Geslacht". > > Perhaps remove the two @Named annotations temporarily so you can > distinguish one property from the other? > > > > > On 2 September 2014 13:33, wrote: > > > > Still wrestling with ENUM: gender always appears in first column > > > no > > matter what I do with MemberOrder. > > > > Any Idea? > > > > > > private PersonGenderType gender; > > > > @javax.jdo.annotations.Column(allowsNull = "false", > > length = > > JdoColumnLength.TYPE_ENUM) > > > > @MemberOrder(sequence = "50") > > > > @Named("Geslacht") > > > > @Hidden(where=Where.ALL_TABLES) > > > > public PersonGenderType getGender() { > > > > return gender; > > > > } > > > > > > > > @Hidden(where=Where.OBJECT_FORMS) // appears only in > > tables > > > > @MemberOrder(sequence = "55") > > > > @Named("Geslacht") > > > > public PersonGenderType getGenderForTables() { > > > > return getGender(); > > > > } > > > > > > > > public void setGender(final PersonGenderType gender) { > > > > this.gender = gender; > > > > } > > > > > > > > There's a couple of tricks you can do to order columns in a table > > separately from as an object form. > > > > One technique is to use member groups to group on the object form. > > The groups are then laid out in the order of @MemberGroupLayout. > > > > Meanwhile, (I'm pretty sure that) the columns of the table are laid > > out > per > > @MemberOrder(sequence) without regard for the member group. So with > > a > bit > > of playing around you can get the columns to appear in a different order. > > > > The above technique has been all we've needed for Estatio. > > > > ~~~ > > Alternatively, (more boilerplate but perhaps more maintainable) you > > can create derived properties and then hide the originals as required, eg: > > > > public class Customer { > > > > @Hidden(where=ALL_TABLES) // appears only on object forms > > @MemberOrder(sequence="1") > > String getFirstName() { ... } > > > > @MemberOrder(sequence="2") > > String getLastName() { ... } > > > > @Hidden(where=OBJECT_FORMS) // appears only in tables > > @MemberOrder(sequence="3") > > @Named("First name") > > String getFirstNameInTables() { return getFirstName()); > > > > } > > > > In an object form, you should see: firstName, lastName. > > In a table, you should see: lastName, firstName > > > > HTH > > Dan > > > > > > > > > > > > > > On 2 September 2014 10:47, wrote: > > > > > > Tnc Dan. I checked those already but somehow it is not clear to > > > > me > how > > > to order columns within a table that represents a collection. > > > (Without altering the order of fields in the form using > > > @MemberOrder). Is there > a > > > way to do that? > > > > > > > > > statically via @MemberOrder and @MemberGroupLayout annotations, > > > see [1] > > > > > > dynamically via .layout.json file: see [2] > > > > > > HTH > > > Dan > > > > > > [1] > http://isis.apache.org/components/viewers/wicket/static-layouts.html > > > [2] > > http://isis.apache.org/components/viewers/wicket/dynamic-layouts.htm > > l > > > > > > > > > > > > On 2 September 2014 08:28, wrote: > > > > > > > Hi, > > > > > > > > > > > > > > > > How can I order the columns (properties of an object) of an > collection > > in > > > > the wicketviewer? I think Jeroen told me but I forgot, sorry. > > > > > > > > (I would like to know how to do it using JSON layout and/or > > Annotations) > > > > > > > > For example ordering all persons in my socrates app [1] > > > > > > > > > > > > > > > > [1] https://github.com/johandoornenbal/socrates > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Atos, Atos Consulting, Worldline and Canopy The Open Cloud Company are trading names used by the Atos group. The following trading entities are registered in England and Wales: Atos IT Services UK Limited (registered number 01245534), Atos Consulting Limited (registered number 04312380), Atos Worldline UK Limited (registered number 08514184) and Canopy The Open Cloud Company Limited (registration number 08011902). The registered office for each is at 4 Triton Square, Regent’s Place, London, NW1 3HG.The VAT No. for each is: GB232327983. This e-mail and the documents attached are confidential and intended solely for the addressee, and may contain confidential or privileged information. If you receive this e-mail in error, you are not authorised to copy, disclose, use or retain it. Please notify the sender immediately and delete this email from your systems. As emails may be intercepted, amended or lost, they are not secure. Atos therefore can accept no liability for any errors or their content. Although Atos endeavours to maintain a virus-free network, we do not warrant that this transmission is virus-free and can accept no liability for any damages resulting from any virus transmitted. The risks are deemed to be accepted by everyone who communicates with Atos by email.
