We use both classic UI and touch ui. In the classic UI we have multifiled which has data stored as string with values as contentpath^textvalue where ^ is delimiter.
Please let me know how could i achieve the same in touch ui using multifield.
Below is the snapshot for the field stored as string in crxde for classic UI .
The multifield i am trying is below which is not working
fieldDescription="Configure Links Manually"
fieldDescription="Label of Link"
As the property is getting stored as string by classic ui with delimiter ^ ,due to this the code above i mentioned is not populating up the mutifield value in touch ui.
Any inputs as how i could solve.
In touch UI, Coral3, multifield data store as node, in your case it would be like navItems0, navItems1
You can easily get path and title in sling model and return as list.
It is not stored as node is stored as property navItems of String .But would want to show it up in multi-field in touch ui .hence all this issue.
Did you mean that still we can make it work using sling model. Any samples will help.
I got it now, you are trying to poluate touch UI dialog from classic UI authored value.
This would be tricky, you have two options
1. Create a utility which would read the String property and create the nodes for touch ui multifield
2. When you open the touch ui dialog, get the value via ajax call and populate the multifield values in dailog.
I don't have any sample code though but 1st but would be easy, just authored one multifield again in touch UI and see how touch UI stores the value and converted same using utility
Thanks for the inputs .Any reference will help as currently i don't have much idea on Point1.
Point2 also using ajax we will have many multifields values in one dialog so cannot use id for populating it and looks to me like an issue.
The first approach is very straight forward.
1. Create a servlet which run SQL2 query to look for the multifield resource node where data is stored in String type property.
2. If found, read the value of String type and convert into nodes and add node to above multifield resource node .
I don't know the dialog structure so couldn't exact point the steps but above is generic solution
Please let me know if the below is possible. for nested multifield
Instead of maintaining 2 separate ways of storing data for touch ui and classic ui .
I was thinking if we just have the classic UI code to make it work like touch ui requires.
As we are going away from classic UI may be in few releases from now.
So currently the touch ui will store the data as:-
But classic Ui it will store as
-item0 and here navItems as string property.
The classic dialog has below structure
-xtype multifiled [menuitems]
-- inner xtype multifield [navItems ]
--- inner field1
--- inner field2
Can we have any custom CQ.Ext.reg code which will store that navItems in nodes instead of string array also the classic dialog will be able to render the inner field1 and inner field2 correctly will displaying.