1. <s:inputTestAjax> problem
<h:panelGroup rendered="false">
<s:inputTextAjax value="#{UserBean.nick}" id="nickTextAjax" validator="#{UserBean.validateNick
}" errorStyle="border:1px solid red; color:red;" />
<t:message forceSpan="true" styleClass="errorMessage" for=""
</h:panelGroup>
public void validateNick(FacesContext context, UIComponent toValidate, Object value)
{
if (value != null)
{
String valStr = ((String) value).trim();
if (valStr.length() < 1)
{
((UIInput) toValidate).setValid(false);
context.addMessage(toValidate.getClientId(context), new FacesMessage(FacesMessage.SEVERITY_ERROR
, "error", null));
}
}
}
I find that validateNick is called but the circle at the right side of the inputText is always active.
2.<s:valueChangeNotifier> problem
<h:selectOneMenu id="selectSearchType" value="#{SearchBean.searchType}" > <s:valueChangeNotifier method="#{SearchBean.changeSearchType}" />
<f:selectItems value="#{SearchBean.typeItems}" />
</h:selectOneMenu>
public void changeSearchType(ValueChangeEvent vce) throws AbortProcessingException{
this.searchType = (String)vce.getNewValue();
}
I want to change the searchType but not refresh the page.
The form is submited, but changeSearchType is never called. Also, when I change the selection the page is refreshed.
3. It seems that all the sandbox components don't support Chinese(charset GBK or GB2312)
Any solutions to these problems?
Thank you very much!