Help refreshing regions

I have what would seem to be a simple use case but I can not figure out what combination of ADF "stuff" will make it work. I have four independent task flows. Each task flow has a single view activity that shows the contents of a table. When someone selects a row from the main table, I want the other four task flows to refresh and only display information from their table that is related to the selected row. Surprisingly I can not find any way to do this.
Now... before someone says "pass a parameter" or "use contextual events" I really need an example. All of the documentation I've found doesn't apply for one reason or another. This is close but I can't make it work with tables because I can't figure out what listener or whatever needs to be involved. http://technology.amis.nl/2008/08/adf-11g-how-events-in-one-region-cause-other-regions-to-refresh/
Everything I see regarding passing parameters between task flows assumes that one task flow calls another. That's not the case here.
As for contextual events I can find no examples of a row selection in a table firing a contextual event. Any help would be appreciated.
Thanks.

choose a different "Display Point" for the first region and the reports regions.
i.e.
Set the first region "Display Point" to "Page Template Body (2. items below region content)
Set the report regions "Display Point" to "Page Template Body (3. items above region content)

Similar Messages

  • I need help refreshing my Adobe Creative Cloud membership in Business Catalyst.

    I need help refreshing my Adobe Creative Cloud membership in Business Catalyst.
    Hello, I had an Adobe Muse membership and I have changed it to a full Adobe Creative cloud membership. The problem is when I login in to business catalyst and try to push live  a second site, it tells me as follows:  Your Adobe Creative Cloud Membership has reached its limit for hosted sites.
    I think business catalyst has not recognize jet that I have change my Adobe Creative Cloud Membership and does not allow me access to the 5 sites that are supposed to come with my adobe creative cloud.
    Please help me refresh my status on business catalyst so I can publish my 5 sites.
    thanks

    Hi,
    Please reach out to our direct support via case or live chat as this may require escalation.  It appears your account is not syncing with your adobe ID for whatever reason and will require further investigation to help resolve.  We'll need your ID(s) plus any additional details so we can correct this for you. 
    - http://helpx.adobe.com/contact.html
    Thanks,
    -Sidney

  • Delete row from report and refresh region

    Hi
    Using apex 4.0
    I have a requirment like on one page there are two regions.
    There are two text boxes and insert button, by setting value into text box and pressing insert button data is saved in one table.
    And second region is for report which is selecting data which was inserted in first region. It is working correctly. Now in report region,
    there should be delete link/button to delete particular row and refresh that region.
    I have created delete link in second region and called java script function to delete from table. However that region is not refreshed and showing
    old data.
    I have tried with dynamic action to refresh region. But i am not getting sequence it is treating, first java script function will be called and then
    dynamic action will be executed or what? Because dynamic action is not refreshing region.
    Please let me know correct way to implement this requirement or correct me in my steps.
    Thanks in advance

    hi om,
    I had a similar issue.
    I am using a sql query to delete.
    "delete from dbo.[@XX_TDL1] " & _
                "where LineId = " & CStr(rownum) & " and code = '" & pAddonVars.TDHCode & "'"
    It's not pretty but it works.
    jw

  • Need some help with region position

    Hi,
    I need som help with regions position....
    Background:
    I have 2 regions, I will call them reg1, reg2 and reg3.
    reg1 = Page Template Body (2. items below region content), column 1, search region.
    reg2 = Page Template Body (2. items below region content), column 2, import file region.
    reg3 = Page Template Body (3. items above region content), column 1, search result, grid region, very wide.
    Issue with the position, the setup explained makes my layout like this
    reg1--------------------------------reg2
    ------------------reg3--------------------
    What I want:
    reg1-reg2
    ------------------reg3--------------------
    What am I doing wrong?
    Regards Daniel

    Daniel,
    this will also work:
    Region1 HTML table cell attributes
    width="10%"
    Region2 HTML table cell attributes
    align="left"
    without touching the page template.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Dynamic Refresh Region with APEX 4.0

    Greetings!
    With APEX 4.2, when you want to refresh a region that depends on an page-item-value, there are different ways to submit that item with the dynamic action ("Page Item zu Submit"). But this is not imcorperated in APEX 4.0 yet. Is there a way to work around that? I have tought about an apex.submit({...}) call, but I am not sure, where to insert it, also that would be a.. well... submit, not ajex.
    Thanks for any help,
    so long,
    tobi

    Thanks for the hint, but its still not working. I have another item, that gets the value of the item passed to on key-up event. This works. But no refresh of the region.
    My setup looks like that now:
    Event: Key Release
    Selection Type: Item
    Item: ... an auto complete text field
    Condition: is not null
    True Actions:
    1) Action: Execute PL/SQL Code
     Fire on Page Load, Stop exec on error
     PL/SQP Code: null;
     Page Items to Submit: ... that same autocomplete field
    2) Action: Refresh
     Fires on Page Load
     Selection Type: Region
     Region: ... the report region with the where clause comparing the text field.
    The identical action I created for the Get Focus Event, because that happens, when the user clicks on the dropdown list to select an item, then the text field gets focused again. Thats when I want the report to update.
    Only when I hit the enter key (what I actually dont want to happen, and thats another issue) the page gets submitted. Then the report is displayed with the new selection. But I dont want the user to wait for the page reload process.

  • Is it possible to refresh region at specific intervals or event based?

    I have bunch of regions on a page. Instead of refreshing the entire page every 5 minutes, I would like refresh certain regions every 5 minutes. Also is it possible to refresh the regions based certain events?. For example, If the region is tracking tasks for a user, whenever someone creates a task for the user, is it possible refresh that tasks region only in the event task creation?. an ideas are appreciated.
    Thanks for your help,
    Surya

    Hi,
    Use "region pull" method and then javascript timer
    http://apex.oracle.com/pls/otn/f?p=11933:48
    Even guide is for "pulling" report, same can be do to any HTML content
    Br,Jari

  • ORA-06502 on "Help Text" region when changing pages on a tabular form

    Hello everybody,
    We are developing an application on Apex 4.1.0.00.32. This application have some pages with tabular forms and these pages uses a page zero as template. In this page zero, we have added two sidebar regions: a list region to navigate on the application and a help text to describe how to use our application.
    The problem occurs when the tabular split the records into pages (since it has more records that it can show on a single page). When the user clicks to change to another page, Apex raises an ORA-06502: PL/SQL: numeric or value error as described below:
    Erro ao renderizar a região "Ajuda". ORA-06502: PL/SQL: erro: erro de conversão de caractere em número numérico ou de valor
    Informações Técnicas (visível somente para desenvolvedores)
    is_internal_error: true
    apex_error_code: APEX.REGION.UNHANDLED_ERROR
    ora_sqlcode: -6502
    ora_sqlerrm: ORA-06502: PL/SQL: erro: erro de conversão de caractere em número numérico ou de valor
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 2
    component.name: Ajuda
    error_backtrace:
    ORA-06512: em "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 3654
    ORA-06512: em "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 4204
    Obs: Our database is in Brazilian Portuguese, so I guess it will be hard for some people to understand the first two lines! :)
    We have tried to change the pagination style of the tabular form and change the region model of the help text but the problem still happens.
    Does anyone an ideia about what this may be?
    Thanks in advance!

    I am getting the exact same message, to the line number, also in APEX 4.1.0.0.32.
    Occurs when changing pages in a classic report, Standard region template, select list pagination, when selecting a different pagination set.
    In English:
    Error during rendering of region "Matched Participants Help & Hints".
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    Technical Info (only visible for developers)
    is_internal_error: true
    apex_error_code: APEX.REGION.UNHANDLED_ERROR
    ora_sqlcode: -6502
    ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 2
    component.name: <strong>Matched Participants</strong> Help & Hints
    error_backtrace:
    ORA-06512: at "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 3654
    ORA-06512: at "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 4204
    There are no conditions on the region, and no date string within the Help text. Some HTML <strong> tags, that's it.
    The Help region renders fine the first time.
    The Debug info does not help any:
    3.798360.00062Computation point: After Box Body4
    0
    3.798990.00081Processes - point: AFTER_BOX_BODY4
    0
    3.799790.00068Region: <strong>Matched Participants</strong> Help & Hints4
    0
    3.800470.00213Region rendered dynamically because request was not null4
    0
    3.802590.00096Add error onto error stack4
    0
    3.803550.00084...Error data:4
    0
    3.804400.00084......message: Error during rendering of region "<strong>Matched Participants</strong> Help & Hints".4
    0
    3.805240.00084......additional_info: ORA-06502: PL/SQL: numeric or value error: character to number conversion error4
    0
    3.806080.00081......display_location: ON_ERROR_PAGE4
    0
    3.806890.00081......is_internal_error: true4
    0
    3.807700.00084......apex_error_code: APEX.REGION.UNHANDLED_ERROR4
    0
    3.808540.00082......ora_sqlcode: -65024
    0
    3.809350.00234......ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character to number conversion error4
    0
    3.811700.00082......error_backtrace: ORA-06512: at "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 3654 ORA-06512: at "APEX_040100.WWV_FLOW_DISP_PAGE_PLUGS", line 4204 4
    0
    3.812510.00081......component.type: APEX_APPLICATION_PAGE_REGIONS4
    0
    3.813310.00110......component.id: 24
    0
    3.814420.00099......component.name: <strong>Matched Participants</strong> Help & Hints4
    0
    3.815400.00076...Show Error on Error Page4
    0
    3.816160.00344......Performing rollback4
    0
    3.819610.00225Processes - point: AFTER_ERROR_HEADER4
    0
    3.821850.00268Processes - point: BEFORE_ERROR_FOOTER4
    0
    3.82453-End Page Rendering
    Any thoughts on where to poke around for this one?
    Thanks - Karen

  • Search Help for Region in travel expense manager

    All,
    The travel expense manager has a field called Region in the "general trip data" section . This region is used to to determine the Per diems and Flat rates for meals and accomodation.
    This values can only be the values that exist in T7020 table. That is T7020 is a check table for this field. But there is no search help provided for this field in the transaction PR05. When I click on the search help (f4), i do not get any values. It is impossible for the user to know the codes for the region in contention. Like for Phoenix, the code is AZ/PH. There is no way the user will know these codes without the F4 search help. Any ideas if this is a configuration thing or any round about way to get over this issue?
    Thanks in advance
    regards
    Sam

    hi
    create your customized search help and add to the field.

  • How to refresh regions of same fragment used twice as region

    Hello,
    I have a fragment A which uses fragment B as a region twice. The state of the fragment B is kept on a viewScope bean. So each instance of the fragment B region has its own instance of the viewScope bean.
    I have a button in fragment B which does a WebService call. The requirement is to refresh both instances of the region of fragment B, as well as the content of the fragment A after that buttons action is finished.
    Refresh should happen as if the user entered the page first time.
    Any ideas how to solve this problem?
    Thanks a lot.
    Jdeveloper 11.1.1.5

    Hi Frank,
    The article that you want me to look for seems to be region-to-parent communication. It partially solves my problem.
    I need region-to-region as well as region-to-parent communication.
    Note: fragment B is used two times as a region within parent view (i.e fragment A).
    The state of fragment B content is kept on viewScope bean.
    I need to access the bean of the parent page, as well as the viewScope bean of the "other" instance of the region B.
    Can you confirm that the article you are pointing me can do that ?
    Otherwise I will try Contextual Events option.
    Thank you.

  • Please help-resizing regions problem

    It's only this song that's doing this:
    When I resize the beginning of a region
    in the arrange window, the contents of the region
    shifts forward. It is behaving as though I am moving the
    'anchor' of the region.
    When I resize the end of a region, all the regions following it
    move forward in the song.
    I went through all the preferences, but there's nothing
    that resembles this behavior.
    From what I know, it is what I think pro tools calls "Slip editing"?
    HELP!!!
    Mike

    Hi Mike,
    Sounds to me like you have Drag Mode set to Shuffle L.
    Look to the top right of the arrange window and you'll see Snap and Drag mode settings. The one you want to change is the drag mode. There are 5 settings but Shuffle L means that, if you change the length of a region, subsequent regions move to maintain the distance from the original. Try changing back to Overlap (or possibly no overlap, in which case other affected regions are trimmed but not moved and is a kind of slip mode, as you might commonly find in video editing).
    Pete

  • Firewire part 2 - Need Help Refreshing My PMU

    Recap:
    At some point a few months back, my FCP HD lost contact with my Canopus Datavideo. Under ABOUT MY MAC in HARDWARE>FIREWIRE it only states FIRE WIRE BUS and its speed.
    I have reloaded Quicktime and tried to REFRESH my AV connectons but to no avail. It was suggested I should reset my PMU but have no idea where to find it (the diagram supplied did not match up with my computer - the switch being next to the battery). Anyone have a step by step way to find it and reset it and hopefully solve my problem....? I am falling behind importing video and need to figure this one out.
    (Picture of my computer below if that helps...)
    Thanks!
    G4, Dual 800   Mac OS X (10.3.9)  

    Mike,
    please keep your threads together.
    This has EVERYTHING to do with this other thread and you should have posted this picture with it.
    x

  • Help Refreshing JFrame, Validate not working...

    Hi,
    I've read many post suggesting that calling the JFrame.getContentPane().Validate() should refresh my JFrame and display the modifications made to the components on it, but it doesn't work for me. OK, so i'm creating a login screen where i want to hide 2 combos/2 labels, move the buttons and resize the frame when i click on a button (similar to the Windows Login screen where you can click "Options" to view the Domain Combo). When I hide my comtrols, works perfect, when i want to re-display them, the section of the frame that was hidden does not refresh what was behind it. The Option Button calls the ButtonOptionHandler() function, that's where the Validate() is executed.
    Here is the complete code for easier understanding, you can run it and see the effects:
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import javax.swing.JPasswordField;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JPanel;
    import javax.swing.SwingConstants;
    import javax.swing.ImageIcon;
    import java.awt.event.*;
    public class screenLogin extends JFrame implements ActionListener {
    private static String OK = "OK";
    private static String CANCEL = "Cancel";
    private static String OPTION = "Option";
    private boolean showODBC = false;
         private JLabel lblUser;
         private JLabel lblPass;
         private JLabel lblOraODBC;
         private JLabel lblSqlODBC;
         private JTextField txtUser;
         private JPasswordField txtPass;
         private JComboBox cboOraODBC;
         private JComboBox cboSqlODBC;
         private JButton btnOK;
         private JButton btnCancel;
         private JButton btnOption;
         private JLabel lblImage;
         public screenLogin() {
              InitUI();
         private void InitUI() {
              this.setSize(400,230);
              this.getContentPane().setLayout(null);
              /* Labels */
              lblUser = new JLabel("NorLims User", SwingConstants.RIGHT);
              lblPass = new JLabel("Password", SwingConstants.RIGHT);
              lblOraODBC = new JLabel("Oracle ODBC", SwingConstants.RIGHT);
              lblSqlODBC = new JLabel("SQL Anywhere ODBC", SwingConstants.RIGHT);
              lblUser.setBounds(10, 65, 120, 23);
              lblPass.setBounds(10, 90, 120, 23);
              lblOraODBC.setBounds(10, 115, 120, 23);
              lblSqlODBC.setBounds(10, 140, 120, 23);
              txtUser = new JTextField();
              txtUser.setBounds(140, 65, 100, 20);
              txtPass = new JPasswordField();
              txtPass.setBounds(140, 90, 100, 20);
              txtPass.setEchoChar('*');
              cboOraODBC = new JComboBox();
              cboOraODBC.setBounds(140, 115, 200, 20);
              cboSqlODBC = new JComboBox();
              cboSqlODBC.setBounds(140, 140, 200, 20);
              btnOK = new JButton("OK");
              btnOK.setSize(80, 25);
              btnOK.setActionCommand(OK);
              btnOK.addActionListener(this);
              btnCancel = new JButton("Cancel");
              btnCancel.setSize(80, 25);
              btnCancel.setActionCommand(CANCEL);
              btnCancel.addActionListener(this);
              btnOption = new JButton("Options");
              btnOption.setSize(80, 25);
              btnOption.setActionCommand(OPTION);
              btnOption.addActionListener(this);
              // position Buttons and display labels/combos
              ButtonOptionHandler();
              // I commented this part since you dont have the login.jpg
              //lblImage = new JLabel(new ImageIcon("login.jpg"));
              //lblImage.setBounds(0, 0, 400, 60);
              this.getContentPane().add(lblUser, null);
              this.getContentPane().add(lblPass, null);
              this.getContentPane().add(lblOraODBC, null);
              this.getContentPane().add(lblSqlODBC, null);
              this.getContentPane().add(txtUser, null);
              this.getContentPane().add(txtPass, null);
              this.getContentPane().add(cboOraODBC, null);
              this.getContentPane().add(cboSqlODBC, null);
              this.getContentPane().add(btnOK, null);
              this.getContentPane().add(btnCancel, null);
              this.getContentPane().add(btnOption, null);
              //this.getContentPane().add(lblImage, null);
         public void actionPerformed(ActionEvent e) {
              String cmd = e.getActionCommand();
              if (OK.equals(cmd)) { //Process the OK Button
                   ButtonOkHandler();
              } else if (CANCEL.equals(cmd)) {
                   ButtonCancelHandler();
              } else if (OPTION.equals(cmd)) {
                   ButtonOptionHandler();
         private void ButtonOkHandler() {
              System.out.println("OK Button");
         private void ButtonCancelHandler() {
              System.out.println("Cancel Button");
              System.exit(0);
         private void ButtonOptionHandler() {
              showODBC = !showODBC;     // Toggle the value
              int top = (showODBC ? 165 : 115);          // determine the top for the buttons
              this.setSize(400, (showODBC ? 230 : 180));
              lblOraODBC.setVisible(showODBC);
              lblSqlODBC.setVisible(showODBC);
              cboOraODBC.setVisible(showODBC);
              cboSqlODBC.setVisible(showODBC);     
              btnOK.setLocation(100, top);
              btnCancel.setLocation(180, top);
              btnOption.setLocation(260, top);
              this.getContentPane().validate(); // This dont refresh ?!?
    I hope someone can help me with this!
    Thanks,
    XiNull

    First suggestion would be to use a layout manager. Then changing the visibility of components within the layout mgr will cause all the proper resizing, refreshing, etc. to happen for you. You should never have to call validate on your own like that (unless you are doing something really bizarre, which you aren't). Generally null or XY layout managers are more hassle than they are worth (and a maintenance nightmare). Do yourself a favor and learn to use gridbaglayout, etc. While a bit wacky to get used to, you will be glad you spent the time on it.

  • Newbie help - refreshing the page and validating?

    When entering a userID and password, how would I make the values in the textbox disappear when I refresh the page/press F5?
    Also how would I check the 2 textboxes in a jsp page, if their empty/null and if they are redirect them to that same page?
    Thanks in advance! =)

    bump

  • Help with regions

    hi all.
    i have 3 html regions on page. i used 1st region to place some drop down combos. next 2 regions are for reports depending on the values of the combos. now the problem is layout. i have set column value for combo region as 1. for first report as 1 and for second report as 2 but the secon report is placed adjacent to the combo region. i want both the report regions to align there tops beneath the first region. how can i do that.
    thanks in advance.

    choose a different "Display Point" for the first region and the reports regions.
    i.e.
    Set the first region "Display Point" to "Page Template Body (2. items below region content)
    Set the report regions "Display Point" to "Page Template Body (3. items above region content)

  • Help refresh

    look at the code below
    //Title: New Vision Rental System
    //Version:
    //Copyright: Copyright (c) 1999
    //Author: PJ GP 10-01
    //Company: PJ GP 10-01
    //Description: None
    package NewVision;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.awt.event.*;
    public class OnLoanForm extends JPanel {
    private Icon bgImage = new ImageIcon("Images\\BO_OnLoan\\BO_OnLoan_bg.jpg");
    private Icon btnReturn = new ImageIcon("Images\\BO_OnLoan\\return_not_tinted.jpg");
    private Icon btnRenew = new ImageIcon("Images\\BO_OnLoan\\renew_not_tinted.jpg");
    private Icon btnReturnMO = new ImageIcon("Images\\BO_OnLoan\\return_tinted.jpg");
    private Icon btnRenewMO = new ImageIcon("Images\\BO_OnLoan\\renew_tinted.jpg");
    JLabel m_bgImage = new JLabel(bgImage);
    JButton m_btnReturn = new JButton(btnReturn);
    JButton m_btnRenew = new JButton(btnRenew);
    JScrollPane m_spnDiscLoan = new JScrollPane();
    String[] columnNames = {"", "Disc ID", "Branch ID", "Due Date", "Renew no"};
    MyTableModel table = new MyTableModel(5, columnNames);
    JTable m_tbDiscLoan = new JTable(table);
    RecordController rCont = new RecordController();
    //Vector renewRec = new Vector();
    Vector recVector = new Vector();
    Vector loanVector = new Vector();
    Vector renewRentVector = new Vector(); // meant for creating the rental record to update the tables
    Vector renewDiscVector = new Vector(); // meant for renewing the disc
    SystemController sysCont = new SystemController();
    RenewController renCont = new RenewController();
    SettingController sCont = new SettingController();
    int tickCnt = 0;
    int renewCnt = 0; // the number of disc to be renewed
    public OnLoanForm() {
    try {
    jbInit();
    catch(Exception ex) {
    ex.printStackTrace();
    private void jbInit() throws Exception {
    m_bgImage.setBounds(new Rectangle(0, 1, 441, 422));
    this.setLayout(null);
    this.setBackground(Color.white);
    this.setSize(new Dimension(441, 422));
    m_btnReturn.setBorder(null);
    m_btnReturn.setActionCommand("Return");
    m_btnReturn.setRolloverIcon(btnReturnMO);
    m_btnReturn.setBounds(new Rectangle(0,391,100,20));
    m_btnReturn.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    m_btnReturn_actionPerformed(e);
    m_btnRenew.setBorder(null);
    m_btnRenew.setActionCommand("Renew");
    m_btnRenew.setRolloverIcon(btnRenewMO);
    m_btnRenew.setBounds(new Rectangle(111,391,100,20));
    m_btnRenew.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    m_btnRenew_actionPerformed(e);
    m_spnDiscLoan.getViewport().setBackground(Color.white);
    m_spnDiscLoan.setBounds(new Rectangle(0, 50, 440, 325));
    m_tbDiscLoan.setFont(new java.awt.Font("Century Gothic", 0, 14));
    m_tbDiscLoan.setForeground(Color.darkGray);
    this.add(m_btnReturn, null);
    this.add(m_btnRenew, null);
    this.add(m_spnDiscLoan, null);
    m_spnDiscLoan.getViewport().add(m_tbDiscLoan, null);
    this.add(m_bgImage, null);
    m_spnDiscLoan.setBorder(BorderFactory.createEtchedBorder());
    displayLoanRec();
    private void displayLoanRec() {
    if(rCont.readLoanRecord(sysCont.getMemberId())) {
    loanVector = rCont.getLoanRec();
    RentalRecord loanRec; // this is to display those disc on loan
    for(int i = 0; i < loanVector.size(); i++) {
    MyTableModel model = (MyTableModel) (m_tbDiscLoan.getModel());
    model.addRow();
    // int j = model.getRowCount()-1;
    loanRec = (RentalRecord) (loanVector.elementAt(i));
    model.setValueAt(new Boolean(false), i, 0);
    model.setValueAt(loanRec.getDiscId(), i, 1);
    model.setValueAt(loanRec.getBranchId(), i, 2);
    model.setValueAt(displayDueDate(loanRec.getDate(), loanRec.getDiscType()), i, 3);
    model.setValueAt(loanRec.getRenewTime()+"", i, 4);
    // the few lines below are just to refresh the table
    m_tbDiscLoan.invalidate();
    m_tbDiscLoan.validate();
    m_tbDiscLoan.repaint();
    m_spnDiscLoan.invalidate();
    m_spnDiscLoan.validate();
    m_spnDiscLoan.repaint();
    private boolean collectSelectedList() {
    MyTableModel model = (MyTableModel)m_tbDiscLoan.getModel();
    if(model.getRowCount()!=0){
    for(int i=0; i<model.getRowCount(); i++){
    if(model.getValueAt(i,0).equals(Boolean.TRUE)){
    //if(loanRec.getDiscId().equalsIgnoreCase((String)(model.getValueAt(i, 1)))) {
    RentalRecord rentRecObj = (RentalRecord)loanVector.elementAt(i);
    recVector.addElement(rentRecObj);
    tickCnt++;
    //} // end if
    } // end if
    } // end for
    } // end if
    else {
    JOptionPane.showMessageDialog(this, "Table is empty");
    return false;
    if(tickCnt==0){
    JOptionPane.showMessageDialog(this, "You do not select any disc in your table.");
    return false;
    return true;
    // this method is meant to display the due date in the table
    private String displayDueDate(String date, String type) {
    //System.out.println(date);
    String tempDate = date.substring(8, 10);
    //System.out.println(tempDate);
    String tempMonth = date.substring(5, 7);
    //System.out.println(tempMonth);
    String tempYear = date.substring(0, 4);
    //System.out.println(tempYear);
    int d = Integer.parseInt(tempDate);
    int m = Integer.parseInt(tempMonth);
    int y = Integer.parseInt(tempYear);
    GregorianCalendar due = new GregorianCalendar(d,m,y);
    int maxDay;
    // Check the max day in the month
    switch(m){
    case 1: case 3: case 5: case 7: case 8: case 10: case 12:
    maxDay = 31;
    break;
    case 2 :      if(due.isLeapYear(y))
    maxDay = 29;
    else
    maxDay = 28;
    break;
    default : maxDay = 30;
    RentalPolicy rp = new RentalPolicy();
    int dur = rp.getDur(type);
    if((d+dur)>maxDay) {
    m++;
    if(m>12){
    m=1;
    y++;
    d = d+dur-maxDay;
    return ""+d+"/"+m+"/"+y;
    else {
    return ""+(d+dur)+"/"+m+"/"+y;
    void m_btnReturn_actionPerformed(ActionEvent e) {
    collectSelectedList();
    //System.out.println(sysCont.getBranchId());
    ReturnController returnCont = new ReturnController();
    if(!returnCont.returnDisc(recVector, sysCont.getMemberId(), sysCont.getBranchId())) {
    JOptionPane.showMessageDialog(this, "Return Failure, please try again");
    recVector.removeAllElements();
    private boolean collectRenewDisc(){
    int check=0;
    Vector exceedRenew = new Vector();
    MyTableModel model = (MyTableModel)m_tbDiscLoan.getModel();
    Disc noRenew;
    int maxRenew = sCont.getMemberPolicy("Renew Limit");
    if(model.getRowCount()!=0){
    for(int i = 0; i < model.getRowCount(); i++){
    if(model.getValueAt(i,0).equals(Boolean.TRUE)){
    int j = Integer.parseInt((String)model.getValueAt(i,4));
    if(j < maxRenew){
    // collect those to be renewed
    RentalRecord tempRec = (RentalRecord) loanVector.elementAt(i);
    renewRentVector.addElement(tempRec);
    Disc tempDisc = renCont.getDiscRenewInfO((String)model.getValueAt(i,1), ++j);
    renewDiscVector.addElement(tempDisc);
    renewCnt++;
    System.out.println(renewCnt);
    else{
    // collect those that can't be renewed
    noRenew = new Disc((String)model.getValueAt(i,1), (String)model.getValueAt(i, 2));
    exceedRenew.addElement(noRenew);
    check++;
    if(!exceedRenew.isEmpty()){
    String info="";
    Disc show;
    for(int k = 0; k < exceedRenew.size(); k++){
    show = (Disc)exceedRenew.elementAt(k);
    if(k!= exceedRenew.size()-1){
    info = info+show.getDiscId()+", ";
    else
    info = info+show.getDiscId();
    JOptionPane.showMessageDialog(this, "The renew limit for disc(s) with id : "+info+"\n"+
    "has been reached. Please return to rent again.");
    //return false;
    if(check == 0){
    JOptionPane.showMessageDialog(this, "You have not selected any record to be renewed.");
    return false;
    else{
    JOptionPane.showMessageDialog(this, "There is no record to be renewed.");
    return false;
    exceedRenew.removeAllElements();
    return true;
    public void clearList() {
    MyTableModel model = (MyTableModel)m_tbDiscLoan.getModel();
    int i = (model.getRowCount()-1);
    while(i>=0){
    model.removeRow(i);
    i--;
    m_tbDiscLoan.invalidate();
    m_tbDiscLoan.validate();
    m_tbDiscLoan.repaint();
    m_spnDiscLoan.invalidate();
    m_spnDiscLoan.validate();
    m_spnDiscLoan.repaint();
    void m_btnRenew_actionPerformed(ActionEvent e) {
    if(collectRenewDisc()){
    renCont.renewDisc(renewRentVector, renewDiscVector, renewCnt);
    loanVector.removeAllElements();
    renewRentVector.removeAllElements();
    renewDiscVector.removeAllElements();
    renewCnt=0;
    clearList();
    displayLoanRec();
    }

    Please repaste your code inside a
    //your code here
    section. Please ...
    --lichu                                                                                                                                                                                                                               

Maybe you are looking for

  • Error 'endOfSession ' whil opening communication channel in RWD

    Hi All, In the activity of Communication Channel Monitoring, Im getting the error 'endOfSession'  while I was trying to open a Communication Channel.  But I can't see any problem with Message monitoring. What could be the problem. Can any body help m

  • Canon MX 922 Faxes not being picked up

    Having trouble with my new Canon MX922 not picking up all faxes.  Some come through ok, others it doesn't pick up.  I have it set for DRPD since my fax line is a double ring on my regular phone line.  My old Canon MX850 had no trouble with this same

  • Displaying Image from Blob as part of JSP

    Hi All, In our application we need to display a image as part of a JSP .The image comes as Blob from DB .we are able to save that image local file system but the image is not getting rendered on JSP.We tried converting the Blob to byte[] also. we are

  • Switching iframe content and javascript problem in safari!

    Hi, I'm having problems with this page we're doing... http://www.intergraphicdesigns.com/clientes/bansbach_web/zonainteractiva/www/zon ainteractiva.php#tab3 It renders everything perfectly in Firefox, Chrome, IE9, or even IE6... but in Safari (both M

  • Activation of 7.x datasource not allowed due to changability of object type

    Hi All, We are facing the following issues. Some times we need to replicate and activate 7.x datasource at the production system but the system doesn't let as due to "changes not allowed" settings on SCC4 transaction. We thought that it could be poss