Specifications of Thorntail project-defaults.yml - wildfly-swarm

I found example at Thorntail Documentation v2.0.0, but I think Thorntail will have more setting items, actually.
Where are specifications of project-defaults.yml file?

These are not Thorntail-core's setting, but fraction's one.
Thus you should refer each faraction's doc.
For example, Datasource setting items are defined at Datasources fraction.
There are items swarm.datasources.data-sources.KEY.allocation-retry and so on.

Related

Grails 3 "show" view with Fields plugin 2.1.0-SNAPSHOT

Stuck at a trivial problem in Grails 3.1.5: Show the fields of a domain object, excluding one of them, including a transient property. Yes, this is my first Grails 3 project after many years with previous versions.
The generated show.gsp contains
<f:display bean="rfaPdffile"/>
This will include a field that may contain megabytes of XML. It should never be shown interactively. The display: false constraint is no longer in the docs, and seems to be silenty ignored.
Next I tried explicitly naming the fields:
<f:with bean="rfaPdffile">
<f:display property='fileName'/>
<f:display property='pageCount'/>
...
</f:with>
This version suprisingly displays the values without any markup whatsoever. Changing display to field,
<f:with bean="rfaPdffile">
<f:field property='fileName'/>
<f:field property='pageCount'/>
...
</f:with>
sort of works, but shows editable values. So does f:all.
In addition I tried adding other attributes to f:display: properties (like in f:table), except (like in f:all). I note in passing that those two attributes have different syntax for similar purposes.
In the Field plugin docs my use case is explicitly mentioned as a design goal. I must have missed something obvious.
My aim is to quickly throw together a prototype gui, postponing the details until later. Clues are greatly appreciated
If I understood you correctly, you want to have all bean properties included in the gsp but the one with the "megabytes of XML" should not be displayed to the user?
If that is the case you can do:
f:with bean="beanName"
f:field property="firstPropertyName"
f:field property="secondPropertyName"
And the one you don't wish to display:
g:hiddenField name="propertyName" value="${beanName.propertyName?}"
f:with
So list all the properties as f:field or f:display and put the one you don't wish to display in a g:hiddenField Grails tag
You can also try:
f:field property="propertyName"
widget-hidden="true"
but the Label is not hidden in this case.
Hope it helps
My own answer: "use the force, read the source". The f:display tag has two rather obvious bugs. I will submit a pull request as soon as I can.
Bugs aside, the documentation does not mention that the plugin may pick up the "scaffold" static property from the domain, if it has one. Its value should be a map. Its "exclude" key may define a list of property names (List of String) to be excluded. This probably works already for the "f:all" tag; bug correction is needed for the "f:display" tag.
My subjective impression is that the fields plugin is in a tight spot. It is intertwined with the Grails architecture, making it sensitive to changes in Grails internals. It is also required by the standard scaffolding plugin, making it very visible. Thus it needs constant attention from maintainers, a position not to be envied. Even now conventions for default constraints seem to have changed somewhere between Grails 3.0.9 and 3.1.7.
Performance of the fields plugin is sensitive to the total number of plugins in the app where it is used. It searches all plugins dynamically for templates.
For the wish list I would prefer stricter tag naming. The main tags should be verbs. There are two main actions, show and edit. For each action there are two main variants, single bean or multiple beans.
My answer is that at present (2 March 2017) there is no answer. I have searched the Net high and low. For the index (list) and create and edit views, the fields plugin works well enough. A certain field can be easily excluded from the create and edit views, relatively easily from the list view (by listing those that should show), and in no way I could find from the show view. This is such a common need that one would suspect it will be addressed soon. Also, easily showing derived values in the show view, like 'total' for an invoice. One can do that by adding an ordered list with a list item showing the value below the generated ordered list of values, but that is kind of a hack.
In some ways, the old way was easier. Yes, it generated long views, but they were generated and didn't have to be done by the programmer - just custom touches here and there.

Get all Schema.org schemas under a specific category (Place, LocalBusiness)

