Working with aliases and xpages control, how to?












0















in my app I have radiogroups that have label|alias values.



in read mode I want to display them in an edit box control and set the readonly attribute. the control has a data-binding to java classes e.g. value="#{matterBean.matter.idType}"



how can I best convert the aliases into the values?



the keywords are now stored in Notes documents.



should I build some sort of converter-class and define a custom converter for the edit box control ?



sample code:



<xp:radioGroup 
id="rgRelStudy"
value="#{matterBean.matter.busStudy}"
disabled="#{!matterBean.matter.editable}"
styleClass="radio-spacing" readonly="true">
<xp:this.defaultValue><![CDATA[#{javascript:getKeywordDefault("intakeStudy")}]]></xp:this.defaultValue>

<xp:selectItems>
<xp:this.value><![CDATA[${javascript:return getKeywordValues("intakeStudy");}]]></xp:this.value>
</xp:selectItems>
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="pnlUpdate">
<xp:this.script><![CDATA[var e = arguments[0] || window.event;
e = dojo.fixEvent(e);
if (e.target.type != "radio") {
e.preventDefault();
dojo.query("input",e.target).forEach(function(inputNode){
dojo.attr(inputNode,"checked",!(dojo.attr(inputNode,"checked")));
});
}
return true;]]></xp:this.script>
<xp:this.onComplete><![CDATA[XSP.partialRefreshGet('#{id:pnlCollegeContainer}', {
onComplete: function () {
XSP.partialRefreshGet('#{id:pnlResidenceContainer}');
}
});]]></xp:this.onComplete>
</xp:eventHandler>
</xp:radioGroup>









share|improve this question

























  • What do you mean you want to display them in an edit box control? If it's readonly mode isn't the value just a string at that point? Why use another component? Do you need to place the info elsewhere on the page? Because, as long as you keep the selectItem tags on the page, the conversion from value to label is handled automatically. How have you defined the items?

    – shillem
    Nov 7 '18 at 10:13













  • the display in an edit box is just for make-up. I do not want to display the other options in the checkbox group that are not selected in read mode. At this moment the web form is the form that users also print-out and I want to keep layout therefor to a minimum. I also need to display the alias in several languages. And later I need to collect the "label" value when I add a library that is suitable to create PDF's. For display in read mode I could use a combobox instead of a radiogroup. or are you suggestion I should use a different control?

    – Patrick Kwinten
    Nov 8 '18 at 21:52











  • A radio group in readonly="true" mode outputs just the values and not the other unselected options. It's like any other control when in read mode.

    – shillem
    Nov 9 '18 at 8:37













  • Hi, I tried this but then I still get the other non-selected values returned.

    – Patrick Kwinten
    Nov 12 '18 at 13:36











  • May I see the code you're using to create the checkbox group?

    – shillem
    Nov 12 '18 at 13:48
















0















in my app I have radiogroups that have label|alias values.



in read mode I want to display them in an edit box control and set the readonly attribute. the control has a data-binding to java classes e.g. value="#{matterBean.matter.idType}"



how can I best convert the aliases into the values?



the keywords are now stored in Notes documents.



should I build some sort of converter-class and define a custom converter for the edit box control ?



sample code:



<xp:radioGroup 
id="rgRelStudy"
value="#{matterBean.matter.busStudy}"
disabled="#{!matterBean.matter.editable}"
styleClass="radio-spacing" readonly="true">
<xp:this.defaultValue><![CDATA[#{javascript:getKeywordDefault("intakeStudy")}]]></xp:this.defaultValue>

<xp:selectItems>
<xp:this.value><![CDATA[${javascript:return getKeywordValues("intakeStudy");}]]></xp:this.value>
</xp:selectItems>
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="pnlUpdate">
<xp:this.script><![CDATA[var e = arguments[0] || window.event;
e = dojo.fixEvent(e);
if (e.target.type != "radio") {
e.preventDefault();
dojo.query("input",e.target).forEach(function(inputNode){
dojo.attr(inputNode,"checked",!(dojo.attr(inputNode,"checked")));
});
}
return true;]]></xp:this.script>
<xp:this.onComplete><![CDATA[XSP.partialRefreshGet('#{id:pnlCollegeContainer}', {
onComplete: function () {
XSP.partialRefreshGet('#{id:pnlResidenceContainer}');
}
});]]></xp:this.onComplete>
</xp:eventHandler>
</xp:radioGroup>









share|improve this question

























  • What do you mean you want to display them in an edit box control? If it's readonly mode isn't the value just a string at that point? Why use another component? Do you need to place the info elsewhere on the page? Because, as long as you keep the selectItem tags on the page, the conversion from value to label is handled automatically. How have you defined the items?

    – shillem
    Nov 7 '18 at 10:13













  • the display in an edit box is just for make-up. I do not want to display the other options in the checkbox group that are not selected in read mode. At this moment the web form is the form that users also print-out and I want to keep layout therefor to a minimum. I also need to display the alias in several languages. And later I need to collect the "label" value when I add a library that is suitable to create PDF's. For display in read mode I could use a combobox instead of a radiogroup. or are you suggestion I should use a different control?

    – Patrick Kwinten
    Nov 8 '18 at 21:52











  • A radio group in readonly="true" mode outputs just the values and not the other unselected options. It's like any other control when in read mode.

    – shillem
    Nov 9 '18 at 8:37













  • Hi, I tried this but then I still get the other non-selected values returned.

    – Patrick Kwinten
    Nov 12 '18 at 13:36











  • May I see the code you're using to create the checkbox group?

    – shillem
    Nov 12 '18 at 13:48














0












0








0








in my app I have radiogroups that have label|alias values.



in read mode I want to display them in an edit box control and set the readonly attribute. the control has a data-binding to java classes e.g. value="#{matterBean.matter.idType}"



how can I best convert the aliases into the values?



the keywords are now stored in Notes documents.



should I build some sort of converter-class and define a custom converter for the edit box control ?



sample code:



<xp:radioGroup 
id="rgRelStudy"
value="#{matterBean.matter.busStudy}"
disabled="#{!matterBean.matter.editable}"
styleClass="radio-spacing" readonly="true">
<xp:this.defaultValue><![CDATA[#{javascript:getKeywordDefault("intakeStudy")}]]></xp:this.defaultValue>

<xp:selectItems>
<xp:this.value><![CDATA[${javascript:return getKeywordValues("intakeStudy");}]]></xp:this.value>
</xp:selectItems>
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="pnlUpdate">
<xp:this.script><![CDATA[var e = arguments[0] || window.event;
e = dojo.fixEvent(e);
if (e.target.type != "radio") {
e.preventDefault();
dojo.query("input",e.target).forEach(function(inputNode){
dojo.attr(inputNode,"checked",!(dojo.attr(inputNode,"checked")));
});
}
return true;]]></xp:this.script>
<xp:this.onComplete><![CDATA[XSP.partialRefreshGet('#{id:pnlCollegeContainer}', {
onComplete: function () {
XSP.partialRefreshGet('#{id:pnlResidenceContainer}');
}
});]]></xp:this.onComplete>
</xp:eventHandler>
</xp:radioGroup>









share|improve this question
















in my app I have radiogroups that have label|alias values.



in read mode I want to display them in an edit box control and set the readonly attribute. the control has a data-binding to java classes e.g. value="#{matterBean.matter.idType}"



how can I best convert the aliases into the values?



the keywords are now stored in Notes documents.



should I build some sort of converter-class and define a custom converter for the edit box control ?



sample code:



<xp:radioGroup 
id="rgRelStudy"
value="#{matterBean.matter.busStudy}"
disabled="#{!matterBean.matter.editable}"
styleClass="radio-spacing" readonly="true">
<xp:this.defaultValue><![CDATA[#{javascript:getKeywordDefault("intakeStudy")}]]></xp:this.defaultValue>

<xp:selectItems>
<xp:this.value><![CDATA[${javascript:return getKeywordValues("intakeStudy");}]]></xp:this.value>
</xp:selectItems>
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="pnlUpdate">
<xp:this.script><![CDATA[var e = arguments[0] || window.event;
e = dojo.fixEvent(e);
if (e.target.type != "radio") {
e.preventDefault();
dojo.query("input",e.target).forEach(function(inputNode){
dojo.attr(inputNode,"checked",!(dojo.attr(inputNode,"checked")));
});
}
return true;]]></xp:this.script>
<xp:this.onComplete><![CDATA[XSP.partialRefreshGet('#{id:pnlCollegeContainer}', {
onComplete: function () {
XSP.partialRefreshGet('#{id:pnlResidenceContainer}');
}
});]]></xp:this.onComplete>
</xp:eventHandler>
</xp:radioGroup>






java xpages






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 20:45







Patrick Kwinten

















asked Nov 6 '18 at 14:37









Patrick KwintenPatrick Kwinten

982617




982617













  • What do you mean you want to display them in an edit box control? If it's readonly mode isn't the value just a string at that point? Why use another component? Do you need to place the info elsewhere on the page? Because, as long as you keep the selectItem tags on the page, the conversion from value to label is handled automatically. How have you defined the items?

    – shillem
    Nov 7 '18 at 10:13













  • the display in an edit box is just for make-up. I do not want to display the other options in the checkbox group that are not selected in read mode. At this moment the web form is the form that users also print-out and I want to keep layout therefor to a minimum. I also need to display the alias in several languages. And later I need to collect the "label" value when I add a library that is suitable to create PDF's. For display in read mode I could use a combobox instead of a radiogroup. or are you suggestion I should use a different control?

    – Patrick Kwinten
    Nov 8 '18 at 21:52











  • A radio group in readonly="true" mode outputs just the values and not the other unselected options. It's like any other control when in read mode.

    – shillem
    Nov 9 '18 at 8:37













  • Hi, I tried this but then I still get the other non-selected values returned.

    – Patrick Kwinten
    Nov 12 '18 at 13:36











  • May I see the code you're using to create the checkbox group?

    – shillem
    Nov 12 '18 at 13:48



















  • What do you mean you want to display them in an edit box control? If it's readonly mode isn't the value just a string at that point? Why use another component? Do you need to place the info elsewhere on the page? Because, as long as you keep the selectItem tags on the page, the conversion from value to label is handled automatically. How have you defined the items?

    – shillem
    Nov 7 '18 at 10:13













  • the display in an edit box is just for make-up. I do not want to display the other options in the checkbox group that are not selected in read mode. At this moment the web form is the form that users also print-out and I want to keep layout therefor to a minimum. I also need to display the alias in several languages. And later I need to collect the "label" value when I add a library that is suitable to create PDF's. For display in read mode I could use a combobox instead of a radiogroup. or are you suggestion I should use a different control?

    – Patrick Kwinten
    Nov 8 '18 at 21:52











  • A radio group in readonly="true" mode outputs just the values and not the other unselected options. It's like any other control when in read mode.

    – shillem
    Nov 9 '18 at 8:37













  • Hi, I tried this but then I still get the other non-selected values returned.

    – Patrick Kwinten
    Nov 12 '18 at 13:36











  • May I see the code you're using to create the checkbox group?

    – shillem
    Nov 12 '18 at 13:48

















What do you mean you want to display them in an edit box control? If it's readonly mode isn't the value just a string at that point? Why use another component? Do you need to place the info elsewhere on the page? Because, as long as you keep the selectItem tags on the page, the conversion from value to label is handled automatically. How have you defined the items?

– shillem
Nov 7 '18 at 10:13







What do you mean you want to display them in an edit box control? If it's readonly mode isn't the value just a string at that point? Why use another component? Do you need to place the info elsewhere on the page? Because, as long as you keep the selectItem tags on the page, the conversion from value to label is handled automatically. How have you defined the items?

– shillem
Nov 7 '18 at 10:13















the display in an edit box is just for make-up. I do not want to display the other options in the checkbox group that are not selected in read mode. At this moment the web form is the form that users also print-out and I want to keep layout therefor to a minimum. I also need to display the alias in several languages. And later I need to collect the "label" value when I add a library that is suitable to create PDF's. For display in read mode I could use a combobox instead of a radiogroup. or are you suggestion I should use a different control?

– Patrick Kwinten
Nov 8 '18 at 21:52





the display in an edit box is just for make-up. I do not want to display the other options in the checkbox group that are not selected in read mode. At this moment the web form is the form that users also print-out and I want to keep layout therefor to a minimum. I also need to display the alias in several languages. And later I need to collect the "label" value when I add a library that is suitable to create PDF's. For display in read mode I could use a combobox instead of a radiogroup. or are you suggestion I should use a different control?

– Patrick Kwinten
Nov 8 '18 at 21:52













A radio group in readonly="true" mode outputs just the values and not the other unselected options. It's like any other control when in read mode.

– shillem
Nov 9 '18 at 8:37







A radio group in readonly="true" mode outputs just the values and not the other unselected options. It's like any other control when in read mode.

– shillem
Nov 9 '18 at 8:37















Hi, I tried this but then I still get the other non-selected values returned.

– Patrick Kwinten
Nov 12 '18 at 13:36





Hi, I tried this but then I still get the other non-selected values returned.

– Patrick Kwinten
Nov 12 '18 at 13:36













May I see the code you're using to create the checkbox group?

– shillem
Nov 12 '18 at 13:48





May I see the code you're using to create the checkbox group?

– shillem
Nov 12 '18 at 13:48












2 Answers
2






active

oldest

votes


















0














A Computed Field component would work too. Rather than a custom converter (assuming this is the only place it's used), I'd set a rendered property and use a custom method in the Java class, e.g. getIdTypeValues() and map to that. Bearing in mind it's only used in read mode, you can boilerplate the method with UIViewRootEx2 view = (UIViewRootEx2) resolveVariable("view");if (view.isRenderingPhase()) {....}. That way it will only run once, during the RENDER RESPONSE phase.






share|improve this answer































    0














    I tried to reproduce the problem you are having but either I'm misunderstanding it or there's something else going on on your end, because it works as expected for me. If you consider this scratch code you have 2 buttons that turn the radio group readonly mode or not. When in readonly only the label associated with checked values is shown, but not the other ones.



    <xp:view xmlns:xp="http://www.ibm.com/xsp/core" style="padding: 20px"
    beforePageLoad="#{javascript:viewScope.readonly=false}">

    <xp:div id="theThing">
    <xp:button value="Make readonly" id="buttonReadOnly"
    rendered="#{not viewScope.readonly}">
    <xp:eventHandler event="onclick" submit="true"
    execMode="partial" refreshMode="partial" refreshId="theThing"
    action="#{javascript:viewScope.readonly=true}" />
    </xp:button>

    <xp:button value="Make editable" id="buttonEditable"
    rendered="#{viewScope.readonly}">
    <xp:eventHandler event="onclick" submit="true"
    execMode="partial" refreshMode="partial" refreshId="theThing"
    action="#{javascript:viewScope.readonly=false}" />
    </xp:button>

    <hr />

    <xp:radioGroup id="rgRelStudy" value="#{viewScope.relStudy}"
    styleClass="radio-spacing" readonly="#{viewScope.readonly}"
    defaultValue="o">
    <xp:selectItems value="${javascript:['apple|a', 'orange|o', 'banana|b']}" />

    <xp:eventHandler event="onclick" submit="true"
    execMode="partial" refreshMode="partial" refreshId="pnlUpdate" />
    </xp:radioGroup>
    </xp:div>

    <hr />

    <xp:div id="pnlUpdate">
    <h3>The radio value (not label)</h3>
    <xp:text value="#{viewScope.relStudy}" />
    </xp:div>

    </xp:view>





    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53174091%2fworking-with-aliases-and-xpages-control-how-to%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      A Computed Field component would work too. Rather than a custom converter (assuming this is the only place it's used), I'd set a rendered property and use a custom method in the Java class, e.g. getIdTypeValues() and map to that. Bearing in mind it's only used in read mode, you can boilerplate the method with UIViewRootEx2 view = (UIViewRootEx2) resolveVariable("view");if (view.isRenderingPhase()) {....}. That way it will only run once, during the RENDER RESPONSE phase.






      share|improve this answer




























        0














        A Computed Field component would work too. Rather than a custom converter (assuming this is the only place it's used), I'd set a rendered property and use a custom method in the Java class, e.g. getIdTypeValues() and map to that. Bearing in mind it's only used in read mode, you can boilerplate the method with UIViewRootEx2 view = (UIViewRootEx2) resolveVariable("view");if (view.isRenderingPhase()) {....}. That way it will only run once, during the RENDER RESPONSE phase.






        share|improve this answer


























          0












          0








          0







          A Computed Field component would work too. Rather than a custom converter (assuming this is the only place it's used), I'd set a rendered property and use a custom method in the Java class, e.g. getIdTypeValues() and map to that. Bearing in mind it's only used in read mode, you can boilerplate the method with UIViewRootEx2 view = (UIViewRootEx2) resolveVariable("view");if (view.isRenderingPhase()) {....}. That way it will only run once, during the RENDER RESPONSE phase.






          share|improve this answer













          A Computed Field component would work too. Rather than a custom converter (assuming this is the only place it's used), I'd set a rendered property and use a custom method in the Java class, e.g. getIdTypeValues() and map to that. Bearing in mind it's only used in read mode, you can boilerplate the method with UIViewRootEx2 view = (UIViewRootEx2) resolveVariable("view");if (view.isRenderingPhase()) {....}. That way it will only run once, during the RENDER RESPONSE phase.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 6 '18 at 15:07









          Paul Stephen WithersPaul Stephen Withers

          14.4k11130




          14.4k11130

























              0














              I tried to reproduce the problem you are having but either I'm misunderstanding it or there's something else going on on your end, because it works as expected for me. If you consider this scratch code you have 2 buttons that turn the radio group readonly mode or not. When in readonly only the label associated with checked values is shown, but not the other ones.



              <xp:view xmlns:xp="http://www.ibm.com/xsp/core" style="padding: 20px"
              beforePageLoad="#{javascript:viewScope.readonly=false}">

              <xp:div id="theThing">
              <xp:button value="Make readonly" id="buttonReadOnly"
              rendered="#{not viewScope.readonly}">
              <xp:eventHandler event="onclick" submit="true"
              execMode="partial" refreshMode="partial" refreshId="theThing"
              action="#{javascript:viewScope.readonly=true}" />
              </xp:button>

              <xp:button value="Make editable" id="buttonEditable"
              rendered="#{viewScope.readonly}">
              <xp:eventHandler event="onclick" submit="true"
              execMode="partial" refreshMode="partial" refreshId="theThing"
              action="#{javascript:viewScope.readonly=false}" />
              </xp:button>

              <hr />

              <xp:radioGroup id="rgRelStudy" value="#{viewScope.relStudy}"
              styleClass="radio-spacing" readonly="#{viewScope.readonly}"
              defaultValue="o">
              <xp:selectItems value="${javascript:['apple|a', 'orange|o', 'banana|b']}" />

              <xp:eventHandler event="onclick" submit="true"
              execMode="partial" refreshMode="partial" refreshId="pnlUpdate" />
              </xp:radioGroup>
              </xp:div>

              <hr />

              <xp:div id="pnlUpdate">
              <h3>The radio value (not label)</h3>
              <xp:text value="#{viewScope.relStudy}" />
              </xp:div>

              </xp:view>





              share|improve this answer




























                0














                I tried to reproduce the problem you are having but either I'm misunderstanding it or there's something else going on on your end, because it works as expected for me. If you consider this scratch code you have 2 buttons that turn the radio group readonly mode or not. When in readonly only the label associated with checked values is shown, but not the other ones.



                <xp:view xmlns:xp="http://www.ibm.com/xsp/core" style="padding: 20px"
                beforePageLoad="#{javascript:viewScope.readonly=false}">

                <xp:div id="theThing">
                <xp:button value="Make readonly" id="buttonReadOnly"
                rendered="#{not viewScope.readonly}">
                <xp:eventHandler event="onclick" submit="true"
                execMode="partial" refreshMode="partial" refreshId="theThing"
                action="#{javascript:viewScope.readonly=true}" />
                </xp:button>

                <xp:button value="Make editable" id="buttonEditable"
                rendered="#{viewScope.readonly}">
                <xp:eventHandler event="onclick" submit="true"
                execMode="partial" refreshMode="partial" refreshId="theThing"
                action="#{javascript:viewScope.readonly=false}" />
                </xp:button>

                <hr />

                <xp:radioGroup id="rgRelStudy" value="#{viewScope.relStudy}"
                styleClass="radio-spacing" readonly="#{viewScope.readonly}"
                defaultValue="o">
                <xp:selectItems value="${javascript:['apple|a', 'orange|o', 'banana|b']}" />

                <xp:eventHandler event="onclick" submit="true"
                execMode="partial" refreshMode="partial" refreshId="pnlUpdate" />
                </xp:radioGroup>
                </xp:div>

                <hr />

                <xp:div id="pnlUpdate">
                <h3>The radio value (not label)</h3>
                <xp:text value="#{viewScope.relStudy}" />
                </xp:div>

                </xp:view>





                share|improve this answer


























                  0












                  0








                  0







                  I tried to reproduce the problem you are having but either I'm misunderstanding it or there's something else going on on your end, because it works as expected for me. If you consider this scratch code you have 2 buttons that turn the radio group readonly mode or not. When in readonly only the label associated with checked values is shown, but not the other ones.



                  <xp:view xmlns:xp="http://www.ibm.com/xsp/core" style="padding: 20px"
                  beforePageLoad="#{javascript:viewScope.readonly=false}">

                  <xp:div id="theThing">
                  <xp:button value="Make readonly" id="buttonReadOnly"
                  rendered="#{not viewScope.readonly}">
                  <xp:eventHandler event="onclick" submit="true"
                  execMode="partial" refreshMode="partial" refreshId="theThing"
                  action="#{javascript:viewScope.readonly=true}" />
                  </xp:button>

                  <xp:button value="Make editable" id="buttonEditable"
                  rendered="#{viewScope.readonly}">
                  <xp:eventHandler event="onclick" submit="true"
                  execMode="partial" refreshMode="partial" refreshId="theThing"
                  action="#{javascript:viewScope.readonly=false}" />
                  </xp:button>

                  <hr />

                  <xp:radioGroup id="rgRelStudy" value="#{viewScope.relStudy}"
                  styleClass="radio-spacing" readonly="#{viewScope.readonly}"
                  defaultValue="o">
                  <xp:selectItems value="${javascript:['apple|a', 'orange|o', 'banana|b']}" />

                  <xp:eventHandler event="onclick" submit="true"
                  execMode="partial" refreshMode="partial" refreshId="pnlUpdate" />
                  </xp:radioGroup>
                  </xp:div>

                  <hr />

                  <xp:div id="pnlUpdate">
                  <h3>The radio value (not label)</h3>
                  <xp:text value="#{viewScope.relStudy}" />
                  </xp:div>

                  </xp:view>





                  share|improve this answer













                  I tried to reproduce the problem you are having but either I'm misunderstanding it or there's something else going on on your end, because it works as expected for me. If you consider this scratch code you have 2 buttons that turn the radio group readonly mode or not. When in readonly only the label associated with checked values is shown, but not the other ones.



                  <xp:view xmlns:xp="http://www.ibm.com/xsp/core" style="padding: 20px"
                  beforePageLoad="#{javascript:viewScope.readonly=false}">

                  <xp:div id="theThing">
                  <xp:button value="Make readonly" id="buttonReadOnly"
                  rendered="#{not viewScope.readonly}">
                  <xp:eventHandler event="onclick" submit="true"
                  execMode="partial" refreshMode="partial" refreshId="theThing"
                  action="#{javascript:viewScope.readonly=true}" />
                  </xp:button>

                  <xp:button value="Make editable" id="buttonEditable"
                  rendered="#{viewScope.readonly}">
                  <xp:eventHandler event="onclick" submit="true"
                  execMode="partial" refreshMode="partial" refreshId="theThing"
                  action="#{javascript:viewScope.readonly=false}" />
                  </xp:button>

                  <hr />

                  <xp:radioGroup id="rgRelStudy" value="#{viewScope.relStudy}"
                  styleClass="radio-spacing" readonly="#{viewScope.readonly}"
                  defaultValue="o">
                  <xp:selectItems value="${javascript:['apple|a', 'orange|o', 'banana|b']}" />

                  <xp:eventHandler event="onclick" submit="true"
                  execMode="partial" refreshMode="partial" refreshId="pnlUpdate" />
                  </xp:radioGroup>
                  </xp:div>

                  <hr />

                  <xp:div id="pnlUpdate">
                  <h3>The radio value (not label)</h3>
                  <xp:text value="#{viewScope.relStudy}" />
                  </xp:div>

                  </xp:view>






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 14 '18 at 14:19









                  shillemshillem

                  1,165611




                  1,165611






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53174091%2fworking-with-aliases-and-xpages-control-how-to%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Florida Star v. B. J. F.

                      Error while running script in elastic search , gateway timeout

                      Adding quotations to stringified JSON object values