You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by Martin Grigorov <mg...@apache.org> on 2015/01/04 20:23:05 UTC

Facet from .layout.properties

Hi,

Facets are created from annotations, from .layout.json and from
.layout.properties, right ?
I haven't seen an example of .layout.properties in any application so far.

Today I tried to add unit tests for ISIS-995 (the new 'namedEscaped'
attribute that can be used to disable HTML escaping of 'named') and by
extending
org.apache.isis.core.metamodel.layoutmetadata.json.LayoutMetadataReaderFromJsonTest_readMetadata
I
broke test
org.apache.isis.core.metamodel.layoutmetadata.json.LayoutMetadataReaderFromJsonTest_read.

The funny thing is that the test seems to be skipped by Maven, so it fails
only when executed in the IDE.

Additionally my IDE says
that org.apache.isis.core.metamodel.layoutmetadata.propfile.LayoutMetadataReaderFromPropertyFile
is not used anywhere in the code. What is its status ? It seems to be
maintained because there are many ***FromLayoutProperties.java classes

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

Re: Facet from .layout.properties

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
On 4 January 2015 at 19:23, Martin Grigorov <mg...@apache.org> wrote:

> Hi,
>
> Facets are created from annotations, from .layout.json and from
> .layout.properties, right ?
> I haven't seen an example of .layout.properties in any application so far.
>
>
Yeah, it's is a bit of a strange design... the .layout.properties idea came
first, then I realized I could put the information into a .json file.





> Today I tried to add unit tests for ISIS-995 (the new 'namedEscaped'
> attribute that can be used to disable HTML escaping of 'named') and by
> extending
>
> org.apache.isis.core.metamodel.layoutmetadata.json.LayoutMetadataReaderFromJsonTest_readMetadata
> I
> broke test
>
> org.apache.isis.core.metamodel.layoutmetadata.json.LayoutMetadataReaderFromJsonTest_read.
>
> The funny thing is that the test seems to be skipped by Maven, so it fails
> only when executed in the IDE.
>
>
Not sure... perhaps it was temporarily removed and never reinstated.




> Additionally my IDE says
> that
> org.apache.isis.core.metamodel.layoutmetadata.propfile.LayoutMetadataReaderFromPropertyFile
> is not used anywhere in the code. What is its status ?


My idea was that the LayoutMetadataReader API would be pluggable (might
also support multiple implementations).  But right now I think we're
hardcoded to only use the JSON impl.




> It seems to be
> maintained because there are many ***FromLayoutProperties.java classes
>
>
They might be being used because of the way that we translate from .json to
.properties and then to facets.

HTH
Dan






> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>