FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

JSF Woodstock: Unclarity when disabling a TextField

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
ChristianH



Joined: 23 Sep 2009
Posts: 1

PostPosted: Sat Oct 31, 2009 1:12 pm    Post subject: JSF Woodstock: Unclarity when disabling a TextField Reply with quote

Hi,

I am working an a web-project using JSF Woodstock 4.3 components and i have a question:

the goal is to disable/enable a textfield on the client-side depending on a checkbox using javascript .

the script code looks like this:

Code:
      function xrayCheckboxClicked() {
        var cb = document.getElementById(theForm + ":" + 'xrayCheckbox');
        (document.getElementById(theForm + ":" + 'xrayPercentageField')).disabled = !cb.getProps().checked;
      }


here is another snippet:

Code:
      ...
      <webuijsf:textField
        id="xrayPercentageField"
        columns="3"
        disabled="#{SessionBean1.createProduct_xrayDisabled}"
        text="#{createProduct.xrayPercentage}"
      />
      ...


ok so far - the field gets disabled/enabled when the checkbox is clicked but it does not really work!

1. the text is shifted from left to right inner the field when the field gets disabled.
2. the field is still editable when it is disabled Confused !

has anybody experienced this problem?

kind regards,
Christian
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB