LIKE
和其他比较运算符=
等的默认行为区分大小写.
是否有可能使它们不区分大小写?
最后,我遇到了从Eclipse中删除插件的问题.
症状:
1.如果通过已安装的菜单删除,无法正确重新安装并具有多个透视图 - 例如,对于SQL Explorer.(在Open Perspective
菜单中)
2.如果从plugins
目录中手动删除文件系统,我不确定应删除的.jars
问题是,保证正确完全删除插件的步骤是什么,哪些更好,手动或自动删除?
分享,拜托,您的体验.
我想覆盖为所有表定义的以下CSS样式:
table {
font-size: 12px;
width: 100%;
min-width: 400px;
display:inline-table;
}
Run Code Online (Sandbox Code Playgroud)
我有一个叫做类的特定表'other'
.
最后餐桌装饰应该如下:
table.other {
font-size: 12px;
}
Run Code Online (Sandbox Code Playgroud)
所以我需要除去3个属性:width
,min-width
和display
我尝试用none
或重置auto
,但没有帮助,我的意思是这些情况:
table.other {
width: auto;
min-width: auto;
display:auto;
}
table.other {
width: none;
min-width: none;
display:none;
}
Run Code Online (Sandbox Code Playgroud) faces-config.xml
:
<application>
<locale-config>
<default-locale>ru</default-locale>
<supported-locale>ua</supported-locale>
</locale-config>
</application>
Run Code Online (Sandbox Code Playgroud)
在bean操作方法中,我正在更改当前视图中的语言环境,如下所示:
FacesContext.getCurrentInstance().getViewRoot().setLocale(new Locale("ua"));
Run Code Online (Sandbox Code Playgroud)
问题是应用了ua
Locale,但仅适用于每个请求/视图而不适用于会话.同一会话中的另一个请求/视图将语言环境重置为默认ru
值.
如何应用会话的区域设置?
从IE浏览器执行上传时,我的后端(org.apache.commons.fileupload)获取完整的文件路径.
对于其他非IE浏览器,它获取文件名,因为安全性,它是可以的.
如何从IE的输入中获取文件名?
是否可以在UI上进行,因为我认为编辑apache lib并不是很优雅.
也许,输入字段存在一些参数?
我可以在服务器上做,但对UI方法感兴趣.
有config(applicationContext-security.xml):
<authentication-manager alias="authenticationManager">
<authentication-provider>
<password-encoder hash="sha"/>
<jdbc-user-service data-source-ref="dataSource"/>
</authentication-provider>
</authentication-manager>
Run Code Online (Sandbox Code Playgroud)
从另一边有我的dataSource
(这是JdbcDaoImpl)的SQL :
...
public static final String DEF_USERS_BY_USERNAME_QUERY =
"select username,password,enabled " +
"from users " +
"where username = ?";
...
Run Code Online (Sandbox Code Playgroud)
现在有关sha
于此代码的消息,因此从标准Spring Security users
表中选择的密码未编码.
也许,我应该在我的hibernate映射配置中sha
为password
列提供一些属性:
<class name="model.UserDetails" table="users">
<id name="id">
<generator class="increment"/>
</id>
<property name="username" column="username"/>
<property name="password" column="password"/>
<property name="enabled" column="enabled"/>
<property name="mail" column="mail"/>
<property name="city" column="city"/>
<property name="confirmed" column="confirmed"/>
<property name="confirmationCode" column="confirmation_code"/>
<set name="authorities" cascade="all" inverse="true"> …
Run Code Online (Sandbox Code Playgroud) 还有一个关于JSF的问题.特别是Primefaces.
有id的ajax同时更新元素有以下问题.如果页面上的元素一个接一个,则ajax更新执行正常:
<ui:repeat value="#{showProducts.inCart}" var="cart">
<td><p:spinner min="0" value="#{cart.count}" immediate="true">
<p:ajax process="@this" update="count,subTotal"/></p:spinner></td>
<td><h:outputText value="#{cart.totalPrice}" id="count"/></td>
<h:outputText value="#{showProducts.subTotal}" id="subTotal"/>
</ui:repeat>
Run Code Online (Sandbox Code Playgroud)
这里id为"count"的元素首先出现,然后id为"subtotal"的元素变为第二个.如果页面上的元素不是一个一个严格,那么具有"小计"id的第二个元素不会更新:
<ui:repeat value="#{showProducts.inCart}" var="cart">
<td><p:spinner min="0" value="#{cart.count}" immediate="true">
<p:ajax process="@this" update="count,subTotal"/></p:spinner></td>
<td><h:outputText value="#{cart.totalPrice}" id="count"/></td>
<td><h:outputText value="#{cart.place}" /></td>
</ui:repeat>
<h:outputText value="#{showProducts.subTotal}" id="subTotal"/>
Run Code Online (Sandbox Code Playgroud)
这是正常的行为还是我错过了一些参数?
拥有JSF 1.2两个页面(one.xhtml和other.xhtml),
它们按照以下规则包含在当前页面中:
...
<c:if test="#{flowScope.Bean.param1}">
<ui:include src="one.xhtml"/>
</c:if>
<c:if test="#{!flowScope.Bean.param1}">
<ui:include src="other.xhtml"/>
</c:if>
...
Run Code Online (Sandbox Code Playgroud)
据one.xhtml
不同于other.xhtml
只能通过动作参数:
one.xhtml:<h:commandLink action="actionOne">
other.xhtml:<h:commandLink action="actionTwo">
是否可以使用一些通用的xhtml?
而不是one.xhtml和other.xhtml,这样的事情:
...
<c:if test="#{flowScope.Bean.param1}">
<ui:include src="general.xhtml" param="actionOne"/>
</c:if>
<c:if test="#{!flowScope.Bean.param1}">
<ui:include src="general.xhtml" param="actionTwo"/>
</c:if>
...
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助.
如何使默认选项<f:selectItem>
之内<h:selectOneMenu>
?
这是必需的,当加载页面时,已经选择了特定的"20"下拉项.
<h:selectOneMenu value="#{fileSearchCriteriaOut.recordsPerPage}" >
<f:selectItem itemLabel="5" itemValue="5" />
<f:selectItem itemLabel="10" itemValue="10" />
<f:selectItem itemLabel="20" itemValue="20" selected="true"/>
</h:selectOneMenu>
Run Code Online (Sandbox Code Playgroud)
这四个不起作用:
<f:selectItem itemLabel="20" selected="true"/>
<f:selectItem itemLabel="20" selected="selected"/>
<f:selectItem itemLabel="20" checked="checked"/>
<f:selectItem itemLabel="20" checked="true"/>
Run Code Online (Sandbox Code Playgroud) jsf ×4
oracle ×2
ajax ×1
config ×1
constraints ×1
css ×1
database ×1
encoding ×1
file ×1
include ×1
input ×1
jsf-2 ×1
localization ×1
overriding ×1
parameters ×1
passwords ×1
path ×1
primefaces ×1
reusability ×1
session ×1
sql ×1
sql-like ×1
upload ×1
width ×1