View | Details | Raw Unified | Return to bug 29652
Collapse All | Expand All

(-)xml/input.xml (-1 / +9 lines)
Lines 764-772 Link Here
764
        <description>options values for select</description>
764
        <description>options values for select</description>
765
        <availability>1.1</availability>
765
        <availability>1.1</availability>
766
      </attribute>
766
      </attribute>
767
768
      <attribute>
769
        <name>ignoreRequest</name>
770
        <required>false</required>
771
        <rtexprvalue>true</rtexprvalue>
772
        <type>boolean</type>
773
        <description>If true, ignore any request parameters when determining which option should be selected.  (I.e., always select the default option(s).)  Default is false.</description>
774
      </attribute>
767
    </tag>
775
    </tag>
768
    
776
    
769
    <!-- option tag -->    
777
    <!-- option tag -->
770
    <tag>
778
    <tag>
771
      <name>option</name> 
779
      <name>option</name> 
772
      <tag-class>org.apache.taglibs.input.Option</tag-class>
780
      <tag-class>org.apache.taglibs.input.Option</tag-class>
(-)src/org/apache/taglibs/input/Select.java (-3 / +17 lines)
Lines 40-45 Link Here
40
    private String attributesText; // attributes of the <input> element as text
40
    private String attributesText; // attributes of the <input> element as text
41
    private String beanId;      // bean id to get default values from
41
    private String beanId;      // bean id to get default values from
42
    private boolean multiple;   // select multiple
42
    private boolean multiple;   // select multiple
43
    private boolean ignoreRequest;  // ignore request parameters (always use default)
43
    private String size;           // select size
44
    private String size;           // select size
44
    private List optionLabels;   // a list of option labels
45
    private List optionLabels;   // a list of option labels
45
    private List optionValues;   // a list of option values
46
    private List optionValues;   // a list of option values
Lines 106-112 Link Here
106
            }
107
            }
107
            else {
108
            else {
108
                // get the current selection from the request
109
                // get the current selection from the request
109
                selected = req.getParameterValues(name);
110
                if (ignoreRequest) {
111
                    selected = null;
112
                } else {
113
                    selected = req.getParameterValues(name);
114
                }
110
                if ( selected == null ) {
115
                if ( selected == null ) {
111
                    // Use defaults
116
                    // Use defaults
112
                    if ( dValArray != null && dVal != null ) {
117
                    if ( dValArray != null && dVal != null ) {
Lines 221-227 Link Here
221
    public void setMultiple( boolean x ) {
226
    public void setMultiple( boolean x ) {
222
        multiple = x;
227
        multiple = x;
223
    }
228
    }
224
    
229
230
    public void setIgnoreRequest(boolean ignoreRequest) {
231
        this.ignoreRequest = ignoreRequest;
232
    }
233
225
    public void setSize( String x ) {
234
    public void setSize( String x ) {
226
        size = x;
235
        size = x;
227
    }
236
    }
Lines 302-308 Link Here
302
     * @return Value of property multiple.
311
     * @return Value of property multiple.
303
     */
312
     */
304
    public boolean isMultiple() { return multiple; }
313
    public boolean isMultiple() { return multiple; }
305
    
314
315
    /** Getter for property ignoreRequest.
316
     * @return Value of property ignoreRequest.
317
     */
318
    public boolean isIgnoreRequest() { return ignoreRequest; }
319
306
    /** Getter for property optionLabels.
320
    /** Getter for property optionLabels.
307
     * @return Value of property optionLabels.
321
     * @return Value of property optionLabels.
308
     */
322
     */

Return to bug 29652