[ 
https://issues.apache.org/jira/browse/ISIS-1824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16329045#comment-16329045
 ] 

Dan Haywood commented on ISIS-1824:
-----------------------------------

 

1. Could you please clarify if we can use either the layout xmls or the 
annotations and not both at the same time?

No, it's either one or the other.  If any actions are not referenced in the 
menubars.layout.xml, they are placed in the menu with 
"unreferencedActions=true".  

What I normally do is download the menubars.layout.xml from the prototyping 
menu, and then just move them around as necessary.

But, perhaps you describe how you would like it to work differently, maybe that 
can be accommodated in a more sophisticated design?

 

2. Are there any other scenarios where these combinations of xml files and 
annotations dont work together?

Well, they don't work together in any scenario.  If the xml file is present, 
then annotations are ignored.  

However, when you download the menubars.layout.xml, you'll see that there's an 
optoin to download the "fallback".  This is the menubar built out only from the 
annotations.  So what you could do is download this and overwrite/merge into 
your current menubars.layout.xml

 

3. I tried removing the layout file and try working with only annotations, but 
that didnt work too. So is it a mandate that we have to use 
menubars.layout.xml? Cannot we use annotations alone to define the menu layout? 

No, don't understand what's going on there... if there is no 
menubars.layout.xml, then it falls back to using annotations.

Perhaps you had deleted the file from your src, but it was still present under 
target directory?  Isis reads the file as a resource from the classpath.

HTH

 

> menubars.layout.xml vs Wicket Viewer annotations
> ------------------------------------------------
>
>                 Key: ISIS-1824
>                 URL: https://issues.apache.org/jira/browse/ISIS-1824
>             Project: Isis
>          Issue Type: Question
>          Components: Core: Viewer: Wicket
>    Affects Versions: 1.16.0
>            Reporter: Smitha Neeliagari
>            Priority: Major
>             Fix For: 1.16.1
>
>
> I am trying to use menubars.layout.xml in combination with annotations. I 
> tried to add another primary menu to the simpleApp archetype. I added them as 
> annotations in actions rather than in the maenubars.layout.xml. This doesnot 
> work. The application always picks up what is available in the layout xml and 
> the annotations added in the action are ignored. Is it ot possible to use a 
> combination of menubars.layout.xml and annotations in action files together? 
> I dont find much information in the documentation for this particular 
> scenario.  SO my questions are:
>   1. Could you please clarify if we can use either the layout xmls or the 
> annotations and not both at the same time?
> 2. Are there any other scenarios where these combinations of xml files and 
> annotations dont work together?
> 3. I tried removing the layout file and try working with only annotations, 
> but that didnt work too. So is it a mandate that we have to use 
> menubars.layout.xml? Cannot we use annotations alone to define the menu 
> layout? 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to