Hi,
I am trying to include a fragment inside the html form. I am able to include the fragment if there are no config fields required using the following syntax:
but if the field has required config values, i cant make an entry:
<uiInclude provider=“uicommons” fragment=“field/datetimepicker” config="{ “id”: “startDate”,
“formFieldName”: “encounterDate”,
“label”:“label”,
“useTime”: false
}"/>
But this wouldn’t work. Can you suggest a way where I can add config values as a map?
Best,
Sameer
@dkayiwa @darius can you help pls?
suthagar23
(Suthagar Kailayapathy)
September 15, 2018, 6:10am
3
Can you please point us the actual implementation/code which contains this part?
Better to make a PR or Commit would easy for the advice
Link to the code
Here is the function:
public String includeFragment(String providerName, String fragmentId, Map<String, Object> config) throws PageAction {
MapResourceExtension resource = mapResource(providerName, fragmentId);
return fragmentIncluder.includeFragment(new FragmentRequest(resource.getProviderId(), resource.getResourceId(),
config));
}
I want to know how to form a map here for config. An example would be really helpful
wyclif
(Wyclif Luyima)
September 17, 2018, 2:16pm
6
I don’t see anything in the documentation here that mentions passing in a config object, I don’t think the html form entry module supports passing in a config.
but the class has a function where config map is present as one of the parameters as visible in my comment above.
wyclif
(Wyclif Luyima)
September 17, 2018, 2:31pm
8
Including a fragment in an html form is different from including a fragment in a gsp, I think you’re mixing up the two.
i was able to include a fragment in an html form.
<uiInclude provider=“uicommons” fragment=“field/datetimepicker”/> using this. just want to find out how to provide config values to datepicker now.
wyclif
(Wyclif Luyima)
September 17, 2018, 3:11pm
10
From the documentation for the uiInclude tag, looks like Html form entry doesn’t currently support passing in config values.