Let me try to explain my response better:
In your portlets you can create your portlet preferences with the type specified as ‘Boolean’. All this is actually doing is changing how the getter and setter methods are generated in your portlet preferences managed bean. In the internal implementation details of the portlet property bag, the preference values are always stored as String or String.
You should see something like the following snippet in the portlet managed bean where the “getPreferenceValue(…)” call in the getter method is doing the work to convert the preference value from the String value that is stored and passed around to a Boolean object. This is just a convenience to make it easier to use the preference value from java code or in binding expressions.
public Boolean getBooleanPrefOne() throws Exception {
return (Boolean) getPreferenceValue("booleanPrefOne", Boolean.class);
}
public void setBooleanPrefOne(Boolean booleanPrefOne) throws Exception {
setPreferenceValue("booleanPrefOne", booleanPrefOne);
}
Now, in your source portlet where you are specifying the parameter that you want to send to the included portlet, that value must be sent as either a String or String to comply with the portlet 1.0 specification.
If your original “value” binding expression resolves to something other than a string like a boolean or number then one way to do make it a String is to let the expression language do the conversion by appending the boolean value to the end of an empty string.
For example:
If you previously specified the parameter value as something like this:
#{TestDefaultviewView.test.booleanPrefOne}
Change it to something like this so it resolves to a String instead of a boolean:
#{""}#{TestDefaultviewView.test.booleanPrefOne}
Basically the portlet include parameter is sent as a string, and then the target portlet usually already has the code that does the conversion from that string to a Boolean whenever the target portlet uses the “getter” method from the portlet managed bean.
Hopefully that makes sense.
#webMethods#webMethods-BPMS#MWS-CAF-Task-Engine