user1622343
user1622343

Reputation: 969

How do I reliably style object layout in apache isis wicket viewer?

I have created a module by copying module-simple. I have everything working well. However, the layout does not follow the layout.xml specification - I did not change anything except to rename the file. This is the SimpleObject view. SimpleObject View This is my ZiemObject view - only the name is changed. This is my zoom object with exactly the same layout.xml When I remove the layout.xml and try to use @MemberOrder(name=..,sequence = .. ) I get nothing but the basic object view.

What am I doing wrong?

Upvotes: 0

Views: 159

Answers (1)

Dan Haywood
Dan Haywood

Reputation: 2235

It isn't clear to me from your question, did you rename the layout file to ZiemObject.layout.xml ? I guess it must be because a layout is the only way to specify tabs. Could you paste a copy of it here?

Even better, perhaps you could upload your app to a github repo so we can take a deeper look?

UPDATE:

I downloaded the sample app from the github repo, and what's there works as expected...

  • the ZiemObject.layout.xml controls the member order of the ZiemObject, and because it is present the @MemberOrder annotation in that class are ignored

  • Also, the notes property is no longer shown as multi-line because that metadata is only provided in the .layout.xml file

  • if I rename the layout file, eg mv ZiemObject.layout.xml ZiemObject.layout.xml.MOVED then the default layout is honoured. In particular, the (framework-defined) id and version fields are no longer shown in tabs.

(Also, the notes is no longer shown as multi-line because that metadata is only provided in the .layout.xml file).

  • If I change the @MemberOrder#sequence attribute for the name and notes properties to "2" and "1" respectively, then the order of these fields is inverted, as shown below:

enter image description here

Hope that helps Dan

Upvotes: 0

Related Questions