首页 \ 问答 \ 是否是scalebase nosql数据库?(Is scalebase nosql database or not?)

是否是scalebase nosql数据库?(Is scalebase nosql database or not?)

我已经阅读过有关scalebase的内容但是不明白它是NoSQL数据库吗? 或者他们只是水平缩放SQL数据库?


I have read about scalebase but did not understand is it NoSQL database or not? Or they just well horizontal scaled SQL database?


原文:https://stackoverflow.com/questions/31669013
更新时间:2023-12-31 13:12

最满意答案

要通过复选框单击更新任何组件可见性,您可以使用'AjaxCheckBox',例如:

//somewhere in the class create model variable:
boolean checkBoxValue = true;

//this is your hideable component
Label someComponent;

...
//and add PropertyModel for checkbox:
AjaxCheckBox checkBox = new AjaxCheckBox("checkBox", new PropertyModel(this, "checkBoxValue")) {
        @Override
        protected void onUpdate(AjaxRequestTarget target) {
                //if checkbox is checked, then our component is shown
                someComponent.setVisible(checkBoxValue);
                target.add(someComponent);
        }
};

...
//this is your component to update
someComponent = new Label("someComponent", "some text");

//this method allows you to hide/show component with ajax updates.
someComponent.setOutputMarkupPlaceholderTag ( true );

要在提交后获得checkBox值,您可以检查checkBoxValue值。

UPDATE

实际上你可以覆盖onConfigure()可隐藏组件方法,根据'checkBoxValue'设置它的可见性(这只是另一种获得此方法的方法,可能更为首选):

   someComponent = new Label("someComponent", "some text")
   {
       @Override
       protected void onConfigure() {
          setVisible ( checkBoxValue ); 
       }
   };

如果你喜欢这样,那么你可以删除someComponent.setVisible(checkBoxValue); 来自AjaxCheckBox#onUpdate()方法的代码

更新2

组件WebMarkupContainer允许你包装一些组件。 当它隐藏时 - 那么它们实际上是从标记中删除的。 但容器的标记将存在样式display:hidden无论如何。

在某处创建容器,如:

WebMarkupContainer container = new WebMarkupContainer ( "cont" );
//we will hide this container, so we can replace  someComponent.setOutputMarkupPlaceholderTag ( true ); by this
container.setOutputMarkupPlaceholderTag ( true );

将容器添加到表单:

form.add(container);

将我们的someComponent添加到此容器中:

container.add(someComponent);

AjaxCheckBox#onUpdate()方法中使用ajax更新容器:

protected void onUpdate(AjaxRequestTarget target) {
    //if checkbox is checked, then our component is shown
    container.setVisible(checkBoxValue);
    target.add(container);
}

在HTML代码中,这就像

  <div wicket:id="cont">
      <input type="text" wicket:id="someComponent"/>
  </div>

您可以向此类容器添加任意数量的组件,您可以使用它来管理它们。


To update any component visibility by checkbox click, you can use 'AjaxCheckBox', for example:

//somewhere in the class create model variable:
boolean checkBoxValue = true;

//this is your hideable component
Label someComponent;

...
//and add PropertyModel for checkbox:
AjaxCheckBox checkBox = new AjaxCheckBox("checkBox", new PropertyModel(this, "checkBoxValue")) {
        @Override
        protected void onUpdate(AjaxRequestTarget target) {
                //if checkbox is checked, then our component is shown
                someComponent.setVisible(checkBoxValue);
                target.add(someComponent);
        }
};

...
//this is your component to update
someComponent = new Label("someComponent", "some text");

//this method allows you to hide/show component with ajax updates.
someComponent.setOutputMarkupPlaceholderTag ( true );

To gain checkBox value after submiting - you can check your checkBoxValue value.

UPDATE

Actually you could override your hideable component method onConfigure() to set its visibility according to 'checkBoxValue' (this is just another way to gain this, may be more preferred):

   someComponent = new Label("someComponent", "some text")
   {
       @Override
       protected void onConfigure() {
          setVisible ( checkBoxValue ); 
       }
   };

If you do like this, then you could delete someComponent.setVisible(checkBoxValue); code from AjaxCheckBox#onUpdate() method

UPDATE 2

Component WebMarkupContainer allows you to wrap some components. And when it is hiding - then they are really removes from markup. But markup for container will be exists with style display:hidden anyway.

Create container somewhere like:

WebMarkupContainer container = new WebMarkupContainer ( "cont" );
//we will hide this container, so we can replace  someComponent.setOutputMarkupPlaceholderTag ( true ); by this
container.setOutputMarkupPlaceholderTag ( true );

Add container to the form:

form.add(container);

Add our someComponent to this container:

container.add(someComponent);

And in AjaxCheckBox#onUpdate() method update container with ajax:

protected void onUpdate(AjaxRequestTarget target) {
    //if checkbox is checked, then our component is shown
    container.setVisible(checkBoxValue);
    target.add(container);
}

In html code this would be like

  <div wicket:id="cont">
      <input type="text" wicket:id="someComponent"/>
  </div>

You can add any number of components to such container and you can manage them all with it.

相关问答

更多
  • 你在正确的轨道上。 您可以通过使用客户端脚本来代替使用UpdatePanel控件和AJAX调用来避免开销和复杂性。 您需要定义一个JavaScript函数来触发网页上复选框的onClick事件: 我假设你将ID为“lbl”的标签添加到代码隐藏的页面中。 确保将标签设置为Page类的受保护成员,以便您可以使用服务器标签从aspx页面访问该标签,以便在JavaScript中调用document ...
  • 试试这个链接,如果你需要动画的方式 $(document).ready(function () { $('#check1').change(function () { if (!this.checked) // ^ $('.rbc-none').hide(); else $('.rbc-none').show(); }); }); ...
  • 要通过复选框单击更新任何组件可见性,您可以使用'AjaxCheckBox',例如: //somewhere in the class create model variable: boolean checkBoxValue = true; //this is your hideable component Label someComponent; ... //and add PropertyModel for checkbox: AjaxCheckBox checkBox = new AjaxCheck ...
  • 比较Strings ,必须使用以下方法: .equals() 即: if(listQuestions.get(position).getQuestionType().toString().equals("1") ){ cb.setVisibility(View.VISIBLE); } else if(listQuestions.get(position).getQuestionType().toString().equals("4") ){ et.setVisibility(View ...
  • 为了显示或隐藏第一个ItemsControl的项,将一个IsVisible属性添加到Vehicle类(即VehicleCollection的元素类型),并将项的ContentPresenter的Visibility绑定到ItemContainerStyle的IsVisible属性: