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-entityPageContainer-entity-rows-1-rowContents-1-col-entityHeaderPanel-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 Cameron < [email protected]> wrote: > Hi Oscar, > > I am setting both sides, setParentActivity(this); is where the > child->parent object reference is created. > > I added the code simply to show its just a very simple method (that works > just fine on my laptop). > > It seems that the problem does in fact relate to the action having no > parameters(arguments)! > > I show this I created another action as below > > @Action > public RecurrentActivity addMany(Integer count){ > for(int i = 0; i<count; i++){ > addNextScheduledActivity() > } > return this; > } > > This works, it just calls the 'problematic' no-args action in a loop > depending on how many times you pass as an Integer parameter. > > I'll try to snoop on the requests using Chrome as Jeroen suggested. > > Steve > > > > > > On Tue, Sep 13, 2016 at 10:22 PM, Óscar Bou - GOVERTIS <[email protected] > > wrote: > >> Hi, Steve. >> >> You’re not setting both sides of the relationship (only adding to the >> collection, but not setting the property on the other side, assuming it’s a >> 1-n relationship). >> >> This is managed through 2 DN properties: >> - datanucleus.manageRelationships >> - datanucleus.manageRelationshipsChecks >> >> Have you introduced any changes on the “persistor_datanucleus.properties” >> file? >> >> Usually you will find something like: >> >> # Manage Relationships >> isis.persistor.datanucleus.impl.datanucleus.manageRelationships=true >> isis.persistor.datanucleus.impl.datanucleus.manageRelationshipsChecks=true >> >> >> >> Cheers, >> >> Oscar >> >> >> >> >> [1] http://www.datanucleus.org/products/datanucleus/jdo/orm/ >> relationships.html >> >> >> El 13 sept 2016, a las 14:14, Jeroen van der Wal <[email protected]> >> escribió: >> >> My first step would be to watch the network activity in Chrome developer >> tools [1]. Secondly you can set up remote debugging of your app [2]. >> >> [1] https://developer.chrome.com/devtools >> [2] >> http://blog.trifork.com/2014/07/14/how-to-remotely-debug-app >> lication-running-on-tomcat-from-within-intellij-idea/ >> >> On 13 September 2016 at 13:38, Stephen Cameron < >> [email protected]> >> wrote: >> >> Hi, >> >> I have an unusual situation where the behaviour of what is apparently the >> same configuration of my app differs on two different systems. When I >> deploy my app to a clients server there is one action that produces no >> effects whereas on my development machine it works as expected. >> >> The norma; effect is to add new objects to a collection, each click of the >> action should create a new collection member. >> >> At the client site all other action buttons work as expected, only one has >> the problem. All I can think that is unusual about this one compared to >> all the others is that it has no parameters. >> >> I've made a copy of the database as the clients sit'e, imported that at >> home and everything works. >> >> I am using the Isis security module, but I don't think that is causing a >> problem, the action button is not greyed out as inactivated. >> >> I've used three different browsers at the client's site, all have the same >> issue. >> >> The action is simple >> >> @Action >> public RecurringActivity addNextScheduledActivity() { >> if (getChildActivities().size() == 0) { >> if (getStartDateTime() == null) { >> container.warnUser("Please set 'Start date time' for this >> Recurring Activity (as starting time from which to schedule more activity >> events)"); >> } else { >> ActivityEvent obj = >> container.newTransientInstance(ActivityEvent.class); >> obj.setParentActivity(this); >> obj.setName(getName()); >> obj.setAbbreviatedName(getAbbreviatedName()); >> //set time one second ahead for comparison inequality >> obj.setStartDateTime(getStartDateTime().plusSeconds(1)); >> getChildActivities().add(obj); >> container.persistIfNotAlready(obj); >> container.flush(); >> } >> } else { >> // find last event from which to schedule next >> // first should be last in chronological order >> DateTime origin = >> getChildActivities().first().getStartDateTime(); >> ActivityEvent obj = >> container.newTransientInstance(ActivityEvent.class); >> obj.setParentActivity(this); >> obj.setName(getName()); >> obj.setAbbreviatedName(getAbbreviatedName()); >> switch (getPeriodicity()) { >> case DAILY: >> obj.setStartDateTime(origin.plusDays(1)); >> break; >> case WEEKLY: >> obj.setStartDateTime(origin.plusDays(7)); >> break; >> case FORTNIGHTLY: >> obj.setStartDateTime(origin.plusDays(14)); >> break; >> case MONTHLY: >> obj.setStartDateTime(origin.plusDays(28)); >> break; >> case BIMONTHLY: >> obj.setStartDateTime(origin.plusDays(56)); >> break; >> } >> getChildActivities().add(obj); >> container.persistIfNotAlready(obj); >> container.flush(); >> } >> return this; >> } >> >> I can start adding some debug messages to this code, but is there a >> smarter >> way to find out happens at the client and server sides? >> >> I guess one distinct difference is that in my development environment the >> client and server are on the same machine, but in deployment they aren't. >> >> Thanks for any advice. >> >> Steve Cameron >> >> >> >> Óscar Bou Bou >> Socio - IT & GRC Management Services Director >> m: +34 620 267 520 >> s: <http://www.govertis.com>www.govertis.com e: [email protected] >> >> LinkedIn: https://www.linkedin.com/in/oscarbou >> Twitter: @oscarbou <https://twitter.com/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. >> >> >
