Re: [iPlanet-JATO] Submit Button in TiledView
John,
Please clarify,
1. You are putting this page together manually? (writing your own JSP and
ViewBean/TiledView classes?)
2. What is the exact location of the button?
Is it below the TiledView but still in the ViewBean (as the traditional
First/Next/Prev/Last buttons are? )
Or
Is it literally within the tiled view itself (in a column, and the button
is displayed repeatedly like any other row member?)
I ask because the latter is a very rare situation, usually people use HREFs
in such cases?
----- Original Message -----
From: Craig V Conover <craig.conover@S...>
Sent: Monday, January 22, 2001 10:21 AM
Subject: Re: [iPlanet-JATO] Submit Button in TiledView
Was this originally an ND project? I don't have the sample you need, butuntil someone else posts a sample, try this: if you have an ND5 Studio,
mimic sample in ND and migrate it and see what is generated.
----- Original Message -----
From: john.teceno@b...
Sent: Monday, January 22, 2001 10:00 AM
Subject: [iPlanet-JATO] Submit Button in TiledView
Hey Guys,
I have a submit button that appears in a TiledView. When I click
the submit button, it loops back to the same page. Should I be
delegating the event through the ViewBean to the TiledView? And if so,
could you give me a code snippet to show me how?
Thanx,
John Teceno
Back Bay Technologies
eGroups Sponsor
Get 3 CDs for ONLY $9.99!
[email protected]
[Non-text portions of this message have been removed]
[email protected]
John,
Please clarify,
1. You are putting this page together manually? (writing your own JSP and
ViewBean/TiledView classes?)
2. What is the exact location of the button?
Is it below the TiledView but still in the ViewBean (as the traditional
First/Next/Prev/Last buttons are? )
Or
Is it literally within the tiled view itself (in a column, and the button
is displayed repeatedly like any other row member?)
I ask because the latter is a very rare situation, usually people use HREFs
in such cases?
----- Original Message -----
From: Craig V Conover <craig.conover@S...>
Sent: Monday, January 22, 2001 10:21 AM
Subject: Re: [iPlanet-JATO] Submit Button in TiledView
Was this originally an ND project? I don't have the sample you need, butuntil someone else posts a sample, try this: if you have an ND5 Studio,
mimic sample in ND and migrate it and see what is generated.
----- Original Message -----
From: john.teceno@b...
Sent: Monday, January 22, 2001 10:00 AM
Subject: [iPlanet-JATO] Submit Button in TiledView
Hey Guys,
I have a submit button that appears in a TiledView. When I click
the submit button, it loops back to the same page. Should I be
delegating the event through the ViewBean to the TiledView? And if so,
could you give me a code snippet to show me how?
Thanx,
John Teceno
Back Bay Technologies
eGroups Sponsor
Get 3 CDs for ONLY $9.99!
[email protected]
[Non-text portions of this message have been removed]
[email protected]
Similar Messages
-
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. -
Hi Shyam--
I'm not seeing this over here. So, we need to figure out why you're seeing
it--I need some more information.
First, what model are you using to back the tiled view? Second, can you
please forward the page and tiled view Java classes and JSPs to my work
address? At what point are you writing the getTileIndex() value out--during
display, business processing, what?
Also, try putting a stack trace in the nextTile() method of the tiled view
to see if its being incremented from somewhere you don't expect:
public boolean nextTile()
if (getTileIndex()==0)
new Exception().printStackTrace();
Todd
Todd Fast
Senior Engineer
Sun/Netscape Alliance
todd.fast@e...
----- Original Message -----
From: <shyam_gotur@p...>
Sent: Saturday, March 03, 2001 2:40 PM
Subject: [iPlanet-JATO] JATO 1.1 - First Tile is not displayed in TiledView.
Hi
We migrated our application from JATO 1.0 to JATO 1.1,
with 1.1 the nextTile() method is skipping the first tile in
tiledView.when printed the getTileIndex() to console , it is starting
with index 1 instead of 0.
Thanks
Shyam
[email protected]Hi Shyam--
I'm not seeing this over here. So, we need to figure out why you're seeing
it--I need some more information.
First, what model are you using to back the tiled view? Second, can you
please forward the page and tiled view Java classes and JSPs to my work
address? At what point are you writing the getTileIndex() value out--during
display, business processing, what?
Also, try putting a stack trace in the nextTile() method of the tiled view
to see if its being incremented from somewhere you don't expect:
public boolean nextTile()
if (getTileIndex()==0)
new Exception().printStackTrace();
Todd
Todd Fast
Senior Engineer
Sun/Netscape Alliance
todd.fast@e...
----- Original Message -----
From: <shyam_gotur@p...>
Sent: Saturday, March 03, 2001 2:40 PM
Subject: [iPlanet-JATO] JATO 1.1 - First Tile is not displayed in TiledView.
Hi
We migrated our application from JATO 1.0 to JATO 1.1,
with 1.1 the nextTile() method is skipping the first tile in
tiledView.when printed the getTileIndex() to console , it is starting
with index 1 instead of 0.
Thanks
Shyam
[email protected] -
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.
ToddHi,
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] 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] using begin childName Display method
Oops. Sorry about that, Craig. I didn't realize I might leave that impression.
I'm sure the tiled
views work since you have so many examples of these and it's a relatively
simple concept, isn't it?
Not to mention a necessary one. I didn't have time to debug my code and find
out what I was doing
wrong where the tiled views are concerned. I decide to just try to implement
tiled views later and
just stick with one of everything for now and get that working.
Yes, I have reviewed your comments and am taking them into consideration. I am
able to save and
retrieve values with my model at this point.
Thanks.
Belinda
X-eGroups-Return:
sentto-2343287-1143-1008622698-belinda.garcia=sun.com@r...
X-Sender: craig.conover@s...
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4)Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
From: "Craig V. Conover" <craig.conover@s...>
X-Yahoo-Profile: cvconover
Mailing-List: list [email protected]; contact
[email protected]
Date: Mon, 17 Dec 2001 13:00:10 -0800
Subject: Re: [iPlanet-JATO] using begin<childName>Display method
Content-Transfer-Encoding: 7bit
Belinda,
He may also be binding the models, howerver, he needs to change the way
the value appears before it is displayed which is why you would use the
display events.
Your null value issue is a completely different issue and has nothing to
do with it being a tiled view. I don't want anyone getting the idea
that the tiledView binding is broken. It does work. You issue should
have something to do with the inconsistent way in which you are getting
your model. At least from what I could tell in your source code that you
sent me.
Have you reviewed my comments I sent to you in your source code?
craig
Belinda Garcia wrote:
I don't currently use a begin or end Display method. I merely bind the
fields to
the model when the child is created and use the setValue to initially setthe
value to what's in the model. I get nulls though if I try to use a tiledView. I
haven't quite got this figured out.
Belinda
X-eGroups-Return:
sentto-2343287-1135-1008613974-belinda.garcia=sun.com@r...
X-Sender: stephen_winer@y...
User-Agent: eGroups-EW/0.82
From: "stephen_winer" <stephen_winer@y...>
X-Originating-IP: 155.188.191.4
X-Yahoo-Profile: stephen_winer
Mailing-List: list [email protected]; contact
[email protected]
Date: Mon, 17 Dec 2001 18:32:48 -0000
Subject: [iPlanet-JATO] using begin<childName>Display method
Content-Transfer-Encoding: 7bit
I want to be able to conditionally show/hide data as well as format
it for display without touching the model. I found the
begin<childName>Display and end<childName>Display methods that
provide the hooks to do this, but I have been unsuccessful in getting
these method to execute. I added the fireChildDisplayEvents="true"
attribute to the jato:useViewBean tag, but this has not helped. I
also added some debug to the ContainerViewBase class in the public
boolean beginChildDisplay(ChildDisplayEvent event) method to see what
was happening. The displayMethodMap was returning null for the child
display methods that were in the view bean. I covered all the bases
(compiling, redeploying, etc.) and nothing has worked. Is there
anything I am missing or is there some working example of this?
Steve
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
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jspThe hidden field was present in the page, but it looked like this:
<input type="hidden" name="jato.defaultCommand" value=""../search"">
Seems like there is a small bug in the code generating this tag.
FYI - I am using JATO1.2
What file displays this text? Maybe I can go in and fix it and rejar
it.
Steve
--- Mike Frisino wrote:
Steve,
Can you check the HTML source that shows up in the browser? Do you see an entry that looks like this at the bottom of the form in
question?
>
<input type="hidden" name="jato.defaultCommand" value="/search">
To answer your question - it should work as you described. Some of the JatoSample make use of the defaultCommandChild. Can you try
running the sample BasicSample->Field Types and let us know what you
see.
>
Failing this you can send me your jsp file , maybe there is some subtle issue there. michael.frisino@s...
>
>
----- Original Message -----
From: stephen_winer
Sent: Friday, December 07, 2001 8:05 AM
Subject: [iPlanet-JATO] Using the defaultCommandChild in a form
I am trying to set the defaultCommandChild in my jato:form tag to be
the searcg button. The search button definition is:
<jato:button name="search"/>.
The form tag definition is:
<jato:form name="PendingIA" defaultCommandChild="/search">
Clicking on the search button works fine, but hitting return in one
of the textFields (which submits the form) passes a value of "" to
the createChild method in my viewBean, which throws an error. Why
does this not just work as normal and trigger the handleSearchRequest
() method?
Steve
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
Service.
>
>
>
[Non-text portions of this message have been removed] -
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] Sorting a resultset
Steve,
Todd will probably address this more, but to set the stage for the discussion,
I will chime in. As per your scenario "say a user wants to resort the results
by some other column" , I think there needs to be some clarification on the
life cycle of the model. You scenario implies that the user sees the data and
then submits a request to sort the data. This implies that the access to the
same data is spread across two HTTP requests.
Unless explicitly or implicitly stored in session, the Model is a per request
object. Therefore, under ordinary circumstances a new instance of Model is
constructed per request and populated as needed. This is done for scalability
reasons. Most applications would not scale properly if all model instances were
kept around in session per user. There is also the issue of data integrity, a
model stored in session may not reflect the current state of the RDBMS from
which the data was previously retrieved, perhaps minutes before. So, the
default action is to instantiate a new model and repopulate that model The
normal solution would be to apply the sort criteria to the data retrieval at
that point.
What I described above is the norm and the default.
If you have compelling reasons to prefer a single retrieval style, you have to
be prepared to store the Model data in session. There are several methods
within the ModelManager class which assist in this regard. You can see them
described in the java doc.
Also bear in mind that the SQLModelBase typically copies the data from the JDBC
result set into JATO specific local storage. This is done because the JDBC
result set is not as flexible as developer needs and requires the JDBC
connection to remain open while it is used.
I suspect that Todd will describe how you can manipulate the underlying JATO
specific local storage to change the order. I just wanted to make sure you
understood the life cycle issues involved and had justification for deviating
from the default.
Also, I'm still waiting for followup on the defaultCommandChild issue - we'd
like to fix it for JATO 1.2.1 if it is a problem and so far your case is the
only one we have heard of.
----- Original Message -----
From: stephen_winer
Sent: Wednesday, December 12, 2001 9:42 AM
Subject: [iPlanet-JATO] Sorting a resultset
If I want to sort a result set (Model) after the search has taken
place (say a user wants to resort the results by some other column),
can this be done without issuing another query? The reason I ask is
that the next() method in the ResultSetModelBase calls synchronizeRow
(), which resets the row, which sounds like a sort done outside of
the SQL would be reverted.
Steve
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
[Non-text portions of this message have been removed]The hidden field was present in the page, but it looked like this:
<input type="hidden" name="jato.defaultCommand" value=""../search"">
Seems like there is a small bug in the code generating this tag.
FYI - I am using JATO1.2
What file displays this text? Maybe I can go in and fix it and rejar
it.
Steve
--- Mike Frisino wrote:
Steve,
Can you check the HTML source that shows up in the browser? Do you see an entry that looks like this at the bottom of the form in
question?
>
<input type="hidden" name="jato.defaultCommand" value="/search">
To answer your question - it should work as you described. Some of the JatoSample make use of the defaultCommandChild. Can you try
running the sample BasicSample->Field Types and let us know what you
see.
>
Failing this you can send me your jsp file , maybe there is some subtle issue there. michael.frisino@s...
>
>
----- Original Message -----
From: stephen_winer
Sent: Friday, December 07, 2001 8:05 AM
Subject: [iPlanet-JATO] Using the defaultCommandChild in a form
I am trying to set the defaultCommandChild in my jato:form tag to be
the searcg button. The search button definition is:
<jato:button name="search"/>.
The form tag definition is:
<jato:form name="PendingIA" defaultCommandChild="/search">
Clicking on the search button works fine, but hitting return in one
of the textFields (which submits the form) passes a value of "" to
the createChild method in my viewBean, which throws an error. Why
does this not just work as normal and trigger the handleSearchRequest
() method?
Steve
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
Service.
>
>
>
[Non-text portions of this message have been removed] -
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] Re: using begin childName Display method
Steve,
It sounds like you have your display fields in a container view, and
that container view is inside of a view bean. I haven't tested whether
the fireChildDisplayEvents has a "deep" effect on its container view
children. Meaning that you may have to set fireChildDisplayEvents="true"
for the <jato:containerView> tag instead. If all else fails and you need
to just get it working, you can set the fireDisplayEvents="true" for
each display field tag separately.
craig
stephen_winer wrote:
I should clarify my earlier statement. The data I want to display is
coming from a model (tied in in the createChild method). I want to
conditionally reformat the text that is being substituted in the JSP
for a JATO form element, but I want this to happen on the server, not
with JavaScript. The begin<childName>Display and
end<childName>Display methods allow me to do this, in theory, but I
can not get them to execute.
Steve
--- In iPlanet-JATO@y..., Belinda Garcia <belinda.garcia@s...> wrote:
I don't currently use a begin or end Display method. I merely bind
the fields to
the model when the child is created and use the setValue to
initially set the
value to what's in the model. I get nulls though if I try to use a
tiled View. I
haven't quite got this figured out.
Belinda
X-eGroups-Return:
sentto-2343287-1135-1008613974-belinda.garcia=sun.com@r...
X-Sender: stephen_winer@y...
User-Agent: eGroups-EW/0.82
From: "stephen_winer" <stephen_winer@y...>
X-Originating-IP: 155.188.191.4
X-Yahoo-Profile: stephen_winer
Mailing-List: list iPlanet-JATO@y...; contact
iPlanet-JATO-owner@y...
Date: Mon, 17 Dec 2001 18:32:48 -0000
Subject: [iPlanet-JATO] using begin<childName>Display method
Content-Transfer-Encoding: 7bit
I want to be able to conditionally show/hide data as well as
format
it for display without touching the model. I found the
begin<childName>Display and end<childName>Display methods that
provide the hooks to do this, but I have been unsuccessful in
getting
these method to execute. I added the
fireChildDisplayEvents="true"
attribute to the jato:useViewBean tag, but this has not helped.
I
also added some debug to the ContainerViewBase class in the
public
boolean beginChildDisplay(ChildDisplayEvent event) method to see
what
was happening. The displayMethodMap was returning null for the
child
display methods that were in the view bean. I covered all the
bases
(compiling, redeploying, etc.) and nothing has worked. Is there
anything I am missing or is there some working example of this?
Steve
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.jspThe hidden field was present in the page, but it looked like this:
<input type="hidden" name="jato.defaultCommand" value=""../search"">
Seems like there is a small bug in the code generating this tag.
FYI - I am using JATO1.2
What file displays this text? Maybe I can go in and fix it and rejar
it.
Steve
--- Mike Frisino wrote:
Steve,
Can you check the HTML source that shows up in the browser? Do you see an entry that looks like this at the bottom of the form in
question?
>
<input type="hidden" name="jato.defaultCommand" value="/search">
To answer your question - it should work as you described. Some of the JatoSample make use of the defaultCommandChild. Can you try
running the sample BasicSample->Field Types and let us know what you
see.
>
Failing this you can send me your jsp file , maybe there is some subtle issue there. michael.frisino@s...
>
>
----- Original Message -----
From: stephen_winer
Sent: Friday, December 07, 2001 8:05 AM
Subject: [iPlanet-JATO] Using the defaultCommandChild in a form
I am trying to set the defaultCommandChild in my jato:form tag to be
the searcg button. The search button definition is:
<jato:button name="search"/>.
The form tag definition is:
<jato:form name="PendingIA" defaultCommandChild="/search">
Clicking on the search button works fine, but hitting return in one
of the textFields (which submits the form) passes a value of "" to
the createChild method in my viewBean, which throws an error. Why
does this not just work as normal and trigger the handleSearchRequest
() method?
Steve
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
Service.
>
>
>
[Non-text portions of this message have been removed] -
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] -
Re: [iPlanet-JATO] Re: session timeout when not submitting to a handler
Mark--
I know what's happening here, but am curious about your approach. You said
in an earlier email that you were generating links directly to JSPs, but
from what you are describing, you are generating JATO-style links to access
JATO pages. Nothing wrong with that, but there is a signficant difference.
Actually, it just occurred to me, I'm wondering what your URLs look like.
The way the request dispatching works in JATO is it ignores anything after
an initial "." in the final part of the URL path. For example, a request
for "/myapp/module1/MyPage.jsp" doesn't actually try to hit the JSP, instead
it tries to hit the JATO page "/myapp/module1/MyPage".
The end result is that you may think you are accessing a JSP directly, but
are instead accessing a JATO page. The reason the request dispatching works
this way is because it is illegal to access JATO JSPs directly, and there is
actually a (disabled) JATO feature that piggybacks on the use of the
dot-delimited URL.
So, now I need to understand your intent. I wasn't really sure why you were
generating direct JSP/page links to begin with. This works against the Type
II architecture JATO uses, in which all JATO requests go back to the
controller servlet.
If you are trying to design something like a menu page, you may have thought
that it was burdensome to create a number of HREF children, plus implement
event handlers for each of them. This definitely would be burdensome beyond
just a handful of links, but this is why JATO provides other mechanisms for
doing what I'll call here "polymorphic HREFs".
Assuming this menu page scenario, the easiest thing to do is to simply use
one HREF child on the page, and add a value to it each time it is rendered
that distinguishes it from the other instances on the page. In your event
handler for the HREF, you simply check this value and use it to decide which
page to forward to. You can add a value to an HREF or Button by using the
"addExtraValue()" method. Or, if you are using JATO 1.2, you can add extra
query string NVPs right in the JSP document using the "queryParams"
attribute of the <jato:href> tag. Thus, your one HREFchild and event
handler become "polymorphic" because what they do depends on the context in
which they are invoked.
Now, I still don't have confirmation that this is what you were trying to
do, so until I do, let me explain the exception you're seeing. JATO assumes
that when a request comes in for a page that includes the pageAttributes
NVP, it is a request coming from a previously generated JATO page. Because
of the way JATO works, this means that the request dispatching code should
send the request back to the originally rendered page. For example, if Page
A renders an HREF, which the user then activates, JATO sends the request
back to Page A for handling. All of the HREFs and forms generated during
rendering of Page A actually refer back to Page A, regardless of where those
links or buttons actually pass the request in their event handlers/Command
objects.
So, what's happening when you include the pageAttributes in your HREFs is
that JATO is assuming that a request is being sent to the target page, with
the assumption that the target page has a mechanism in place to handle the
request. This assumption relies on the specification of the "originator" of
the request being specified in the request. For links/HREFs, the name and
value of the HREF is sent along with the request. For forms, the name and
value of the button that was pressed are sent in the request. JATO uses the
presence of these name/value pairs to decide which event handler, or which
Command object, to invoke to handle the request.
The exception you are receiving is saying that there was no object on the
target page that indicated it could handle the request. This is to be
expected, since you have not specified a query parameter that indicates
which CommandField child is responsible the request. However, this is where
I see the disconnect, because that is not what I believe you were trying to
do (as explained above).
So now, given all the information above, can you tell me what you're trying
to accomplish, and whether or not the info I've given you has helped you to
design a mechanism more in line with a JATO approach? If not, given that I
understand what you're trying to do, I can offer a more concrete solution.
Todd
----- Original Message -----
From: <Mark_Dubinsky@p...>
Sent: Monday, November 05, 2001 2:54 PM
Subject: [iPlanet-JATO] Re: session timeout when not submitting to a handler
This is the exception we get:
(And BTW, leaving a blank value for the pageAttributes doesn't help)
[05/Nov/2001 17:49:18:4] error: <portalServlet.processRequest>
javax.servlet.ServletException: The request was not be handled by the
specified handler
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at
javax.servlet.ServletException.<init>(ServletException.java:107)
at
com.putnaminvestments.common.jato.ApplicationServletBase.dispatchRequ
est(Compiled Code)
at
com.putnaminvestments.common.jato.ApplicationServletBase.processReque
st(Compiled Code)
at
com.putnaminvestments.bp.portal.portalServlet.processRequest(Compiled
Code)
at
com.putnaminvestments.common.jato.ApplicationServletBase.doPost(Compi
led Code)
at
com.putnaminvestments.common.jato.ApplicationServletBase.doGet(Compil
ed Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at com.putnaminvestments.bp.bpServletBase.service(Compiled
Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Compile
d Code)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Compi
led Code)
at com.kivasoft.applogic.AppLogic.execute(Compiled Code)
at com.kivasoft.applogic.AppLogic.execute(Compiled Code)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)
--- In iPlanet-JATO@y..., "Todd Fast" <Todd.Fast@S...> wrote:
Mark--
Initially we tried to add the pageAttributes NVP as well, but that
was
causing an exception, so we stopped doing that.That's odd--what was the exception?
Our problem now is that when the SessionTimes out it does not go
to
onSessionTimeout method as in processRequestMethod of the
ApplicationServletBase it looks for pageAttributes. If it is notnull
then only onSessionTimeOut method is called.This is sadly the only technique for determining if a session hastimed out
and a new one been created, versus the initial creation of thesession.
Is there any work around for this? Maybe you can suggest how topass
the pageAttributes without causing the initial exception?Definitely--let me know what the exception was and I'll be able tosuggest
something. However, it shouldn't really be any harder thanappending a
"jato.pageAttributes=" empty NVP on the HREF.
Todd
Todd Fast
Senior Engineer
Sun/Netscape Alliance
todd.fast@s...
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jspOK, 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] Data model(Dataobject in Nd5)
Sn,
Computed columns need special attention.
The migration tool creates a QueryFieldSchema for each Model (DataObject).
The schema is populated with entries for each of the "data fields" needed by
that query. For example:
FIELD_SCHEMA.addFieldDescriptor(
new QueryFieldDescriptor(
FIELD_NDNWORDERS_ORDERID,
COLUMN_NDNWORDERS_ORDERID,
QUALIFIED_COLUMN_NDNWORDERS_ORDERID,
Integer.class,
false,
false,
QueryFieldDescriptor.APPLICATION_INSERT_VALUE_SOURCE,
QueryFieldDescriptor.ON_EMPTY_VALUE_EXCLUDE,
The query field descriptor describes the "metadata" for a given field:
QueryFieldDescriptor(java.lang.String logicalName, java.lang.String
columnName, java.lang.String qualifiedColumnName, java.lang.Class
fieldClass, boolean isKey, boolean isComputedField, int insertValueSource,
java.lang.String insertFormula, int onEmptyValuePolicy, java.lang.String
emptyFormula)
There is also a SQL Template generated for select statements:
static final String SELECT_SQL_TEMPLATE="SELECT ALL ndnwOrders.OrderID,
ndnwOrders.CustomerID, ndnwOrders.EmployeeID, ndnwOrders.OrderDate,
ndnwOrders.RequiredDate, ndnwOrders.ShippedDate, ndnwOrders.ShipVia,
ndnwOrders.Freight, ndnwOrders.ShipName, ndnwOrders.ShipAddress,
ndnwOrders.ShipCity, ndnwOrders.ShipRegion, ndnwOrders.ShipPostalCode,
ndnwOrders.ShipCountry FROM ndnwOrders __WHERE__ ";
public
So for computed columns you need to do two things:
1. You need to adjust the SELECT_SQL_TEMPLATE to reflect your computed
column instead of the "simplistic" column name that appears there by
default.
2. You have to "alias" that column and provide the value of the alias in the
columnName position of the QueryFieldDescriptor. This is needed so that the
model will be able to dereference the computed column in the result set.
----- Original Message -----
From: "SNR R" <snr@s...>
Sent: Thursday, July 12, 2001 8:30 AM
Subject: [iPlanet-JATO] Data model(Dataobject in Nd5)
Hi
We are migrating ND5 application into iplanet.When we are excuting
data model it is giving invalid column name error but when we check
data
model sql statement which is working fine at sqlplus but this data model
has got computed column.
could you please tell me how to resolve this problem.
Thanks
Sn
----- Original Message -----
From: "Todd Fast" <toddwork@c...>
Date: Monday, July 9, 2001 10:42 pm
Subject: Re: [iPlanet-JATO] COULD YOU PLS HELP ME TO FIX REPEATED OBJECT
ISSUE.
This code should generally be in the TiledView (it may appear in
both the
ViewBean and the TiledView after migration).
CSpRepeated repeated =(CSpRepeated) event.getSource();// Assuming the code is in the TiledView
TiledView repeated=this;
CSpStaticText stFieldName =(CSpStaticText)
repeated.getDisplayField("stFieldName");StaticTextField stFieldName=
(StaticTextField)getDisplayField("stFieldName");
- or -
StaticTextField stFieldName=getStFieldName();
int index = event.getRowIndex();In what event do you want to obtain the index? For the most part,
you can
just call TiledView.getTileIndex(). If this is a request event
handlingmethod, the row index is part of the event signature.
IMPORTANT: If the original code cached references to display
fields as page
instance variables for use in the class's events, you should NOT
do the same
in JATO. This was an ND pattern that is unnecessary and
inefficient in
JATO. Instead, you should just use the generated accessors or the
getDisplayField()/getChild() methods to obtain a reference to a
displayfield as needed. Mike Frisino has elaborated this point in
the past; please
refer to his emails.
Todd
[email protected]
[email protected]Sn,
Computed columns need special attention.
The migration tool creates a QueryFieldSchema for each Model (DataObject).
The schema is populated with entries for each of the "data fields" needed by
that query. For example:
FIELD_SCHEMA.addFieldDescriptor(
new QueryFieldDescriptor(
FIELD_NDNWORDERS_ORDERID,
COLUMN_NDNWORDERS_ORDERID,
QUALIFIED_COLUMN_NDNWORDERS_ORDERID,
Integer.class,
false,
false,
QueryFieldDescriptor.APPLICATION_INSERT_VALUE_SOURCE,
QueryFieldDescriptor.ON_EMPTY_VALUE_EXCLUDE,
The query field descriptor describes the "metadata" for a given field:
QueryFieldDescriptor(java.lang.String logicalName, java.lang.String
columnName, java.lang.String qualifiedColumnName, java.lang.Class
fieldClass, boolean isKey, boolean isComputedField, int insertValueSource,
java.lang.String insertFormula, int onEmptyValuePolicy, java.lang.String
emptyFormula)
There is also a SQL Template generated for select statements:
static final String SELECT_SQL_TEMPLATE="SELECT ALL ndnwOrders.OrderID,
ndnwOrders.CustomerID, ndnwOrders.EmployeeID, ndnwOrders.OrderDate,
ndnwOrders.RequiredDate, ndnwOrders.ShippedDate, ndnwOrders.ShipVia,
ndnwOrders.Freight, ndnwOrders.ShipName, ndnwOrders.ShipAddress,
ndnwOrders.ShipCity, ndnwOrders.ShipRegion, ndnwOrders.ShipPostalCode,
ndnwOrders.ShipCountry FROM ndnwOrders __WHERE__ ";
public
So for computed columns you need to do two things:
1. You need to adjust the SELECT_SQL_TEMPLATE to reflect your computed
column instead of the "simplistic" column name that appears there by
default.
2. You have to "alias" that column and provide the value of the alias in the
columnName position of the QueryFieldDescriptor. This is needed so that the
model will be able to dereference the computed column in the result set.
----- Original Message -----
From: "SNR R" <snr@s...>
Sent: Thursday, July 12, 2001 8:30 AM
Subject: [iPlanet-JATO] Data model(Dataobject in Nd5)
Hi
We are migrating ND5 application into iplanet.When we are excuting
data model it is giving invalid column name error but when we check
data
model sql statement which is working fine at sqlplus but this data model
has got computed column.
could you please tell me how to resolve this problem.
Thanks
Sn
----- Original Message -----
From: "Todd Fast" <toddwork@c...>
Date: Monday, July 9, 2001 10:42 pm
Subject: Re: [iPlanet-JATO] COULD YOU PLS HELP ME TO FIX REPEATED OBJECT
ISSUE.
This code should generally be in the TiledView (it may appear in
both the
ViewBean and the TiledView after migration).
CSpRepeated repeated =(CSpRepeated) event.getSource();// Assuming the code is in the TiledView
TiledView repeated=this;
CSpStaticText stFieldName =(CSpStaticText)
repeated.getDisplayField("stFieldName");StaticTextField stFieldName=
(StaticTextField)getDisplayField("stFieldName");
- or -
StaticTextField stFieldName=getStFieldName();
int index = event.getRowIndex();In what event do you want to obtain the index? For the most part,
you can
just call TiledView.getTileIndex(). If this is a request event
handlingmethod, the row index is part of the event signature.
IMPORTANT: If the original code cached references to display
fields as page
instance variables for use in the class's events, you should NOT
do the same
in JATO. This was an ND pattern that is unnecessary and
inefficient in
JATO. Instead, you should just use the generated accessors or the
getDisplayField()/getChild() methods to obtain a reference to a
displayfield as needed. Mike Frisino has elaborated this point in
the past; please
refer to his emails.
Todd
[email protected]
[email protected]
Maybe you are looking for
-
Photoshop CS5 crashing when opening/creating a new file. (OSX)
I've seen several threads with this issue but so far none of the solutions have worked. I've tried: -Resetting the preferences -Deleting the mediabrowser.plist and photoshop.plist -Changing the default printer -Updating Photoshop -Updating OSX Crash
-
Is RTMT can monitor when the first Route Group of a Route List is not used ?
Hi everyone, I want to find how monitor this event in RTMT without success. I hope someone will have an idea to suggest ! My problem : I have one Route List (RL_Remote) wich is used to route calls between two sites. This Route List has two Route Grou
-
plz help me while making app id it says An unexpected error occurred. Please try again."?
-
I am decieding wether or not to get a Thunderbolt Display. I want to know if I could play Xbox on it. Is there a HDMI to Thunderbolt so that I can play Xbox on my display? PS: I want a Thunderbolt Display not a Apple HDMI Display.
-
Hello, I have a project class(object) which contains all information about the actual project. In this class there are some base type variables and some sub classes. To save the actual project object I don't want to use serialization but an XML outpu