The Apex Pages component reference for 'scontrol' states for the 'Width' Integer attribute:
The width of the inline frame that should display the s-control, expressed either as a percentage of the total available horizontal space (for example width="80%"), or as the number of pixels (for example, width="600px").
When I attempt to set width="100%" I recieve the following error:
Error: Cannotcoerce '100%' to classjava.lang.Integer
Either the documentation is wrong or the conversion behind the scenes is not taking into account percentages.
For the moment I'm setting my width attribute to px but a percentage for width would be ideal.
Percentage values for <apex:scontrol width> is supported in a rather bizarre (and incorrectly documented) way currently - if you specify a negative integer value it will be interpreted as the absolute value expressed as a percent. For example:
Code:
<apex:scontrol width="-100">
will result in the generated iframe element with a width="100%" attribute.
No support for percentage height is planned at this time.
sorry, this is the issue.
Regular Contributor
Posts: 23
Message 1 of 1
Viewed 5009 times
When I attempt to set width="100%" I recieve the following error:
Either the documentation is wrong or the conversion behind the scenes is not taking into account percentages.
For the moment I'm setting my width attribute to px but a percentage for width would be ideal.
will result in the generated iframe element with a width="100%" attribute.
No support for percentage height is planned at this time.