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 <[email protected] > 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 <[email protected] > > 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 < >> [email protected]> >> wrote: >> >> > >> > >> > This is the HTML DOM from Chrome for the Add Next (Scheduled Activity) >> > button. >> > >> > <div class="btn-group"> >> > <div id="id1b2"> >> > <ul class="additionalLinkList additionalLinkListInline >> > list-unstyled list-inline" id="id1b3"> >> > <li class="additionalLinkItem" title="Adds another child >> > Activity"> >> > <a href="javascript:;" class="btn btn-sm btn-default >> > noVeil RecurringActivity-addNextScheduledActivity" id="id1a1"> >> > <span class="fa fa-fw fa-plus-square >> > fontAwesomeIcon"></span><span class="additionalLinkItem add-next">Add >> > Next</span> >> > </a> >> > </li> >> > </ul> >> > </div> >> > </div> >> > >> > This is what is present for the single arg Action >> > >> > <div class="entityActions" id="id1ad"> >> > <ul class="additionalLinkList additionalLinkListInline >> > list-unstyled list-inline" id="id1ae"> >> > <li class="additionalLinkItem" title=""> >> > <a href="javascript:;" class="btn btn-sm btn-default >> > noVeil RecurringActivity-addMany" id="id195"> >> > <span class="fa fa-fw fa-plus-square >> > fontAwesomeIcon"></span><span class="additionalLinkItem add-many">Add >> > Many</span> >> > </a> >> > </li> >> > </ul> >> > </div> >> > >> > 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 < >> > [email protected]> 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 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.propert >> ies” >> >>>> file? >> >>>> >> >>>> Usually you will find something like: >> >>>> >> >>>> # Manage Relationships >> >>>> isis.persistor.datanucleus.impl.datanucleus.manageRelationships=true >> >>>> isis.persistor.datanucleus.impl.datanucleus.manageRelationsh >> ipsChecks=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(getStartD >> ateTime().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. >> >>>> >> >>>> >> >>> >> >> >> > >> > >
