-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update in b:commandButton fired but region not updated #891
Comments
Have you tried |
Yes I did, which is pretty strange that neither the native ajax approach works. |
incidentally why are you using |
As far as I can see, the event is fired and the region updated, but no changes are seen. Checking the Firefox inspector you can see that when you hover over "mainform", which is the one containing all the elements, it's like displaced to the left, it doesn't glow the right area, it's a little bit off to the left, like there's another ghost form in there. |
can you post more code? like the form |
There you go. <h:body>
<h:form id="mainform">
<b:button/>
<b:container id="mycontainer">
<div id="mylist">
<c:if>
<div style="margin-bottom: 10px;">‌</div>
<p style="text-align: center;"></p>
</c:if>
<c:otherwise>
<c:forEach>
<div style="margin-top: -5px;">
<b:jumbotron>
<b:column span="2">
<img></img>
</b:column>
<b:column span="7">
<div id="content">
<b:row>
</b:row>
<b:row>
</b:row>
<b:row>
<c:forEach>
<c:if>
</c:if>
<c:otherwise>
</c:otherwise>
</c:forEach>
</b:row>
</div>
</b:column>
<b:column span="3">
<b:commandButton value="CONFIG" look="default"
action="#{panel.action}"
oncomplete="$('.config_modal').modal()">
<f:ajax render="otherform"/>
</b:commandButton>
<b:commandButton value="DELETE"
action="#{panel.delete}"
update="mycontainer">
<f:param name="test" value="#{bean.test}"/>
</b:commandButton>
</b:column>
</b:jumbotron>
</div>
</c:forEach>
</c:otherwise>
</div>
</b:container>
</h:form>
...
</h:body> |
firstly you should move the container outside the you are using jstl a lot. it is recommended to use |
Two ideas:
Only it doesn't. Another problem with |
Hey guys, thanks for the quick feedback. I've just modified the page with the suggestions you've just made to me and nothing has changed, the region isn't updated. @stephanrauh I've been checking the HTML code before and after its execution and nothing has changed, I can't see any extra divs. Maybe is a modal or something else what's causing the issue? My actual code is the following one... <b:container>
<h:form id="mainform">
<b:button />
<div id="list">
<c:choose>
<c:when>
<div>‌</div>
<p>
<h:outputText/>
</p>
</c:when>
<c:otherwise>
<ui:repeat var="st" value="#{bean.items}">
<div style="margin-top: -5px;">
<b:jumbotron
style="border-radius: 0px; height: 200px; margin-bottom: 0px;">
<b:column span="2">
<img src="${st.img}">
</img>
</b:column>
<b:column span="7">
<div id="content" style="margin-top: 25px; margin-left: 50px;">
<b:row>
<font />
</b:row>
<b:row >
<b:badge value="${st.property}" />
<h:outputText />
<b:badge value="${st.property}" />
<h:outputText />
</b:row>
<b:row >
<ui:repeat var="anotheritem" value="#{st.items}">
<c:choose>
<c:when>
<b:label/>
</c:when>
<c:otherwise>
<b:label/>
</c:otherwise>
</c:choose>
</ui:repeat>
</b:row>
</div>
</b:column>
<b:column span="3">
<b:commandButton
action="#{bean.action(item)}"
oncomplete="$('.a_modal').modal()">
<f:ajax render="aform" />
</b:commandButton>
<b:commandButton
action="#{bean.delete}" update="mainform">
<f:param/>
</b:commandButton>
</b:column>
</b:jumbotron>
</div>
</ui:repeat>
</c:otherwise>
</c:choose>
</div>
</h:form>
</b:container>
```xml |
can you remove the also...have you tried changing |
@chongma I've also changed all the |
did you try using |
also |
I'll close the ticket now because we haven't heard from @turbobrick since November. |
Hey guys,
I'm experimenting an issue in a special scenario when a commandButton, right when I try to refresh a form after an onclick event has finished its execution.
The onclick event is fired and succesfully exeucted, but the form is not refreshed. The commandButton is a button generated per entry in a c:forEach, and is used to delete the given item from the DB. I have the exact same syntax in another page but as a single button outside any c:forEach and it works.
The loop is contained inside b:container > div 'main' > div > {here}
The text was updated successfully, but these errors were encountered: