Refreshing the subforms in Frames

Hi,
We developed a web application using JSF in which we have leftmenu,header and main workarea. We used frames for it.
When i am trying to refresh the page that is displayed on main workarea, its loading the default page set for first time entry.
How can i refresh only the main work area in my application?
Thanks in advance.

I think the mistake u did is populating the collection/entity of your custom view in some other place rather than on_new_focus method of the context class. So when u first time come to the view, it is calling your custom code and populating your custom view. But when u click new, it is not executing that method and it is not refreshing. on_new_focus is called everytime
you change to new or open in edit mode..that method should be declared as event handler method..
Move your code to the on_new_focus method of the particular context node. see standard codes how that is created and used...
e.g. you can see the component/view BT112H_SC/Details, context node BTPARTNERSET and method CREATE_BTPARTNERSET of CL_BT112H_S_DETAILS_CTXT of how it is used.

Similar Messages

  • Question about refreshing the page with frames...

    hi, my website uses three frames... (the standard main one, top and left frame)
    but when i go to different pages on the site and press the refresh button it goes back to the homepage but i want it to just refresh the page in the 'main' frame.
    i understand why its going back to the homepage... coz when i press refresh its refreshing the index.jsp page and thats where the frames are, so the location for the 'main' frame page is the homepage.
    is there any way around this?
    i just want it to refresh whatever page is in the 'main' frame.

    You can do it, but it means storing the currently viewed page in the user's session, and maintaining those sessions at all cost.
    Here is a brief example of how it might be done:
      //Top.jsp
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <c:set var="top_location" value="Top.jsp" scope="session"/>
    <html>
      <body>
        <h2><%= new java.util.Date() %></h2>
        My SesisonID = <c:out value="${pageContext.session.id}"/><br/>
      </body>
    </html>
    //Bottom1.jsp
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <c:set var="bottom_location" value="Bottom1.jsp" scope="session"/>
    <html>
      <body>
        <h2>I am Bottom 1</h2>
        My SesisonID = <c:out value="${pageContext.session.id}"/><br/>
        <c:url var="toPage2" value="Bottom2.jsp"/>
        <a href="${toPage2}">Go To Page 2</a>
      </body>
    </html>
    //Bottom2.jsp
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <c:set var="bottom_location" value="Bottom2.jsp" scope="session"/>
    <html>
      <body>
        <h2>I am Bottom 2</h2>
        My SesisonID = <c:out value="${pageContext.session.id}"/><br/>
        <c:url var="toPage1" value="Bottom1.jsp"/>
        <a href="${toPage1}">Go To Page 1</a>
      </body>
    </html>
    //Framer.jsp  (with the frameset that gets reloaded...
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <c:if test="${empty sessionScope.top_locaction}">
      <c:set var="top_location" value="Top.jsp" scope="session"/>
    </c:if>
    <c:if test="${empty sessionScope.bottom_location}">
      <c:set var="bottom_location" value="Bottom1.jsp" scope="session"/>
    </c:if>
    <html>
      <frameset rows="50%,*">
        <frame title="top" src="<c:url value="${sessionScope.top_location}"/>"/>
        <frame title="bottom" src="<c:url value="${sessionScope.bottom_location}"/>"/>
      </frameset>
    </html>But for this to work EVERY page you make will need to record itself in the session, and you will need to pass every link through the response.encodeURL(...) or <c:url ...>
    An alternative which may be easier (depending on what you are doing) would be to create one frame, with a <jsp:include ...> for the stuff you want to show at the top, and another one for the stuff you want to show on the left. More like this:
    //Top.jsp  note- no html or body tags
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <div style="border: thin solid black;">
        <h2><%= new java.util.Date() %></h2>
        My SesisonID = <c:out value="${pageContext.session.id}"/><br/>
    </div>
    //Bottom1.jsp
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html>
      <body>
      <jsp:include page="Top.jsp"/>
        <h2>I am Normal 1</h2>
        My SesisonID = <c:out value="${pageContext.session.id}"/><br/>
        <c:url var="toPage2" value="Bottom2.jsp"/>
        <a href="${toPage2}">Go To Page 2</a>
      </body>
    </html>
    //Bottom2.jsp
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <html>
      <body>
      <jsp:include page="Top.jsp"/>
          <h2>I am Normal 2</h2>
        My SesisonID = <c:out value="${pageContext.session.id}"/><br/>
        <c:url var="toPage1" value="Bottom1.jsp"/>
        <a href="${toPage1}">Go To Page 1</a>
      </body>
    </html>

  • Refreshing the frame

    I have a routine where if the user presses a button I want the frame to refresh but with a changed image in a label. At the moment I call the actionPerformed event of the button and put -
    Label Dice5 = new Label("Dice1",Dice1Icon,Label.CENTER);
    within the event, but nothing happens. Is there a way to "refresh the screen" or even refresh that label?

    I have a routine where if the user presses a button I
    want the frame to refresh but with a changed image in
    a label. At the moment I call the actionPerformed
    event of the button and put -
    Label Dice5 = new
    Label("Dice1",Dice1Icon,Label.CENTER);
    don't do this.
    you should alter your existing label not make a new one...
    let's say your label (already added to your frame) is called dice5
    then something like this...
    dice5.setText("New Text");also are you using JLabel or Label cuz you are calling it Label but using JLabel methods?
    anyway there are methods for setIcon etc. for JLabel if that is what you are trying to do.

  • Refreshing the panels when new content added?

    Hey, guys. My first post here; hope I'm not too much of a JNewbie for you. :)
    I'm getting my feet wet in Swing, working on an invoice program for work. I want it to look like a regular invoice, with fields for SKU, description, cost per unit, units, and total per line item. Right now, I have those five fields in a Jpanel that I add to the bottom of the layout.
    The problem is that I need the ability to go to File => Add New Item... and have another JPanel with those five fields add to the bottom so a 2nd item can be added to the form below the first. I tried making a function that adds them to the panel, using the same type of syntax that the generated code (using a form builder in NetBeans) did. I don't see the lines get added.
    My thought is that there is some function I need to call to redraw or refresh the panel so that the new components start drawing. However, my Great Javadoc Adventure has turned up no clues.
    Can anyone please give me a hand with making this happen, or at the least coming up with an alternate solution that will achieve similar results?
    Thanks much.
    Jaeden Stormes
    [email protected]

    I tried revalidate() , but no change.
    Here's the function I'm using to try to add the item...
    private void NewLineItem()
    javax.swing.JPanel jLine = new javax.swing.JPanel();
    jLine.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
    jItemCode.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jLine.add(jItemCode, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 110, -1));
    jCourseDelivery.setHorizontalAlignment(javax.swing.JTextField.LEFT);
    jLine.add(jCourseDelivery, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 0, 240, -1));
    jItemQuantity.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jLine.add(jItemQuantity, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 0, 110, -1));
    jItemRate.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jLine.add(jItemRate, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 0, 100, -1));
    jItemAmount.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jLine.add(jItemAmount, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 0, 100, -1));
    jLineItemSection.add(jLine);
    jLineItemSection.revalidate();
    pack();
    JLineItemSection is a JPanel inside my frame.
    Any suggestions? I think the way I am using the AbsoluteContraints is screwed up, as I'm having a lot of trouble with the layouts in general. The form editor in NetBeans (at least, the version in 3.6) needs a LOT of work.

  • Passing javascript values to jsp without refreshing the page

    Hi,
    How do u pass a value of a javascript variable to the jsp without refreshing the page ?
    For example, a file called test.jsp in which a javascript variable x contains value 254. I need to pass the value of x to a method declared in test.jsp(same page).

    Hi Mona,
    when i say refresh i do mean a blink of the browser.
    This is a small example i wrote to show you how you can pass javascript varables to JSP variables. If you don't want the refresh to be seen by the user just include this code in a hidden frame on a page and instead of refreshing the entire page, refresh the hidden frame.
    i have to say, i didn't test the code so i don't guarantee it's flawless.
    if you need an more detailed example just tell me, i'll create one, but it won't be for today :)
    <html>
    <head>
         <title>Log in to the system</title>
    </head>
    <body>
    <script>
    //we retrieve the parameter 'user' from the URL
    <%
      String username = request.getParameter("user");
    %>
    var user = "<%= username%>";
    //check if there is a username in the URL
    if(user=="null")
      //there is no username so we log the person in as a guest
      user="guest";
      //we refresh the page and set the user parameter to 'guest'
      //the parameter now contains the javascript variable 'user'.
      //The parameter can be read by the JSP (see the top op this script).
      //This way we gave the javascript variabele to the JSP variable
      location="login.jsp?user="+user;
    else if(user=="guest")
    {  alert("Welcome "+user+", I hope you like this site"); }
    else
    {  alert("Welcome "+user+", I'm glad to see you again"); }
    </script>
    </body>
    </html>

  • ALV OO and refreshing the ALV grid

    Hi,
    i have some problems with my ALV 00 program.
    On screen 1 i have to fill in a material number.
    For that material i'm getting some data and show in screen 2 in a ALV grid.
    Via BACK-button i'm getting back to screen 1 and can fill in another material number.
    But the 2nd (and 3rd, etc) time i fill a material, the ALV grid data from material 1 is shown. Even if the internal table I_ALV where the data is, is changed.
    What should i do ?
    I have initialized the customer container and the grid, but that didn't solved the problem.
    regards,
    Hans

    Hi,
    Try clearing and refreshing the alv grid data table in screen 2.
    Check with this code. this code is working fine. If we go back and change the input, it is showing the output corresponding to the second input only.
    Have you use this method?
    <b> GR_ALVGRID->REFRESH_TABLE_DISPLAY</b>
    TYPE-POOLS : SLIS.
    * Tables                                                              *
    TABLES:
      VBRK,
      VBRP.
    * Parameters and select options OR SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS:
                S_VBELN FOR VBRK-VBELN.
    SELECTION-SCREEN END OF BLOCK B1.
    * Internal Tables                                                     *
    * work areas
    DATA: BEGIN OF IT_VBRP OCCURS 0,
           VBELN LIKE VBRK-VBELN,
           POSNR LIKE VBRP-POSNR,
           UEPOS LIKE VBRP-UEPOS,
           FKIMG LIKE VBRP-FKIMG,
           NETWR LIKE VBRP-NETWR,
           MEINS LIKE VBRP-MEINS.
    DATA : END OF IT_VBRP.
    * Variables                                                           *
    DATA : GR_ALVGRID TYPE REF TO CL_GUI_ALV_GRID,
           GC_CUSTOM_CONTROL_NAME TYPE SCRFNAME VALUE 'CC_ALV',
           GR_CCONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
           GT_FIELDCAT TYPE LVC_T_FCAT,
           GS_LAYOUT TYPE LVC_S_LAYO,
           V_FLAG VALUE 'X'.
    * Start of Program                                                    *
    *       INITIALIZATION.                                               *
    INITIALIZATION.
      S_VBELN-LOW = 1.
      S_VBELN-HIGH = 1000000000.
      S_VBELN-OPTION = 'EQ'.
      S_VBELN-SIGN = 'I'.
      APPEND S_VBELN.
    *       SELECTION-SCREEN                                              *
    AT SELECTION-SCREEN.
      PERFORM VALIDATION.
    *       START-OF-SELECTION                                            *
    START-OF-SELECTION.
      PERFORM GET_DATA.
      CALL SCREEN 0100.
    *       END-OF-SELECTION                                              *
    END-OF-SELECTION.
    *       TOP-OF-PAGE                                                   *
    TOP-OF-PAGE.
    *       END-OF-PAGE                                                   *
    END-OF-PAGE.
    *       AT USER-COMMAND                                               *
    *&      Form  VALIDATION
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM VALIDATION .
      SELECT SINGLE VBELN
      FROM VBRK
      INTO VBRK-VBELN
      WHERE VBELN IN S_VBELN.
      IF SY-SUBRC <> 0.
        MESSAGE E000 WITH 'no billing documents found'.
      ENDIF.
    ENDFORM.                    " VALIDATION
    *&      Form  GET_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_DATA .
      SELECT VBELN
             POSNR
             UEPOS
             FKIMG
             NETWR
             MEINS
      FROM VBRP
      INTO TABLE IT_VBRP
      WHERE VBELN IN S_VBELN.
    ENDFORM.                    " GET_DATA
    *&      Module  DISPLAY_ALV  OUTPUT
    *       text
    MODULE DISPLAY_ALV OUTPUT.
      IF V_FLAG = 'X'.
        PERFORM DISPLAY_ALV.
        PERFORM PREPARE_FIELD_CATALOG CHANGING GT_FIELDCAT.
        PERFORM PREPARE_LAYOUT CHANGING GS_LAYOUT.
       CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
            EXPORTING
    *      I_BUFFER_ACTIVE               =
    *      I_BYPASSING_BUFFER            =
    *      I_CONSISTENCY_CHECK           =
    *      I_STRUCTURE_NAME              = 'VBRP'
    *      IS_VARIANT                    =
    *      I_SAVE                        =
    *      I_DEFAULT                     = 'X'
              IS_LAYOUT                     = GS_LAYOUT
    *      IS_PRINT                      =
    *      IT_SPECIAL_GROUPS             =
    *      IT_TOOLBAR_EXCLUDING          =
    *      IT_HYPERLINK                  =
    *      IT_ALV_GRAPHICS               =
    *      IT_EXCEPT_QINFO               =
            CHANGING
              IT_OUTTAB                     = IT_VBRP[]
              IT_FIELDCATALOG               = GT_FIELDCAT
    *      IT_SORT                       =
    *      IT_FILTER                     =
            EXCEPTIONS
              INVALID_PARAMETER_COMBINATION = 1
              PROGRAM_ERROR                 = 2
              TOO_MANY_LINES                = 3
              OTHERS                        = 4
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          CALL METHOD GR_ALVGRID->SET_READY_FOR_INPUT
            EXPORTING
              I_READY_FOR_INPUT = 1.
        ELSE.
          <b>CALL METHOD GR_ALVGRID->REFRESH_TABLE_DISPLAY
    *    EXPORTING
    *      IS_STABLE      =
    *      I_SOFT_REFRESH =
            EXCEPTIONS
              FINISHED       = 1
              OTHERS         = 2
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.</b>
        ENDIF.
        CLEAR V_FLAG.
      ENDIF.
    ENDMODULE.                 " DISPLAY_ALV  OUTPUT
    *&      Form  DISPLAY_ALV
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DISPLAY_ALV .
      IF GR_ALVGRID IS INITIAL.
        CREATE OBJECT GR_ALVGRID
          EXPORTING
    *    I_SHELLSTYLE      = 0
    *    I_LIFETIME        =
            I_PARENT          = GR_CCONTAINER
    *    I_APPL_EVENTS     = space
    *    I_PARENTDBG       =
    *    I_APPLOGPARENT    =
    *    I_GRAPHICSPARENT  =
    *    I_NAME            =
          EXCEPTIONS
            ERROR_CNTL_CREATE = 1
            ERROR_CNTL_INIT   = 2
            ERROR_CNTL_LINK   = 3
            ERROR_DP_CREATE   = 4
            OTHERS            = 5
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV
    *&      Form  PREPARE_FIELD_CATALOG
    *       text
    *      <--P_GT_FIELDCAT  text
    FORM PREPARE_FIELD_CATALOG  CHANGING P_GT_FIELDCAT TYPE LVC_T_FCAT.
      DATA : LS_FCAT TYPE LVC_S_FCAT,
             L_POS TYPE I.
      L_POS = L_POS + 1.
      LS_FCAT-FIELDNAME = 'VBELN'.
      LS_FCAT-TABNAME = 'IT_VBRP'.
      LS_FCAT-COL_POS = L_POS.
      LS_FCAT-SCRTEXT_M = 'Billing Document'.
      LS_FCAT-OUTPUTLEN = '10'.
      APPEND LS_FCAT TO P_GT_FIELDCAT.
      CLEAR LS_FCAT.
      L_POS = L_POS + 1.
      LS_FCAT-FIELDNAME = 'POSNR'.
      LS_FCAT-TABNAME = 'IT_VBRP'.
      LS_FCAT-COL_POS = L_POS.
      LS_FCAT-SCRTEXT_M = 'Billing Item'.
      LS_FCAT-OUTPUTLEN = '6'.
      APPEND LS_FCAT TO P_GT_FIELDCAT.
      CLEAR LS_FCAT.
      L_POS = L_POS + 1.
      LS_FCAT-FIELDNAME = 'UEPOS'.
      LS_FCAT-TABNAME = 'IT_VBRP'.
      LS_FCAT-COL_POS = L_POS.
      LS_FCAT-SCRTEXT_M = 'Higher Level Item'.
      LS_FCAT-OUTPUTLEN = '6'.
      APPEND LS_FCAT TO P_GT_FIELDCAT.
      CLEAR LS_FCAT.
      L_POS = L_POS + 1.
      LS_FCAT-FIELDNAME = 'FKIMG'.
      LS_FCAT-TABNAME = 'IT_VBRP'.
      LS_FCAT-COL_POS = L_POS.
      LS_FCAT-SCRTEXT_M = 'Invoice Quantity'.
      LS_FCAT-OUTPUTLEN = '13'.
      APPEND LS_FCAT TO P_GT_FIELDCAT.
      CLEAR LS_FCAT.
      L_POS = L_POS + 1.
      LS_FCAT-FIELDNAME = 'NETWR'.
      LS_FCAT-TABNAME = 'IT_VBRP'.
      LS_FCAT-COL_POS = L_POS.
      LS_FCAT-SCRTEXT_M = 'Net Value'.
      LS_FCAT-OUTPUTLEN = '15'.
      APPEND LS_FCAT TO P_GT_FIELDCAT.
      CLEAR LS_FCAT.
      L_POS = L_POS + 1.
      LS_FCAT-FIELDNAME = 'MEINS'.
      LS_FCAT-TABNAME = 'IT_VBRP'.
      LS_FCAT-COL_POS = L_POS.
      LS_FCAT-SCRTEXT_M = 'Unit of Measure'.
      LS_FCAT-OUTPUTLEN = '3'.
      APPEND LS_FCAT TO P_GT_FIELDCAT.
      CLEAR LS_FCAT.
      L_POS = L_POS + 1.
    ENDFORM.                    " PREPARE_FIELD_CATALOG
    *&      Form  PREPARE_LAYOUT
    *       text
    *      <--P_GS_LAYOUT  text
    FORM PREPARE_LAYOUT  CHANGING P_GS_LAYOUT TYPE LVC_S_LAYO.
      P_GS_LAYOUT-ZEBRA = 'X'.
      P_GS_LAYOUT-GRID_TITLE = 'INVOICE DETAILS'.
      P_GS_LAYOUT-SMALLTITLE = 'X'.
      P_GS_LAYOUT-EDIT = 'X'.
    ENDFORM.                    " PREPARE_LAYOUT
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'CANCEL'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'CANCEL'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          CALL TRANSACTION 'SE38'.
        WHEN 'CHANGE'.
          IF GR_ALVGRID->IS_READY_FOR_INPUT( ) = 0.
            CALL METHOD GR_ALVGRID->SET_READY_FOR_INPUT
              EXPORTING
                I_READY_FOR_INPUT = 1.
          ELSE.
            CALL METHOD GR_ALVGRID->SET_READY_FOR_INPUT
              EXPORTING
                I_READY_FOR_INPUT = 0.
          ENDIF.
      ENDCASE.
    Regards,
    Aswin

  • Set the thumbnail/poster frame?

    I use iMovie to generate QuickTime files, which I embed in HTML web pages.
    Is there a way to specify the frame which displays when the embedded movie is not being played? I.e. the image that appears in the QuickTime player in the webpage, prior to hitting play.
    Thanks for any help!
    Mike

    When I tried setting the poster frame in QT Pro and then saving the file, the format seemed to have mysteriously changed.
    If you check the "Inspector" or "Properties" windows you should find that the audio and video compression formats have remained the same. What did change was the file container which I now assume is MOV.
    When put online, the new files remain as giant quicktime logos, whereas the original versions would start to show video immediately. I think this may have been because I exported from iMovie as "streaming". Do you happen to know how to preserve this parameter when saving from QT Pro?
    Not knowing how you are posting your files it is difficult to guess what is confusing the plug-in player. For instance, did you remember to change the file extensions in your references to match the new file container extension? Or, if you did, did you empty the download cache or force a page reload to refresh the page changes? As to setting the "Fast Start" option for auto playback while the movie is being cached to the local hard drive, this is normally re-set to "on" when you access the "Save As..." option in QT Pro. Of course, the file embedded setting is overridden if you embed an "AutoPlay" parameter with a value like "True", "False", or a specific cache load point that will automatically start playback when a cache download reaches that time reference. If you are using an application like iWeb to post your pages, then simply set the "Autoplay" option and let the application write the code for you. The hinted tracks are only needed if you are actually posting your files to a real time streaming server. The "Fast Start" content is what most users actually see/use here and are talking about whe the talk about streaming. In any case, until the logo problem is corrected, you won't know whether you file still capable of "Fast Start" auto playback.
    As an alternative you can always "paste" a still frame of the same dimensions as your movie as the first display frame in your movie or create/code a separate "poster frame" still image to your web page. (I believe QT Kirk has covered this latter work flow a number of times in the QT Pro forum.)

  • Help! how to refresh the JTable of a class from another thread class

    there is an application, in server side ,there are two classes, one is a class called face class that screen a JTable, another is a class the a thread ,which accept socket from client, when it accept the client socket, it deal the data and insert into db,then notify the face class to refresh the JTable,but in the thread class I used JTable's revalidate() and updateUI() method, the JTable does not refresh ,how should i do, pls give me help ,thank you very much

    thank you very much !
    i tried it ,but the TableModel i used like this ,and how to change the TableModel?
    here the files of mine ,pls give me some help,thank you very much
    1,first file is a class that create a JInternalFrame,and on it there is a table
    public class OutFace{
    public JInternalFrame createOutFace(){
    JInternalFrame jf = new JInternalFram();
    TableModel tm = new MyTableModel();
    JTable jt = new JTable(tm);
    JScrollPane jsp = new JScrollPane();
    jsp.add(jt);
    jf.getContentPane().add(jsp);
    return jf;
    2,the second file is the main face ,there is a button,when press the button,screen the JInternalFrame. there is also a thread is beggining started .
    public class MainFace extends JFrame implements ActionListener,Runnable{
    JButton jb = new JButton("create JInternalFrame");
    jb.addActionListener(this);
    JFrame fram = new JFrame();
    public void performance(ActionEvent e){
    JInternalFrame jif = new OutFace().createOutFace(); frame.getContentPane().add(JInternalFrame,BorderLayout.CENTER);
    public static void main(String[] args){
    frame.getContentPane().add(jb,BorderLayout.NORTH);
    frame.pack();
    frame.setVisible(true);
    ServerSokct ss = new ServerSocket(10000);
    Socket skt = ss.accept()'
    new ServerThread(skt).start();
    3.the third file is a thread class, there is a serversoket ,and accept the client side data,and want to refresh the JTable of the JInternalFrame
    public class ServerThread extends Thread{
    private skt;
    public ServerThread(Sokcet skt){
    this.skt = skt;
    public void run(){
    OutputObjectStream oos = null;
    InputObjectStream ios = null;
    try{
    Boolean flag = flag;
    //here i want to refresh the JTable,how to write?? }
    catch(){}
    4.second is the TableModel
    public class MyTableModel{
    public TableModel createTableModel(){
    String[][] data = getData();
    TableModel tm = AbstractTableModel(
    return tm;
    public String[][] getData(){
    }

  • After unlink or unthread the last text frame, it still points to the old story

    Hi,
    I used 'kTextUnlinkCmdBoss' to unlink the last text frame from the thread, however, after the command is processed if I access the textModel of the box as follows it still points to the old model:
    InterfacePtr<IGeometry> srcgeometry(srcbox,UseDefaultIID());
    if(srcgeometry==NULL) break;
    InterfacePtr<IMultiColumnTextFrame> srctextframe(srcbox.GetDataBase(), Utils<IFrameUtils>()->GetTextFrameUID(srcgeometry), UseDefaultIID());
    if(srctextframe==NULL) break;
    InterfacePtr<ITextModel> srctextmodel(srctextframe->QueryTextModel());
    if(srctextmodel==NULL) break;
    Is there any way to force refresh the textModel info related with the text frame? Of course, if I checked the textModel later, it's properly assigned with new one, it's just problem of the info is not refreshed on the same execution cycle.
    Thanks,
    Doil

    Hi Dirk,
    Thanks for the response. I tried the following, however, it didn't work, it still returns the same result:
    InterfacePtr<IHierarchy> fh(thebox,UseDefaultIID());
    ASSERT(fh);
    if (!fh) {
    break;
    InterfacePtr<IHierarchy> multiColumnItemHierarchy(fh->QueryChild(0));
    ASSERT(multiColumnItemHierarchy);
    if (!multiColumnItemHierarchy) {
    break;
    InterfacePtr<IMultiColumnTextFrame> mctf(multiColumnItemHierarchy, UseDefaultIID());
    ASSERT(mctf);
    if (! mctf) {
    break;
    UID storyUID = mctf->GetTextModelUID();

  • Refresh the PanelGrid in  page not the whole page ...

    Hi friends,
    I have two frames in one page. Those are Left.faces and Right.faces. In the left.faces i have pangelGrid and stackbarGroup under stackbar. In the Right.faces i am having only dropDownList and command button.
    Here my problem is , First i am selecting the value from the drop down list and click the command button in the Right.faces. That action should be reflected on Left.faces that means, selected value is captured by element current Reference Month which is in panel grid through refreshing the page Left.faces. But here i used stackbarGroup under the panel grid. While refreshing the page Left.faces the stackbargroup is compressed. I should touch only the panel grid not the stack bar group.
    My code: Left.faces
    ==============
    <f:view>
    <h:form>
    <h:panelGrid columns="2" styleClass="leftPanelTitle" cellspacing="5" style="width:100%" id="panelGrid" >
    <h:outputText value="*Current Reference Month : "* />
    <h:outputText value="*#{bottom_sess.displayMonthRef}*" style="font-weight:normal"/>
    </h:panelGrid>
    <ig:stackbar groupContentStyleClass="csStackbarGroupContent" groupExpandedStyleClass="csStackbarGroupExpanded" groupExpandedHoverStyleClass="csStackbarGroupExpandedHover" groupCollapsedStyleClass="csStackbarGroup" groupCollapsedHoverStyleClass ="csStackbarGroupHover" >
    <ig:stackbarGroup text="Search Provision" rendered="#{not user_login.hideUserTeam}" >
    <ig:link target="right" value="#{msg.search}" action="#{provision_search_action.clearSearch}" ></ig:link>
    </ig:stackbarGroup>
    <ig:stackbarGroup text="Add Provision" rendered="#{not user_login.hideUserTeam}" >
    <ig:link target="right" value="#{msg.provision_book}" action="#{provision_book.clear}"></ig:link>
    <ig:link target="right" value="#{msg.provision_trade}" action="#{provision_trade.clear}"></ig:link>
    <ig:link target="right" value="#{msg.provision_atom}" action="#{provision_atomCode.clear}"></ig:link>
    </ig:stackbarGroup>
    </ig:stackbar>
    Right.faces
    ==========
         <f:view>
    <h:form id="form1" >
    <ig:dropDownList id="selectMonthEndDropDown" dataSource="#{select_month.selectMonthEndList}"                     binding="#{select_month.selectMonthEndDropDown}" />
    <h:commandButton type="submit" value="#{msg.change_month}" actionListener="#{select_month.addSession}" onclick="refreshPage()"/ >
    </h:form>
    </f:view>
    Script:
    =====
    <script LANGUAGE="JavaScript">
    function *refreshPage()*
    *parent.frames["left"].location.href='Left.faces'* // page refresh
    </script>
    In Left.faces i got the value in the panel grid's component from the Right.faces . But stack bar group is compressed in Left.faces.
    I am waiting for earlier reply.

    Hi Zack,
    Try the following under Report options.
    1. Clear the check box of "Verify Stored Procedures on First Refresh" in the Main report.
    2. Select the check box of "Verify on First Refresh" in  the sub report.
    Hope this helps.

  • Displaying the  results without refreshing the page

    Hi,
    I need to show the items added to the basket within a list box which is on the top frame without refreshing the page.the page is a jsp page.Could you please give me idea how this could be done.
    The problem is, there are 2 frames, one above and one below.In the below frame I select a product and add to the basket, at the same time I need to show these items in above frame within the list box, the above frame should not refresh, it should show the items as soon as the items are added.
    Thanks

    The cart bean is on the server? Then you will have to send a request to the server to get it added. How do you do that? You post a form. How do you post a form without submitting a page? You don't.
    You need to make a design decision. If you want all of your logic on the server, you will have to be content with client-side refreshes. If client-side refreshes and their inherent delays are not acceptable, you will have to learn to be savvy with JavaScript but realize that anything you do on the form is still only on the form until you submit it.

  • Not having to refresh the data in the main report but only in the subreport

    Hi SAP,
    I have a report that uses a stored procedure in the main report and uses regular database tables in the subreport.  The data returned from the stored procedure reports information from the month-end database (a cutoff point from the previous month's numbers) while the subreport reports information from the live database.  This report gets run everyday to show the changes in numbers from the live database.  Obviously the numbers from the month-end database remainds static until the next month's cutoff database is created. 
    My problem is that everyday when I run the report, the data needs to refresh from both the stored procedure in the main report and the live database tables in the subreport.  How can I leave the data returned from the stored procedure static or as is without refreshing the stored procedure returned data and just have the subreport data refresh itself?  The stored procedure really puts a strain on the database and I would like to cut-out the time to process the report as well.  Does anyone have any ideas?
    Zack

    Hi Zack,
    Try the following under Report options.
    1. Clear the check box of "Verify Stored Procedures on First Refresh" in the Main report.
    2. Select the check box of "Verify on First Refresh" in  the sub report.
    Hope this helps.

  • Can not refresh the metrics in schedular

    Post Author: sachinddalal
    CA Forum: Performance Management and Dashboards
    Hi,
    When I refresh the metric using schedular, the metric is not refreshed , nor schedular return any error. But when checked in metrics proparties, the last refresh date is not changed, niether the values are updated.
    Whe I try to refresh the metric manual, the values are refresh.
    Please help me to troubleshoot the problem of refreshing metric through schedular.
    Thanks,
    Regards
    Sachin Dalal

    Post Author: jezbraker
    CA Forum: Performance Management and Dashboards
    Scheduler is pretty horrid for refreshing metrics.Better of to use the Rules engine and create a rule thats based on a schedule that based on condition (1=1 works well ) then refreshes metircs.troubleshooting is best done with the trace options in setup/parameters.there are a few other ways or seeing what the schedulers up to - but id stick to rules if i were you.

  • How can I fast refresh the  materialized view !!

    I created a MV base on some tables in order to improve the querey speed.
    but the mv I have created falied to refresh fast.
    because there are two same table in the from clause:
    jcdm jc1,jcdm jc2
    create materialized view temp_mv
    nologging
    pctfree 0
    storage (initial 2048k next 2048k pctincrease 0)
    parallel
    build immediate
    refresh force
    on demand
    as
    select
    TAB_GSHX.rowid hx_rid,
    TAB_GSHD.rowid hd_rid ,
    JC1.rowid jc1_rid ,
    JC2.rowid jc2_rid ,
    YSHD_ID     HXID,          
    JC1.JCDM     QFD,     
    JC2.JCDM     JLD     
    FROM
    TAB_GSHX,
    TAB_GSHD,
    jCDM JC1,
    JCDM JC2
    WHERE
    YSHD_ID=YSHX_ID
    AND YSHD_QFD=JC1.JBJC_ID
    AND YSHD_JLD=JC2.JBJC_ID
    AND TO_CHAR(YSHX_time,'YYYYMMDD')='20030101'
    the column msgtxt of the table MV_CAPABILITIES_TABLE is :
    "the multiple instances of the same table or view" and " one or more joins present in mv".
    How can I succeed in fast refresh the above temp_mv!!!
    thanks.

    lianjun,
    When you are using Oracle9i there is a procedure which can help you setup the materialized view. If some option isn't working it gives you hint why it doesn't work.
    The procedure is dbms_mview.explain_mview.
    Take a look at the documentation how to use it. (In the Oracle9i DWH guide the package is explained.)
    Hope this helps
    With kind regards,
    Bas Roelands

  • Refreshing the Data Source View in Analysis Services

    I have added columns to the SQL Database table that is used as a dimension in an Analysis Services Cube.  The new columns will be used as additional Property Fields for the dimension.  When I attempted to refresh the Data Source view so that the additional columns are present, I am given the following error:
    System.Data
    Property not accessible because 'Parent Columns and Child Columns don't have type-matching columns'
    I have done nothing to the columns used for the parent of child and the error message provides nothing to gon on. Does anyone have any ideas on this?
    Gary

    Olga,
    Thanks for your response.  I will try and answer your questions
    1) I have not tried removing the columns yet.  I will try that this afternoon but have limited hope.  The two columns I added are simple text columns that will be used as attributes in the dimension.  I have made no change to the parent or child columns.
    2) The table I modified is the source table for a parent-child dimension.
    3) The reference to the "check list" does not take me to any kind of check list.
    4) The parent-child dimensions I am trying to modify have been in use for months and the parent and child columns do have the dame data types.
    5) I have also check the data types between the dimension table and the fact table.  they use the same data types (small int).
    6) I have not made a collection for the parent key, it is a single column. The remainder of your last paragraph is not clear to me. Can you give me an example.
    I am fairly inexperienced with Analysis Services, please talk slow and use small words  :-)
    Thanks again for your help!
    Gary

Maybe you are looking for