0
我有一個靜態的下拉列表,但我想從AEM觸摸UI中的下拉列表中獲取值和文本。從AEM中的觸摸UI下拉獲取文本和值
<articleType
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/select"
fieldLabel="Article Type"
name="./articleType">
<items jcr:primaryType="nt:unstructured">
<select
jcr:primaryType="nt:unstructured"
text="Select Icon"
value=""/>
<article
jcr:primaryType="nt:unstructured"
text="Article"
value="article"/>
<video
jcr:primaryType="nt:unstructured"
text="Video"
value="video"/>
<infographic
jcr:primaryType="nt:unstructured"
text="Infographic"
value="graph"/>
</items>
</articleType>
現在我想取它像<i class="article-icon icon" />
。我可以從「值」中獲取「圖標類」,但我需要總是有一些測試條件來獲取文本。 所以我想要一個解決方案。
爲什麼不只是做一個什麼樣的中值和文本的複合價值?無論如何,它們都是靜態的,對吧?或者從後端代碼中的值中推斷出文本?什麼是確切的用例? – toniedzwiedz
我不想做任何手術,所以構圖不適合我。 –