Skip to content
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

Bean Dialog - empty input #293

Closed
nirlib opened this issue Apr 27, 2017 · 1 comment
Closed

Bean Dialog - empty input #293

nirlib opened this issue Apr 27, 2017 · 1 comment

Comments

@nirlib
Copy link

nirlib commented Apr 27, 2017

When field in bean dialog is not produced the value is null.
When field in bean dialog is produced and then deleted the value is empty string.
(for String - empty string, for File - File object with empty string)

@itaiag itaiag self-assigned this Jun 21, 2017
@itaiag itaiag added this to the 6.1.06 milestone Jun 25, 2017
@itaiag itaiag changed the title Bean Diaolg - empy input Bean Dialog - empty input Jul 12, 2017
@itaiag
Copy link
Contributor

itaiag commented Jul 12, 2017

One option for a fix is to edit the LinkedHashMap<String, String> propertiesToMap(Properties properties) in the GenericObjectParameterProvider class:

	private static LinkedHashMap<String, String> propertiesToMap(Properties properties){
		LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
		Set<Object> keys = properties.keySet();
		for(Object key: keys){
			map.put(key.toString(), properties.getProperty(key.toString()));
		}
		return map;
	}

In case the value of the property is empty, the property should not be added to the map at all.

itaiag pushed a commit that referenced this issue Jul 18, 2017
Fix for cases in which bean value is deleted, the value will be now null instead of empty string. issue #293
@itaiag itaiag closed this as completed Sep 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants