Input placeholder

Write your functional requirement here, be Specific please!

Input placeholder

Postby algocrunch » Tue Nov 26, 2013 10:20 pm

Please add a place holder for the Input control. I was able to work around this locally by doing:

Code: Select all
xui.UI.Input.setDataModel({
    placeholder: {
        ini: '',
        action: function (value) {
            this.getSubNode('INPUT').attr('placeholder', value);
        }
    }
});
xui.UI.Input.getTemplate().FRAME.BORDER.BOX.WRAP.INPUT.placeholder = '{placeholder}';
algocrunch
 
Posts: 40
Joined: Thu Oct 31, 2013 12:50 pm

Re: Input placeholder

Postby algocrunch » Wed Nov 27, 2013 2:19 am

We also have a need for this in the ComboInput control, the following workaround seems to do the trick:

/************ Add placeholder to xui combo Input **********/
xui.UI.ComboInput.setDataModel({
placeholder: {
ini: '',
action: function (value) {
this.getSubNode('INPUT').attr('placeholder', value);
}
}
});
xui.UI.ComboInput.getTemplate().FRAME.BORDER.BOX.WRAP.INPUT.placeholder = '{placeholder}';
algocrunch
 
Posts: 40
Joined: Thu Oct 31, 2013 12:50 pm

Re: Input placeholder

Postby support » Wed Dec 04, 2013 1:01 pm

OK. Can you give further suggestion for more necessary HTML5 prop?

Temporary, you can
   
Class('App', 'xui.Com',{
Instance:{
iniComponents : function(){
// [[Code created by CrossUI RAD Tools
var host=this, children=[], append=function(child){children.push(child.get(0));};

append((new xui.UI.Input())
.setHost(host,"ctl_input1")
.setLeft(70)
.setTop(30)
.onRender("_ctl_input1_onrender")
);

return children;
// ]]Code created by CrossUI RAD Tools
},
_ctl_input1_onrender:function (profile){
profile.getSubNode("INPUT").attr("placeholder","placeholder");
}
}
});
   
support
 
Posts: 350
Joined: Sat Apr 27, 2013 9:22 am

Re: Input placeholder

Postby algocrunch » Wed Dec 04, 2013 1:52 pm

We haven't come across anything else that we need yet. I will add posts as we come across more requirements. Thank you for the correct temporary fix.
algocrunch
 
Posts: 40
Joined: Thu Oct 31, 2013 12:50 pm


Return to Functional Requirement

Who is online

Users browsing this forum: No registered users and 0 guests

cron