Re: [iPlanet-JATO] Re: onBeforeRequest(); Finding requested view from requestContext

If you want to stop a JATO request in its tracks, you have a little black
magic at your disposal: you can throw a CompleteRequestException. This
indicates to the JATO infrastructure that it should immeditately stop
handling the request, but not generate an error, as the develper has taken
full control. You can generally throw this error from anywhere, at any
point--it is a RuntimeException, and is "tunneled" through other exception
handlers where appropriate.
In your scenario, you want to check if the user is logged in, and if not,
save the target URL using the parsePathInfo() method. Then, forward to the
login page and then throw a CompleteRequestException.
Todd
----- Original Message -----
From: "nickmalthus" <nickmalthus@h...>
Sent: Monday, January 07, 2002 3:05 PM
Subject: [iPlanet-JATO] Re: onBeforeRequest(); Finding requested view from
requestContext
I guess what I am thinking about doing is capturing the requested URL,
i.e. /appname/modulename/RequestName. In the onBeforeRequest(). I
would then check to see if the user is logged in, and if not, set the
URL in the session(or page session of the Login bean) and forward to
the Login viewbean using the viewbean manager. Inside the login view
in the handleSubmit() method I would authenticate the user and then
get the URL out of the session (or pagesession). I would then
magically get the ViewBean/Command object for the URL or otherwise
"forward the request" as if the user had typed in
/appname/modulename/RequestName, which is the behavior I am trying to
acheive.
It turns out I cannot forward in the onBeforeRequest() as it will
output the viewbean and then continue to process the request which in
turn trys to do a RequestDispatcher().forward after data has been
written to the stream which does not bode well with the servlet
container. Thus, it appears I have no control of the request in the
onBeforeRequest() method. Is this correct?
In light of this new observation I am now going to create a base view
class that all views will extend from and override the
onSecurityCheck() method to forward to my login bean. If I can't find
any other way, I will get the URL from the page session and do a
response.sendRedirect() to the URL.
Thanks for the help!
--- In iPlanet-JATO@y..., "Craig V. Conover" <craig.conover@s...> wrote:
The problem is that you don't know what the target view is until it has
been forwarded to.
Think about it... the request handling view bean (or command object)has
the request handler that has the code that will ultimately forward to
another view bean. This is code that you have written. So, until that
forwardTo() is invoked, there is no notion of a "target page".
What you do know is which "page" (view bean) the request is coming from
(the handling view bean or command class). You can get this from the
HttpServletRequest. The attribute name is "viewBean".
So you can get the view bean name by doing the following inonBeforeRequest:
<HttpServletRequest>.getAttribute("viewBean");
But I suspect this is not going to solve your current issue.
You could add the target page name to the page session. If there ismore
than one possible target page, it might get a little more involved.
Let me know if the use of page session needs further explanation.
c
For more information about JATO, including download information, pleasevisit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp

If you want to stop a JATO request in its tracks, you have a little black
magic at your disposal: you can throw a CompleteRequestException. This
indicates to the JATO infrastructure that it should immeditately stop
handling the request, but not generate an error, as the develper has taken
full control. You can generally throw this error from anywhere, at any
point--it is a RuntimeException, and is "tunneled" through other exception
handlers where appropriate.
In your scenario, you want to check if the user is logged in, and if not,
save the target URL using the parsePathInfo() method. Then, forward to the
login page and then throw a CompleteRequestException.
Todd
----- Original Message -----
From: "nickmalthus" <nickmalthus@h...>
Sent: Monday, January 07, 2002 3:05 PM
Subject: [iPlanet-JATO] Re: onBeforeRequest(); Finding requested view from
requestContext
I guess what I am thinking about doing is capturing the requested URL,
i.e. /appname/modulename/RequestName. In the onBeforeRequest(). I
would then check to see if the user is logged in, and if not, set the
URL in the session(or page session of the Login bean) and forward to
the Login viewbean using the viewbean manager. Inside the login view
in the handleSubmit() method I would authenticate the user and then
get the URL out of the session (or pagesession). I would then
magically get the ViewBean/Command object for the URL or otherwise
"forward the request" as if the user had typed in
/appname/modulename/RequestName, which is the behavior I am trying to
acheive.
It turns out I cannot forward in the onBeforeRequest() as it will
output the viewbean and then continue to process the request which in
turn trys to do a RequestDispatcher().forward after data has been
written to the stream which does not bode well with the servlet
container. Thus, it appears I have no control of the request in the
onBeforeRequest() method. Is this correct?
In light of this new observation I am now going to create a base view
class that all views will extend from and override the
onSecurityCheck() method to forward to my login bean. If I can't find
any other way, I will get the URL from the page session and do a
response.sendRedirect() to the URL.
Thanks for the help!
--- In iPlanet-JATO@y..., "Craig V. Conover" <craig.conover@s...> wrote:
The problem is that you don't know what the target view is until it has
been forwarded to.
Think about it... the request handling view bean (or command object)has
the request handler that has the code that will ultimately forward to
another view bean. This is code that you have written. So, until that
forwardTo() is invoked, there is no notion of a "target page".
What you do know is which "page" (view bean) the request is coming from
(the handling view bean or command class). You can get this from the
HttpServletRequest. The attribute name is "viewBean".
So you can get the view bean name by doing the following inonBeforeRequest:
<HttpServletRequest>.getAttribute("viewBean");
But I suspect this is not going to solve your current issue.
You could add the target page name to the page session. If there ismore
than one possible target page, it might get a little more involved.
Let me know if the use of page session needs further explanation.
c
For more information about JATO, including download information, pleasevisit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp

