Example usage for org.apache.wicket.markup.html.form SimpleFormComponentLabel setVisible

List of usage examples for org.apache.wicket.markup.html.form SimpleFormComponentLabel setVisible

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.form SimpleFormComponentLabel setVisible.

Prototype

public final Component setVisible(final boolean visible) 

Source Link

Document

Sets whether this component and any children are visible.

Usage

From source file:com.francetelecom.clara.cloud.presentation.environments.EnvironmentsTablePanel.java

License:Apache License

@Override
protected void onBeforeRender() {

    createSearchCriteriaForm();//from  w  w w.  j  ava 2s. c  o m

    viewAllCheckBox = new AjaxCheckBox("allEnvironmentsCheckbox",
            new Model<Boolean>(WicketSession.get().getViewAll())) {
        private static final long serialVersionUID = 6279581094195253824L;

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            WicketSession.get().setViewAll(getModelObject());

            updateEnvDetailsPanel(target);

        }
    };
    viewAllCheckBox.setLabel(WicketUtils.getStringResourceModel(this, "portal.environment.table.header.all"));
    viewAllCheckBox.setVisible(release == null);
    searchCriteriaForm.addOrReplace(viewAllCheckBox);

    SimpleFormComponentLabel viewAllLabel = new SimpleFormComponentLabel("allEnvironmentsLabel",
            viewAllCheckBox);
    viewAllLabel.setVisible(release == null);
    searchCriteriaForm.addOrReplace(viewAllLabel);

    getEnvironmentsFromDB();

    initTable();
    refreshContainer.addOrReplace(dataTable);
    super.onBeforeRender();
}

From source file:com.francetelecom.clara.cloud.presentation.releases.ReleasesTablePanel.java

License:Apache License

@Override
protected void onBeforeRender() {
    //    protected void initViewAllCheckBox() {

    createSearchCriteriaForm();//from   w ww.  j  av  a  2 s  . c  o m

    viewAllCheckBox = new AjaxCheckBox("allReleasesCheckbox",
            new Model<Boolean>(WicketSession.get().getViewAll())) {
        private static final long serialVersionUID = 3701907014721062208L;

        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            WicketSession.get().setViewAll(getModelObject());
            getApplicationReleasesFromDB();
            //
            initTable();
            refreshContainer.replace(dataTable);
            target.add(refreshContainer);
        }
    };
    viewAllCheckBox.setLabel(WicketUtils.getStringResourceModel(this, "portal.release.table.header.all"));
    viewAllCheckBox.setVisible(app == null);
    searchCriteriaForm.addOrReplace(viewAllCheckBox);

    SimpleFormComponentLabel viewAllLabel = new SimpleFormComponentLabel("allReleasesLabel", viewAllCheckBox);
    viewAllLabel.setVisible(app == null);
    searchCriteriaForm.addOrReplace(viewAllLabel);

    getApplicationReleasesFromDB();

    initTable();
    refreshContainer.addOrReplace(dataTable);
    super.onBeforeRender();
}