I'm wondering if there is a website or a way to get the list of all the Schema.org schemas under a specific category (ex: Place).
I found the complete list on Schema.org - they also provide a JSON-LD file - but there's no way to filter/order this easily.
My goal is to get the list of all the places in a nice array (PHP, JSON, whatever).
Most vocabularies/ontologies are defined using RDF.
The vocabulary Schema.org is no exception. The canonical/machine-readable representation of Schema.org is provided in HTML+RDFa:
http://schema.org/docs/schema_org_rdfa.html
This file always contains the current release. If you are interested in specific versions of Schema.org, snapshots are available.
As a quick overview:
Each Schema.org type is of type rdfs:Class.
Sub-types are specified with the rdfs:subClassOf property.
Each Schema.org property is of type rdf:Property.
Sub-properties are specified with the rdfs:subPropertyOf property.
The domains of a property (i.e., on which types this property is expected) are specified with the schema:domainIncludes property.
The ranges of a property (i.e., which values are expected) are specified with the schema:rangeIncludes property.
RDFa is a RDF serialization which many RDF parsers support (if not, it’s simple to automatically convert it into other RDF serializations, like Turtle, RDF/XML, or JSON-LD). There are many different tools and libraries available for this purpose. (You should use an RDF-aware tool instead of trying to parse the file as HTML.)

cakephp how to check variable content and all function included?

sorry i was new here so this problem maybe simple.
anyone knows how to check variable content?
like xx($a);
then page shows all relate information about $a. Is CakePHP allowed to do that?
i setup a kit on my cakephp
You might be looking for either var_dump() or print_r()
You can use PHP built-in functions like
var_dump() - displays structured information about variable
print_r() - the same, but preformatted with some differences
get_defined_vars() - returns array with all defined variables
Or use true CakePHP-way
Debugger::dump() - It will print out all properties and methods (if any) of the supplied variable
For more convenience you may use CakePHP Debug Kit plugin, which provides nice toolbar and some useful tools for your purpose.

Sitecore country ISO in url

I have created a site with multiple languages in sitecore... I the content editor (system > languages) I have specified three languages (Dutch, English and German). No I have 2 problems.
When an item has, for example: an English version but no German and Dutch version and I type the address to the German site: www.testsite.com/de I get the German site, but without content. In this case I want a 404 page to be shown.
Another problem is when I go to language that is not specified in system > language and also on the item is still get an empty site. In this case I also want a 404 page to be shown. Sitecore shows the page as long as it is a valid ISO-code.
I'm using Sitecore 6.4
Does anybody has a solution for these problem(s)?
Thanks in advance!
mrtentje
My LinkManager is specified as follows in the Web.config:
<add name="sitecore" type="Sitecore.Links.LinkProvider, Sitecore.Kernel" addAspxExtension="true" alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="asNeeded" languageLocation="filePath" shortenUrls="true" useDisplayName="false"/>
Unfortunately you have to manage both of these scenarios manually in Sitecore, they both have quite simple solutions but will require some development on your part.
For the first (accessing of pages without translations) I think you would need to extend the current ItemResolver within Sitecore and have it explicitly check that a version exists for the language that has been selected. I haven't implemented that myself but that's how I'd look at handling it.
The second (only accepting certain languages) is something I have handled, and it really bothered me that Sitecore couldn't handle it itself (though perhaps it does and I missed it). For this I created a step in the pipeline immediately after the LanguageResolver called PermissableLanguageChecker. This checks to see if the current language of the request is one of certain allowable values, and if it isn't it sets the language back to the default language, or in your case throw a 404.
For the "allowable values", I read them from the site config with a new property there:
<site name="website" ... permissableLanguages="pl-PL,en" language="pl-PL" ... />
That permissableLanguages property is handy as we can also use it later on in the site when presenting a language selection control to the user.
You may want to take a look at the Language Fallback module in the Sitecore Shared Source Library. As it covers some of your scenarios.
http://trac.sitecore.net/LanguageFallback

MultiScaleTileSource and Collections

Does anyone know how to override the GetTileLayers for a collection in the MultiScaleTileSource class. I want to set the source to a xml document ( which is a deep zoom collection doc ). I need to remap where the images come from and the filename format.
This is simple with a single image, but how do you do it for a collection?
Anyone?
thanks
D
It might not be officially possible. Check out this thread.
A related question might be why the tileImageLayerSources argument of MultiScaleTileSource.GetTileLayers is not specifically a collection of Uris and why is it a collection... i.e. why would we want to add multiple Uris in one call?
The easiest way to do "dynamic" deep zoom is instead of setting the source for the MSI directly to the XML, set it to an ASPX handler that returns the xml you generate on the fly. If you're not sure what I'm saying, let me know and I can reply with more detail.

Resources