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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:48:23+00:00 2026-06-08T08:48:23+00:00

I create widgets for date for my project. n using the same widget for

  • 0

I create widgets for date for my project.

n using the same widget for setProperty and getProperty of a object.

public TextBox getTimeTxtbx() {
        // TODO Auto-generated method stub

        timebx =new TextBox();

        timebx.setReadOnly(true);
        final PopupPanel popupPanel=new PopupPanel(true);
        final DatePicker datePicker=new DatePicker();

        datePicker.addValueChangeHandler(new ValueChangeHandler<Date>() {

            public void onValueChange(ValueChangeEvent<Date> event) {
                // TODO Auto-generated method stub

                Date date=event.getValue();
                timebx.setText(DateTimeFormat.getFormat("EEE MMM dd HH:mm:ss z yyyy").format(date));
                popupPanel.hide();
            }


        });
        popupPanel.setWidget(datePicker);
        timebx.addClickHandler(new ClickHandler() {

            public void onClick(ClickEvent event) {
                // TODO Auto-generated method stub
                String strDate = timebx.getText();
                System.out.println(" strDate " +strDate);
                DateTimeFormat format = DateTimeFormat.getFormat("[EEE MMM dd HH:mm:ss z yyyy]");
                try {  
                      Date selDate = (Date)format.parse(strDate); 
                      datePicker.setValue(selDate, true);
                    } catch(Exception pe){
                     // setting current date
                        System.out.println("error" +pe);
                     datePicker.setValue(new Date(), true);
                    }
                int x=timebx.getAbsoluteLeft();
                int y=timebx.getAbsoluteTop();
                popupPanel.setPopupPosition(x, y+20);
                popupPanel.show();
            }
        });
        return timebx;
    }
    public void setTimebx(String string) {
        // TODO Auto-generated method stub
        timebx.setText(string);
    }

I am adding this widgets in flexTable in different gui class

flexTable.setWidget(i, j,textBoxDisplay.getTimeTxtbx());
textBoxDisplay.setTimebx(customProperty.getValues().toString());

In a flexTable , this above code is inside a iterator and called Twice.
enter image description here

Like in Image : testDate an received on.

When i click on testDate the value of Received On is Changed


Edited

public ListBox getBooleanBox() {
        // TODO Auto-generated method stub
        selectBoolean = new ListBox(false);
        //selectBoolean.setName(title);
        selectBoolean.setStyleName("cmis-Customproperties-TextBox");
        selectBoolean.setSize("150px", "20px");
        selectBoolean.addItem("True","True");
        selectBoolean.addItem("False", "False");
        return selectBoolean;
    }
    public void setBooleanBox(String value){
         int itemCount = selectBoolean.getItemCount();
         for(int i = 0 ;i < itemCount;i++){
             if(selectBoolean.getItemText(i).equalsIgnoreCase(value)){
                 selectBoolean.setSelectedIndex(i);
             }
         }
    }

adding in flexTable

customPropertyTabel.setWidget(i, j,textBoxDisplay.getBooleanBox());
textBoxDisplay.setBooleanBox(removeSymbol(customProperty.getValues().toString()));

and this is working perfectly fine.
I got the correct values.

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

    This is a referencing issue in the implementation.

    On your second iteration of getTimeTxtbx (when you create Received On textbox) you have set the local variable timebx in textBoxDisplay instance to a new reference which is the Received On textbox. Your datePicker‘s onValueChange implementation set the text on timebx, hence the Received On textbox gets set instead of the testingDate textbox on your second iteration.

    Try use a new instance of TextBoxDisplay instead during the iteration.

    TextBoxDisplay textBoxDisplay = new TextBoxDisplay();
    flexTable.setWidget(i, j,textBoxDisplay.getTimeTxtbx());
    textBoxDisplay.setTimebx(customProperty.getValues().toString());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a Settings-Widget, where I can choose a Date. Because it
I will be using jQuery's functionality to create portlet widgets for my web application
I create a form like this with Symfony2: $builder ->add('days', 'date', array( 'widget' =>
Lets say you want to create a listing of widgets The Widget Manufacturers all
I am writing wordpress plugin. This plugin will create widgets based upon response of
I want to create two widgets in flex. One for the movies ( that
My problem : I need to create draggable widgets (here it's a jslider for
Is it possible to create your own widgets in XAML?
I want to create a route like //Widgets/PerformanceTable/['best' or 'worst' to sort by performance
We are planning to create a few javascript widgets which will be served to

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.