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 8892261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:57:17+00:00 2026-06-14T22:57:17+00:00

My issue is that I am trying to have a column in my datatable

  • 0

My issue is that I am trying to have a column in my datatable show an outputtext by default, and replace that with an inputtext when the commandbutton is pressed. Have not found a solution. First post by the way.

I have an a4j:commandButton that I am looking to reRender this part of my dataTable

<a4j:commandButton reRender="yieldTable" action="#{yieldSearch.activateVisible()}"
id="modify" styleClass="editLargeIcon" value="Modify">
</a4j:commandButton>

<rich:dataTable id="yieldTable" value="#{yieldSearch.yfitem.yielditem}" var="_yield">
<rich:column>
<f:facet name="header">%-YLD</f:facet>
<h:outputText value="#{_yield.yfYield}" rendered="#{not yieldSearch.visible}">
</h:outputText>
<h:inputText rendered="#{yieldSearch.visible}" />
</rich:column>

And I would like activate this method (just shows relevant code)

@Name("yieldSearch")
@Scope(ScopeType.CONVERSATION)
public class YieldSearch implements Serializable{

private Boolean visible;

public void activateVisible(){
    this.setVisible(true);
    System.out.print(true);
}

    public void setVisible(Boolean visible) {
    this.visible = visible;
}

public Boolean getVisible() {
    return visible;
}

Any help much appreciated.

  • 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-14T22:57:19+00:00Added an answer on June 14, 2026 at 10:57 pm

    You need to wrap both components in an <a4j:outputPanel id="myPanel" ajaxRendered="true"/>. The reason both components are failing to be reRendered is that the component you’ve set torendered="false" will not be sent to the browser on initial view rendering.

    <a4j:outputPanel id="myPanel" ajaxRendered="true">
    <h:outputText value="#{_yield.yfYield}" rendered="#{not yieldSearch.visible}"/>
    <h:inputText rendered="#{yieldSearch.visible}" />
    </a4j:outputPanel>
    

    The way ajax refreshes work is by using javascript to locate a clientId in the DOM tree to update with new markup, i.e. the component must already be in the DOM tree. Since you’ve set the rendered="false", the component was never in the DOM tree to start with. So on an ajax request, the browser doesn’t know what you’re talking about because it can’t find the clientId to update.

    Using the outputPanel with ajaxRendered="true", you’re refreshing the entire outputPanel, so the ajax refresh will update that component as a whole, with whatever you’ve nested within it

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

Sidebar

Related Questions

I'm trying to learn html and jquery. My issue is that I have box
I'm having an issue where I have a player object that I'm trying to
The issue I am trying to solve is that I have a folder with
I'm trying to debug an issue that only occurs when my iPhone app receives
I've come across an issue with ActiveResource that has been resolved and was trying
I'm trying to track down an issue in our MFC code that looks like
I'm trying to create a page that contains a grid and searching. The issue
I am trying to figure out the issue, and tried different styles that I
I'm having an issue with mongoid any_of . I'm trying to find objects that
I'm fairly new at SQL and have run into an issue that has me

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.