[JBoss Seam] - After updating to 2.0.0.GA uiComponent.findComponent(string)
by jbuechel
When i deploy the application with the new Seam 2.0.0.GA jar files the method
UIComponent comparedUIComponent = uiComponent.findComponent(comparedFieldId);
returns null. When i deploy it with 2.0.0.BETA1 the component is found..
I don't have any idea why this behavior occurs as it's not seam code..!?
@Name("equalsFieldValidator")
| @BypassInterceptors
| @Validator(id = "com.frox.fwc.validator.equalsFieldValidator")
| public class EqualsFieldValidator implements javax.faces.validator.Validator {
|
| public final static String ATTRIBUTE_COMPARED_COMPONENT_ID = "comparedFieldId";
|
| /*
| * (non-Javadoc)
| *
| * @see javax.faces.validator.Validator#validate(javax.faces.context.FacesContext,
| * javax.faces.component.UIComponent, java.lang.Object)
| */
| @Override
| public void validate(FacesContext facesContext, UIComponent uiComponent, Object value)
| throws ValidatorException {
|
| String fieldValue = (String) value;
| UIComponent equalInputField = this.getComparedComponent(uiComponent);
|
| Object equalValue = ((UIInput) equalInputField).getValue();
|
| if (!fieldValue.equals(equalValue))
| throw new ValidatorException(FacesMessages.createFacesMessage(FacesMessage.SEVERITY_ERROR,
| "com.frox.fwc.validator.equalsField", ""));
| }
|
| public UIComponent getComparedComponent(UIComponent uiComponent) {
|
| String comparedFieldId = (String) uiComponent.getAttributes().get(
| ATTRIBUTE_COMPARED_COMPONENT_ID);
| if (comparedFieldId == null)
| throw new IllegalStateException(
| "Attribut equalComponentId must be set. ");
|
| UIComponent comparedUIComponent = uiComponent.findComponent(comparedFieldId);
| if (comparedUIComponent == null)
| throw new IllegalStateException("UIComponent with id " + comparedFieldId
| + " not found.");
|
| return comparedUIComponent;
| }
| }
|
<f:validator validatorId="com.frox.fwc.validator.equalsFieldValidator" />
| <f:attribute name="comparedFieldId" value="user_label_new_password" />
| <s:validate />
Any help would be great!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102268#4102268
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102268
18 years, 6 months
[JBossWS] - Re: service-name-pattern
by Sefai
This is the debug output of JBossAS
2007-11-06 17:58:34,493 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Configure SOAPBinding
| 2007-11-06 17:58:34,493 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl] initHandlerChain: PRE
| 2007-11-06 17:58:34,493 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl] initHandlerChain: ENDPOINT
| 2007-11-06 17:58:34,493 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl] initHandlerChain: POST
| 2007-11-06 17:58:34,493 DEBUG [org.jboss.ws.core.jaxws.handler.HandlerResolverImpl] addHandler:
| HandlerMetaDataJAXWS:
| type=POST
| name=WSSecurity Handler Client(x509v3)
| class=class org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient
| params=[]
| protocols=null
| services={http://mywebservice.org/}MyWebService
| ports=null
And this is the client-config
<jaxws-config xmlns="urn:jboss:jaxws-config:2.0"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xmlns:javaee="http://java.sun.com/xml/ns/javaee"
| xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
| <client-config>
| <config-name>
| My Web Service Client Security Config
| </config-name>
| <post-handler-chains>
| <javaee:handler-chain>
| <javaee:service-name-pattern xmlns:myns="http://mywebservice.org/">
| myns:MyWebService
| </javaee:service-name-pattern>
| <javaee:handler>
| <javaee:handler-name>
| WSSecurity Handler Client(x509v3)
| </javaee:handler-name>
| <javaee:handler-class>
| org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient
| </javaee:handler-class>
| </javaee:handler>
| </javaee:handler-chain>
| </post-handler-chains>
| </client-config>
| </jaxws-config>
This seems to me OK.
What you say about this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102261#4102261
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102261
18 years, 6 months