Hi All, Is that true? I read a comment somewhere which was saying that any uncaught exception would cause Seam to close the opened connection (hence preventing the next phases from accessing it...?)
I noticed that when adding a validation method to the input tag that queries the database and afterwards throws an ValidationException if not valid. Then the selectItems (on the same rerendered page) would try to execute a entityquery.getResultList() which results in a transaction - closed exception... Did I interpret this correctly? If so, is there any way around it? Any help or hint appreciated, Tino my xhtml: | ... | <q:field helpText="Please enter an alpha-numerical value" fieldId="receipt_receiptId"> | <h:inputText styleClass="editEntity" | id="receipt_receiptId" | validator="#{receiptHome.validateUniqueReceiptId}" | value="#{receiptHome.instance.receiptId}" | required="true" | requiredMessage="Please enter a valid receipt ID" > | </h:inputText> | </q:field> | <q:field fieldId="receipt_rep"> | <h:selectOneMenu id="receipt_rep" value="#{receiptHome.instance.rep}"> | <si:selectItems value="#{allUserList.resultList}" var="user" label="#{user.stringRep}" noSelectionLabel="Select one..."/> | </h:selectOneMenu> | </q:field> | ... | my validation method: public void validateUniqueReceiptId(FacesContext context, | UIComponent component, Object value) throws ValidatorException { | if(isManaged() && getInstance().getReceiptId().equals(value.toString())){ | return; | } | List existing = fetchReceiptList(value); | if (existing.size() > 0) { | throwValidationError("Receipt with this ID already exists", | component); | } | } View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093366#4093366 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093366 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user