[JBoss Seam] - Re: <s:selectItems> not recognized in seam 1.2.0 patch1
by juangiovanolli
oops. this is the corrected file:
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
| <ui:component xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:t="http://myfaces.apache.org/tomahawk"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:c="http://java.sun.com/jstl/core"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
| xmlns:platform="http://www.santexstandard.com/jsf"
| xmlns:darwin="http://www.santexstandard.com/jsf/darwin"
| xmlns:iu="http://www.sun.com/web/ui">
| <ui:decorate template="formInputTemplate.xhtml">
| <ui:define name="input">
|
| <c:if test="#{not empty inputLabel}">
| <c:set var="inputLookupKey" value="#{inputLabel}" />
| </c:if>
|
| <c:if test="#{not empty fieldName and empty inputLabel}">
| <c:set var="inputLookupKey" value="#{itemName}.#{fieldName}" />
| </c:if>
|
| <c:if test="#{empty inputType}">
| <c:set var="inputType" value="text" />
| </c:if>
|
| <c:if test="#{empty inputId}">
| <c:set var="inputId" value="#{fieldName}" />
| </c:if>
|
| <c:if test="#{empty fieldName and inputType == 'location'}">
| <c:set var="inputId" value="location" />
| </c:if>
|
| <c:if test="#{empty size}">
| <c:set var="size" value="5" />
| </c:if>
|
| <c:if test="#{empty required}">
| <c:set var="required" value="false" />
| </c:if>
|
| <c:if test="#{empty disabled}">
| <c:set var="disabled" value="false" />
| </c:if>
|
| <c:if test="#{empty isFromBackingBean}">
| <c:set var="isFromBackingBean" value="true" />
| </c:if>
|
|
| <!-- pxh -->
| <c:if test="#{empty bindingValue and isFromBackingBean == 'true'}">
| <c:choose>
| <c:when test="#{formType == 'search'}">
| <c:set var="bindingValue" value="#{backingBean[fieldName].value}" />
| </c:when>
| <c:otherwise>
| <c:set var="bindingValue" value="#{backingBean[fieldName]}" />
| </c:otherwise>
| </c:choose>
| </c:if>
|
| <c:if test="#{empty converterId}">
| <c:choose>
| <c:when test="#{formType == 'search'}">
| <c:choose>
| <c:when test="#{inputType == 'combobox'}">
| <c:set var="converterId" value="idSearchObjectConverter" />
| </c:when>
| <c:otherwise>
| <c:set var="converterId" value="defaultSearchObjectConverter" />
| </c:otherwise>
| </c:choose>
| </c:when>
| <c:otherwise>
| <c:set var="converterId" value="simpleIdObjectConverter" />
| </c:otherwise>
| </c:choose>
| </c:if>
| <!-- end pxh -->
|
| <c:if test="#{not empty nestedObject}">
| <c:set var="bindingValue" value="#{nestedObject[fieldName]}" />
| </c:if>
|
| <h:outputLabel for="#{inputId}">
| <c:if test="#{required == 'true'}">
| <span>*</span>
| </c:if>
| <h:outputText value="#{messages[inputLookupKey]}" />
| </h:outputLabel>
|
| <s:decorate>
|
| <f:facet name="aroundInvalidField">
| <s:div styleClass="error" />
| </f:facet>
| <f:facet name="afterInvalidField">
| <darwin:formInputMessage />
| </f:facet>
|
| <c:choose>
| <c:when test="#{inputType == 'text'}">
| <h:inputText id="#{inputId}" value="#{bindingValue}"
| required="#{required}" disabled="#{disabled}" />
| </c:when>
| <c:when test="#{inputType == 'number'}">
| <h:inputText id="#{inputId}" value="#{bindingValue}"
| required="#{required}" disabled="#{disabled}">
| <f:converter converterId="#{converterId}" />
| </h:inputText>
| </c:when>
| <c:when test="#{inputType == 'calendar'}">
| <platform:calendar inputId="#{inputId}"
| bindingValue="#{bindingValue}" required="#{required}"
| disabled="#{disabled}" />
| </c:when>
| <c:when test="#{inputType == 'secret'}">
| <h:inputSecret id="#{inputId}" value="#{bindingValue}"
| required="#{required}" disabled="#{disabled}" />
| </c:when>
| <c:when test="#{inputType == 'textArea'}">
| <h:inputTextarea id="#{inputId}" value="#{bindingValue}"
| required="#{required}" />
| </c:when>
|
| <c:when test="#{inputType == 'combobox'}">
| <h:selectOneMenu id="#{inputId}" value="#{bindingValue}"
| required="#{required}" disabled="#{disabled}">
| <c:if test="#{not empty valueChangeListener}">
| <f:attribute name="valueChangeListener"
| value="#{valueChangeListener}" />
| <f:attribute name="onchange" value="submit()" />
| </c:if>
| <c:if test="#{not empty enumType}">
| <f:converter converterId="enumConverter" />
| <c:forEach items="#{darwinWebUtil[enumType]}"
| var="enumItemValue">
| <c:set var="enumItemLabel"
| value="#{enumItemValue.class.name}.#{enumItemValue}" />
| <f:selectItem itemValue="#{enumItemValue}"
| itemLabel="#{messages[enumItemLabel]}" />
| </c:forEach>
| </c:if>
| <c:if test="#{empty enumType}">
| <f:converter converterId="#{converterId}" />
| <f:selectItems value="#{itemsList}" />
| </c:if>
| </h:selectOneMenu>
| </c:when>
|
| <c:when test="#{inputType == 'standardCombobox'}">
| <h:selectOneMenu id="#{inputId}" value="#{bindingValue}"
| required="#{required}" disabled="#{disabled}">
| <c:if test="#{not empty valueChangeListener}">
| <f:attribute name="valueChangeListener"
| value="#{valueChangeListener}" />
| <f:attribute name="onchange" value="submit()" />
| </c:if>
| <f:selectItems value="#{itemsList}" />
| </h:selectOneMenu>
| </c:when>
|
| <c:when test="#{inputType == 'noFacesListBox'}">
| <select id="#{inputId}" size="#{size}">
| <c:forEach items="#{itemsList}" var="itemValue">
| <option value="#{itemValue}">#{itemValue}</option>
| </c:forEach>
| </select>
| </c:when>
|
| <c:when test="#{inputType == 'checkbox'}">
| <h:selectBooleanCheckbox id="#{inputId}" value="#{bindingValue}"
| disabled="#{disabled}" />
| </c:when>
|
| <c:when test="#{inputType == 'email'}">
| <h:inputText id="#{inputId}" value="#{bindingValue}"
| required="#{required}" disabled="#{disabled}">
| <t:validateEmail />
| </h:inputText>
| </c:when>
|
| <c:when
| test="#{inputType == 'location' and
| not empty countryFldName and
| not empty regionFldName and
| not empty cityFldName and
| empty fieldName}">
| <!-- DISPLAY COUNTRIES -->
| <a4j:status startStyle="font-color:red" stopText="Ready"
| startText="Request under process" /> -->
| <h:selectOneMenu id="#{countryFldName}"
| value="#{backingBean[countryFldName]}" required="#{required}"
| disabled="#{disabled}">
| <f:selectItem itemLabel="arg" itemValue="arg" />
| <f:selectItem itemLabel="bra" itemValue="bra" />
| </h:selectOneMenu>
| <!-- DISPLAY REGIONS -->
| <h:selectOneMenu id="#{regionFldName}"
| value="#{backingBean[regionFldName]}" required="#{required}"
| disabled="#{disabled}">
| <f:selectItem itemLabel="arg" itemValue="arg" />
| <f:selectItem itemLabel="bra" itemValue="bra" />
| </h:selectOneMenu>
| <!-- DISPLAY CITIES -->
| <h:selectOneMenu id="#{cityFldName}"
| value="#{backingBean[cityFldName]}" required="#{required}"
| disabled="#{disabled}">
| <f:selectItem itemLabel="arg" itemValue="arg" />
| <f:selectItem itemLabel="bra" itemValue="bra" />
| </h:selectOneMenu>
| </c:when>
|
| <c:when test="#{inputType == 'oneToMany'}" >
|
| <h:selectManyListbox id="#{inputId}" value="#{bindingValue}" title="Selected Values" >
|
| <s:selectItems value="#{roleHome.allValues}" />
| </h:selectManyListbox>
|
|
|
| </c:when>
| </c:choose>
|
| <!-- Insert nested components -->
| <ui:insert />
| </s:decorate>
|
| </ui:define>
| </ui:decorate>
|
| </ui:component>
|
|
Sorry :P
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4029949#4029949
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4029949
19Â years, 1Â month
[JNDI/Naming/Network] - NamingException with local interface
by a.evoli
Hi all,
I built an entity EJB with only local interface and a Session stateless EJB with remote and local interface. After these I write a Java Application that lookup to the remote home of the session bean. The problem is that the session bean doesn't lookup to the local interface of the enity beans. I think that the problem is I don't know the gloabal jndi of a local interface. That's the code:
public int login(String idUtente, String password) {
//TODO implement login
AccessoBean1Local utente=null;
AccessoBean1PK chiave = new AccessoBean1PK(idUtente,password);
try{
InitialContext iniCtx = new InitialContext();
Context ejbCtx = (Context) iniCtx.lookup("java:comp/env/ejb");
AccessoBean1LocalHome home = (AccessoBean1LocalHome) iniCtx.lookup("AccessoBean1LocalHome");
utente=home.findByPrimaryKey(chiave);
}
catch(FinderException e){return 1;}
catch(NamingException e){return 3;}
catch(Exception e){return 2;}
return 0;
Infact it always return 3. Could someone help me? Thanks a lot.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4029943#4029943
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4029943
19Â years, 1Â month