You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2016/01/04 19:37:32 UTC

[3/3] isis git commit: ISIS-1287: further FAQs

ISIS-1287: further FAQs


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/9fe8b0b9
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/9fe8b0b9
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/9fe8b0b9

Branch: refs/heads/master
Commit: 9fe8b0b9e6f04e91d14d3d813a1c708916bf3bcc
Parents: 49ad625
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Jan 4 16:33:48 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Jan 4 16:33:48 2016 +0000

----------------------------------------------------------------------
 .../src/main/asciidoc/guides/_ugfun_faqs.adoc   |  1 +
 ...un_faqs_how-run-fixtures-on-app-startup.adoc | 20 ++++++++++++++++++++
 ...aqs_how-to-handle-void-and-null-results.adoc |  3 +--
 ..._ugfun_faqs_i18n-label-in-wicket-viewer.adoc | 18 +++++++++++++-----
 .../guides/_ugfun_faqs_per-user-themes.adoc     |  2 +-
 .../_ugfun_faqs_restful-image-property.adoc     |  7 +++++--
 ...faqs_subtype-entity-not-fully-populated.adoc |  7 ++++---
 7 files changed, 45 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/9fe8b0b9/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs.adoc
index 2d30ccd..63827b3 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs.adoc
@@ -18,3 +18,4 @@ include::_ugfun_faqs_per-user-themes.adoc[leveloffset=+1]
 include::_ugfun_faqs_i18n-label-in-wicket-viewer.adoc[leveloffset=+1]
 include::_ugfun_faqs_how-to-handle-void-and-null-results.adoc[leveloffset=+1]
 include::_ugfun_faqs_how-to-implement-a-spellchecker.adoc[leveloffset=+1]
+include::_ugfun_faqs_how-run-fixtures-on-app-startup.adoc[leveloffset=+1]

http://git-wip-us.apache.org/repos/asf/isis/blob/9fe8b0b9/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_how-run-fixtures-on-app-startup.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_how-run-fixtures-on-app-startup.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_how-run-fixtures-on-app-startup.adoc
new file mode 100644
index 0000000..1367fea
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_how-run-fixtures-on-app-startup.adoc
@@ -0,0 +1,20 @@
+[[_ugfun_faqs_how-run-fixtures-on-app-startup]]
+= How run fixtures on startup?
+:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
+:_basedir: ../
+:_imagesdir: images/
+
+
+From this link:http://isis.markmail.org/thread/g6amfj2eyf2xfjbr[thread] on the Apache Isis users mailing list:
+
+* _my fixtures have grown into a couple of files the application needs to read in when it starts the first time
+(and possibly later on when the files content change).  What is the right way to do this?  Hook up into the webapp start? Use events?_
+
+
+The standard approach is to use xref:ugtst.adoc#_ugtst_fixture-scripts[fixture scripts].  These can be run in on start-up typically by being specified in the xref:rgcsm.adoc#_rgcsm_classes_AppManifest-bootstrapping[`AppManifest`], see for
+example the xref:ug.adoc#_ug_getting-started_simpleapp-archetype[SimpleApp archetype].
+
+Alternatively just set "isis.fixtures" and "isis.persistor.datanucleus.install-fixtures" properties.
+
+In terms of implementations, you might also want to check out the (non-ASF) http://github.com/isisaddons/isis-module-excel[Isis addons' excel] module, by using link:https://github.com/isisaddons/isis-module-excel/blob/master/dom/src/main/java/org/isisaddons/module/excel/dom/ExcelFixture.java[`ExcelFixture`] and overriding `ExcelFixtureRowHandler` (same package).  An example can be found in this (non ASF) link:https://github.com/incodehq/contactapp[contactapp], see link:https://github.com/incodehq/contactapp/blob/master/backend/fixture/src/main/java/domainapp/fixture/scenarios/demo/ContactRowHandler.java[`ContactRowHandler`].
+

http://git-wip-us.apache.org/repos/asf/isis/blob/9fe8b0b9/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_how-to-handle-void-and-null-results.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_how-to-handle-void-and-null-results.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_how-to-handle-void-and-null-results.adoc
index 8f5117a..885f22b 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_how-to-handle-void-and-null-results.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_how-to-handle-void-and-null-results.adoc
@@ -1,12 +1,11 @@
 [[_ugfun_faqs_how-to-handle-void-and-null-results]]
-= How to handle void and null results
+= How to handle void/null results
 :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 :_basedir: ../
 :_imagesdir: images/
 
 
 
-
 From this link:http://isis.markmail.org/thread/yf7qdeiu3vrvk2ei[thread] on the Apache Isis users mailing list:
 
 * _When using a void action, let’s say a remove action, the user is redirected to a

http://git-wip-us.apache.org/repos/asf/isis/blob/9fe8b0b9/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_i18n-label-in-wicket-viewer.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_i18n-label-in-wicket-viewer.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_i18n-label-in-wicket-viewer.adoc
index 0763689..a6e0aab 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_i18n-label-in-wicket-viewer.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_i18n-label-in-wicket-viewer.adoc
@@ -1,16 +1,24 @@
 [[_ugfun_faqs_i18n-label-in-wicket-viewer]]
-= How i18n Labels in Wicket Viewer?
+= How i18n the Wicket viewer?
 :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 :_basedir: ../
 :_imagesdir: images/
 
