public String getEncodedClientData() { return urlEncoder.encode(getClientData()); } }
public String encodeValue(Object value) { String valueEncoded = value == null ? null : valueEncoder.toClient(value); return urlEncoder.encode(valueEncoded); }
@Test(dataProvider = "encoder_inputs") public void encode(String input, String expectedOutput) { String output = encoder.encode(input); assertEquals(output, expectedOutput); if (input != null && input.equals(output)) assertSame(input, output, "When no change occurs, the input object should be passed through as is."); }
public void handleEvent(Component instance, ComponentEvent event) { Object value = handle.get(instance); if (value == null) { return; } Link link = event.getEventContext().get(Link.class, 0); String clientValue = encoder.toClient(value); // TAP5-1768: escape special characters clientValue = urlEncoder.encode(clientValue); link.addParameter(parameterName, clientValue); } };
urlEncoder.encode(failurePage)), "Go to page <strong>%s</strong> (with reload)", failurePage);