With a multifield and textarea component I am trying to sightly print the values inserted into the textareas and then print the modified values by means of a method in the sling model.
I wrote <data-sly-list.commenta="${comments.listChildren}">
${comment.text}
${model.modifyText}
It continues to print only the values entered from the dialog without printing those modified with the model
解決済! 解決策の投稿を見る。
トピックはコミュニティのコンテンツの分類に役立ち、関連コンテンツを発見する可能性を広げます。
表示
返信
いいね!の合計
Hi @Vodjakxa
check the context
${model.modifyText @ context='html'}
Could you please share below:
1. How text and modifyText stored in the content page node.
2. Sling Model code?
If text and modifyText are stored in the same node then you can return list from sling Model and display both like
<sly data-sly-list.commenta="${comments.listChildren}">
<div>Text : ${commenta.text @ context='html'} </div>
<div> Modify Text : ${commenta.modifyText @ context='html'} </div>
</sly>
Hi @Vodjakxa
check the context
${model.modifyText @ context='html'}
Could you please share below:
1. How text and modifyText stored in the content page node.
2. Sling Model code?
If text and modifyText are stored in the same node then you can return list from sling Model and display both like
<sly data-sly-list.commenta="${comments.listChildren}">
<div>Text : ${commenta.text @ context='html'} </div>
<div> Modify Text : ${commenta.modifyText @ context='html'} </div>
</sly>
In the content page node comments are saved as children of comments. And for now it only prints the values entered via the dialog. My intention is to be able to print those modified method values in the model, called modifyText. In the model I added @RequestAttribute to the text attribute
表示
返信
いいね!の合計
Hi @Vodjakxa
In your sling model, return the modified item list through getters and setters.
Please iterate through modified list using data-sly-list in sightly and print the modifyText
${list.modifyText}
Hope this helps !
表示
返信
いいね!の合計