A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

package org.apache.wicket.markup.html.form

Code Examples of org.apache.wicket.markup.html.form.TextField


        // form and submit
        Form form = new Form("form", new CompoundPropertyModel(coverageModel));
        add( form );

        // All the fields
        TextField corePoolSize = new TextField("corePoolSize");
        corePoolSize.add(new MinimumValidator(1));
        form.add(corePoolSize);
        
        TextField maxPoolSize = new TextField("maxPoolSize");
        maxPoolSize.add(new MinimumValidator(1));
        form.add(maxPoolSize);
        
        TextField keepAliveTime = new TextField("keepAliveTime");
        keepAliveTime.add(new MinimumValidator(1));
        form.add(keepAliveTime);
        
        final DropDownChoice queueType = new DropDownChoice("queueType", Arrays.asList(CoverageAccessInfo.QueueType.values()), new QueueTypeRenderer());
        form.add(queueType);
        
        TextField imageIOCacheThreshold = new TextField("imageIOCacheThreshold");
        imageIOCacheThreshold.add(new MinimumValidator(0l));
        form.add(imageIOCacheThreshold);
                
        Button submit = new Button("submit", new StringResourceModel("submit", this, null)) {
            @Override
            public void onSubmit() {

View Full Code Here


        final IModel contactModel = getContactInfoModel();

        Form form = new Form("form", new CompoundPropertyModel(contactModel));

        add(form);
        form.add(new TextField("contactPerson" ));
        form.add(new TextField("contactOrganization"));
        form.add(new TextField("contactPosition"));
        form.add(new TextField("addressType"));
        form.add(new TextField("address")); 
        form.add(new TextField("addressCity"));
        form.add(new TextField("addressState")); 
        form.add(new TextField("addressPostalCode"));
        form.add(new TextField("addressCountry"));
        form.add(new TextField("contactVoice"));
        form.add(new TextField("contactFacsimile"));
        form.add(new TextField("contactEmail"));
        form.add(new Button("submit") {
            @Override
            public void onSubmit() {
                GeoServer gs = (GeoServer)geoServerModel.getObject();
                GeoServerInfo global = gs.getGlobal();

View Full Code Here


        final IModel contactModel = getContactInfoModel();

        Form form = new Form("form", new CompoundPropertyModel(contactModel));

        add(form);
        form.add(new TextField("contactPerson" ));
        form.add(new TextField("contactOrganization"));
        form.add(new TextField("contactPosition"));
        form.add(new TextField("addressType"));
        form.add(new TextField("address")); 
        form.add(new TextField("addressCity"));
        form.add(new TextField("addressState")); 
        form.add(new TextField("addressPostalCode"));
        form.add(new TextField("addressCountry"));
        form.add(new TextField("contactVoice"));
        form.add(new TextField("contactFacsimile"));
        form.add(new TextField("contactEmail"));
        form.add(new Button("submit") {
            @Override
            public void onSubmit() {
                GeoServer gs = (GeoServer)geoServerModel.getObject();
                GeoServerInfo global = gs.getGlobal();

View Full Code Here


        add(form);
        
        form.add(new Label("service.enabled", new StringResourceModel("service.enabled", this, null, new Object[]{
            getServiceName()
        })));
        form.add(new TextField("maintainer"));
        TextField onlineResource = new TextField("onlineResource");
        onlineResource.add(new UrlValidator());
        form.add(onlineResource);
        form.add(new CheckBox("enabled"));
        form.add(new CheckBox("citeCompliant"));
        form.add(new TextField("title"));
        form.add(new TextArea("abstract"));
        form.add(new KeywordsEditor("keywords", LiveCollectionModel.list(new PropertyModel(infoModel, "keywords"))));
        form.add(new TextField("fees"));
        form.add(new TextField("accessConstraints"));
        
        build(infoModel, form);
        
        //add the extension panels
        ListView extensionPanels = createExtensionPanelList("extensions", infoModel);

View Full Code Here


        add(form);
        
        form.add(new Label("service.enabled", new StringResourceModel("service.enabled", this, null, new Object[]{
            getServiceName()
        })));
        form.add(new TextField("maintainer"));
        TextField onlineResource = new TextField("onlineResource");
        onlineResource.add(new UrlValidator());
        form.add(onlineResource);
        form.add(new CheckBox("enabled"));
        form.add(new CheckBox("citeCompliant"));
        form.add(new TextField("title"));
        form.add(new TextArea("abstract"));
        form.add(new KeywordsEditor("keywords", LiveCollectionModel.list(new PropertyModel(infoModel, "keywords"))));
        form.add(new TextField("fees"));
        form.add(new TextField("accessConstraints"));
        
        build(infoModel, form);
        
        SubmitLink submit = new SubmitLink("submit",new StringResourceModel( "save", (Component)null, null) ) {
            @Override

View Full Code Here


        add( form );

        // All the fields
        // ... memory capacity and threshold are percentages
        NumberValidator percentageValidator = NumberValidator.range(0, 1);
        TextField memoryCapacity = new TextField("memoryCapacity");
        memoryCapacity.add(percentageValidator);
        form.add(memoryCapacity);
        TextField memoryThreshold = new TextField("memoryThreshold");
        memoryThreshold.add(percentageValidator);
        form.add(memoryThreshold);
        TextField tileThreads = new TextField("tileThreads");
        tileThreads.add(NumberValidator.POSITIVE);
        form.add(tileThreads);
        TextField tilePriority = new TextField("tilePriority");
        tilePriority.add(NumberValidator.POSITIVE);
        form.add(tilePriority);
        form.add(new CheckBox("recycling"));
        form.add(new CheckBox("jpegAcceleration"));
        form.add(new CheckBox("pngAcceleration"));
        form.add(new CheckBox("allowNativeMosaic"));

View Full Code Here


        add( form );

        // All the fields
        // ... memory capacity and threshold are percentages
        NumberValidator percentageValidator = NumberValidator.range(0, 1);
        TextField memoryCapacity = new TextField("memoryCapacity");
        memoryCapacity.add(percentageValidator);
        form.add(memoryCapacity);
        TextField memoryThreshold = new TextField("memoryThreshold");
        memoryThreshold.add(percentageValidator);
        form.add(memoryThreshold);
        TextField tileThreads = new TextField("tileThreads");
        tileThreads.add(NumberValidator.POSITIVE);
        form.add(tileThreads);
        TextField tilePriority = new TextField("tilePriority");
        tilePriority.add(NumberValidator.POSITIVE);
        form.add(tilePriority);
        form.add(new CheckBox("recycling"));
        form.add(new CheckBox("imageIOCache"));
        form.add(new CheckBox("jpegAcceleration"));
        form.add(new CheckBox("pngAcceleration"));

View Full Code Here


        originYContainer = new WebMarkupContainer("originYContainer");
        add(originYContainer);
        shearYContainer = new WebMarkupContainer("shearYContainer");
        add(shearYContainer);
        
        add( new TextField( "scaleX", new PropertyModel(this, "scaleX")) );
        shearXContainer.add( new TextField( "shearX", new PropertyModel(this, "shearX")) );
        originXContainer.add( new TextField( "originX", new PropertyModel(this, "originX")) );
        add( new TextField( "scaleY", new PropertyModel(this, "scaleY")) );
        shearYContainer.add( new TextField( "shearY", new PropertyModel(this, "shearY")) );
        originYContainer.add( new TextField( "originY", new PropertyModel(this, "originY")) );
    }
    
    @Override
    protected void onBeforeRender() {
        updateFields();

View Full Code Here


public class WFSLayerConfig extends LayerConfigurationPanel {

    public WFSLayerConfig(String id, IModel model){
        super(id, model);

        TextField maxFeatures = new TextField("perReqFeatureLimit", new PropertyModel(model, "resource.maxFeatures"));
        maxFeatures.add(NumberValidator.minimum(0));
        Border mfb = new FormComponentFeedbackBorder("perReqFeaturesBorder");
        mfb.add(maxFeatures);
        add(mfb);
        TextField maxDecimals = new TextField("maxDecimals", new PropertyModel(model, "resource.numDecimals"));
        maxFeatures.add(NumberValidator.minimum(0));
        Border mdb = new FormComponentFeedbackBorder("maxDecimalsBorder");
        mdb.add(maxDecimals);
        add(mdb);
    }

View Full Code Here


public class MimetypeNewPage extends GeoServerSecuredPage {

    TextField nameTextField;
    
    public MimetypeNewPage() {
        final TextField mimetype = new TextField("mimetype", new Model(""));
        
        final Form form = new Form("form") {
            @Override
            protected void onSubmit() {
                String newMimetype = mimetype.getModelObjectAsString();
                ProxyConfig config = ProxyConfig.loadConfFromDisk();
                config.mimetypeWhitelist.add(newMimetype);
                ProxyConfig.writeConfigToDisk(config);
                setResponsePage(ProxyAdminPage.class);
            }

View Full Code Here


public class HostnameNewPage extends GeoServerSecuredPage {

    TextField nameTextField;
    
    public HostnameNewPage() {
        final TextField hostname = new TextField("hostname", new Model(""));
        
        final Form form = new Form("form") {
            @Override
            protected void onSubmit() {
                String newHostname = hostname.getModelObjectAsString();
                ProxyConfig config = ProxyConfig.loadConfFromDisk();
                config.hostnameWhitelist.add(newHostname);
                ProxyConfig.writeConfigToDisk(config);
                setResponsePage(ProxyAdminPage.class);
            }

View Full Code Here


public class WFSLayerConfig extends LayerConfigurationPanel {

    public WFSLayerConfig(String id, IModel model){
        super(id, model);

        TextField maxFeatures = new TextField("perReqFeatureLimit", new PropertyModel(model, "resource.maxFeatures"));
        maxFeatures.add(NumberValidator.minimum(0));
        Border mfb = new FormComponentFeedbackBorder("perReqFeaturesBorder");
        mfb.add(maxFeatures);
        add(mfb);
        TextField maxDecimals = new TextField("maxDecimals", new PropertyModel(model, "resource.numDecimals"));
        maxFeatures.add(NumberValidator.minimum(0));
        Border mdb = new FormComponentFeedbackBorder("maxDecimalsBorder");
        mdb.add(maxDecimals);
        add(mdb);
    }

View Full Code Here


public class MimetypeNewPage extends GeoServerSecuredPage {

    TextField nameTextField;
    
    public MimetypeNewPage() {
        final TextField mimetype = new TextField("mimetype", new Model(""));
        
        final Form form = new Form("form") {
            @Override
            protected void onSubmit() {
                String newMimetype = mimetype.getDefaultModelObjectAsString();
                ProxyConfig config = ProxyConfig.loadConfFromDisk();
                config.mimetypeWhitelist.add(newMimetype);
                ProxyConfig.writeConfigToDisk(config);
                setResponsePage(ProxyAdminPage.class);
            }

View Full Code Here


public class HostnameNewPage extends GeoServerSecuredPage {

    TextField nameTextField;
    
    public HostnameNewPage() {
        final TextField hostname = new TextField("hostname", new Model(""));
        
        final Form form = new Form("form") {
            @Override
            protected void onSubmit() {
                String newHostname = hostname.getDefaultModelObjectAsString();
                ProxyConfig config = ProxyConfig.loadConfFromDisk();
                config.hostnameWhitelist.add(newHostname);
                ProxyConfig.writeConfigToDisk(config);
                setResponsePage(ProxyAdminPage.class);
            }

View Full Code Here


        // overview policy
        form.add(new DropDownChoice("overviewPolicy", Arrays.asList(OverviewPolicy.values()), new OverviewPolicyRenderer()));
        form.add(new CheckBox("subsamplingEnabled"));
        
        // resource limits
        TextField maxInputMemory = new TextField("maxInputMemory");
        maxInputMemory.add(new MinimumValidator(0l));
        form.add(maxInputMemory);
        TextField maxOutputMemory = new TextField("maxOutputMemory");
        maxOutputMemory.add(new MinimumValidator(0l));
        form.add(maxOutputMemory);
    }

    protected String getServiceName(){
        return "WCS";

View Full Code Here


    }
    
    void initComponents() {
        updateFields();
        
        add( new TextField( "minX", new PropertyModel(this, "minX")) );
        add( new TextField( "minY", new PropertyModel(this, "minY")) );
        add( new TextField( "maxX", new PropertyModel(this, "maxX") ) );
        add( new TextField( "maxY", new PropertyModel(this, "maxY")) );
    }
    
    @Override
    protected void onBeforeRender() {
        updateFields();

View Full Code Here


    }
    
    void initComponents() {
        updateFields();
        
        add( new TextField( "minX", new PropertyModel(this, "minX")) );
        add( new TextField( "minY", new PropertyModel(this, "minY")) );
        add( new TextField( "maxX", new PropertyModel(this, "maxX") ));
        add( new TextField( "maxY", new PropertyModel(this, "maxY")) );
    }
    
    @Override
    protected void onBeforeRender() {
        updateFields();

View Full Code Here


	 */
	public EditablePanel(String id, IModel inputModel)
	{
		super(id);

		TextField field = new TextField("textfield", inputModel);
		add(field);

		field.add(new AjaxFormComponentUpdatingBehavior("onblur")
		{
			protected void onUpdate(AjaxRequestTarget target)
			{
			}
		});

View Full Code Here


        //avoid showing two login forms
        if ( get("loginform") != null ) {
            get("loginform").setVisible(false);
        }
        
        TextField field = new TextField("username");
        HttpSession session = ((WebRequest) getRequest()).getHttpServletRequest().getSession();
        String lastUserName = (String) session.getAttribute(AuthenticationProcessingFilter.ACEGI_SECURITY_LAST_USERNAME_KEY);
        field.setModel(new Model(lastUserName));
        add(field);
        
        try {
            if(parameters.getBoolean("error"))
                error(new ParamResourceModel("error", this).getString());

View Full Code Here



        PropertyModel<MetadataMap> metadata = new PropertyModel<MetadataMap>(model, "metadata");

        add(new LanguageDropDownChoice("language", new MapModel(metadata, LANGUAGE.key)));

        TextField textField = new TextField("metadataURL", new MapModel(metadata,
                SERVICE_METADATA_URL.key));
        add(textField);
        textField.add(new AttributeModifier("title", true, new ResourceModel(
                "InspireAdminPanel.metadataURL.title")));

        final Map<String, String> mdUrlTypes = new HashMap<String, String>();
        mdUrlTypes.put("application/vnd.ogc.csw.GetRecordByIdResponse_xml",
                "CSW GetRecordById Response");

View Full Code Here


        //avoid showing two login forms
        if ( get("loginform") != null ) {
            get("loginform").setVisible(false);
        }
        
        TextField field = new TextField("username");
        HttpSession session = ((WebRequest) getRequest()).getHttpServletRequest().getSession();
        String lastUserName = (String) session.getAttribute(AuthenticationProcessingFilter.SPRING_SECURITY_LAST_USERNAME_KEY);
        field.setModel(new Model(lastUserName));
        add(field);
        
        try {
            if(parameters.getBoolean("error"))
                error(new ParamResourceModel("error", this).getString());

View Full Code Here


    }

    void initComponents() {
        updateFields();
        
        add( new TextField( "minX", new PropertyModel(this, "minX")) );
        add( new TextField( "minY", new PropertyModel(this, "minY")) );
        add( new TextField( "maxX", new PropertyModel(this, "maxX") ));
        add( new TextField( "maxY", new PropertyModel(this, "maxY")) );
        crsContainer = new WebMarkupContainer("crsContainer");
        crsContainer.setVisible(false);
        crsPanel = new CRSPanel("crs", new PropertyModel(this, "crs"));
        crsContainer.add(crsPanel);
        add(crsContainer);

View Full Code Here


                new MapModel(metadata, "kml.regionateAttribute"), 
                new AttributeNamesModel(new PropertyModel(model, "resource"))));
        add(new DropDownChoice("kml.regionateStrategy", 
                    new MapModel(metadata, "kml.regionateStrategy"), KML_STRATEGIES)
           );
        TextField maxFeatures = new TextField("kml.regionateFeatureLimit",
                    new MapModel(metadata, "kml.regionateFeatureLimit"), Integer.class);
        maxFeatures.add(NumberValidator.minimum(1));
        add(maxFeatures);
    }
    
    private static class AttributeNamesModel extends LoadableDetachableModel {
        IModel featureTypeInfo;

View Full Code Here


                new MapModel(metadata, "kml.regionateAttribute"), 
                new AttributeNamesModel(new PropertyModel(model, "resource"))));
        add(new DropDownChoice("kml.regionateStrategy", 
                    new MapModel(metadata, "kml.regionateStrategy"), KML_STRATEGIES)
           );
        TextField maxFeatures = new TextField("kml.regionateFeatureLimit",
                    new MapModel(metadata, "kml.regionateFeatureLimit"), Integer.class);
        maxFeatures.add(NumberValidator.minimum(1));
        add(maxFeatures);
    }
    
    private static class AttributeNamesModel extends LoadableDetachableModel {
        IModel featureTypeInfo;

View Full Code Here


	
	public BasicLayerConfig(String id, IModel model) {
		super(id, model);
		init();
		// atm the layer follows the resource name, so it's not editable
		TextField name = new TextField("name");
		name.setEnabled(false);
		
        add(name);
		add(new CheckBox("enabled"));
	}
	

View Full Code Here


@SuppressWarnings("serial")
public class HTTPLayerConfig extends LayerConfigurationPanel {
    public HTTPLayerConfig(String id, IModel model){
        super(id, model);
        add(new CheckBox("cachingEnabled", new MapModel(new PropertyModel(model, "resource.metadata"), "cachingEnabled")));
        TextField maxAge = new TextField("cacheAgeMax", new MapModel(new PropertyModel(model, "resource.metadata"), "cacheAgeMax"), Long.class);
        maxAge.add(NumberValidator.range(0, Long.MAX_VALUE));
        add(maxAge);
    }
}

View Full Code Here


	
	public BasicLayerConfig(String id, IModel model) {
		super(id, model);
		init();
		// atm the layer follows the resource name, so it's not editable
		TextField name = new TextField("name");
		name.setEnabled(false);
		
        add(name);
		add(new CheckBox("enabled"));
	}
	

View Full Code Here


@SuppressWarnings("serial")
public class HTTPLayerConfig extends LayerConfigurationPanel {
    public HTTPLayerConfig(String id, IModel model){
        super(id, model);
        add(new CheckBox("cachingEnabled", new MapModel(new PropertyModel(model, "resource.metadata"), "cachingEnabled")));
        TextField maxAge = new TextField("cacheAgeMax", new MapModel(new PropertyModel(model, "resource.metadata"), "cacheAgeMax"), Long.class);
        maxAge.add(NumberValidator.range(0, Long.MAX_VALUE));
        add(maxAge);
    }
}

View Full Code Here



        choices = new ListMultipleChoice("keywords", new Model(), new ArrayList((List) keywords.getObject()));
        choices.setOutputMarkupId(true);
        add(choices);
        add(removeKeywordsButton());
        newKeyword = new TextField("newKeyword", new Model());
        newKeyword.setOutputMarkupId(true);
        add(newKeyword);
        add(addKeywordsButton());
    }

View Full Code Here



        choices = new ListMultipleChoice("keywords", new Model(), new ArrayList((List) keywords.getObject()));
        choices.setOutputMarkupId(true);
        add(choices);
        add(removeKeywordsButton());
        newKeyword = new TextField("newKeyword", new Model());
        newKeyword.setOutputMarkupId(true);
        add(newKeyword);
        add(addKeywordsButton());
    }

View Full Code Here


    void initComponents() {
            
        popupWindow = new ModalWindow("popup");
        add( popupWindow );
        
        srsTextField = new TextField( "srs", new Model() );
        add( srsTextField );
        srsTextField.setOutputMarkupId( true );
        
        srsTextField.add(new AjaxFormComponentUpdatingBehavior("onblur") {
            

View Full Code Here


        form.setModel(new CompoundPropertyModel(userModel));
        setDefaultModel(userModel);
        add(form);
        
        // populate the form editing components
        username = new TextField("username");
        form.add(username);
        PasswordTextField pw1 = new PasswordTextField("password").setResetPassword(false);
        PasswordTextField pw2 = new PasswordTextField("confirmPassword").setResetPassword(false);
        form.add(pw1);
        form.add(pw2);

View Full Code Here


    void initComponents() {
            
        popupWindow = new ModalWindow("popup");
        add( popupWindow );
        
        srsTextField = new TextField( "srs", new Model() );
        add( srsTextField );
        srsTextField.setOutputMarkupId( true );
        
        srsTextField.add(new AjaxFormComponentUpdatingBehavior("onblur") {
            

View Full Code Here


        form.setModel(new CompoundPropertyModel(userModel));
        setModel(userModel);
        add(form);
        
        // populate the form editing components
        username = new TextField("username");
        form.add(username);
        PasswordTextField pw1 = new PasswordTextField("password").setResetPassword(false);
        PasswordTextField pw2 = new PasswordTextField("confirmPassword").setResetPassword(false);
        form.add(pw1);
        form.add(pw2);

View Full Code Here

TOP

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

TOP