从表单中提取值并将参数(过滤器)发送到数据库服务
Extract value from form and send to database service how a parameter (filter)
在我的配置中,我尝试下一个命令 (BD mysql):
SELECT user, name, lastname FROM Cordloc
where user=<sql:param type="xs:string" select="/form/section-1/usuario"/>
此数据库服务连接到下拉菜单,但是当我包含句子 "where user=<sql:param type="xs:string" select="/form/section-1/usuario"/>"
时,
这是行不通的。
我尝试使用 show en drowdown name user,但使用用户登录名 orbeon 进行过滤(在 table 中是相同的值 "orbeon")。
拜托,你能帮我吗?
非常感谢。
您不能在查询中使用 XPath 表达式,例如 /form/section-1/usuario
。相反,select
属性 的值必须 留空(如 1. Set a service parameter 中所述)。
相反,您 "feed" 从操作中获得服务的价值。在 Actions Editor 中,在 Set Database Service Parameters 下,您可以说给定字段的值应该用于您的 SQL 查询.
在我的配置中,我尝试下一个命令 (BD mysql):
SELECT user, name, lastname FROM Cordloc
where user=<sql:param type="xs:string" select="/form/section-1/usuario"/>
此数据库服务连接到下拉菜单,但是当我包含句子 "where user=<sql:param type="xs:string" select="/form/section-1/usuario"/>"
时,
这是行不通的。
我尝试使用 show en drowdown name user,但使用用户登录名 orbeon 进行过滤(在 table 中是相同的值 "orbeon")。
拜托,你能帮我吗?
非常感谢。
您不能在查询中使用 XPath 表达式,例如 /form/section-1/usuario
。相反,select
属性 的值必须 留空(如 1. Set a service parameter 中所述)。
相反,您 "feed" 从操作中获得服务的价值。在 Actions Editor 中,在 Set Database Service Parameters 下,您可以说给定字段的值应该用于您的 SQL 查询.