- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
$CMS_VALUE()$ in Executable nachbauen
Hallo,
ich habe eine Frage und zwar, wie kann ich einer Executable die Funktion $CMS_VALUE()$ nachbauen?
Anwendungsfall:
ich mรถchte Eingabekomponenten wie z.B. CMS_INPUT_DOM oder CMS_INPUT_LINK innerhalb
einer Executable rendern.
Die FormFields bzw. die Objekt habe ich bereits in der Executable:
@Override
public Object execute(Map<String, Object> executionContext, Writer stdOut, Writer stdErr) throws ExecutionException {
SiteProduction siteProduction = (SiteProduction) executionContext.get("context");
Section<?> section = siteProduction.getSection();
FormData formData = section.getFormData();
Language language = siteProduction.getLanguage();
FormField field = formData.get(lang, "link_field_name");
Link link = (Link) field.get();
}
Wie bringe ich diese jetzt zum Rendern?
Vielen Dank im Voraus fรผr die Tipps!
- Labels:
-
Developers
-
Knowledgebase
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sollte in etwa so funktionieren:
siteProduction.getContext().setVariableValue("x", <field>);
siteProduction.print(siteProduction.parse("$CMS_VALUE(x)$"));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sollte in etwa so funktionieren:
siteProduction.getContext().setVariableValue("x", <field>);
siteProduction.print(siteProduction.parse("$CMS_VALUE(x)$"));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hallo Peter,
vielen Dank fรผr dein Tipp. Es funktioniert! Genau das was ich gesucht habe!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Super, danke fรผr die Rรผckmeldung.
Wofรผr du das genau brauchst frage ich jetzt mal lieber nicht

