Jquery ui 是否有一个Sencha等价于jQuery';s无线电台?
jQueryUI有一个非常漂亮的单选按钮显示: 森查有类似的吗Jquery ui 是否有一个Sencha等价于jQuery';s无线电台?,jquery-ui,mobile,sencha-touch,extjs,sencha-touch-2,Jquery Ui,Mobile,Sencha Touch,Extjs,Sencha Touch 2,jQueryUI有一个非常漂亮的单选按钮显示: 森查有类似的吗 跟进问题,如否: 对于只需要一次触摸的三项(甚至四项)组件,您认为什么是好的用户体验?(例如,一个选择框是两次触摸,一次打开选择列表,一次选择您的选项)您正在Sencha Touch中查找 示例代码段:- var segmentedButton = new Ext.SegmentedButton({ allowMultiple: false, // ensures only 1 button gets pressed
跟进问题,如否: 对于只需要一次触摸的三项(甚至四项)组件,您认为什么是好的用户体验?(例如,一个选择框是两次触摸,一次打开选择列表,一次选择您的选项)您正在Sencha Touch中查找 示例代码段:-
var segmentedButton = new Ext.SegmentedButton({
allowMultiple: false, // ensures only 1 button gets pressed at a time.
items: [
{
text: 'Choice 1'
},
{
text : 'Choice 2',
pressed: true
},
{
text: 'Choice 3'
}
],
listeners: {
toggle: function(container, button, pressed){
console.log("User toggled the '" + button.text + "' button: " + (pressed ? 'on' : 'off'));
}
}
});
Ext.Viewport.add({ xtype: 'container', padding: 10, items: [segmentedButton] });
输出:-
非常有效,谢谢。对于其他有相同问题的人,这也适用于FormPanel,当在表单中使用segmenetedbutton时,通过使用xtype='segmentedbutton'Hey@roadRunner,在表单旁边创建hiddenfield并在更改时更新hiddenfield的值是典型的吗?(sencha 1.1)不,我不这么认为。为什么要创建
隐藏字段
?。。如果你想得到按下按钮的值,你可以在这里得到Ext.getCmp('segId')。getPressedButtons()[0]。getText()
嗯,我的sencha表单是通过在桌面站点的视图模型上反射而创建的通用/动态表单。考虑到这一点,我不一定知道在beforesubmit方法中查找什么元素ID。