Question

I am working on a project that is Spring Web Flow and I am using Dojo (Dijit) for the UI and I have a dropdown(select) one of my screens and I would like to see if I can set the size of it.. its to long! Like I would like it to have a scollbar and show maybe 4 at a time

<td><form:select path="number" id="number" name="number">
                            <form:option value="1" label="1" />
                            <form:option value="2" label="2" />
                            <form:option value="3" label="3" />
                            <form:option value="4" label='4" />
                            <form:option value="5" label="5" />
                            <form:option value="6" label="6" />
                            <form:option value="7" label="7" />
                            <form:option value="8" label="8" />
                            <form:option value="9" label="9" />
                            <form:option value="10" label="10" />
                            <form:option value="11" label="11" />

                        </form:select > 
                        <script type="text/javascript">
                        Spring.addDecoration(new Spring.ElementDecoration({
                            elementId : "number",
                            widgetType : "dijit.form.Select",
                            widgetAttrs : {
                            promptMessage : "Pick Number",
                            required : true, 
                            onChange : function() {
                                Spring.remoting.submitForm(
                                    'submit', 
                                    'customer', 
                                    {_eventId: 'numberchange', fragments:'contents'}
                                 ); 
                                 return false;
                            } }}));


                    </script>
Was it helpful?

Solution

dijit.form.Select will be scrollable if you set the maxHeight property

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top