Parameters 如何为e4命令创建参数

Parameters 如何为e4命令创建参数,parameters,command,e4,Parameters,Command,E4,我正在开发一个e4应用程序,试图将参数传递给命令。 我在应用程序模型中定义了参数,因此它们是字符串。 我遗漏了参数的typeId Map参数=newhashmap(); parameter.put(“de.mdsd.e4.rap.kdn.joggathon.webeditor.commandparameter.username”,用户名); parameter.put(“de.mdsd.e4.rap.kdn.joggathon.webeditor.commandparameter.passwor

我正在开发一个e4应用程序,试图将参数传递给命令。 我在应用程序模型中定义了参数,因此它们是字符串。 我遗漏了参数的typeId

Map参数=newhashmap();
parameter.put(“de.mdsd.e4.rap.kdn.joggathon.webeditor.commandparameter.username”,用户名);
parameter.put(“de.mdsd.e4.rap.kdn.joggathon.webeditor.commandparameter.password”,password);
ParameterizedCommand cmd=commandService.createCommand(“command.dologin”,参数);
当我创建传递参数的命令时,由于commandService没有为我的参数找到转换器,所以返回null


我必须在参数中指定哪个typeId才能使用简单的字符串参数?

如果“用户名”和“密码”来自类型
String
,则您的版本非常好。错误可能是在其他地方产生的。
您可以尝试
parameters.clear()在填充映射之前,避免意外映射。

您会得到什么错误?可能的重复