RE: Making a grid's checkbox column preserve its checked state across pages

2016-02-27 Thread Svein-Erik Løken
A working example if needed :



Route Edit ${routeEditChangedIndicator}
Create
Update
Delete



Route Id: ${routeId}
Selected ts2Id: ${ts2Id}
Route length: ${routeLengthInKmFormatted} km





Close


















Ctrl + Click to Add
Ctrl + Shift + Click to Remove




void onSubmitUpdate() {
isRouteChanged = true;
routeChangedAjaxResponse();
}

void onSubmitSave() {
routeService.saveRoute(routeId, routeElements);
isRouteChanged = false;
routeChangedAjaxResponse();
}


private void routeChangedAjaxResponse() {
if (request.isXHR()) {
final JSONArray jsonRouteElements = new JSONArray();
for (final FreshRouteelement freshRouteelement : this.routeElements) {
JSONArray latLngs = new JSONArray();
for (Coordinate coordinate : 
freshRouteelement.getTracksegment2ByTrackSegment2Id().getLineString().getCoordinates())
 {
latLngs.put(new LatLng(coordinate.y, 
coordinate.x).getJsonObject());
}
jsonRouteElements.put(new JSONObject(
"ts2Id", freshRouteelement.getTrackSegment2Id(),
"rev", freshRouteelement.getReverseDirection(),
"latLngs", latLngs));
}
ajaxResponseRenderer
.addRender(routeEditZone)
.addCallback(new JavaScriptCallback() {
@Override
public void run(JavaScriptSupport javascriptSupport) {

javascriptSupport.require("map/map-superadmin").invoke("updateRouteHelperLine")
.with(new JSONObject("routeElements", 
jsonRouteElements));
}
});
setRouteChangedFlagAjaxResponse(isRouteChanged);
}
}



Re: Selenium test cases fail building 5.4

2016-02-27 Thread Barry Books
No problem I've had this problem many times before. The thing that threw me
at first was the error I got running from Eclipse was "address already in
use" so I spent a bunch of time trying to figure out what that could
possibly be.

On Friday, February 26, 2016, Bob Harner  wrote:

> Yep, sorry we didn't get the docs updated before you ran into that. As you
> saw, an older Firefox version is needed. (Or, current Firefox versions work
> with upgraded versions of Selenium (v2.52.0) long as a build.gradle is
> switched to use Java 1.7 or newer.)
> Firefox 42 worked
>
> On Friday, February 26, 2016, Barry Books >
> wrote:
>
> > I downloaded Firefox version 40 and it at least tries to run the test
> > cases but crashes. Is there a preferred version?
> >
> > On Friday, February 26, 2016, Barry Books  
> > ');>>
> wrote:
> >
> >> Now that 5.4 is out I'd like to submit a couple of small patches so I
> >> downloaded 5.4 and followed the instructions here
> >>
> >> https://tapestry.apache.org/building-tapestry-from-source.html
> >>
> >> everything went smoothly but the following tests fail
> >>
> >> ActivationContextIntegrationTests. testStartup
> >>
> >> ActivationContextIntegrationTests2. testStartup
> >>
> >> DoctypeTests. testStartup
> >>
> >> PageCatalogTests. testStartup
> >>
> >> ProductionModeTests. testStartup
> >>
> >> AppFolderTests. testStartup
> >>
> >> LinkTransformerIntegrationTest. testStartup
> >>
> >> ReloadTests. testStartup
> >>
> >> GridSymbolDemoTests. testStartup
> >>
> >> When I run gradle build from the command line I get this message in
> >> Firefox (version 44.0.2) running on OS X 10.11.3
> >>
> >> Firefox can't find the file at
> >>
>
> chrome://src/content/RemoteRunner.html?sessionId=2b72c3d62fe64efc89a7a00e35e19f1c=true=
> >>
>
> http://localhost:9090/=false=http://localhost:/selenium-server/driver/
> >> .
> >>
> >> which seems to match this issue which basically says this is deprecated
> >> and no longer works
> >>
> >> https://github.com/SeleniumHQ/selenium/issues/1444
> >>
> >> Is this the case or is there some other trick that's not in the build
> >> instructions?
> >>
> >>
> >>
> >>
>