soweit mir bekannt sollte das über den OperationAgent und der ShowFormDialogOperation funktionieren.
Wenn du ein Script erstellst, welches im ContentCreator genutzt werden kann, kannst du dem Formularkanal des Scriptes mit den notwendigen Eingabekomponeten erstellen oder dir in dem Script eine Eingabekomponente zusammenbauen:
/* Ungetestet als Script */
opAgent = context.requireSpecialist(OperationAgent.TYPE);
langAgent = context.requireSpecialist(LanguageAgent.TYPE);
masterLang = langAgent.getMasterLanguage();
formsAgent = context.requireSpecialist(FormsAgent.TYPE);
generateForm() {
formBuilder = new StringBuilder();
formBuilder.append("<CMS_MODULE>");
formBuilder.append("<CMS_LABEL>");
formBuilder.append("<LANGINFOS>");
formBuilder.append("<LANGINFO lang=\"*\" label=\"This Script copies all language dependend information from source language to target language(s)\"/>");
formBuilder.append("</LANGINFOS>");
formBuilder.append("</CMS_LABEL>");
formBuilder.append("<CMS_INPUT_COMBOBOX name=\"sc_sourceLanugage\" allowEmpty=\"no\" hFill=\"yes\" useLanguages=\"no\" singleLine=\"no\">");
formBuilder.append("<ENTRIES>");
for (lang : context.getProject().getLanguages()) {
formBuilder.append("<ENTRY value=\""+lang.getAbbreviation()+"\">");
formBuilder.append("<LANGINFOS>");
formBuilder.append("<LANGINFO lang=\"*\" label=\""+lang.getAbbreviation()+"\"/>");
formBuilder.append("</LANGINFOS>");
formBuilder.append("</ENTRY>");
}
formBuilder.append("</ENTRIES>");
formBuilder.append("<LANGINFOS>");
formBuilder.append("<LANGINFO lang=\"*\" label=\"Source Language\"/>");
formBuilder.append("</LANGINFOS>");
formBuilder.append("</CMS_INPUT_COMBOBOX>");
formBuilder.append("</CMS_MODULE>");
}
sfdOp = opAgent.getOperation(ShowFormDialogOperation.TYPE);
sfdOp.setTitle("Title");
inputData = null;
try {
inputData = sfdOp.perform(formsAgent.getForm(generateForm()), langAgent.getLanguages());
} catch(e) {
//error
}
if(inputData != null) {
sourceLang = inputData.get(masterLang, "sc_sourceLanugage").get();
}
Das dürfte in ContentCreator und SiteArchitect funktionieren.
Vielleicht kann das ja hier noch kurz jemand bestätigen, das habe ich nicht getestet.