1

ZK setWidgetAttribute() method issue? [closed]

asked 2013-09-09 06:53:47 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

I worked with Rapid Spell Checker+ZK Integration and in ZUL i have to do following..

    <zk xmlns:x="xhtml" xmlns:zk="zk" xmlns:d="http://www.zkoss.org/2005/zk/client/attribute">

        <window width="100%" height="100%" id="Folder_comment_add"
            apply="org.zkoss.bind.BindComposer"
            viewModel="@id('vm') @init('com..viewmodel.FolderCommentAddViewModel')" contentStyle="overflow:auto;" xmlns:d="http://www.zkoss.org/2005/zk/client/attribute">
      <script type="text/javascript">
        <![CDATA[
          zk.afterMount(function(){
                 setTimeout(function() { rapidSpell.setParameterValue('default', 'UserDictionaryFile', '~/userdictionaries/AmandaDic.txt');}, 2000); 
                 setTimeout (function () { rsw_setupTextBoxes(true);}, 4000); });
        ]]> 
        </script>
    <datebox hflex="1" value="@bind(vm.commentDate)" d:nospell='true'/>
</window>
</zk>

If i am using above code everything working fine.

But when i am using setWidgetAttribute() method in Datebox Extend Class the same thing not working.

public class MyDatebox extends Datebox {

    private static final long serialVersionUID = 1L;
    private boolean mandatory;

    public AmandaDatebox() {
        setFormat(CsdcUtility.getDateFormat());
        setWidgetAttribute("d:nospell" , "true");
    }
}

In this case i have removed the d:nospell='true' from the ZUL page becuase DateBox Component already have this defined in Java Class. But now in this it is not working . If i will use d:nospell='true' in zul i have to write same attribute with each datebox component in each zul page ,so overcome this issue i was trying Java class way. But no any success .Can anyone know what i am doing wrong here?

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by sjoshi
close date 2013-09-10 05:42:01

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-09-10 03:14:23 +0800

paowang gravatar image paowang
140 6

try setWidgetAttribute("nospell", "true");

The d: is XML namespace prefix and only ZUL needs it.

link publish delete flag offensive edit

Question tools

Follow
2 followers

RSS

Stats

Asked: 2013-09-09 06:53:47 +0800

Seen: 23 times

Last updated: Sep 10 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More