-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only the first line in a multiline textbox is saved #223
Comments
The current code in
I replaced the code with the built in public void setCustomPublisherData(final CustomPublisherContainer publisher) throws PublisherException, IOException {
publisher.setClassPath(customPublisherCurrentClass);
if (!publisher.isCustomUiRenderingSupported()) {
publisher.setPropertyData(customPublisherPropertyData);
return;
}
final Properties properties = new Properties();
properties.putAll(publisher.getCustomUiPropertyList(EjbcaJSFHelper.getBean().getAdmin()).stream()
.map(p -> getEntry(p))
.collect(Collectors.toMap(Entry::getKey, Entry::getValue)));
final StringWriter writer = new StringWriter();
properties.store(new PrintWriter(writer), "");
final String customPublisherDataString = writer.getBuffer().toString();
log.info("Setting custom publisher data:" + System.lineSeparator() + customPublisherDataString);
publisher.setPropertyData(customPublisherDataString);
}
private SimpleEntry<?, ?> getEntry(final CustomPublisherProperty p) {
if (p.getType() == CustomPublisherProperty.UI_TEXTINPUT_PASSWORD &&
customPublisherPropertyValues.get(p.getName()).equals(PASSWORD_PLACEHOLDER)) {
return new AbstractMap.SimpleEntry<>(p.getName(), p.getValue());
} else {
return new SimpleEntry<>(p.getName(), customPublisherPropertyValues.get(p.getName()));
}
} The same data is now saved as:
However, it is still not loaded correctly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When creating a custom publisher with a
CustomPublisherProperty.UI_TEXTOUTPUT
only the first line of the text entered into the multiline textbox is saved.How can it be fixed best?
The text was updated successfully, but these errors were encountered: