Re: object level ownership / tenancy

2016-09-23 Thread David Tildesley

Hi Martin,

You haven't described a  tenancy problem so I wouldn't necessarily try 
and bend that to your problem. I would model it in the domain and use 
domain behavior. The behaviour checks if the user is a member of a 
committee (Committee) in the role of managing 
(ConcertManager) the concert (Concert) before 
allowing operations on the concert component.


Regards,

David.


On 23-Sep-16 6:07 PM, Martin wrote:

Hello,

We want to give ownership of specific objects in the domain model to a
subset of users.

Example: an application to manage concerts, and a subset of the users is
the concert organization committee. The members of
the organization committee can be added and removed at runtime or defined
when creating a new concert object. A user can be assigned to be a member
of multiple committees, and the members of a concerts organization
committee should be granted permissions to manipulate the concert and its
associated objects.

I looked at the isis-security-module (
https://github.com/isisaddons/isis-module-security) and also at the
tenancy, but I had trouble figuring out if this could actually serve our
needs.

How would one go about this with apache isis?

Thanks and regards,
Martin





Full Calendar reflect.InvocationTargetException error

2016-09-23 Thread Matías Macaya
Hi, my name is Matías, I'm starting with Apache Isis, I am trying to
implement isis-wicket-fullcalendar2 on my project [1], getting the table of
records ("Reservas"), but can not see them reflected in the Calendar view.
This is my stack trace: [2]

[1] : https://github.com/GestionHostel/gestionhosteldev

[2]

C:/Users/Matt/.m2/repository/cglib/cglib-nodep/2.2.2/cglib-nodep-2.2.2.jar

C:/Users/Matt/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.6.4/jackson-annotations-2.6.4.jar

C:/Users/Matt/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.6.4/jackson-core-2.6.4.jar

C:/Users/Matt/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.6.4/jackson-databind-2.6.4.jar

C:/Users/Matt/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.4.5/jackson-dataformat-yaml-2.4.5.jar

C:/Users/Matt/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-joda/2.4.5/jackson-datatype-joda-2.4.5.jar

C:/Users/Matt/.m2/repository/com/google/code/findbugs/annotations/2.0.1/annotations-2.0.1.jar

C:/Users/Matt/.m2/repository/com/google/code/gson/gson/2.5/gson-2.5.jar

C:/Users/Matt/.m2/repository/com/google/guava/guava/19.0/guava-19.0.jar

C:/Users/Matt/.m2/repository/com/google/inject/guice/4.0/guice-4.0.jar

C:/Users/Matt/.m2/repository/com/lmax/disruptor/3.2.0/disruptor-3.2.0.jar

C:/Users/Matt/.m2/repository/com/sun/istack/istack-commons-runtime/2.16/istack-commons-runtime-2.16.jar

C:/Users/Matt/.m2/repository/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar

C:/Users/Matt/.m2/repository/com/sun/xml/bind/jaxb-core/2.2.7/jaxb-core-2.2.7.jar

C:/Users/Matt/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.7/jaxb-impl-2.2.7.jar

C:/Users/Matt/.m2/repository/com/sun/xml/fastinfoset/FastInfoset/1.2.12/FastInfoset-1.2.12.jar

C:/Users/Matt/.m2/repository/com/thoughtworks/xstream/xstream/1.4.8/xstream-1.4.8.jar

C:/Users/Matt/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar

C:/Users/Matt/.m2/repository/commons-cli/commons-cli/1.3.1/commons-cli-1.3.1.jar

C:/Users/Matt/.m2/repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar

C:/Users/Matt/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar

C:/Users/Matt/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar

C:/Users/Matt/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar

C:/Users/Matt/.m2/repository/de/agilecoders/maven/maven-parent-config/0.3.5/maven-parent-config-0.3.5.jar

C:/Users/Matt/.m2/repository/de/agilecoders/wicket/jquery-selectors/0.1.6/jquery-selectors-0.1.6.jar

C:/Users/Matt/.m2/repository/de/agilecoders/wicket/webjars/wicket-webjars/0.4.8/wicket-webjars-0.4.8.jar

C:/Users/Matt/.m2/repository/de/agilecoders/wicket/wicket-bootstrap-core/0.9.15/wicket-bootstrap-core-0.9.15.jar

C:/Users/Matt/.m2/repository/de/agilecoders/wicket/wicket-bootstrap-extensions/0.9.15/wicket-bootstrap-extensions-0.9.15.jar

C:/Users/Matt/.m2/repository/de/agilecoders/wicket/wicket-bootstrap-themes/0.9.15/wicket-bootstrap-themes-0.9.15.jar

C:/Users/Matt/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar

C:/Users/Matt/.m2/repository/io/swagger/swagger-annotations/1.5.5/swagger-annotations-1.5.5.jar

C:/Users/Matt/.m2/repository/io/swagger/swagger-core/1.5.5/swagger-core-1.5.5.jar

C:/Users/Matt/.m2/repository/io/swagger/swagger-models/1.5.5/swagger-models-1.5.5.jar

C:/Users/Matt/.m2/repository/javax/activation/activation/1.1.1/activation-1.1.1.jar

C:/Users/Matt/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar

C:/Users/Matt/.m2/repository/javax/jdo/jdo-api/3.1/jdo-api-3.1.jar

C:/Users/Matt/.m2/repository/javax/transaction/transaction-api/1.1/transaction-api-1.1.jar

C:/Users/Matt/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar

C:/Users/Matt/.m2/repository/javax/xml/bind/jaxb-api/2.2.7/jaxb-api-2.2.7.jar

C:/Users/Matt/.m2/repository/javax/xml/bind/jsr173_api/1.0/jsr173_api-1.0.jar

C:/Users/Matt/.m2/repository/joda-time/joda-time/2.9.1/joda-time-2.9.1.jar

C:/Users/Matt/.m2/repository/junit/junit/4.12/junit-4.12.jar

C:/Users/Matt/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar

C:/Users/Matt/.m2/repository/net/ftlines/wicket-fullcalendar/wicket-fullcalendar-core/2.2.0/wicket-fullcalendar-core-2.2.0.jar

C:/Users/Matt/.m2/repository/net/ftlines/wicket-source/wicket-source/
6.0.0.8/wicket-source-6.0.0.8.jar

C:/Users/Matt/.m2/repository/net/jcip/jcip-annotations/1.0/jcip-annotations-1.0.jar

C:/Users/Matt/.m2/repository/org/apache/commons/commons-email/1.4/commons-email-1.4.jar

C:/Users/Matt/.m2/repository/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar

C:/Users/Matt/.m2/repository/org/apache/geronimo/specs/geronimo-activation_1.1_spec/1.1/geronimo-activation_1.1_spec-1.1.jar

C:/Users/Matt/.m2/repository/org/apache/geronimo/specs/geronimo-annotation_1.0_spec/1.1.1/geronimo-annotation_1.0_spec-1.1.1.jar


Re: Display HashMap in UI

2016-09-23 Thread Stephen Cameron
XML DTOs are a kind of View Model, so maybe just using @ViewModel instead?

On Fri, Sep 23, 2016 at 10:55 PM, Simecsek Timothy <
timothy.simec...@nttdata.com> wrote:

> Hi,
>
> I was able to find a solution that I want to share:
>
> In the domain object I added this method:
> @MemberOrder(sequence = "2.0")
> @PropertyLayout(hidden = Where.ALL_TABLES)
> @CollectionLayout(named = "request headers", render =
> RenderType.EAGERLY)
> @XmlElementWrapper
> @NotPersistent
> public ArrayList getStringListElement() {
> final ArrayList stringMapVo =
> Lists.newArrayList();
> for (String key : this.getRequestHeaders().keySet()) {
> final StringMapElementVo stringMapElement = new
> StringMapElementVo();
> stringMapElement.setKey(key);
> stringMapElement.setValue(this.getRequestHeaders().get(key));
> stringMapVo.add(stringMapElement);
> }
> return  stringMapVo;
> }
>
> And set the persisted field to not show:
> private Map requestHeaders = Maps.newHashMap();
>
> @PropertyLayout(hidden = Where.EVERYWHERE)
> @Persistent(defaultFetchGroup = "true")
> public Map getRequestHeaders() {
> return requestHeaders;
> }
>
> And here the JAXB annotated DTO see [1] :
> @XmlRootElement(name = "KeyValueElement")
> @DomainObject(editing = Editing.DISABLED)
> public class StringMapElementVo {
>
> public StringMapElementVo() {
> }
>
> //region > key (property)
> private String key;
>
> public String getKey() {
> return key;
> }
>
> public void setKey(final String key) {
> this.key = key;
> }
> //endregion
>
> //region > value (property)
> private String value;
>
> public String getValue() {
> return value;
> }
>
> public void setValue(final String value) {
> this.value = value;
> }
> //endregion
> }
>
> I used a very similar approach for a List property also. This way
> it displays in the UI like any other collection of persistent Domain
> Objects. If you need this to act as an object you can add another DTO
> around it.
>
> Regards Timothy
>
> [1] https://isis.apache.org/guides/ugbtb.html#2.3.-jaxb-annotated-dtos
>
> -Ursprüngliche Nachricht-
> Von: Simecsek Timothy
> Gesendet: Donnerstag, 22. September 2016 10:58
> An: users@isis.apache.org
> Betreff: Display HashMap in UI
>
> Hi,
>
> I'm using a Map in one of our DomainObjects which is
> stored in one column of this class.
> This is the definition:
> //region > requestHeaders (collection)
> private Map requestHeaders = Maps.newHashMap();
>
> @MemberOrder(sequence = "2.0")
> @CollectionLayout(named = "request headers", render = RenderType.EAGERLY)
> @Persistent(defaultFetchGroup = "true") public Map
> getRequestHeaders() {
> return requestHeaders;
> }
>
> private void setRequestHeaders(final Map requestHeaders) {
> this.requestHeaders = requestHeaders; } //endregion
>
> Now I want to display the content of the Map in the UI. Currently it shows
> me:
> ...
> Request Headers   Untitled Hash Map
> ...
>
> Where "Untitled Hash Map" is a clickable object but when I click on it I'm
> forwarded to the start page.
>
> Is there any possibility to get this working with HashMap?
>
> Thanks Timothy
>
>
> __
> Disclaimer: This email and any attachments are sent in strictest
> confidence for the sole use of the addressee and may contain legally
> privileged, confidential, and proprietary data. If you are not the intended
> recipient, please advise the sender by replying promptly to this email and
> then delete and destroy this email and any attachments without any further
> use, copying or forwarding.
>
> __
> Disclaimer: This email and any attachments are sent in strictest confidence
> for the sole use of the addressee and may contain legally privileged,
> confidential, and proprietary data. If you are not the intended recipient,
> please advise the sender by replying promptly to this email and then delete
> and destroy this email and any attachments without any further use, copying
> or forwarding.
>


Re: object level ownership / tenancy

2016-09-23 Thread Óscar Bou - GOVERTIS
Hi, Martin.

We discussed about this recently.

Please, read this thread [1] and determine if it can be helpful for your use 
case or need more detail.

Regards,

Oscar

[1] 
https://lists.apache.org/thread.html/%3c9d9b9075-c6b8-4637-80a3-0d4801bfa...@govertis.com%3E
 




> El 23 sept 2016, a las 8:07, Martin  escribió:
> 
> Hello,
> 
> We want to give ownership of specific objects in the domain model to a
> subset of users.
> 
> Example: an application to manage concerts, and a subset of the users is
> the concert organization committee. The members of
> the organization committee can be added and removed at runtime or defined
> when creating a new concert object. A user can be assigned to be a member
> of multiple committees, and the members of a concerts organization
> committee should be granted permissions to manipulate the concert and its
> associated objects.
> 
> I looked at the isis-security-module (
> https://github.com/isisaddons/isis-module-security) and also at the
> tenancy, but I had trouble figuring out if this could actually serve our
> needs.
> 
> How would one go about this with apache isis?
> 
> Thanks and regards,
> Martin



Óscar Bou Bou
Socio - IT & GRC Management Services Director
m: +34 620 267 520
s:  www.govertis.com  e: 
o@govertis.com 

LinkedIn: https://www.linkedin.com/in/oscarbou 

Twitter:@oscarbou 



Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen 
información reservada que no puede ser difundida. Si usted ha recibido este 
correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al 
remitente mediante reenvío a su dirección electrónica; no deberá copiar el 
mensaje ni divulgar su contenido a ninguna persona.

Su dirección de correo electrónico junto a sus datos personales constan en un 
fichero titularidad de GOVERTIS ADVISORY SERVICES, S.L. cuya finalidad es la de 
mantener el contacto con Ud. Si quiere saber de qué información disponemos de 
Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito 
al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: 
GOVERTIS ADVISORY SERVICES, S.L. Avda Cortes Valencianas, 58 – 8º - 6ª. 46015 - 
Valencia,  y Paseo de la Castellana, 153, 28045 - MADRID. Asimismo, es su 
responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan 
virus informáticos, y en caso que los tuvieran eliminarlos.




AW: Display HashMap in UI

2016-09-23 Thread Simecsek Timothy
Hi,

I was able to find a solution that I want to share:

In the domain object I added this method:
@MemberOrder(sequence = "2.0")
@PropertyLayout(hidden = Where.ALL_TABLES)
@CollectionLayout(named = "request headers", render = RenderType.EAGERLY)
@XmlElementWrapper
@NotPersistent
public ArrayList getStringListElement() {
final ArrayList stringMapVo = Lists.newArrayList();
for (String key : this.getRequestHeaders().keySet()) {
final StringMapElementVo stringMapElement = new 
StringMapElementVo();
stringMapElement.setKey(key);
stringMapElement.setValue(this.getRequestHeaders().get(key));
stringMapVo.add(stringMapElement);
}
return  stringMapVo;
}

And set the persisted field to not show:
private Map requestHeaders = Maps.newHashMap();

@PropertyLayout(hidden = Where.EVERYWHERE)
@Persistent(defaultFetchGroup = "true")
public Map getRequestHeaders() {
return requestHeaders;
}

And here the JAXB annotated DTO see [1] :
@XmlRootElement(name = "KeyValueElement")
@DomainObject(editing = Editing.DISABLED)
public class StringMapElementVo {

public StringMapElementVo() {
}

//region > key (property)
private String key;

public String getKey() {
return key;
}

public void setKey(final String key) {
this.key = key;
}
//endregion

//region > value (property)
private String value;

public String getValue() {
return value;
}

public void setValue(final String value) {
this.value = value;
}
//endregion
}

I used a very similar approach for a List property also. This way it 
displays in the UI like any other collection of persistent Domain Objects. If 
you need this to act as an object you can add another DTO around it.

Regards Timothy

[1] https://isis.apache.org/guides/ugbtb.html#2.3.-jaxb-annotated-dtos 

-Ursprüngliche Nachricht-
Von: Simecsek Timothy
Gesendet: Donnerstag, 22. September 2016 10:58
An: users@isis.apache.org
Betreff: Display HashMap in UI

Hi,

I'm using a Map in one of our DomainObjects which is stored in 
one column of this class.
This is the definition:
//region > requestHeaders (collection)
private Map requestHeaders = Maps.newHashMap();

@MemberOrder(sequence = "2.0")
@CollectionLayout(named = "request headers", render = RenderType.EAGERLY) 
@Persistent(defaultFetchGroup = "true") public Map 
getRequestHeaders() {
return requestHeaders;
}

private void setRequestHeaders(final Map requestHeaders) {
this.requestHeaders = requestHeaders; } //endregion

Now I want to display the content of the Map in the UI. Currently it shows me:
...
Request Headers   Untitled Hash Map
...

Where "Untitled Hash Map" is a clickable object but when I click on it I'm 
forwarded to the start page.

Is there any possibility to get this working with HashMap?

Thanks Timothy


__
Disclaimer: This email and any attachments are sent in strictest confidence for 
the sole use of the addressee and may contain legally privileged, confidential, 
and proprietary data. If you are not the intended recipient, please advise the 
sender by replying promptly to this email and then delete and destroy this 
email and any attachments without any further use, copying or forwarding.

__
Disclaimer: This email and any attachments are sent in strictest confidence
for the sole use of the addressee and may contain legally privileged,
confidential, and proprietary data. If you are not the intended recipient,
please advise the sender by replying promptly to this email and then delete
and destroy this email and any attachments without any further use, copying
or forwarding.


Re: Action is not working on deployment

2016-09-23 Thread Dan Haywood
no worries

On 23 September 2016 at 04:22, Stephen Cameron 
wrote:

> Oh dear, this was working all along. Its much slower on the production
> system for some reason.
>
> Sorry for wasting peoples precious time (incliding my own).
>
> On Sat, Sep 17, 2016 at 9:21 AM, Stephen Cameron <
> steve.cameron...@gmail.com
> > wrote:
>
> > Thanks for the suggestions, I'll have time to get into this properly,
> > figure out the details of Wicket etc., later in the coming week.
> >
> > On Fri, Sep 16, 2016 at 6:44 PM, Dan Haywood <
> d...@haywood-associates.co.uk
> > > wrote:
> >
> >> Hi Steve,
> >>
> >> Hmm, thanks for your work on this so far.
> >>
> >> Unfortunately, I haven't been able to reproduce.  I've run up the
> >> kitchensink on one dev box, and then accessed it from another, with
> >> kitchensink running in SERVER rather than prototype mode.  On the
> >> "semantics" menu it will return an object that has a no-arg action "Safe
> >> action", and this invokes just fine.
> >>
> >> My suggestion is trying to trace the interaction from Wicket's
> javascript,
> >> see where it gets stuck.  If you use Chrome dev tools, you should be
> able
> >> to find the callback, eg [1].  I know you say you aren't seeing any
> >> network
> >> interaction, but if you were, then (with "preserve log" checked), you
> >> would
> >> see something like [2], ie an initial XHR request to invoke the action,
> >> which ultimately returns a response code for the javascript to request
> the
> >> next version of the entity (or at least, the bit of the page to be
> >> repainted).
> >>
> >> If you can't find the callback in the first place, then I guess there's
> >> some sort of issue with javascript resources not being downloaded, or
> with
> >> the Wicket callbacks not being wired together somehow when the HTML DOM
> is
> >> initially built.
> >>
> >> If you can find the callback, then I guess it's hitting some sort of
> >> network issue.
> >>
> >> @martin-g ... any further insights/clues/debugging suggestions?
> >>
> >> Thx
> >> Dan
> >>
> >>
> >>
> >> [1] http://imgur.com/a/RUVvW
> >> [2] http://imgur.com/a/vwAbC
> >>
> >>
> >>
> >>
> >>
> >>
> >> On 14 September 2016 at 11:45, Stephen Cameron <
> >> steve.cameron...@gmail.com>
> >> wrote:
> >>
> >> >
> >> >
> >> > This is the HTML DOM from Chrome for the Add Next (Scheduled Activity)
> >> > button.
> >> >
> >> >
> >> > 
> >> > 
> >> > 
> >> > 
> >> > Add
> >> > Next
> >> > 
> >> > 
> >> > 
> >> > 
> >> >
> >> >
> >> > This is what is present for the single arg Action
> >> >
> >> > 
> >> > 
> >> > 
> >> > 
> >> > Add
> >> > Many
> >> > 
> >> > 
> >> > 
> >> > 
> >> >
> >> > There is no difference. The  href="javascript:;" is maybe just a place
> >> > holder to make the markup legal and the actual javascript routine
> >> executed
> >> > is updated after page load. So, I need to see that enhance DOM to know
> >> > where to start I guess.
> >> >
> >> > However,  that the no-args 'Add Next' button works on one system and
> not
> >> > on another, might suggest something to someone.
> >> >
> >> > It maybe suggests that something important is not getting to the
> client?
> >> >
> >> > I now have a work-around, so urgency is not so great,  I can work on
> >> > resolving this as time allows.
> >> >
> >> > Regards
> >> > Steve C
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > On Wed, Sep 14, 2016 at 10:20 AM, Stephen Cameron <
> >> > steve.cameron...@gmail.com> wrote:
> >> >
> >> >> Network activity with no args Action: none!
> >> >>
> >> >> Network activity with 1-parameter Action: some, see request below
> >> >>
> >> >> GET /chats/wicket/entity?14-1.IBehaviorListener.0-theme-entityPa
> >> >> geContainer-entity-rows-1-rowContents-1-col-entityHeader
> >> >> Panel-entityActions-additionalLinkList-additionalLinkItem-0-
> >> additionalLink&_=1473812104907
> >> >> HTTP/1.1
> >> >> Host: lifechatsdb
> >> >> Connection: keep-alive
> >> >> Wicket-FocusedElementId: id195
> >> >> User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64)
> AppleWebKit/537.36
> >> >> (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36
> >> >> Accept: application/xml, text/xml, */*; q=0.01
> >> >> X-Requested-With: XMLHttpRequest
> >> >> Wicket-Ajax: true
> >> >> Wicket-Ajax-BaseURL: entity?14
> >> >> Referer: http://lifechatsdb/chats/wicket/entity?14
> >> >> Accept-Encoding: gzip, deflate, sdch
> >> >> Accept-Language: en-US,en;q=0.8
> >> >> Cookie: LoggedIn=PjpOK6Pku8mL27old8t-DA;
> >> isis..viewer..wicket..themes..selected=Flatly;
> >> >> isisWicketRememberMe=VQ_ElYTPZMrqNSoiJsEZ2G0ktvE5ArT4;
> >> >> JSESSIONID=wdt3bnexk6vx16c6cmh9g57mf
> >> >>
> >> >>
> >> >>
> >> >> The
> >> >>
> >> >> On Wed, Sep 14, 2016 at 10:04 AM, Stephen 

object level ownership / tenancy

2016-09-23 Thread Martin
Hello,

We want to give ownership of specific objects in the domain model to a
subset of users.

Example: an application to manage concerts, and a subset of the users is
the concert organization committee. The members of
the organization committee can be added and removed at runtime or defined
when creating a new concert object. A user can be assigned to be a member
of multiple committees, and the members of a concerts organization
committee should be granted permissions to manipulate the concert and its
associated objects.

I looked at the isis-security-module (
https://github.com/isisaddons/isis-module-security) and also at the
tenancy, but I had trouble figuring out if this could actually serve our
needs.

How would one go about this with apache isis?

Thanks and regards,
Martin