有方便的方法StringUtils.capitalize()在apache-commons-lang库中.但我找不到成对逆方法,它会使单词中的第一个字母为小写.这种方法存在吗?
我需要在一个 Tapestry 表列中获取 2 个 java 字段。我的每个字段都可以为空。我可以在单行中编写 if 条件(一个 IF 运算符中的两个字段),还是必须为第二个字段编写内部条件?
现在我有这个:
<t:if test="${subject.subjectQuantity}">
<t:if test="${subject.unitMeasure}">
<tr>
<td>Subject count:</td>
<td>${subject.subjectQuantity} ${subject.unitMeasure}</td>
</tr>
</t:if>
</t:if>
Run Code Online (Sandbox Code Playgroud)