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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:08:46+00:00 2026-06-10T08:08:46+00:00

I have a dataTable filled with information. On selected one rown onRowSelect method is

  • 0

I have a dataTable filled with information. On selected one rown “onRowSelect” method is called.
“Order number ” outputText entry is populated with value retrieved from ProductOrder object.

/* Filter bean */
public void onRowSelect(SelectEvent event) {
    NewOrderBean currentOrder = (NewOrderBean) FacesUtils
            .getManagedBean("newOrderBean");
    currentOrder.setOrderNum(((ProductOrder) event.getObject()).getOrderNum());
}

/* newOrderBean */
public int update() {
    ProductOrder pt = new ProductOrder ();
    try {
        pt = productService.findOrderbyNum(orderNum).get(0);
    } catch (Exception e) {
        return 0;
    }

    pt.setOrderNum(orderNum);

    try {
        FacesMessage msg = new FacesMessage("Product updated with: ", orderNum);
        FacesContext.getCurrentInstance().addMessage(null, msg);
        return 1;
    } catch (Exception e) {
        return 0;
    }
}

User, after entering new text into “Order number “, presses Update to modify product order number.

<!-- JSF page -->
<ui:define id="content" name="contentBody">
    <h:form class="ViewResservation" id="viewPanel">
        <p:tabView id="tabView">
            <p:tab title="Client" id="tab1">
                    <h:outputText value="Order number " />
                <p:inputText id="ordr" value="#{newOrderBean.orderNum}" />
                </p:tab>
            </p:tabView>    
    </h:form>
</ui:define>        
    <ui:define name="footer">
        <h:form>
            <h:commandButton value="Update"
                actionListener="#{newOrderBean.update}" />
        </h:form>
    </ui:define>

Problem is that after entering new text and pressing Update, value (orderNum) stays the same. How can I get value enterted by user and
update ProductOrder object with new order number?

  • 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-10T08:08:48+00:00Added an answer on June 10, 2026 at 8:08 am

    The tab must be inside the tabview element. You have it inverted.

    For your problem, your order number is set in one form and your submit button in another. You need to put both in the same form else the order number isn’t submitted.

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

Sidebar

Related Questions

I have a datatable with user information and a column called 'Bits'. There is
I have a DataTable that has a string type column filled with valid numeric
Importing a spreadsheet I have filled a DataTable object with that data and returns
I have a non-editable DataTable built with PrimeFaces. The table is initially filled with
I have a datatable with a bunch of fields, and it's filled data by
Say I have a DataGridView Control, this grid is filled through a DataTable. Now,
I am currently developing a desktop application. I have a DataTable filled up. How
I have a DataTable that is filled in from an SQL query to a
I have PrimeFaces dataTable that is been filled by a Ajax call. When I
So i have this datagridview1 filled with a datatable(index 1) in a dataset(db1) and

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.