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

  • Home
  • SEARCH
  • 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 7904617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:09:44+00:00 2026-06-03T10:09:44+00:00

I have a .xhtml with two commandlink buttons and two outputpanels. Everything inside same

  • 0

I have a .xhtml with two commandlink buttons and two outputpanels. Everything inside same form. When I click on commandlink why do I need to explicitly say which output panels need to be rendered? If nothing specified, shouldn’t entire view re-constructed based on following description from Spec (or) Am I mixing things?

As well as do we really need to set action="navigation-rule" when we want to refresh a component in same view?

Link controls are typically used to perform complete form submissions for data storing.
As a consequence, the <a4j:commandLink> component has the execute="@form" setting by default. 

Any input is much appreciated.

Here is code for reference:

 <h:form>
        <div>
            <a4j:outputPanel layout="block">
                <!--Tab1 -->
                <a4j:commandLink
                    id="homeTabLinkId"
                    value="Tab1"
                    actionListener="somelistener" render="contentDIVId">
                    <h:outputText value=""/>
                </a4j:commandLink>
                <!--Hosts Tab -->
                <a4j:commandLink 
                    id="hostsTabLinkId"
                    value="Tab2"
                    actionListener="anotherlistener" render="contentDIVId">
                    <h:outputText value=""/>
                </a4j:commandLink>


            </a4j:outputPanel>
        </div>

        <a4j:outputPanel layout="block" id="contentDIVId">
            <!-- dynamically gets src based on tab click -->
            <ui:include id="tabBodyPanel" src="elexpression"/>
        </a4j:outputPanel>

        <a4j:outputPanel layout="block" id="anotherdiv">
            <h:outputText value="Inside second div"/>
        </a4j:outputPanel>

    </h:form> 
  • 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-06-03T10:09:50+00:00Added an answer on June 3, 2026 at 10:09 am

    If nothing specified, shouldn’t entire view re-constructed based on following description from Spec (or) Am I mixing things?

    That applies only to synchronous requests. Replace <a4j:commandLink> by <h:commandLink> and you’ll get the described behaviour.


    As well as do we really need to set action=”navigation-rule” when we want to refresh a component in same view?

    No. The action method can just return null or void. Otherwise the view will be recreated and that isn’t what you want if you’ve view scoped beans on the view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a xhtml popup page which has two buttons.The two buttons have actionListener
I have a two simple IceFaces buttons created this way. (I don't use xhtml
I have a .swf banner embeded on my xhtml and I need it to
I have two items that I am floating right in my XHTML page. Unfortunately,
We have two forms where we need to pass values from one to the
I have following sample code. Initially, only commandButton Two is visible. When I click
I have two buttons. Both buttons have two attributes – data-from and data-to. When
I'm trying to have two things happen when I click on a button in
I have an XSLT 1.0 (2.0 is not an option) stylesheet which produces XHTML.
I have a simple ASP.NET form with a DropDownList and two RadioButtons (that both

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.