Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2014 Philip Helger (www.helger.com) philip[at]helger[dot]com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package com.helger.webbasics.form;
 
 
 
 
 public class RequestField extends RequestFieldData implements IHCRequestField
 {
  
Copy constructor

Parameters:
aRF The request field to copy the values from. May not be null.
 
   public RequestField (@Nonnull final RequestFieldData aRF)
   {
     super (aRF);
   }

  
Create a new request field that has no default value

Parameters:
sFieldName The field name to use. May neither be null nor empty.
 
   public RequestField (@Nonnull @Nonempty final String sFieldName)
   {
     super (sFieldName);
   }

  
Default constructor.

Parameters:
sFieldName The field name to use. May neither be null nor empty.
sDefaultValue The default value to use, if no value is present in the request scope.
 
   public RequestField (@Nonnull @Nonempty final String sFieldName, @Nullable final String sDefaultValue)
   {
     super (sFieldNamesDefaultValue);
   }

  
Utility constructor that uses an optional default value provider that has an ID

Parameters:
sFieldName The field name to use. May neither be null nor empty.
aDefaultValueProvider The object who's ID is to be used. May be null in which case no default value is used
 
   public RequestField (@Nonnull @Nonempty final String sFieldName, @Nullable final IHasID <StringaDefaultValueProvider)
   {
     super (sFieldNameaDefaultValueProvider);
   }

  
Helper constructor using a BigDecimal instead of a String.

Parameters:
sFieldName The field name to use. May neither be null nor empty.
aDefaultValue The default value to be used. Is converted to a String. May be null.
 
   public RequestField (@Nonnull @Nonempty final String sFieldName, @Nullable final BigDecimal aDefaultValue)
   {
     super (sFieldNameaDefaultValue == null ? null : aDefaultValue.toString ());
   }

  
Helper constructor using an int instead of a String.

Parameters:
sFieldName The field name to use. May neither be null nor empty.
nDefaultValue The default value to be used. Is converted to a String
  public RequestField (@Nonnull @Nonempty final String sFieldNamefinal int nDefaultValue)
  {
    super (sFieldNamenDefaultValue);
  }

  
Helper constructor using a long instead of a String.

Parameters:
sFieldName The field name to use. May neither be null nor empty.
nDefaultValue The default value to be used. Is converted to a String
  public RequestField (@Nonnull @Nonempty final String sFieldNamefinal long nDefaultValue)
  {
    super (sFieldNamenDefaultValue);
  }
New to GrepCode? Check out our FAQ X