-From the Apache Isis mailing list:
+
+
+From link:http://isis.markmail.org/thread/ctppmtcbsf4iskzi[this thread] on the Apache Isis users mailing list:
 
 * _I am trying to internationalize the label descriptions of form actions, eg those in `ActionParametersFormPanel`.  Referencing those via their message id inside a .po file didn't work either.  Can this be done?_
 
-At the moment (`1.10.0`) we have a bit of a hybrid story when it comes to i18n.  Most of the i18n does indeed come from the .po files, however certain bits of the UI are "hard-coded", which is to say they rely upon link:https://ci.apache.org/projects/wicket/guide/6.x/guide/i18n.html#i18n_3[ Wicket's internationalization support], namely resource bundles.
 
-So, you can internationalize the labels from this class using the regular resource bundle approach; this is just "vanilla" Wicket: create a directory structure inside the webapp resource folder following that pattern `org.apache.isis.viewer.wicket.ui.components.actions`.  Inside there create an equivalent `ActionParametersFormPanel_xx_XX.properties` or `ActionParametersFormPanel_xx.properties` file for the various locales that you want to support (eg `ActionParametersFormPanel_en_UK.properties`, `ActionParametersFormPanel_en_US.properties`, `ActionParametersFormPanel_de.properties` and so on).
+The above FAQ was raised against `1.10.0`.  As of `1.11.0` (due to link:https://issues.apache.org/jira/browse/ISIS-1093[ISIS-1093]) it _is_ now possible to internationalize both the Wicket viewer's labels as well as the regular translations of the domain object metadata using the `.po` translation files as
+supported by the xref:rgsvc.adoc#_rgsvc_spi_TranslationService[`TranslationService`].
+
+Full details of the ``msgId``s that must be added to the `translations.po` file can be found in xref:guides/ugbtb.adoc#_ugbtb_i18n_wicket-viewer[i18n] section of the xref:ugbtb.adoc#[beyond the basics] guide.
+
+In prior releases (`1.10.0` and earlier) it was necessary to use link:https://ci.apache.org/projects/wicket/guide/6.x/guide/i18n.html#i18n_3[ Wicket's internationalization support], namely resource bundles.  This is still supported (as a fallback):
+
+* create a directory structure inside the webapp resource folder following that pattern `org.apache.isis.viewer.wicket.ui.components.actions`
+* Inside there create an equivalent `ActionParametersFormPanel_xx_XX.properties` or `ActionParametersFormPanel_xx.properties` file for the various locales that you want to support (eg `ActionParametersFormPanel_en_UK.properties`, `ActionParametersFormPanel_en_US.properties`, `ActionParametersFormPanel_de.properties` and so on).
 
-We do have a ticket link:https://issues.apache.org/jira/browse/ISIS-1093[ISIS-1093] to simplify this so that all i18n labels are read from the .po files.
 

http://git-wip-us.apache.org/repos/asf/isis/blob/9fe8b0b9/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_per-user-themes.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_per-user-themes.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_per-user-themes.adoc
index 0afe2ce..f08e7df 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_per-user-themes.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_per-user-themes.adoc
@@ -4,7 +4,7 @@
 :_basedir: ../
 :_imagesdir: images/
 
-From the Apache Isis mailing list is:
+From link:http://isis.markmail.org/thread/kb4442niwwbnghey[this thread] on the Apache Isis users mailing list:
 
 * _Is it possible to have each of our resellers (using our Isis application) use there own theme/branding with their own logo and colors? Would this also be possible for the login page, possibly depending on the used host name?_
 

http://git-wip-us.apache.org/repos/asf/isis/blob/9fe8b0b9/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_restful-image-property.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_restful-image-property.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_restful-image-property.adoc
index a4bd8de..f71ab81 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_restful-image-property.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_restful-image-property.adoc
@@ -1,11 +1,14 @@
 [[_ugfun_faqs_restful-image-property]]
-= How parse image properties from Restful Objects?
+= How parse images in RO viewer?
 :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 :_basedir: ../
 :_imagesdir: images/
 
 
-ref: link:http://markmail.org/message/4kcu7sml4ufdsah3[mailing list thread]
+From this link:http://markmail.org/message/4kcu7sml4ufdsah3[thread] on the Apache Isis users mailing list:
+
+* _I am trying to display an image in a JavaScript client app, the image comes from
+   an Isis RO web service as a string, but it won't show.  Is there something I should do to change the message?_
 
 The RO viewer returns the image as a string, in the form:
 

http://git-wip-us.apache.org/repos/asf/isis/blob/9fe8b0b9/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_subtype-entity-not-fully-populated.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_subtype-entity-not-fully-populated.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_subtype-entity-not-fully-populated.adoc
index 8ec1e85..c2e7340 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_subtype-entity-not-fully-populated.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_subtype-entity-not-fully-populated.adoc
@@ -1,11 +1,12 @@
-[[_ugfun_troubleshooting_faqs]]
-= (Subtype) entity not fully populated
+[[_ugfun_faqs_subtype-entity-not-fully-populated]]
+= Subtype not fully populated
 :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 :_basedir: ../
 :_imagesdir: images/
 
 
-ref: link:http://markmail.org/message/ovgai56uqgfgnrx7[mailing list thread]
+Taken from link:http://markmail.org/message/ovgai56uqgfgnrx7[this thread] on the Apache Isis users mailing list...
+
 
 If it seems that Apache Isis (or rather DataNucleus) isn't fully populating domain entities (ie leaving some properties
 as `null`), then check that your actions are not accessing the fields directly.  Use getters instead.  that is: