简体   繁体   English

从标签或jsp调用Java set方法

[英]Calling a Java set method from a tag or jsp

I am trying to call a set method from a tag file. 我正在尝试从标记文件调用set方法。 Here is my code: 这是我的代码:

<c:set var="countryCode" value="${proposalPerson.countryCode}"/>
<c:set value="${f:KualiForm.setCurrentPersonCountryCode(countryCode)}"/>

the second statement is the set statement that I am having problems with. 第二个语句是我遇到问题的set语句。 Just for note, this tag looping through a List of objects, and I need to set this value for proccessing server side lower on in the code. 仅作说明,此标记在对象列表中循环,因此我需要将此值设置为在代码中将服务器端进行处理。 Anyway, the error I have gotten is: 无论如何,我得到的错误是:

PWC6296: The function setCurrentPersonCountryCode 
must be used with a prefix when a default namespace is not specified

I've found a few related posts on this site, but none seem to be working for me. 我在此站点上找到了一些相关的帖子,但似乎没有一个适合我。 Any ideas? 有任何想法吗?

Here is the code I needed: 这是我需要的代码:

<c:set var="currentCountryCode" value="${KualiForm.document.developmentProposalList[0].proposalPersons[personIndex].countryCode}"/>
<jsp:setProperty name="KualiForm" property="currentPersonCountryCode" value="${currentCountryCode }"  /> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM