Frames and the Model 2 architecture

Discussion in 'Java' started by Klaas, Jul 17, 2003.

  1. Klaas

    Klaas Guest

    Hi,

    I am working on a Web app using the Model 2 architecture. The view
    (index.jsp) consists of 2 frames, the left frame containing thumbnail pics,
    the right one containing the selected pic. The frame content is included
    using 2 jsp:include tags referring the controllerservlet.



    index.jsp:

    ....

    <FRAMESET frameborder=no cols="20%,80%">

    <FRAME src="controllerservlet?cmd=thumbnailframe" NAME="LeftFrame"
    scrolling=AUTO>

    <FRAME src="controllerservlet?cmd=pictureframe" name="RightFrame"
    scrolling=AUTO>

    <NOFRAMES>

    ....



    This works OK. The pictureset displayed in the left frame is obtained from
    the Model and is selected using a dropdown menu in the left frame.

    And there occurs my problem. When a new picture group is selected, the
    controllerservlet updates the Model and dispatches the request to the
    thumbnailframe. Then the updated thumbnailframe is displayed correctly but
    the right frame still contains the old picture UNTIL a thumbnail picture is
    clicked.

    It is logic that this happens because the right frame is not updated
    automatically. But how can I manage this ??? Dispatching the request to
    index.jsp is no solution because then the complete index.jsp is showed in
    the left frame !!!

    In fact, I would like to do an invisible request to the controllerservlet
    with the cmd set to pictureframe and the target set to "RightFrame", this is
    exactly what happens when a thumbnail picture is clicked...

    Anybody has a solution ???

    TIA,

    Klaas
     
    Klaas, Jul 17, 2003
    #1
    1. Advertising

  2. "Klaas" <> wrote
    <...>
    > And there occurs my problem. When a new picture group is selected, the
    > controllerservlet updates the Model and dispatches the request to the
    > thumbnailframe. Then the updated thumbnailframe is displayed correctly but
    > the right frame still contains the old picture UNTIL a thumbnail picture

    is
    > clicked.
    >
    > It is logic that this happens because the right frame is not updated
    > automatically. But how can I manage this ??? Dispatching the request to
    > index.jsp is no solution because then the complete index.jsp is showed in
    > the left frame !!!
    >
    > In fact, I would like to do an invisible request to the controllerservlet
    > with the cmd set to pictureframe and the target set to "RightFrame", this

    is
    > exactly what happens when a thumbnail picture is clicked...
    >
    > Anybody has a solution ???



    I think this concerns JavaScript. The frame that contains the picture needs
    to be reloaded. For example, you could use a javascript command in the end
    of the thumbnail frame to refresh or submit a form in the picture frame.

    Cedric
     
    Cedric ROCHEFOLLE, Jul 18, 2003
    #2
    1. Advertising

  3. "Klaas" <> writes:

    > It is logic that this happens because the right frame is not updated
    > automatically. But how can I manage this ??? Dispatching the request
    > to index.jsp is no solution because then the complete index.jsp is
    > showed in the left frame !!!


    You need to send a full FRAMESET again with the right parameters for
    the FRAMEs. use target="_parent" to replace it (the parent of the
    frame you're in).
     
    Tor Iver Wilhelmsen, Jul 18, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Muhammad Khan
    Replies:
    4
    Views:
    1,236
    Mike Treseler
    Jul 10, 2003
  2. Replies:
    3
    Views:
    516
    Malcolm
    Sep 29, 2005
  3. rashmi
    Replies:
    2
    Views:
    470
    Grumble
    Jul 5, 2005
  4. Replies:
    3
    Views:
    431
    Malcolm
    Sep 29, 2005
  5. Replies:
    4
    Views:
    670
    Malcolm
    Sep 29, 2005
Loading...

Share This Page