myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@gmail.com>
Subject Re: JSF PROBLEM WITH DUPLICATE COMPONENT ID.
Date Mon, 31 Aug 2009 17:12:21 GMT
Well, technically, you can have a jsf tag inside a jstl tag, but you
have to insure that every jsf tag has a unique id per iteration of the
jstl tag.  But it's far easier to use jsf versions of the jstl tags.

On Fri, Aug 28, 2009 at 4:59 PM, Richard Yee<richard.k.yee@gmail.com> wrote:
> The problem is caused by using a jsf tag inside a a c:foreach tag. You can't
> have a jsf tag inside a jstl tag.
> Richard
> Sent from my iPhone
> On Aug 28, 2009, at 1:26 PM, "Nutulapati, Krishna" <KNutulapati@ussco.com>
> wrote:
>
> Problem description
> Introduction:- we have a web application by name itemsub developed
> using jsf,spring and hibernate working in production since a long time.
>
> Problem description:- Whenever use clicks on a tab by name "QuickAdds"
> user is rarely getting the following exception.
> Duplicate component ID 'quickAddsHeader:_id54' found in view.
>
> The exception we are getting is specifically from the following code of
> QuickAdds.jsp which is included in html table.
>
> <c:forEach items="${quickAddsBean.quickAddItemList}" var="varitems"
> varStatus="status">
> <tr>
> <td width="25%">
> <h:inputText maxlength="15" value="#{varitems.itemNumber}" />
> </td>
> <td width="25%">
> <h:inputText  maxlength="15" value="#{varitems.subItem1}" />
> </td>
> <c:choose>
> <c:when test="${quickAddsBean.ruleType == 'INV'}">
> <td width="25%">
> <h:inputText  maxlength="15" value="#{varitems.subItem2}" />
> </td>
> <td width="25%">
> <h:inputText   maxlength="15" value="#{varitems.subItem3}" />
> </td>
> </c:when>
> <c:otherwise test="${quickAddsBean.ruleType == 'ALW'}">
> <td width="25%"></td>
> <td width="25%"></td>
> </c:otherwise>
> </c:choose>
> </tr>
> </c:forEach>
>
>
> As input text are inside the for loop and get repeated till it reaches
> required number of rows,  we didn't add id's to the text fields.
> Please suggest me a solution
> Thanks
> Krishna

Mime
View raw message