Similar Messages

  • Re: [iPlanet-JATO] onBeforeRequest(); Finding requested view from requestContext

    The problem is that you don't know what the target view is until it has
    been forwarded to.
    Think about it... the request handling view bean (or command object) has
    the request handler that has the code that will ultimately forward to
    another view bean. This is code that you have written. So, until that
    forwardTo() is invoked, there is no notion of a "target page".
    What you do know is which "page" (view bean) the request is coming from
    (the handling view bean or command class). You can get this from the
    HttpServletRequest. The attribute name is "viewBean".
    So you can get the view bean name by doing the following in onBeforeRequest:
    <HttpServletRequest>.getAttribute("viewBean");
    But I suspect this is not going to solve your current issue.
    You could add the target page name to the page session. If there is more
    than one possible target page, it might get a little more involved.
    Let me know if the use of page session needs further explanation.
    c
    nickmalthus wrote:
    I am implementing a custom security model since the standard J2EE
    security model does not allow me access to the users password, which I
    need to log into a third party application. I have overriden the
    onBeforeRequest() method to check to see if the user is logged in, and
    if not, forward to the Login ViewBean. However, I need to determine
    what page/viewbean the request is attempting to access so I can let it
    pass through if it is accessing the Login viewbean and to forward to
    the requested view once the user is logged in. What is the best way to
    do this? I see no obvious uitility in the javadocs
    TIA
    For more information about JATO, including download information, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

    I guess what I am thinking about doing is capturing the requested URL,
    i.e. /appname/modulename/RequestName. In the onBeforeRequest(). I
    would then check to see if the user is logged in, and if not, set the
    URL in the session(or page session of the Login bean) and forward to
    the Login viewbean using the viewbean manager. Inside the login view
    in the handleSubmit() method I would authenticate the user and then
    get the URL out of the session (or pagesession). I would then
    magically get the ViewBean/Command object for the URL or otherwise
    "forward the request" as if the user had typed in
    /appname/modulename/RequestName, which is the behavior I am trying to
    acheive.
    It turns out I cannot forward in the onBeforeRequest() as it will
    output the viewbean and then continue to process the request which in
    turn trys to do a RequestDispatcher().forward after data has been
    written to the stream which does not bode well with the servlet
    container. Thus, it appears I have no control of the request in the
    onBeforeRequest() method. Is this correct?
    In light of this new observation I am now going to create a base view
    class that all views will extend from and override the
    onSecurityCheck() method to forward to my login bean. If I can't find
    any other way, I will get the URL from the page session and do a
    response.sendRedirect() to the URL.
    Thanks for the help!
    --- In iPlanet-JATO@y..., "Craig V. Conover" <craig.conover@s...> wrote:
    The problem is that you don't know what the target view is until it has
    been forwarded to.
    Think about it... the request handling view bean (or command object)has
    the request handler that has the code that will ultimately forward to
    another view bean. This is code that you have written. So, until that
    forwardTo() is invoked, there is no notion of a "target page".
    What you do know is which "page" (view bean) the request is coming from
    (the handling view bean or command class). You can get this from the
    HttpServletRequest. The attribute name is "viewBean".
    So you can get the view bean name by doing the following inonBeforeRequest:
    >
    <HttpServletRequest>.getAttribute("viewBean");
    But I suspect this is not going to solve your current issue.
    You could add the target page name to the page session. If there ismore
    than one possible target page, it might get a little more involved.
    Let me know if the use of page session needs further explanation.
    c

  • Re: [iPlanet-JATO] Re: Href click & tiled view display

    Srinivas--
    Remember, attachments don't come through on the forum. Please send them to
    the jatoteam@e... alias.
    Todd
    ----- Original Message -----
    From: "Srinivas Chikkam" <srinivas.chikkam@w...>
    Sent: Thursday, July 19, 2001 5:26 AM
    Subject: [iPlanet-JATO] Re: Href click & tiled view display
    Todd,
    I'm calling resetTileIndex() in the begin display of the tiled views.
    I'm attaching the code with this mail.
    Outer tile: pgModelDistributionrMultiplePayeesTiledView
    inner tile: pgModelDistributionrPayeeDetailsTiledView
    Yes, Matt's mail helped me in resolving the first problem (submitting
    the form on href click).
    I have replaced the href from
    <a
    href="../Participant/pgModelDistribution?pgModelDistribution.linkNetDistribu
    tion=&pageAttributes=">
    $1,000 </a>
    to
    $1,000
    and added a new javascript method as below:
    function netDistFunc()
    val = document.forms[0].elements["pageAttributes"].value;
    _url =
    "../Participant/pgModelDistribution?pgModelDistribution.linkNetDistribution=
    &pageAttributes="+val;
    >
    document.forms[0].method = "post";
    document.forms[0].action = _url;
    document.forms[0].submit();
    return false;
    Now, I'm able to get the data entered by the user.
    Thanks
    Srinivas
    Message: 2
    Date: Wed, 18 Jul 2001 04:03:51 -0600
    From: "Todd Fast" <toddwork@c...>
    Subject: Re: Digest Number 157
    Srinivas--
    From where are you calling these methods, what event? Maybe you shouldsend
    me the code for your nested tiled views--that's probably the easiest way
    for
    me to understand what's happening. Also, were any of Matt's
    suppositions
    correct?
    Todd
    The Information contained and transmitted by this E-MAIL is proprietary to
    Wipro Limited and is intended for use only by the individual or entity towhich
    it is addressed, and may contain information that is privileged,confidential or
    exempt from disclosure under applicable law. If this is a forwardedmessage,
    the content of this E-MAIL may not have been sent with the authority ofthe
    Company. If you are not the intended recipient, an agent of the intended
    recipient or a person responsible for delivering the information to thenamed
    recipient, you are notified that any use, distribution, transmission,printing,
    copying or dissemination of this information in any way or in any manneris
    strictly prohibited. If you have received this communication in error,please
    delete this mail & notify us immediately at mailadmin@w...
    [Non-text portions of this message have been removed]
    [email protected]

    Srinivas--
    Remember, attachments don't come through on the forum. Please send them to
    the jatoteam@e... alias.
    Todd
    ----- Original Message -----
    From: "Srinivas Chikkam" <srinivas.chikkam@w...>
    Sent: Thursday, July 19, 2001 5:26 AM
    Subject: [iPlanet-JATO] Re: Href click & tiled view display
    Todd,
    I'm calling resetTileIndex() in the begin display of the tiled views.
    I'm attaching the code with this mail.
    Outer tile: pgModelDistributionrMultiplePayeesTiledView
    inner tile: pgModelDistributionrPayeeDetailsTiledView
    Yes, Matt's mail helped me in resolving the first problem (submitting
    the form on href click).
    I have replaced the href from
    <a
    href="../Participant/pgModelDistribution?pgModelDistribution.linkNetDistribu
    tion=&pageAttributes=">
    $1,000 </a>
    to
    $1,000
    and added a new javascript method as below:
    function netDistFunc()
    val = document.forms[0].elements["pageAttributes"].value;
    _url =
    "../Participant/pgModelDistribution?pgModelDistribution.linkNetDistribution=
    &pageAttributes="+val;
    >
    document.forms[0].method = "post";
    document.forms[0].action = _url;
    document.forms[0].submit();
    return false;
    Now, I'm able to get the data entered by the user.
    Thanks
    Srinivas
    Message: 2
    Date: Wed, 18 Jul 2001 04:03:51 -0600
    From: "Todd Fast" <toddwork@c...>
    Subject: Re: Digest Number 157
    Srinivas--
    From where are you calling these methods, what event? Maybe you shouldsend
    me the code for your nested tiled views--that's probably the easiest way
    for
    me to understand what's happening. Also, were any of Matt's
    suppositions
    correct?
    Todd
    The Information contained and transmitted by this E-MAIL is proprietary to
    Wipro Limited and is intended for use only by the individual or entity towhich
    it is addressed, and may contain information that is privileged,confidential or
    exempt from disclosure under applicable law. If this is a forwardedmessage,
    the content of this E-MAIL may not have been sent with the authority ofthe
    Company. If you are not the intended recipient, an agent of the intended
    recipient or a person responsible for delivering the information to thenamed
    recipient, you are notified that any use, distribution, transmission,printing,
    copying or dissemination of this information in any way or in any manneris
    strictly prohibited. If you have received this communication in error,please
    delete this mail & notify us immediately at mailadmin@w...
    [Non-text portions of this message have been removed]
    [email protected]

  • RE: [iPlanet-JATO] Href click & tiled view display

    Srinivas,
    I hope that I am not oversimplifying your first question; repost if I do not
    answer your question. Independent of JATO, HTML Form button sumbits will
    include the scraping of data off the form input fields; the data will passed
    as part of the body of the HTTP request. Therefore, you would expect to
    receive all your inputs during the Button submit. In the case of a button,
    a HTTP POST request is invoked. Href clicks, only submit the NVPs which are
    encoded on the HREF URL. Therefore, it is impossible (under normal
    circumstances) to retrieve the inputs from the FORM during the Href click.
    In the case of a Href, a HTTP GET request is invoked. Some customers have
    used a pattern in which Javascript is used to capture the Href onClick()
    event to perform some runtime modifications to the HREF URL before the HTTP
    GET request is submitted. I recommend to always have the LogProxy2 utility
    running during development so that the HTTP requests and repsonses can be
    debugged. If you setup the LogProxy2 (downloadable from this Group's Files
    repository) then you would see the HTTP requests in the LogProxy2's console
    window.
    TiledView question: Remember, each TiledView requires a "primary
    DatasetModel" which it uses for iteration of the tiles. It can be
    confusing, but the API call of
    <ContainerView>.getDefaultModel()
    has no relation to the implementation class called DefaultModel. See the
    Javadoc (excerp below)
    /migtoolbox-1.1.1/doc/jato/api/com/iplanet/jato/view/ContainerView.html#getD
    efaultModel()
    "Returns this view's default model. The default model is typically used by
    DisplayField children for default value storage (if they are not bound to
    any other model). This method should always return a valid model instance.
    Note that the default model need not be an actual instance of DefaultModel,
    although this is usually the case."
    Both of your TiledView's (inner and outer) are ContainerViews, each having
    their own property for [get/set]DefaultModel(). Likewise, the ViewBean
    parent of the outer TiledView is a ContainerView as well. With these facts
    in mind, consider the behavior of the ModelManager. The ModelManager will
    ensure that only once instance of specifically named model will be provided
    during a request scope. Therefore, everytime that you make a call to
    <ModelManager>.getModel(SomeModel.class)
    no matter how many times you make this call during a request, the
    ModelManager will ensure that you get the same object reference back.
    Implicitly, you are asking for a Model with the exclusive name of
    <ModelManager>.getDefaultModelInstanceName(SomeModel.class)
    I believe that your problem is that you have the Primary Model of both the
    inner and outer TiledView's set to the same instance of the DefaultModel
    class. Therefore, the TiledViews are tripping over each other because they
    are using the same Primary model. What I would do is change the constructor
    of each TiledView to set an exclusive Primary model
    // add to constructor of outer TileView
    setPrimaryModel(getModelI(DefaultModel.class,"outer")
    // add to constructor of inner TileView
    setPrimaryModel(getModelI(DefaultModel.class,"inner")
    remember to set the "size" of the Primary Model appropriately in the
    beginDisplay() event of each TiledView before calling super.beginDisplay()
    matt
    -----Original Message-----
    From: Srinivas Chikkam [mailto:<a href="/group/SunONE-JATO/post?protectID=061212020185082096169232190043244089032032196034013195172049230091142254099102">srinivas.chikkam@w...</a>]
    Sent: Tuesday, July 17, 2001 7:36 AM
    Subject: [iPlanet-JATO] Href click & tiled view display
    Hi,
    I'm facing the following two problems in JATO. Your help will be
    appreciated.
    1) Clicking a HREF.
    I have a button and a href in a page. When I submit the page by
    clicking the button, I'm able to
    get all the user entered data (form elements) in handler method.
    However, when I click
    the href and I try to retrieve the data entered by the user in my
    corresponding handler method, I'm
    getting blank values.
    How would I be able to get the user entered data upon clicking of a href
    ? I'm copying the sample
    code for your reference.
    // This returns me 5 values entered in the 5 tiles by the user.
    public void handleBButtonRequest(RequestContext req)
    throws ServletException, IOException
    try
    System.out.println("button clicked..");
    pgSampleTiledView tiledView = getSampleTile();
    System.out.println("\n\n\n\n@@@@@@@@@@@ No of tiles >>>
    "+tiledView.getNumTiles());
    int n = tiledView.getNumTiles();
    for (int i=0; i<n; i++)
    tiledView.setTileIndex(i);
    System.out.println(i+".
    "+tiledView.getTbValue().getValue().toString());
    this.forwardTo(req);
    catch (Exception ex)
    ex.printStackTrace();
    // This returns me 0 tiles and doesn't get into for loop
    public void handleLinkModifyDistributionRequest(RequestContext req )
    throws ServletException, IOException
    try
    System.out.println("href clicked..");
    pgSampleTiledView tiledView = getSampleTile();
    System.out.println("\n\n\n\n@@@@@@@@@@@ No of tiles >>>
    "+tiledView.getNumTiles());
    int n = tiledView.getNumTiles();
    for (int i=0; i<n; i++)
    tiledView.setTileIndex(i);
    System.out.println(i+".
    "+tiledView.getTbValue().getValue().toString());
    this.forwardTo(req);
    catch (Exception ex)
    ex.printStackTrace();
    2) Tiled view display
    I have tiled view inside another tiled view. Based upon the data
    retrieved from the database, lets say, the outer tile needs to be
    displayed twice and the inner tile 3 times and 1 time.
    For Ex: Lets say, the desired output from these tiled views is as
    follows
    STOCK INVESTMENT
    stock name1
    stock name2
    stock name3
    OTHER INVESTMENT
    other investment1
    The outer tiled view displays the investment type headings (STOCK
    INVESTMENT or OTHER INVESTMENT) and inner tile
    displays the actual stock names or the other investment names. Both
    the tile views are bound to a default model. In the begin display
    of these tiled view I'm setting the size of the model as
    getPrimaryModel.setSize(requiredsize).
    If i display 3 records in the inner tiled view in the first iteration
    and i try to display 1 record in the second iteration, it displays 3
    records
    properly the first time but it doesn't display any records second
    time. super.nextTile() returns false right away second time.
    But If I try to display 1 record in the first iteration and 3 records in
    the second iteration as below, it works fine.
    STOCK INVESTMENT
    stock name1
    OTHER INVESTMENT
    other investment1
    other investment2
    other investment3
    Please let me know what could be the problem.
    Thanks
    ~ Srinivas
    The Information contained and transmitted by this E-MAIL is
    proprietary to
    Wipro Limited and is intended for use only by the individual or
    entity to which
    it is addressed, and may contain information that is privileged,
    confidential or
    exempt from disclosure under applicable law. If this is a
    forwarded message,
    the content of this E-MAIL may not have been sent with the
    authority of the
    Company. If you are not the intended recipient, an agent of the intended
    recipient or a person responsible for delivering the information
    to the named
    recipient, you are notified that any use, distribution,
    transmission, printing,
    copying or dissemination of this information in any way or in any
    manner is
    strictly prohibited. If you have received this communication in
    error, please
    delete this mail & notify us immediately at mailadmin@w...
    [Non-text portions of this message have been removed]
    [email protected]

    should read
    // add to constructor of outer TileView
    setPrimaryModel(getModel(DefaultModel.class,"outer");
    // add to constructor of inner TileView
    setPrimaryModel(getModel(DefaultModel.class,"inner");
    matt
    -----Original Message-----
    From: Matthew Stevens [mailto:<a href="/group/SunONE-JATO/post?protectID=029166114165042198028082000056130080177026031196061123241150194211220076086020224">matthew.stevens@e...</a>]
    Sent: Tuesday, July 17, 2001 9:25 AM
    Subject: RE: [iPlanet-JATO] Href click & tiled view display
    Srinivas,
    I hope that I am not oversimplifying your first question; repost
    if I do not
    answer your question. Independent of JATO, HTML Form button sumbits will
    include the scraping of data off the form input fields; the data
    will passed
    as part of the body of the HTTP request. Therefore, you would expect to
    receive all your inputs during the Button submit. In the case of
    a button,
    a HTTP POST request is invoked. Href clicks, only submit the
    NVPs which are
    encoded on the HREF URL. Therefore, it is impossible (under normal
    circumstances) to retrieve the inputs from the FORM during the Href click.
    In the case of a Href, a HTTP GET request is invoked. Some customers have
    used a pattern in which Javascript is used to capture the Href onClick()
    event to perform some runtime modifications to the HREF URL
    before the HTTP
    GET request is submitted. I recommend to always have the
    LogProxy2 utility
    running during development so that the HTTP requests and repsonses can be
    debugged. If you setup the LogProxy2 (downloadable from this
    Group's Files
    repository) then you would see the HTTP requests in the
    LogProxy2's console
    window.
    TiledView question: Remember, each TiledView requires a "primary
    DatasetModel" which it uses for iteration of the tiles. It can be
    confusing, but the API call of
    <ContainerView>.getDefaultModel()
    has no relation to the implementation class called DefaultModel. See the
    Javadoc (excerp below)
    /migtoolbox-1.1.1/doc/jato/api/com/iplanet/jato/view/ContainerView
    .html#getD
    efaultModel()
    "Returns this view's default model. The default model is typically used by
    DisplayField children for default value storage (if they are not bound to
    any other model). This method should always return a valid model instance.
    Note that the default model need not be an actual instance of
    DefaultModel,
    although this is usually the case."
    Both of your TiledView's (inner and outer) are ContainerViews, each having
    their own property for [get/set]DefaultModel(). Likewise, the ViewBean
    parent of the outer TiledView is a ContainerView as well. With
    these facts
    in mind, consider the behavior of the ModelManager. The ModelManager will
    ensure that only once instance of specifically named model will
    be provided
    during a request scope. Therefore, everytime that you make a call to
    <ModelManager>.getModel(SomeModel.class)
    no matter how many times you make this call during a request, the
    ModelManager will ensure that you get the same object reference back.
    Implicitly, you are asking for a Model with the exclusive name of
    <ModelManager>.getDefaultModelInstanceName(SomeModel.class)
    I believe that your problem is that you have the Primary Model of both the
    inner and outer TiledView's set to the same instance of the DefaultModel
    class. Therefore, the TiledViews are tripping over each other
    because they
    are using the same Primary model. What I would do is change the
    constructor
    of each TiledView to set an exclusive Primary model
    // add to constructor of outer TileView
    setPrimaryModel(getModelI(DefaultModel.class,"outer")
    // add to constructor of inner TileView
    setPrimaryModel(getModelI(DefaultModel.class,"inner")
    remember to set the "size" of the Primary Model appropriately in the
    beginDisplay() event of each TiledView before calling super.beginDisplay()
    matt
    -----Original Message-----
    From: Srinivas Chikkam [mailto:<a href="/group/SunONE-JATO/post?protectID=061212020185082096169232190043244089032032196034013195172049230091142254099102">srinivas.chikkam@w...</a>]
    Sent: Tuesday, July 17, 2001 7:36 AM
    Subject: [iPlanet-JATO] Href click & tiled view display
    Hi,
    I'm facing the following two problems in JATO. Your help will be
    appreciated.
    1) Clicking a HREF.
    I have a button and a href in a page. When I submit the page by
    clicking the button, I'm able to
    get all the user entered data (form elements) in handler method.
    However, when I click
    the href and I try to retrieve the data entered by the user in my
    corresponding handler method, I'm
    getting blank values.
    How would I be able to get the user entered data upon clicking of a href
    ? I'm copying the sample
    code for your reference.
    // This returns me 5 values entered in the 5 tiles by the user.
    public void handleBButtonRequest(RequestContext req)
    throws ServletException, IOException
    try
    System.out.println("button clicked..");
    pgSampleTiledView tiledView = getSampleTile();
    System.out.println("\n\n\n\n@@@@@@@@@@@ No of tiles >>>
    "+tiledView.getNumTiles());
    int n = tiledView.getNumTiles();
    for (int i=0; i<n; i++)
    tiledView.setTileIndex(i);
    System.out.println(i+".
    "+tiledView.getTbValue().getValue().toString());
    this.forwardTo(req);
    catch (Exception ex)
    ex.printStackTrace();
    // This returns me 0 tiles and doesn't get into for loop
    public void handleLinkModifyDistributionRequest(RequestContext req )
    throws ServletException, IOException
    try
    System.out.println("href clicked..");
    pgSampleTiledView tiledView = getSampleTile();
    System.out.println("\n\n\n\n@@@@@@@@@@@ No of tiles >>>
    "+tiledView.getNumTiles());
    int n = tiledView.getNumTiles();
    for (int i=0; i<n; i++)
    tiledView.setTileIndex(i);
    System.out.println(i+".
    "+tiledView.getTbValue().getValue().toString());
    this.forwardTo(req);
    catch (Exception ex)
    ex.printStackTrace();
    2) Tiled view display
    I have tiled view inside another tiled view. Based upon the data
    retrieved from the database, lets say, the outer tile needs to be
    displayed twice and the inner tile 3 times and 1 time.
    For Ex: Lets say, the desired output from these tiled views is as
    follows
    STOCK INVESTMENT
    stock name1
    stock name2
    stock name3
    OTHER INVESTMENT
    other investment1
    The outer tiled view displays the investment type headings (STOCK
    INVESTMENT or OTHER INVESTMENT) and inner tile
    displays the actual stock names or the other investment names. Both
    the tile views are bound to a default model. In the begin display
    of these tiled view I'm setting the size of the model as
    getPrimaryModel.setSize(requiredsize).
    If i display 3 records in the inner tiled view in the first iteration
    and i try to display 1 record in the second iteration, it displays 3
    records
    properly the first time but it doesn't display any records second
    time. super.nextTile() returns false right away second time.
    But If I try to display 1 record in the first iteration and 3 records in
    the second iteration as below, it works fine.
    STOCK INVESTMENT
    stock name1
    OTHER INVESTMENT
    other investment1
    other investment2
    other investment3
    Please let me know what could be the problem.
    Thanks
    ~ Srinivas
    The Information contained and transmitted by this E-MAIL is
    proprietary to
    Wipro Limited and is intended for use only by the individual or
    entity to which
    it is addressed, and may contain information that is privileged,
    confidential or
    exempt from disclosure under applicable law. If this is a
    forwarded message,
    the content of this E-MAIL may not have been sent with the
    authority of the
    Company. If you are not the intended recipient, an agent of the intended
    recipient or a person responsible for delivering the information
    to the named
    recipient, you are notified that any use, distribution,
    transmission, printing,
    copying or dissemination of this information in any way or in any
    manner is
    strictly prohibited. If you have received this communication in
    error, please
    delete this mail & notify us immediately at mailadmin@w...
    [Non-text portions of this message have been removed]
    [email protected]
    [email protected]

  • Re: [iPlanet-JATO] Re: Retrieving all Values from a Tiled View

    Todd,
    Let me try to explain you this time. I have a text field in a TiledViewBean.
    When I display the page, the text field
    html tag is created with the name="PageDetail.rDetail[0].tbFieldName" say
    five times/rows with same name.
    The html tags look like this.
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    When the form is submitted, I want to get the text field values using the
    method getTbFieldName().getValues() which
    returns an array object[]. This is in case where my TiledViewBean is not
    bound and it is working fine.
    Now in case when my TiledView is bound to a model, it creates the html tags
    as follows.
    <input type=text name="PageDetail.rDetail[0].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[1].tbFieldName" value=""
    maxlength=9 size=13>
    <input type=text name="PageDetail.rDetail[2].tbFieldName" value=""
    maxlength=9 size=13>
    Now when I say getTbFieldName().getValues() it returns only the first
    element values in the object[] and the rest of the
    values are null.
    May be we need to create a utility method do get these values from
    requestContext.
    raju.
    ----- Original Message -----
    From: Todd Fast <toddwork@c...>
    Sent: Saturday, July 07, 2001 3:52 AM
    Subject: Re: [iPlanet-JATO] Re: Retrieving all Values from a Tiled View
    Raju.--
    I wanted to know how the getValues() method works the reason being,
    when the tiled view is NOT bound to a model, it populates all the
    fields with the same name as some thing likeI'm afraid I don't understand your point--can you please clarify? Do you
    mean "value" instead of "name"?
    What are you trying to do? What behavior are you expecting but notseeing?
    >
    Without further clarification, I can say that the setValues() methodsNEVER
    populates data on multiple rows of a (dataset) model, nor does it affect
    multiple fields on the same row. Perhaps what you are seeing is theeffect
    of default values. Model that derive from DefaulModel have the ability to
    carry forward the values set on the first row to other rows in lieu ofdata
    in those other rows. This behavior is for pure convenience and can be
    turned off, and it is turned off for the SQL-based models.
    Todd
    [email protected]

    Hi,
    I wanted to know how the getValues() method works the reason being,
    when the tiled view is NOT bound to a model, it populates all the
    fields with the same name as some thing like
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[0].tbFieldValue
    in which case, the getValues() method works fine.
    But in case where the tiled view is bound to a model, it populates
    with different field names such as,
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[1].tbFieldValue
    in this case, the getValues() doesn't work. Any soultion to this?
    We are using Moko 1.1.1.
    thanks in advance,
    raju.
    --- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
    Does anyone know of is there a single method to get all values of a
    display
    field in a tiled view without having to iterate through all the
    values ie
    resetTileIndex() / nextTile() approach.
    ie Something that returns an Object[] or Vector just like ND returned a
    CspVector. I tried using the getValues() methods but that allways returns
    a
    single element array containing the first element.
    (I think now, that method is used for multi selecteable ListBoxes)Actually, no. We can add this in the next patch, but for now, I'd recommend
    creating a simple utility method to do the iteration on an arbitrary model
    and build the list for you.
    Todd

  • Re: [iPlanet-JATO] Retrieving all Values from a Tiled View

    Does anyone know of is there a single method to get all values of adisplay
    field in a tiled view without having to iterate through all the values ie
    resetTileIndex() / nextTile() approach.
    ie Something that returns an Object[] or Vector just like ND returned a
    CspVector. I tried using the getValues() methods but that allways returnsa
    single element array containing the first element.
    (I think now, that method is used for multi selecteable ListBoxes)Actually, no. We can add this in the next patch, but for now, I'd recommend
    creating a simple utility method to do the iteration on an arbitrary model
    and build the list for you.
    Todd

    Hi,
    I wanted to know how the getValues() method works the reason being,
    when the tiled view is NOT bound to a model, it populates all the
    fields with the same name as some thing like
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[0].tbFieldValue
    in which case, the getValues() method works fine.
    But in case where the tiled view is bound to a model, it populates
    with different field names such as,
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[1].tbFieldValue
    in this case, the getValues() doesn't work. Any soultion to this?
    We are using Moko 1.1.1.
    thanks in advance,
    raju.
    --- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
    Does anyone know of is there a single method to get all values of a
    display
    field in a tiled view without having to iterate through all the
    values ie
    resetTileIndex() / nextTile() approach.
    ie Something that returns an Object[] or Vector just like ND returned a
    CspVector. I tried using the getValues() methods but that allways returns
    a
    single element array containing the first element.
    (I think now, that method is used for multi selecteable ListBoxes)Actually, no. We can add this in the next patch, but for now, I'd recommend
    creating a simple utility method to do the iteration on an arbitrary model
    and build the list for you.
    Todd

  • Re: [iPlanet-JATO] Finding the database column length

    This is the technique I would recommend. If you'd like to wrap this
    mechanism up in the model class itself, create a subclass of QueryModelBase
    that provides such a method and use that as the base class for all your
    QueryModels.
    Todd
    ----- Original Message -----
    From: "Craig V. Conover" <craig.conover@S...>
    Sent: Friday, October 19, 2001 12:15 PM
    Subject: Re: [iPlanet-JATO] Finding the database column length
    Chidu,
    The result set that you get back is a JDBC ResultSet, not a "JATO" resultset. In ND, everything was wrapped in a "spider" data
    structure, and therefore, difficult to get to the underlying datastructure, in many cases. In some case ND made it easier to do
    certain things, and in other ways, made it more difficult or impossible(like seeing the SQL for an insert, update, delete).
    >
    Anyway, looking at the java.sql package, you can do this.
    java.sql.ResultSet rs = <jata-model>.getResultSet();
    java.sql.ResultSetMetaData rsMeta = rs.getMetaData();
    // not sure if this is what you need, but it was the closest thing I couldfind
    int colSize = rsMeta.getColumnDisplaySize(int column);
    There are numerous other methods in the ResultSetMetaData interface thatmay be of use as well.
    >
    c
    chidusv@y... wrote:
    Hi,
    How do I find out the length of a database column in a data model? In
    NetDynamics, we can do dataobject.getDataField(<field
    name>).getColumnLength(). Is it possible to achieve this in JATO
    without using a resultset?
    Thanks,
    Chidu.
    For more information about JATO, please visit
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    >>
    >>
    >>
    >>
    >
    >
    >
    For more information about JATO, please visit
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    >
    >
    >
    >
    >
    >
    >

    This is the technique I would recommend. If you'd like to wrap this
    mechanism up in the model class itself, create a subclass of QueryModelBase
    that provides such a method and use that as the base class for all your
    QueryModels.
    Todd
    ----- Original Message -----
    From: "Craig V. Conover" <craig.conover@S...>
    Sent: Friday, October 19, 2001 12:15 PM
    Subject: Re: [iPlanet-JATO] Finding the database column length
    Chidu,
    The result set that you get back is a JDBC ResultSet, not a "JATO" resultset. In ND, everything was wrapped in a "spider" data
    structure, and therefore, difficult to get to the underlying datastructure, in many cases. In some case ND made it easier to do
    certain things, and in other ways, made it more difficult or impossible(like seeing the SQL for an insert, update, delete).
    >
    Anyway, looking at the java.sql package, you can do this.
    java.sql.ResultSet rs = <jata-model>.getResultSet();
    java.sql.ResultSetMetaData rsMeta = rs.getMetaData();
    // not sure if this is what you need, but it was the closest thing I couldfind
    int colSize = rsMeta.getColumnDisplaySize(int column);
    There are numerous other methods in the ResultSetMetaData interface thatmay be of use as well.
    >
    c
    chidusv@y... wrote:
    Hi,
    How do I find out the length of a database column in a data model? In
    NetDynamics, we can do dataobject.getDataField(<field
    name>).getColumnLength(). Is it possible to achieve this in JATO
    without using a resultset?
    Thanks,
    Chidu.
    For more information about JATO, please visit
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    >>
    >>
    >>
    >>
    >
    >
    >
    For more information about JATO, please visit
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    >
    >
    >
    >
    >
    >
    >

  • Re: [iPlanet-JATO] TiledView - getting Values

    Kostas--
    This is because in TiledViewBase.mapRequestParameters(), calling
    getChild(String name, int tile) before setting the values in the request,
    will not set the location for the models other that the primary model-
    effectively we are only setting one value (more that once if there aremany
    values being submitted). So we get the value of the last value in thetiled
    view. This is because getChild only changes the location on the primary
    model. Which is why I the following code change worked.Ah, I admit I didn't connect the problem to this. Thanks ver much for
    clarifying.
    As you stated it might be better to add a place holder for all other
    auxillary models and keep them in sync with the primary model.Agreed, this sounds like the correct approach. My unstated assumption was
    that all location changes to the primary model would also occur on the
    auxiliary models, so that would mean that the mapRequestParameters() method
    would then work as intended.
    How about making the primary model the controlling model. We would have to
    "prime" the other models to ensure they all have the same number of rowsas
    the highest model for the request. Otherwise we will the followingsituation
    I detailed in the prevoius email:That works for me, but it will no doubt result in some strange behavior for
    someone down the road. I'll see what's possible about syncing primary and
    auxiliary models more explicitly, or at least checking for the situation
    where the primary has more rows than the other models.
    This way developers would not have to determine if a DisplayField is bound
    to non primary model and do additional processing. I suppose it is aslight
    design question as well. Enforcing a MVC approach is about going to the to
    the Model to get you data. Onthe other hand NetDynamics just allowed youthe
    get the value(s) of a field regardless of the Data Object it was or wasn't
    bound to.Right, and I think it's important for JATO developers to preserve both techn
    iques. The nice thing the technique of accessing the fields directly gives
    you is the ability to obtain data in a non-model-specific way. This can be
    just as valuable as providing model-only interactions.
    Thanks for your feedback Todd. Let me know what you think.Same to you. I hope others on the list have similar suggestions that they
    share with us. I think the above approach is sound and I'll be putting it in
    for the next patch version, 1.1.2. If anyone has any final comments, please
    let me know ASAP.
    Todd

    Hi,
    I wanted to know how the getValues() method works the reason being,
    when the tiled view is NOT bound to a model, it populates all the
    fields with the same name as some thing like
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[0].tbFieldValue
    in which case, the getValues() method works fine.
    But in case where the tiled view is bound to a model, it populates
    with different field names such as,
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[1].tbFieldValue
    in this case, the getValues() doesn't work. Any soultion to this?
    We are using Moko 1.1.1.
    thanks in advance,
    raju.
    --- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
    Does anyone know of is there a single method to get all values of a
    display
    field in a tiled view without having to iterate through all the
    values ie
    resetTileIndex() / nextTile() approach.
    ie Something that returns an Object[] or Vector just like ND returned a
    CspVector. I tried using the getValues() methods but that allways returns
    a
    single element array containing the first element.
    (I think now, that method is used for multi selecteable ListBoxes)Actually, no. We can add this in the next patch, but for now, I'd recommend
    creating a simple utility method to do the iteration on an arbitrary model
    and build the list for you.
    Todd

  • RE: [iPlanet-JATO] EJB in iMT

    Matt,
    Thanks for your clarifications.That helps a lot.
    We have found in a lot of cases, that your new components can be
    implemented as JATO ModelsI don't understand this.Is it that EJB acts as the Data Model or something
    Thanks,
    Gajendran.
    "Matthew Stevens"
    Subject: RE: [iPlanet-JATO]
    EJB in iMT
    10/30/01 07:34 PM
    Please respond to
    iPlanet-JATO
    Gajendran,
    The iMT for NetDynamics does not current have any translation requirement
    for EJBs. If you have a ND 3.x or ND 4.x application then you have no
    pre-existing EJBs. ND 5.0 provided an EJB 1.0 container for Session Beans
    but the Migration leaves the EJBs untouched. The migration path for ND 5.0
    EJBs to J2EE EJBs is clear - it simply requires a recompiling and packaging
    and tweaking. I have done this at some customer sites and it is very
    straight forward. In many cases, you may find that your choice of an EJB
    implementation does not truely take advantage of the features of the EJB
    container and you EJBs are simply business objects (stateless and
    stateful).
    We have found that migrating stateless and stateful ND 5.0 EJBs to JATO
    Models is very simple and greatly improves the performance in many cases.
    Now that your ND application is migated to J2EE/JATO you can easily add
    EJBs
    to the application; JATO does not prevent this in any way. Some customers
    are even adapting existing or 3rd party EJBs to JATO Models interfaces, but
    this is not necessary. Your EJBs will be packaged separately in JAR file
    and combined with JATO Application WAR file in an EAR file. We recommend
    using a good tool like Forte to generate your EJBs. I personally suggest
    that you carefully plan and analyze your requirements before moving forward
    with the EJBs. Please make sure that you your new components 'need' the
    features of the EJB container/framework. If you need an Entity bean then
    use it. We have found in a lot of cases, that your new components can be
    implemented as JATO Models. It all depends on the dynamics of the
    application and constitution of your data.
    matt
    -----Original Message-----
    From: gajendran.gopinathan@i...
    [mailto:<a href="/group/SunONE-JATO/post?protectID=123166177056078154218098066036192063041102166009043241114211116056004136218164200193244096076095219">gajendran.gopinathan@i...</a>]
    Sent: Tuesday, October 30, 2001 6:40 AM
    Subject: [iPlanet-JATO] EJB in iMT
    We have migrated an application in ND3.0 to J2EE using iMT 1.1.1.
    Is there any provision in iMT which could generate EJBs?
    What is the recommended approach towards this?
    Thanks,
    Gajendran
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    ------------------------Disclaimer------------------------
    The views of the author may not necessarily reflect those
    of the Company. All liability is excluded to the extent
    permitted by law for any claims arising as a result of the
    use of this medium to transmit information by or to
    IT Solutions (India) Pvt. Ltd.
    We have taken precautions to minimize the risk of
    transmitting software viruses, but we advise you to
    carry out your own virus checks on any attachment to
    this message. We cannot accept liability for any loss or
    damage caused by software viruses.
    ------------------------Disclaimer------------------------

    Matt,
    Thanks for your clarifications.That helps a lot.
    We have found in a lot of cases, that your new components can be
    implemented as JATO ModelsI don't understand this.Is it that EJB acts as the Data Model or something
    Thanks,
    Gajendran.
    "Matthew Stevens"
    Subject: RE: [iPlanet-JATO]
    EJB in iMT
    10/30/01 07:34 PM
    Please respond to
    iPlanet-JATO
    Gajendran,
    The iMT for NetDynamics does not current have any translation requirement
    for EJBs. If you have a ND 3.x or ND 4.x application then you have no
    pre-existing EJBs. ND 5.0 provided an EJB 1.0 container for Session Beans
    but the Migration leaves the EJBs untouched. The migration path for ND 5.0
    EJBs to J2EE EJBs is clear - it simply requires a recompiling and packaging
    and tweaking. I have done this at some customer sites and it is very
    straight forward. In many cases, you may find that your choice of an EJB
    implementation does not truely take advantage of the features of the EJB
    container and you EJBs are simply business objects (stateless and
    stateful).
    We have found that migrating stateless and stateful ND 5.0 EJBs to JATO
    Models is very simple and greatly improves the performance in many cases.
    Now that your ND application is migated to J2EE/JATO you can easily add
    EJBs
    to the application; JATO does not prevent this in any way. Some customers
    are even adapting existing or 3rd party EJBs to JATO Models interfaces, but
    this is not necessary. Your EJBs will be packaged separately in JAR file
    and combined with JATO Application WAR file in an EAR file. We recommend
    using a good tool like Forte to generate your EJBs. I personally suggest
    that you carefully plan and analyze your requirements before moving forward
    with the EJBs. Please make sure that you your new components 'need' the
    features of the EJB container/framework. If you need an Entity bean then
    use it. We have found in a lot of cases, that your new components can be
    implemented as JATO Models. It all depends on the dynamics of the
    application and constitution of your data.
    matt
    -----Original Message-----
    From: gajendran.gopinathan@i...
    [mailto:<a href="/group/SunONE-JATO/post?protectID=123166177056078154218098066036192063041102166009043241114211116056004136218164200193244096076095219">gajendran.gopinathan@i...</a>]
    Sent: Tuesday, October 30, 2001 6:40 AM
    Subject: [iPlanet-JATO] EJB in iMT
    We have migrated an application in ND3.0 to J2EE using iMT 1.1.1.
    Is there any provision in iMT which could generate EJBs?
    What is the recommended approach towards this?
    Thanks,
    Gajendran
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    ------------------------Disclaimer------------------------
    The views of the author may not necessarily reflect those
    of the Company. All liability is excluded to the extent
    permitted by law for any claims arising as a result of the
    use of this medium to transmit information by or to
    IT Solutions (India) Pvt. Ltd.
    We have taken precautions to minimize the risk of
    transmitting software viruses, but we advise you to
    carry out your own virus checks on any attachment to
    this message. We cannot accept liability for any loss or
    damage caused by software viruses.
    ------------------------Disclaimer------------------------

  • Re: [iPlanet-JATO] Re: onSecurityCheckFailedEvent & & onSessionTimeoutEvent

    My mistake. Thanks for the clarification, Craig.
    Todd
    ----- Original Message -----
    From: "Craig V. Conover" <craig.conover@s...>
    Sent: Friday, January 04, 2002 11:14 AM
    Subject: Re: [iPlanet-JATO] Re: onSecurityCheckFailedEvent & &
    onSessionTimeoutEvent
    Alex,
    In addition to Todd saying that the ND security object "is nothing morethan a
    sessionable object...", remember that the security object did nothing morethan
    retrieve the user profile from some persistent store: a database or athird party
    API. So the security object was just a very specialized model (a dataobject in ND
    terms, of course), although it need not be a model, it could just be anarbitrary
    Java class, whatever works best.
    Once the security object was triggered to perform a user profile lookup,the
    profile was stored in an instance of CSpUserProfile and kept in the user's
    session. The project object was then the object that was responsible forchecking
    the user profile for privileges, previous pages, and db logins and such.As Todd
    explained, the ViewBean API now does the security check (as opposed toJATO's
    module servlet, or ND's project object), so extending ViewBeanBase andoverriding
    securityCheck is a convenient way to mimic ND's security hooks. You couldeven
    override a method or event in the module servlet to do a lookup if youwant a
    greater parallel to ND, but this is unneccessary. Either way, the securitycheck
    is performed before the "page" is "loaded".
    c
    Todd Fast wrote:
    Agreed. This is partly why we have never added such a feature to JATO
    (though we've talked about it many many times), because it seemed too
    prescriptive and possibly at odds with the other solutions people favor.
    We're still on the fence. We want to add it, but feel it'll take a fair
    bit
    of design to do properly and extensibly.
    However, realize that the ND security object is nothing more than a
    sessionable object with slots for username, password, and priveleges.This
    is almost trivially easy to replicate on your own, with a small additionof
    code to automatically handle lifecycle and security checking. It wouldbe
    extremely easy to create a subclass of ViewBeanBase that would overridethe
    securityCheck() method to check the state of a sessioned "user profile"
    object. Add to the ViewBean a declared set of "privelege" strings, andyou
    can check the profile object against those required.
    I feel I'm being unclear--do you see where I'm going?
    Todd
    ----- Original Message -----
    From: "njdoe123" <first.us@a...>
    Sent: Friday, December 28, 2001 6:44 AM
    Subject: [iPlanet-JATO] Re: onSecurityCheckFailedEvent & &
    onSessionTimeoutEvent
    Hi,
    We used a lot of "security object" in netD projects. Each used
    username, password and privilege for login. After migration,
    we have to hand code all login codes manually. Session control
    is pretty standard in j2ee, i'm wondering whether there is a
    best practice example available for netD login feature.
    Since security was one of the outstanding feature in netD, it will
    be a great idea to have a stadard plugin to support this feature
    after migration. I wish v1.2 could supply a direction, although
    there are several login methods in j2ee.
    Thanks,
    Alex Lin
    --- In iPlanet-JATO@y..., "Todd Fast" <todd.fast@s...> wrote:
    Small correction: the name of the method in ViewBean is"securityCheck()",
    not "onSecurityCheck()". The method would've been better named
    "checkSecurity()", but too late now. <grin>
    Todd
    ----- Original Message -----
    From: "Craig V. Conover" <craig.conover@s...>
    Sent: Monday, December 17, 2001 12:47 PM
    Subject: Re: [iPlanet-JATO] onSecurityCheckFailedEvent & &
    onSessionTimeoutEvent
    The iMT has a ND to JATO/J2EE mapping document that covers ND
    events and
    common ND class/variable/method mapping.
    To answer you two questions below:
    onSessionTimoutEvent is onSessionTimeout in JATO and can beoverriden in
    any class the subclasses JATO'scom.iplanet.jato.ApplicationServletBase.
    Typically, this is done in you application servlet class which allof
    your module servlets in the application will subclass.
    onSecurityCheckFailedEvent is an ND specific event that istriggered
    when a Security exception is thrown in ND. In JATO, a
    SecurityCheckException is thrown when the default securitychecking in
    JATO fails. JATO's default security is to make sure theRequestContext
    object is not null. This is done in the ViewBean API. The
    onSecurityCheck event in JATO allows you to hook into thisbehavior and
    write your own security checking, or hook in a third party API.You can
    call super so that you still get the RequextContext null check.
    You should create a "non-visual" ViewBean (behavior only) thatoverrides
    the onSecurityCheck event, and all other ViewBeans in yourapplication
    extend it to inherit this security checking behavior.
    You could also hook in the security in your application Servlet by
    overriding one of the events in ApplicationServletBase, like
    onBeforeRequest.
    craig
    njdoe123 wrote:
    Hi,
    We have the following two events (onSecurityCheckFailedEvent
    & onSessionTimeoutEvent) across all ND projects. I guess
    it's pretty common for netdynamics project.
    How do you solve the corresponding issues in j2ee ?
    Is there any example available ?
    Thanks,
    Alex
    //[[SPIDER_EVENT<this_onSecurityCheckFailedEvent>
    public int this_onSecurityCheckFailedEvent
    (CSpProjectSecurityEvent event)
    switch (event.getFailureType() )
    case NEW_SECURITY_CHECK_PRIV_FAILURE_TYPE:
    // do something
    CSpPage loginPage1 = CSpider.getPage("PgLogin");
    CSpString msg1 = new CSpString("Wrong District Code, UserID
    or
    Password. Try again.");
    loginPage1.setDisplayFieldValue("StMsg1", msg1);
    loginPage1.load (false);
    break;
    case SESSION_CONTINUITY_FAILURE_TYPE:
    // do something else
    CSpPage loginPage2 = CSpider.getPage("PgLogin");
    CSpString msg2 = new CSpString("You must login first...");
    loginPage2.setDisplayFieldValue("StMsg1", msg2);
    loginPage2.load (false);
    break;
    return (STOP);
    //]]SPIDER_EVENT<this_onSecurityCheckFailedEvent>
    //[[SPIDER_EVENT<this_onSessionTimeoutEvent>
    public int this_onSessionTimeoutEvent(CSpProjectSessionEventevent)
    CSpString msg3 = new CSpString("You were gone too long - login
    again");
    CSpPage loginPage3 = CSpider.getPage("PgLogin");
    loginPage3.setDisplayFieldValue("StMsg1", msg3);
    // stop any further processing of this original user request
    loginPage3.setDisplayFieldValue("District_ID", newCSpString(""));
    loginPage3.setDisplayFieldValue("User_ID", new CSpString(""));
    loginPage3.setDisplayFieldValue("Password", newCSpString(""));
    loginPage3.load (false);
    return (PROCEED);
    //]]SPIDER_EVENT<this_onSessionTimeoutEvent>
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    Service.
    For more information about JATO, including download information,
    please
    visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, including download information, pleasevisit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, including download information, pleasevisit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

    Thank you - Jin and Todd.
    Will try that.
    Atul
    --- In iPlanet-JATO@y..., Byung Jin Chun <bchun@n...> wrote:
    try using kregedit and modify the key for the jvm args, using the -x
    parameters for the 1.2 runtime
    Jin
    -----Original Message-----
    From: Todd Fast [mailto:<a href="/group/SunONE-JATO/post?protectID=101233080150035167169232031248066208071048">Todd.Fast@S...</a>]
    Sent: Tuesday, February 19, 2002 8:40 PM
    Subject: Re: [iPlanet-JATO] Re: OutOfMemoryError
    Atul--
    Out of curiosity - How do you modify the memory parameters for
    the container's VM ?? I know I should try to do some research but
    figured you may already have some insight and willingness to
    share.
    Please consider this as low priority.It differs by container; I don't remember details of any particular one.
    >
    Todd
    For more information about JATO, including download information, please
    visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    <http://developer.iplanet.com/tech/appserver/framework/index.jsp>
    [Non-text portions of this message have been removed]

  • RE: [iPlanet-JATO] Re: Deployment problem

    Chidu,
    I think that you are mired in the very common confusion of the default
    behavior of the ApplicationServletBase.parsePathInfo() which will determine
    the controlling/handling ViewBean via a URL design pattern. Lets take a look
    at the URL
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.jsp
    is decomposed as follows:
    /NASApp -> well, this is long story but is absolutely necessary, welcome to
    iAS
    /MigtoolboxSampleAppWar -> is the web application name, taken as the name of
    the WAR file when there is no EAR file (this allows the Servlet/JSP
    container to deferences the web application root under
    <ias>/APPS/modules/MigtoolboxSampleAppWar) I think this part of the URL is
    called th Context Path
    /MigtoolboxSample -> is the Servlet Path, and will either directly reference
    or match a Servlet Mapping
    for instance
    <servlet-mapping>
    <servlet-name>MigtoolboxSampleServlet</servlet-name>
    <url-pattern>/MigtoolboxSample/*</url-pattern>
    </servlet-mapping>
    tells the Servlet Container that the Servlet Path
    /MigtoolboxSample
    maps to the Module Servlet MigtoolboxSampleServlet
    This is how EVERY request makes its way to the "front controller" pattern in
    JATO. It is fundamental to JATO Applicatioan that every request pass
    through the ModuleServlet.
    every else on the URL past the Servlet Path is the PATH INFO. Based on this
    understanding, you will see why the
    ApplicationServletBase.parsePathInfo()
    is so important. In parsePathInfo() the PATH INFO is compared to the design
    pattern
    /VIEWBEANNAME*
    to determine the handling ViewBean from the first String Token in the path
    info. For instance, the starting URL of the Sample Application is
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage
    The PATH INFO is [IndexPage]
    and IndexPage[ViewBean] is the handling ViewBean. Therefore, any simiarl
    URL like
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.jsp
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.matt
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.mike
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.chidu
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.XXX
    will all result in the same handling View Bean
    IndexPageViewBean
    It is very important to understand that you CANNOT hit the JATO JSPs
    directly. You must hit the "front controller" ModuleServlet which will
    always delegate control to the handling ViewBean (a la, the "service to
    workers" pattern)
    You can attempt to hit the JSP directly but you need the right J2EE URL
    /NASApp/MigtoolboxSampleAppWar/MigtoolboxSampleApp/MigtoolboxSample/IndexPag
    e.jsp
    this URL will directly hit the JSP. However, you will recieve an error
    because the JATO framework quickly determines that there is no
    RequestContext in the HttpRequest attributes and assumes that the "front
    controller" was bypassed. Try it. You will get ERROR.
    Lets go back to what you are trying to do, place Models and Viewbeans in
    separate directories. I recommend that you move the Models. Models are
    ONLY referenced by TYPE via the ModelManager, the compiler will ensure that
    your code is correct and matches the packages, file locations, import
    statements, etc. ViewBeans, on the other hand are related to the
    ModuleServlet their are contained in and are loaded via type names according
    to a design pattern.
    if you want to separate models and Viewbean then simply move the Model and
    make sure everything compiles.
    you cannot move the ViewBeans
    if you do want to move the JSP peers of the Viewbeans, then you can put them
    anywhere in the web application doc root. When you do, update the
    DEFAULT_DISPLAY_URL as Mike suggested
    matt
    -----Original Message-----
    From: Mike Frisino [mailto:<a href="/group/SunONE-JATO/post?protectID=174176219122158198138082063148231088239026066196217193234150166091061">Michael.Frisino@S...</a>]
    Sent: Thursday, July 26, 2001 10:48 PM
    Subject: Re: [iPlanet-JATO] Re: Deployment problem
    Chidu,
    Did you have it running fine in the original default configuration, before
    you started changing things around? The URL should not access the .jsp
    directly. The URL should look more like this
    "/NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage", without the
    .jsp.
    Also, please read the "Migration Tech Notes" document that is
    linked to the
    main doc index page. There is some information in there related
    to trying to
    run the sample application under iAS (see Tech Note 4 in
    particular, "Note
    on running the iMT "MigtoolboxSample" in iPlanet Application Server )
    ----- Original Message -----
    From: <<a href="/group/SunONE-JATO/post?protectID=219015020150194233215218164140244063078048234051197">chidusv@y...</a>>
    Sent: Thursday, July 26, 2001 7:27 PM
    Subject: [iPlanet-JATO] Re: Deployment problem
    Hi Mike,
    I tried changing the url in all the viewbeans to reflect the new sub-
    directory for the viewbeans(I have placed the jsps and viewbeans in
    a sub-directory under MigtoolboxSampleApp/MigtoolboxSample). But I'm
    still not able to get access to the jsps. I basically see the
    message "GX Error Socket Error Code missing!!" error on the browser
    thrown by iPlanet, but the log doesn't tell me anything. Does the url
    which I give to access the jsp change accordingly, i.e., should I
    give something other
    than /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.jsp.
    If I try to use any other url other
    than /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.jsp, I
    see the FileNotFoundException in the log.
    I guess I'm still missing something.
    Thanks for your help.
    --Chidu.
    --- In <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166136158139046209">iPlanet-JATO@y...</a>, "Mike Frisino" <<a href="/group/SunONE-JATO/post?protectID=174176219122158198138082063148231088239026066196217130152150">Michael.Frisino@S...</a>> wrote:
    Chidu.
    Did you also adjust the following member in each of the ViewBeans?
    public static final String DEFAULT_DISPLAY_URL=
    "/jatosample/module1/Index.jsp";
    Try adjusting this to be consistent with your new hierarchy.
    Also, if you still have problems, send us the error message thatyou recieve
    when you try to access the page. That would help.
    ----- Original Message -----
    From: <<a href="/group/SunONE-JATO/post?protectID=219015020150194233215218164036129208">chidusv@y...</a>>
    Sent: Thursday, July 26, 2001 4:48 PM
    Subject: [iPlanet-JATO] Deployment problem
    Hi,
    We have a requirement to seperate the models and viewbeans and
    keep
    them in seperate directories. Is it possible to seperate the
    viewbeans and models not be in the same directory?
    I tried seperating the two in the MigtoolboxSampleApp application
    provided by JATO. I changed the package and import statements
    accordingly in the viewbeans, jsps and the models. But when I
    deployed the application, I'm not able to access the Index page or
    any of the jsps. Does the ApplicationServletBase always look forthe
    viewbean in the same path as that of the module servlet?
    Any help will be appreciated.
    Thanks,
    Chidu.
    <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166215146166214017110250006230056039126077176105140127082088124241215002153">[email protected]</a>
    <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166215146166214017110250006230056039126077176105140127082088124241215002153">[email protected]</a>
    <a href="/group/SunONE-JATO/post?protectID=210083235237078198050118178206047166215146166214017110250006230056039126077176105140127082088124241215002153">[email protected]</a>

    Hi Mike,
    I tried changing the url in all the viewbeans to reflect the new sub-
    directory for the viewbeans(I have placed the jsps and viewbeans in
    a sub-directory under MigtoolboxSampleApp/MigtoolboxSample). But I'm
    still not able to get access to the jsps. I basically see the
    message "GX Error Socket Error Code missing!!" error on the browser
    thrown by iPlanet, but the log doesn't tell me anything. Does the url
    which I give to access the jsp change accordingly, i.e., should I
    give something other
    than /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.jsp.
    If I try to use any other url other
    than /NASApp/MigtoolboxSampleAppWar/MigtoolboxSample/IndexPage.jsp, I
    see the FileNotFoundException in the log.
    I guess I'm still missing something.
    Thanks for your help.
    --Chidu.
    --- In iPlanet-JATO@y..., "Mike Frisino" <Michael.Frisino@S...> wrote:
    >
    Chidu.
    Did you also adjust the following member in each of the ViewBeans?
    public static final String DEFAULT_DISPLAY_URL=
    "/jatosample/module1/Index.jsp";
    Try adjusting this to be consistent with your new hierarchy.
    Also, if you still have problems, send us the error message that you recieve
    when you try to access the page. That would help.
    ----- Original Message -----
    From: <chidusv@y...>
    Sent: Thursday, July 26, 2001 4:48 PM
    Subject: [iPlanet-JATO] Deployment problem
    Hi,
    We have a requirement to seperate the models and viewbeans and
    keep
    them in seperate directories. Is it possible to seperate the
    viewbeans and models not be in the same directory?
    I tried seperating the two in the MigtoolboxSampleApp application
    provided by JATO. I changed the package and import statements
    accordingly in the viewbeans, jsps and the models. But when I
    deployed the application, I'm not able to access the Index page or
    any of the jsps. Does the ApplicationServletBase always look for the
    viewbean in the same path as that of the module servlet?
    Any help will be appreciated.
    Thanks,
    Chidu.
    [email protected]

  • RE: [iPlanet-JATO] image button handling

    Hi Todd,
    from what I have seen so far on the Project they are just buttons on
    the page.
    In the interim, I modified RequestHandlingViewBase.acceptsRequest() to
    handle the matching of parameter and command child names.
    from
    if (request.getParameter(commands)!=null)
    return getCommandChildNames()[i];
    to
    if (request.getParameter(commands[i])!=null ||
    (request.getParameter(commands[i]+ ".x")!=null ))
    return getCommandChildNames()[i];
    This fixed the problem with the image buttons in our cases.
    Kostas
    -----Original Message-----
    From: Todd Fast
    Sent: 10/27/00 6:21 AM
    Subject: Re: [iPlanet-JATO] image button handling
    Hi Kostas--
    I wanted to get some feedback on the known issue of the
    handleXXXXRequest method not being fired for buttons which have
    images, due to the the browser submitting
    the pixel coordinates back to the server like this:
    Page1.ImageButton1.x=...
    Page1.ImageButton1.y=...
    As the ND conversion project we are currently working on heavily uses
    image buttons we would like to get and indication if and when a patch
    is planned for this.
    Our current work around is to remove the src attribute from the JATO
    tags in the JSPs.We are currently working on getting this fixed. One question--what is
    the
    relative type of usage of image buttons in your project? Are they just
    buttons on the page (view bean), or do they appear in tiled views as
    well?
    Todd
    [email protected]
    [Non-text portions of this message have been removed]

    OK, here's what I'm trying to do: We have, like you said, a menu
    page. The pages that it goes to and the number of links are all
    variable and read from the database. In NetD we were able to create
    URLs in the form
    pgXYZ?SPIDERSESSION=abcd
    so this is what I'm trying to replicate here. So the URL that works
    is
    pgContactUs?GXHC_GX_jst=fc7b7e61662d6164&GXHC_gx_session_id_=cc9c6dfa5
    601afa7
    which I interpreted to be the equivalent of the old Netd way. Our
    javascript also loads other frames of the page in the same manner.
    And I believe the URL-rewritten frame sources of a frameset look like
    this too.
    This all worked except for the timeout problem. In theory we could
    rewrite all URLs to go to a handler, but that would be...
    inconvenient.

  • Re: [iPlanet-JATO] Back Button functionality

    Hi Mike,
    Our test environment does not include proxy server.
    regards,
    syam.
    Please respond to [email protected]
    cc:
    Subject: Re: [iPlanet-JATO] Back Button functionality
    Guys,
    Please clarify something for me, the JATO code is commented as follows
    protected void addResponseHeaders(RequestContext requestContext)
    // These values should make any proxy between the client and
    // server avoid caching, and ensure that pages from one user
    // can never be seen by another user (if they're cached anyway)
    requestContext.getResponse().addHeader("Pragma","no-cache");
    requestContext.getResponse().addHeader
    ("Cache-Control","private");Yet you make no mention of whether your test environment includes a Proxy
    Server, or does your browser
    go directly to the Application Server's web server?
    Can you clarify, please?
    ----- Original Message -----
    From: <syam_reddy@p...>
    Sent: Wednesday, April 25, 2001 2:59 PM
    Subject: [iPlanet-JATO] Back Button functionality
    >
    Hi,
    We observed the following difference in behaviour between JATO pages
    and NetD served pages.
    We have the following scenario. User will login to the
    site. After login he will get a frame set. This frame set has threeframes.
    Top and bottom frames are used for navigation (to switch between various
    sections on the site.) .The middle frame(main frame) shows the actual
    content. When the the frame set gets loaded main frame shows page1. User
    will click on a link on page1. Page 2 will be loaded in main frame. Atthis
    point if the user clicks on back button , with migrated application(JATO
    pages) the following message appears in the main frame.
    In Netscape Communicator 4.61 the following message appears in the main
    frame :
    Data Missing
    This document resulted from a POST operation and has expired fromcache.If
    you wish you can repost the form data to recreate the document by
    presenting the reload button.
    In IE 4.72/5.5 the following message appears in the main frame:
    Warning : Page has Expired
    The page you requested was created using information you submitted in a
    form.This page is no longer available.As a security precaution, Internet
    Explorer does not automatically resubmit your information for you. To
    resubmit your information and view the web page click teh refresh button.
    However, in the NetD site page1 will appear in main frame.
    How do we mimic the NetD behaviour with the migrated
    applications ?
    We think the above behaviour with migrated Apps, is due to the
    headers that are get set in Application ServletBase , see the following
    code snippet :
    protected void addResponseHeaders(RequestContext requestContext)
    // These values should make any proxy between the client and
    // server avoid caching, and ensure that pages from one user
    // can never be seen by another user (if they're cached anyway)
    requestContext.getResponse().addHeader("Pragma","no-cache");
    requestContext.getResponse().addHeader
    ("Cache-Control","private");
    If we comment the above code , we were able to mimic theNetD
    behaviour. Are there any alternatives/thoughts on how to mimic the NetD
    behaviour ?
    Thanks in Advance,
    syam&ravi.
    [email protected]
    [email protected]

    OK, here's what I'm trying to do: We have, like you said, a menu
    page. The pages that it goes to and the number of links are all
    variable and read from the database. In NetD we were able to create
    URLs in the form
    pgXYZ?SPIDERSESSION=abcd
    so this is what I'm trying to replicate here. So the URL that works
    is
    pgContactUs?GXHC_GX_jst=fc7b7e61662d6164&GXHC_gx_session_id_=cc9c6dfa5
    601afa7
    which I interpreted to be the equivalent of the old Netd way. Our
    javascript also loads other frames of the page in the same manner.
    And I believe the URL-rewritten frame sources of a frameset look like
    this too.
    This all worked except for the timeout problem. In theory we could
    rewrite all URLs to go to a handler, but that would be...
    inconvenient.

  • Re: [iPlanet-JATO] Experiencing problem while executing model.

    Hi Todd,
    Thanks a lot for your input!
    In the case , I found that "TO_CHAR(PLAN_DT, 'MM/DD/YYYY')" is alaised as a
    column name in the resultset. So I am using this as a column in Jato
    Descriptor for Plan_Dt. Now it is working fine.
    Thanks and Regards,
    Santa.
    ----- Original Message -----
    From: Todd Fast <toddwork@c...>
    Sent: Thursday, July 26, 2001 9:50 AM
    Subject: Re: [iPlanet-JATO] Experiencing problem while executing model.
    Santa--
    I am experiencing a problem while executing a bounded model. I am usingQueryModelBase. Whenever the following query gets executed inonBeforeModel
    execute of TiledView, it throws an exception describing "PLAN_DT not found
    in ResultSet". If you execute this query on the SQL prompt then we getrows
    of data. Please could you tell us how the mapping between model and
    resultset works ? And what changes do we have to make to execute thisquery.
    >>
    SELECT PART_NM,NEWTXTDOLL
    TO_CHAR(PLAN_DT, 'MM/DD/YYYY'),
    FROM cpsselect
    WHERE CHG_DT >= TO_DATE('2001-06-17', 'YYYY-MM-DD')The mapping of result set to model is done via JDBC, using the columnnames
    you provide in your model's column descriptors. It sounds as if you are
    providing the column name "PLAN_DT" in a descriptor, and when the model
    tries to look up that column in the result set, there is no such columnand
    the operation fails.
    In order to debug this, you should try running your query with a JDBC
    connection, not SQL*Plus or your command-line SQL tool. What you need to
    find out is how the expresion "TO_CHAR(PLAN_DT, 'MM/DD/YYYY')" is aliasedas
    a column name in the resut set. The easiest way to do this is to write a
    simple class that does nothing but use your JDBC driver to connect the
    database and execute this query. After execution, use theResultSetMetaData
    information to find out the column names for the result set. Then, use
    these column names in your JATO column descriptors.
    Another Problem:We are not getting the values for NEWTXTDOLL column whenwe try to display it in a Tiled View.
    I'm sorry, this isn't enough information for me to offer any suggestions.
    Using the technique above, determine which columns are coming back in the
    result set, and make sure your display fields in the TiledView are boundto
    those column names. The problem could be something as simple as a typo in
    the field's bound name, or something more complex like the column in the
    result set being named something you don't expect.
    Another approach might be to alias the columns yourself using the "AS
    <alias>" expression, and assign them names that you choose instead ofusing
    the names assigned by the database or JDBC driver.
    Todd
    [email protected]
    The Information contained and transmitted by this E-MAIL is proprietary to
    Wipro Limited and is intended for use only by the individual or entity to
    which
    it is addressed, and may contain information that is privileged, confidential
    or
    exempt from disclosure under applicable law. If this is a forwarded message,
    the content of this E-MAIL may not have been sent with the authority of the
    Company. If you are not the intended recipient, an agent of the intended
    recipient or a person responsible for delivering the information to the named
    recipient, you are notified that any use, distribution, transmission,
    printing,
    copying or dissemination of this information in any way or in any manner is
    strictly prohibited. If you have received this communication in error, please
    delete this mail & notify us immediately at mailadmin@w...
    [Non-text portions of this message have been removed]

    Hi Todd,
    Thanks a lot for your input!
    In the case , I found that "TO_CHAR(PLAN_DT, 'MM/DD/YYYY')" is alaised as a
    column name in the resultset. So I am using this as a column in Jato
    Descriptor for Plan_Dt. Now it is working fine.
    Thanks and Regards,
    Santa.
    ----- Original Message -----
    From: Todd Fast <toddwork@c...>
    Sent: Thursday, July 26, 2001 9:50 AM
    Subject: Re: [iPlanet-JATO] Experiencing problem while executing model.
    Santa--
    I am experiencing a problem while executing a bounded model. I am usingQueryModelBase. Whenever the following query gets executed inonBeforeModel
    execute of TiledView, it throws an exception describing "PLAN_DT not found
    in ResultSet". If you execute this query on the SQL prompt then we getrows
    of data. Please could you tell us how the mapping between model and
    resultset works ? And what changes do we have to make to execute thisquery.
    >>
    SELECT PART_NM,NEWTXTDOLL
    TO_CHAR(PLAN_DT, 'MM/DD/YYYY'),
    FROM cpsselect
    WHERE CHG_DT >= TO_DATE('2001-06-17', 'YYYY-MM-DD')The mapping of result set to model is done via JDBC, using the columnnames
    you provide in your model's column descriptors. It sounds as if you are
    providing the column name "PLAN_DT" in a descriptor, and when the model
    tries to look up that column in the result set, there is no such columnand
    the operation fails.
    In order to debug this, you should try running your query with a JDBC
    connection, not SQL*Plus or your command-line SQL tool. What you need to
    find out is how the expresion "TO_CHAR(PLAN_DT, 'MM/DD/YYYY')" is aliasedas
    a column name in the resut set. The easiest way to do this is to write a
    simple class that does nothing but use your JDBC driver to connect the
    database and execute this query. After execution, use theResultSetMetaData
    information to find out the column names for the result set. Then, use
    these column names in your JATO column descriptors.
    Another Problem:We are not getting the values for NEWTXTDOLL column whenwe try to display it in a Tiled View.
    I'm sorry, this isn't enough information for me to offer any suggestions.
    Using the technique above, determine which columns are coming back in the
    result set, and make sure your display fields in the TiledView are boundto
    those column names. The problem could be something as simple as a typo in
    the field's bound name, or something more complex like the column in the
    result set being named something you don't expect.
    Another approach might be to alias the columns yourself using the "AS
    <alias>" expression, and assign them names that you choose instead ofusing
    the names assigned by the database or JDBC driver.
    Todd
    [email protected]
    The Information contained and transmitted by this E-MAIL is proprietary to
    Wipro Limited and is intended for use only by the individual or entity to
    which
    it is addressed, and may contain information that is privileged, confidential
    or
    exempt from disclosure under applicable law. If this is a forwarded message,
    the content of this E-MAIL may not have been sent with the authority of the
    Company. If you are not the intended recipient, an agent of the intended
    recipient or a person responsible for delivering the information to the named
    recipient, you are notified that any use, distribution, transmission,
    printing,
    copying or dissemination of this information in any way or in any manner is
    strictly prohibited. If you have received this communication in error, please
    delete this mail & notify us immediately at mailadmin@w...
    [Non-text portions of this message have been removed]

  • RE: [iPlanet-JATO] TileView not being displayed

    Craig.you are quite the JATO expert now!
    cb
    -----Original Message-----
    From: Craig V Conover [mailto:<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039098124198039130151196028">craig.conover@S...</a>]
    Sent: Tuesday, April 17, 2001 8:11 PM
    Subject: Re: [iPlanet-JATO] TileView not being displayed
    I had this issue a while ago and forget the exact solution Todd gave me, so
    I'll take a guess untill I can find it somewhere or untill Todd or Mike get
    back online to verify.
    Set the size of the model. I know your TiledView is not bound, but actually
    it is - to the DefaultModel.
    Try this:
    getDefaultModel().setSize(1)
    getPrimaryModel() should work as well.
    let me know if that works or not
    If I find my example, I'll repost.
    c
    ----- Original Message -----
    From: MShanmugam@c...
    Sent: Tuesday, April 17, 2001 7:38 PM
    Subject: [iPlanet-JATO] TileView not being displayed
    Hi All,
    I have a TileView which is not bound to any models.
    It should display one row however none are being displayed. Following
    is the constructor as a reference.
    public pgVoucherListrptCheckInfoTiledView(View parent, String name)
    super(parent, name);
    setMaxDisplayTiles(1);
    setPrimaryModel((DatasetModel) getDefaultModel() );
    registerChildren();
    initialize();
    The problem in the nextTile() method, the super.nextTile allways
    returns false. This seems to be because the
    TiledViewBase.getPrimaryModel().next() allways returns false.
    All the bound tiled views work fine.
    Any help will be appreciated .
    Thanks
    [email protected]
    [email protected]
    [Non-text portions of this message have been removed]

    Craig.you are quite the JATO expert now!
    cb
    -----Original Message-----
    From: Craig V Conover [mailto:<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039098124198039130151196028">craig.conover@S...</a>]
    Sent: Tuesday, April 17, 2001 8:11 PM
    Subject: Re: [iPlanet-JATO] TileView not being displayed
    I had this issue a while ago and forget the exact solution Todd gave me, so
    I'll take a guess untill I can find it somewhere or untill Todd or Mike get
    back online to verify.
    Set the size of the model. I know your TiledView is not bound, but actually
    it is - to the DefaultModel.
    Try this:
    getDefaultModel().setSize(1)
    getPrimaryModel() should work as well.
    let me know if that works or not
    If I find my example, I'll repost.
    c
    ----- Original Message -----
    From: MShanmugam@c...
    Sent: Tuesday, April 17, 2001 7:38 PM
    Subject: [iPlanet-JATO] TileView not being displayed
    Hi All,
    I have a TileView which is not bound to any models.
    It should display one row however none are being displayed. Following
    is the constructor as a reference.
    public pgVoucherListrptCheckInfoTiledView(View parent, String name)
    super(parent, name);
    setMaxDisplayTiles(1);
    setPrimaryModel((DatasetModel) getDefaultModel() );
    registerChildren();
    initialize();
    The problem in the nextTile() method, the super.nextTile allways
    returns false. This seems to be because the
    TiledViewBase.getPrimaryModel().next() allways returns false.
    All the bound tiled views work fine.
    Any help will be appreciated .
    Thanks
    [email protected]
    [email protected]
    [Non-text portions of this message have been removed]

Maybe you are looking for