Question5Replies258ViewsX HermyR98 Member since 2015 17 posts Wells Fargo Posted: 8 months agoLast activity: 8 months 1 week ago Solved Custom control editable or read-onlyQuestion:I'm creating a custom control for input fields and I need to know if the field is read-only or editable. How do I do this with JSP tags or in Java?Details:The JSP when tag documentation says to use the following but I get an error when trying to save the rule.<pega:when test="$THIS:isModifiable" >The error I get when trying to save is:content of stream definition— when tag: :isModifiable is not recognized as a valid method of a ClipboardProperty Low-Code App Development User Interface ReplyI also have this Question (0) FacebookTwitterLinkedinEmail Copy Link Copied! Posted: 8 months agoHermyR98 Wells Fargo replied to HermyR98I also tried the following but that always returns true (meaninig it evidently thinks it's always in a read-only section according to the documentation). <pega:when test="!$mode-input"> I also tried the following but it also always returned true. <pega:when test="$input-enabled"> Posted: 8 months agoSunny_GCS PEGA replied to HermyR98I tried a quick example in the UI gallery and made some observations. I wrote a custom control with the below code... <pega:choose> <pega:when test='$mode-input'> <input type="text" value="abc"> </pega:when> <pega:when test='!$mode-input'> <input type="text" value="abc" readonly> </pega:when> <pega:otherwise> <input type="text" value="xyz"> </pega:otherwise> </pega:choose> When I reference the control on a property that is within a section/container that is EDITABLE at runtime, below is rendered as expected. <input type="text" value="abc"> When I reference the control on a property that is within a section/container that is READONLY at runtime, below is rendered as expected. <input type="text" value="abc" readonly> So it worked as expected for me. Can you share what your container configuration looks like that hosts your property with your custom control? Accepted Solution Posted: 8 months agoHermyR98 Wells Fargo replied to Sunny_GCSI went back and retested with the mode-input tag and it is working. I must have done something wrong before. Thanks for the help! Posted: 8 months agoRett_Hean_GCS PEGA replied to HermyR98Hmm, according to the documention the input enabled test should return true if all of the following are satisfied. Can you sanity check if all of these criteria have been met? The $MODE-INPUT keyword is true when all of the following are true: The current stream is an input-enabled stream. The keyword is part of the processing of a <pega:reference > tag that specifies the INPUT option, with or without a stream name value. The current property identified in the <pega:reference > tag is modifiable. Posted: 8 months agoHermyR98 Wells Fargo replied to Rett_Hean_GCSI must have done something else wrong when I first tested this as it is working now. Thanks.