Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6626907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:57:00+00:00 2026-05-25T21:57:00+00:00

This is the relevant part of my code (I am trying to add a

  • 0

This is the relevant part of my code (I am trying to add a timetable component to my school’s portal):

<h:panelGroup layout="block" id="sc-timetable-slots" styleClass="traverse ui-helper-clearfix">
                    <h:form id="sc-timetable-slots-table" styleClass="sc-left-bulk ui-widget-content">
                        <div class="sc-8-column">
                            <h:panelGroup layout="block" styleClass="sc-hours">
                                <ul>
                                    <li class="ui-widget-header"><h:outputText value="H" /></li>
                                    <c:forEach begin="4" end="24" var="h">
                                        <li>#{h}:00</li>
                                    </c:forEach> 
                                </ul>
                            </h:panelGroup>
                        </div>
                        <ui:repeat value="#{timetableSlot.dow}" var="dow" varStatus="ix">
                            <div class="sc-8-column">
                                <h:panelGroup layout="block" styleClass="sc-timetable-slots">
                                    <ul>
                                        <li class="ui-widget-header"><h:outputText value="#{msg[dow]}"/></li>
                                        <ui:repeat value="#{timetableSlot.getSlots(login.person,ix.index)}" var="slot">
                                            <li class="sc-timetable-item">
                                                <h:commandLink action="#{timetableSlot.edit(slot)}" value="#{slot.timeStart} : #{slot.timeEnd}" styleClass="sc-button incomplete">
                                                    <f:ajax render=":sc-timetable-slots" onevent="reRender"/>
                                                </h:commandLink>
                                            </li>
                                        </ui:repeat>
                                        <li>
                                            <h:commandLink action="#{timetableSlot.edit(login.person,ix.index)}" value="#{msg['timetable.slots.new']}" styleClass="sc-button incomplete">
                                                <f:ajax render=":sc-timetable-slots" onevent="reRender"/>
                                            </h:commandLink>
                                        </li>
                                    </ul>
                                </h:panelGroup>
                            </div>
                        </ui:repeat>
                    </h:form>
                    <h:form id="sc-timetable-slots-edit" styleClass="sc-right-detail ui-widget-content" rendered="#{not empty timetableSlot.edited}">
                        <span class="traverse ui-widget-header">#{msg['timetable.slots.edit']}</span> 
                        <h:panelGrid styleClass="traverse" columns="2">
                            <h:outputLabel for="timeStart" value="#{msg['timetable.slots.start']}"/>
                            <h:inputText id="timeStart" value="#{timetableSlot.edited.timeStart}"/>
                            <h:outputLabel for="timeEnd" value="#{msg['timetable.slots.end']}"/>
                            <h:inputText id="timeEnd" value="#{timetableSlot.edited.timeEnd}"/>
                            <h:commandButton type="submit" styleClass="sc-button incomplete" action="#{timetableSlot.save}" value="#{msg['nav.save']}">
                                <f:ajax render=":sc-timetable-slots" onevent="reRender"/>
                            </h:commandButton>
                        </h:panelGrid>                            
                    </h:form>
                </h:panelGroup>

The commandLinks work fine, but the “save” commandButton doesn’t. It’s not the “rendered” attribute, I tried without it, same. The thing is, it doesn’t fire at all, no XHR gets generated, the button is dead. I tried different combinations, even setting the “render” attribute to “@all”. Still nothing. The last time I asked about something involving commandButton and ajax, I was in a hurry so I worked around it eventually – but this time I’d like to get to the bottom of it. 😀

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:57:01+00:00Added an answer on May 25, 2026 at 9:57 pm

    Disclaimer: I haven’t tried to reproduce this locally because it’s too much code and not SSCCE-worthy

    However, I know that when you have multiple ajax forms which render each other by a general/common parent ID, then any submit of the other form on a subsequent request will fail because the view state is not appended as a hidden field after re-render by JS. But, if that was the case, then a second attempt to submit it should actually work. Perhaps there is more into the story, but to start, you need to explicitly specify the ID of the other form in the render attribute of the <f:ajax>.

    Do it for the both <f:ajax> tags inside the first form:

    <f:ajax render=":sc-timetable-slots :sc-timetable-slots-edit" onevent="reRender"/>
    

    In your particular case, the :sc-timetable-slots-edit is the ID of the other form.

    See also:

    • Ajax rendering of content which contains another form
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a part of an open source project called JNotify. I am trying
How Do You Turn On Parenthesis Matching in Visual Studio 2005? This is relevant
I tried to find this in the relevant RFC, IETF RFC 3986 , but
I'm specifically referring to JavaScript anonymous function but this could be relevant to other
Folks. I trust that the community will see this as a relevant question. My
Though it's on the edge of programming questions, I think this is still relevant
This is what I have in mind: Can anyone point out some relevant resources?
NB: This question has been extensively edited to make it more relevant, for completeness
this is really doing my nut..... all relevant PHP Output scripts set headers (in
This should be a common scenario, but could not find any relevant post yet..

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.