是否是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
最满意答案
要通过复选框单击更新任何组件可见性,您可以使用'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 fromAjaxCheckBox#onUpdate()
methodUPDATE 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 styledisplay: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.
相关问答
更多-
jquery mobile 页面跳转第二次不刷新怎么办[2022-09-17]
checkbox -
jquery mobile本地和环境中显示问题[2023-06-25]
checkbox -
jquery mobile 点击跳转不加载数据怎么回事[2023-11-26]
checkbox -
jQuery Mobile框架弹窗中放表单文本框,整个弹窗区域都会变为文本框的触发焦点,不想这样[2022-03-02]
checkbox -
如何在 jQuery Mobile 的 Listview 中动态移除某一条的图标[2023-09-01]
checkbox -
你在正确的轨道上。 您可以通过使用客户端脚本来代替使用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的可见性(Change visibility of one itemscontrol via checkbox in another)[2021-12-13]
为了显示或隐藏第一个ItemsControl的项,将一个IsVisible属性添加到Vehicle类(即VehicleCollection的元素类型),并将项的ContentPresenter的Visibility绑定到ItemContainerStyle的IsVisible属性: