Keith Robertson wrote:
Hi,
I'm using Struts 2 and I'm trying to get the UI tag "label" to appear to
the
immediate left of a combobox that does not come from the Struts 2 tag
library. If I were using the a predefined Struts 2 tag like <s:combobox
..../> the layout would look like this...
+-------------------------------------------------+
| Name : COMBOBOX_HERE |
+-------------------------------------------------+
However, in my case the label and combobox look like this...
+-------------------------------------------------+
| COMBOBOX_HERE |
+-------------------------------------------------+
+-------------------------------------------------+
| Name : |
+-------------------------------------------------+
Does anyone have any ideas as to how to fix this? Here's a snippet of the
code...
<s:form id="PREFS-FORM">
<s:label key="STATES"/>
<select dojoType='combobox' style='width: 300px;' id='autocompleter'
autoComplete='true' mode='local'>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
</select>
</s:form>
I would guess the resusts you're seeing are a result of one of two things:
1) the Struts template theme you're using. You may need to use the
'simple' theme, at least for the s:label, to achieve the layout you want
2) the markup generated by Dojo for a 'combobox' widget. I don't know
what Dojo replaces the <select/> tag with during page rendering in the
browser. Use a DOM tree inspector to see what the DOM looks like after
Dojo has done its stuff
A combination of changing the theme and/or HTML markup in your JSP,
understanding the DOM changes Dojo makes after the page is sent and some
CSS foo should get you the desired result.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]