2015-05-07 50 views
2

我正在開發觸摸UI組件。以下是我在某種程度上嘗試和工作的內容。下面是dialog.xmlTouchUI組件中的RadioGroup

<content 
     jcr:primaryType="nt:unstructured" 
     sling:resourceType="granite/ui/components/foundation/container"> 
     <layout 
      jcr:primaryType="nt:unstructured" 
      sling:resourceType="granite/ui/components/foundation/layouts/tabs" 
      type="nav"/> 
     <items jcr:primaryType="nt:unstructured"> 
      <herotext 
       jcr:primaryType="nt:unstructured" 
       jcr:title="Hero Text Properties" 
       sling:resourceType="granite/ui/components/foundation/section"> 
       <layout 
        jcr:primaryType="nt:unstructured" 
        sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/> 
       <items jcr:primaryType="nt:unstructured"> 
        <column 
         jcr:primaryType="nt:unstructured" 
         sling:resourceType="granite/ui/components/foundation/container"> 
         <items jcr:primaryType="nt:unstructured"> 
          <myradiogroup 
           jcr:primaryType="nt:unstructured" 
           sling:resourceType="granite/ui/components/foundation/form/radiogroup" 
           fieldLabel="Select Fruit" 
           name="./fruit"> 
           <items jcr:primaryType="nt:unstructured"> 
            <option1 
             jcr:primaryType="nt:unstructured" 
             sling:resourceType="granite/ui/components/foundation/form/radio" 
             cq-msm-lockable="fruit" 
             renderReadOnly="{Boolean}true" 
             text="Apple" 
             value="apple"/> 
            <option2 
             jcr:primaryType="nt:unstructured" 
             sling:resourceType="granite/ui/components/foundation/form/radio" 
             cq-msm-lockable="fruit" 
             renderReadOnly="{Boolean}true" 
             text="Pear" 
             value="pear"/> 
           </items> 
          </myradiogroup> 
         </items> 
        </column> 
       </items> 
      </herotext> 
     </items> 
    </content> 

在此之後我能夠在頁面上呈現的無線電選擇的值。但有以下問題。

1) Radio options are coming in vertical direction, but i want them in horizontal. 
2) Radio Group Name not display, I want same like as fieldLabel & want to hide hide the border line. 
3) When i reopen the dialog, radiobutton is not selected even if the selected value stored in JCR during last submit. 

由於

回答

0

爲獲得在水平方向上使用下面的類與coral-RadioGroup--horizontal值屬性中的單選按鈕。這是AEM提供的OOTB類,您也可以讓您的自定義類控制佈局和對齊

對於顯示Radio Button Group標籤,請使用text屬性。

Radio Button Group properties

在打開的對話框中,屬性填充的罰款。看看你是否有同名的同一對話中的其他無線電通話組。