Re: [SunONE-JATO] JatoTutorial
Fr?d?ric--
In the case of a GET, all the information required to reconstruct the target
page is available in the address bar, and thus bookmarks work fine. When
the user does a POST, the same information does not appear in the address
bar and bookmarking the page will bookmark the previous page. But this is
nothing new. Any server code that dynamically decides which page to show
while processing a POST will have the same or a similar issue, unless it is
using a type I architecture. Because there are multiple buttons per form,
and for each button the JATO developer has the freedom to dynamically decide
which page to show next, there is no way to determine at page rendering time
the URL that should appear in the form tag.
One workaround is to change the "method" attribute on the form tag to GET.
However, there are drawbacks to this approach. First, you cannot send
nearly as much data with a GET as you can a POST (especially keep this in
mind when using JATO's page session feature). Second, is it always correct
for the user to be able to bookmark a page resulting from a POST? For
example, in the case of the login scenario you mention, or say a credit card
transaction, possibly not.
There have always been all sorts of issues with users bookmarking dynamic
pages (session, data consistency, etc.); this is just one of them.
As for the jsessionid question, I misunderstood your question. You are
seeing this because JATO unilaterally uses the encodeURL() method on all
URLs, including the one in the form tag. This is why you see it on the
first GET or POST, and it is necessary to make sure the user does not
bypass the container's session tracking. If you find that it's a problem,
you can turn off session tracking via URL rewriting, but this of course has
the consequence of only permitting users using cookies to access the
application.
Todd
----- Original Message -----
From: "Fr?d?ric Miserey" <frederic@n...>
Sent: Sunday, September 15, 2002 12:02 AM
Subject: Re: [SunONE-JATO] JatoTutorial
Todd,
It is "just" an issue because if the user bookmarks the page at that
point (emails the address, ...), it will go back to the login page, not
the customer page. If I even encounter such a web-site, I don't come
back. Bring this issue to Jakob (www.useit.com) and see what he has to
say ;)
If .forwardTo has always the same side-effect, this becomes an issue as
the address bar should reflect the user's location on the site. I've
never seen this problem while browsing nor while developing apps with
NAS (99: version2 ?) Of course, a 302 is NOT a solution. Is there a
work-around ?
Regarding jsessionid, I knew what it was ;-) but I was wondering why it
was appearing after "Submit" and going away for good after "Update" (at
least on IE). Is this another "byproduct" of .forwardTo ?
Thanx
Fr?d?ric
On dimanche, sep 15, 2002, at 04:33 Europe/Paris, Todd Fast wrote:
Fr?d?ric--
The behavior you notice is normal for a JATO app, and is a byproduct
of the
fact that JATO requests go back to the same object. Any framework or
architecture that uses this technique will be the same. It is not
something
that should cause any issues if that's what you're worried about.
Note that
if for some reason you really need to show a particular address in the
address bar, you can issue a 302 redirect to the client to have it
load the
URL of your choice. Note also that you wouldn't want to do that on a
regular basis since it multiplies the number of requests to the server
(one
for the original request and one for the redirected request).
The jsessionid is the standard session key for J2EE containers. You
will
normally always see this on the first URL you get back from the server,
since the server doesn't know if the client supports cookie-based
session
tracking yet. Once the server determines that cookies are supported,
it
omits the session key from subsequent URLs. However, if the client
doesn't
support cookies, the session key will be added to the URL, a technique
called "URL rewriting". This was the standard technique for tracking
session in web apps before cookies were invented or in widespread use.
Todd
----- Original Message -----
From: "Fr?d?ric Miserey" <frederic@n...>
Sent: Saturday, September 14, 2002 10:12 AM
Subject: [SunONE-JATO] JatoTutorial
I'm ramping up on Jato. Being a good soldier, I followed the tutorial ;
I noticed a strange thing:
1 I type in the browser "address zone": (appserver
root)/JatoTutorial/module1/Login
2 I enter one of the three valid logins
3 I hit "Submit"
4 The Customer jsp is displayed
BUT the browser "address zone" still shows /Login, not Customer
5 I hit "Update"
6 "address zone" now correctly shows /Customer
Can this (4 BUT) be fixed ?
Also, on some browsers, in step (4), some browsers (OmniWeb/IE 5.2 -
not Mozilla 1.2a) ";jsessionid=xyz..." is appended to /Login. Is this a
feature of Jato, of the appserver I'm using ? (Oracle OC4J 903b)
I'll try to raise the bar of my questions as time passes ;?)
Thanx,
Fr?d?ric
ps: if you wonder, I'm running all this on a MacOSX notebook ! (I have
yet to install SunApp 7.0b2 on one of my Solaris boxes ;)
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
<image.tiff>
>
>
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
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]
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
test
Similar Messages
-
Re: [SunONE-JATO] Re: How to use a tiled view without a model
I'm not sure what is different for you now. You still parse the string
and put it into a data structure. Before the data structure was a
vector, in JATO its just a model with a "hidden" data structure (a hash
map).
MVC only really comes into play when you talk about where your write
this code, and where the data structure is being stored. So really, JATO
takes care of half of the MVC'ness of it all (where the data is store).
You just decide where to be the code to populate the model.
Make sense?
Is there something different required of you in JATO in this scenario
that I am not grasping?
c
Hoskins, John D. wrote:
Thanks for the feedback.
The problem I was solving involved a single string, which contained
delimited subsets of information.
The string looked like
this:"time|analyst|description|time|analyst|description|..."
In ND, I parsed it apart into it's components (time vector, analyst vector,
description vector), populated the repeated.
With JATO, how would I make a model for something that doesn't have a
database component like this?
I'm pretty new to this MVC thing, so bear with me.
John D. Hoskins
Telephone & Data Systems
Application Development & Support
Voice: 608.664.8263
Fax: 608.664.8288
Email: john.hoskins@t...
-----Original Message-----
From: Craig V. Conover [mailto:<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039098031198039130252055210">craig.conover@s...</a>]
Sent: 6/26/2002 3.22 PM
Subject: Re: [SunONE-JATO] Re: How to use a tiled view without a model
I guess the only thing "weird" (for lack of a better term) about what
you are doing is that your are populating the model on the "display
cycle". Typically, the cycle goes like this:
Request -> populate model -> update data store -> retrieve data to
populate model -> display data
some of the above steps are optional but hopefully you get the point I
am making.
So what you are doing is:
Request -> populate model/display data
If it works for you, then it's not necessarilly wrong. But I would
probably have my model populated before I forwarded to the target
(displaying view bean) or at a minimum, in the begin display event of
the view bean or the tiled view, but not during the iteration of the
tiled view.
c
jhoskins wrote:
Craig,
Thanks for the pointers. I ended up doing something else. I set the
models setSize() method to set the max size, and as the tiles fields
iterated, populated the value from some vectors I had the data in
already. Is this solution fraught with peril and will ultimately fail,
or should I try your way?
John
--- Craig V. Conover wrote:
John,
Check out the docs for DefaultModel. There is an appendRow() method.
So get your tiledview's primary model (the tiledview's primary model
should be set to use an instance of DefaultModel), model.appendRow(),
then model.setValue("fieldname", value) for each value.
Rinse, repeat as needed.
c
jhoskins wrote:
I would like to use a tiled view, but populate the fields manually.
Any pointers about where I can set the size of the tiled view? I tried
setMaxDisplayTiles() in the beginDisplay, but it won't get down and
generate the rows.
John Hoskins
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jspCraig,
Thanks for the pointers. I ended up doing something else. I set the
models setSize() method to set the max size, and as the tiles fields
iterated, populated the value from some vectors I had the data in
already. Is this solution fraught with peril and will ultimately fail,
or should I try your way?
John
--- "Craig V. Conover" wrote:
John,
Check out the docs for DefaultModel. There is an appendRow() method.
So get your tiledview's primary model (the tiledview's primary model
should be set to use an instance of DefaultModel), model.appendRow(),
then model.setValue("fieldname", value) for each value.
Rinse, repeat as needed.
c
jhoskins wrote:
I would like to use a tiled view, but populate the fields manually.
Any pointers about where I can set the size of the tiled view? I tried
setMaxDisplayTiles() in the beginDisplay, but it won't get down and
generate the rows.
John Hoskins
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp -
Re: [SunONE-JATO] Re: Using an object to store and display data
Personally, I think there is little or no value to creating a "domain"
object that itself relies on a JATO QueryModel internally, but hides that
fact and requires use of BeanAdapterModel.
It would be more appropriate (and much less work, and more scalable) to just
derive a QueryModel subclass and add the domain-specific behavior to the
model. In other words, what's the point of creating an object that hides
JATO inside it when you're running in JATO to begin with? Now if the domain
object were doing plain JDBC, and thus trying to be JATO independent, that
would be different. However, you could still implement the Model interface
on the object (or use BeanAdapterModel) to integrate it seamlessly with the
View tier.
Todd
----- Original Message -----
From: "grschroeder" <grschroeder@y...>
Sent: Wednesday, July 31, 2002 12:00 PM
Subject: [SunONE-JATO] Re: Using an object to store and display data
Craig,
I think it all finally makes sense. First, your assumption is
correct regarding the process flow. The ViewBean will interact with
a custom Javabean which will then in turn interact with a SQL Model
to access the database. So now let me make sure I understand what I
need to do. Basically the custom Javabean will have a method to get
the SQLModel. I would then invoke the setValue method on the
SQLModel and call the appropriate execute method( e.g.,
executeUpdate, etc. ) just like I would do from a ViewBean. Does
this sound correct?
Thanks,
Greg
--- In SunONE-JATO@y..., "Craig V. Conover" <craig.conover@s...>
wrote:
Greg,
see below...
grschroeder wrote:
Thanks for the help Craig. I looked at the sample code that makes
use of the BeanAdapterModel. Basically it looks like it allows a
view to interact with a bean the same way it would interact with
any
other model. That part I think I understand.
This is correct.
The part I'm a little
unclear on still is how to interface this BeanAdapterModel( which
is
a very basic model ) that I now have with a query model toactually
interact with the database.
Not sure what you mean by "interface this BeanAdapterModel ... witha
query model". Does this mean that you have a ViewBean the interactswith
a custom JavaBean via the BeanAdpterModel wrapper, and from the
JavaBean you are interacting with the SQL Model?
So it looks like this: ViewBean > BeanAdapterModel(Custom JavaBean)
SQL Model > RDBMS
That's what I am reading anyway. Please explain this to me.
Would I need to make direct JDBC calls
from my custom model instead of letting JATO dynamically create
the
calls for me?
If my assumptions above are correct, then the custom JavaBean cansimply
use the SQL Model in exactly the same manner as the ViewBean,otherwise,
if no SQL Model is involved, then yes, you need to handle JDBCdirectly,
which is fine, if you do it "right" (connection pooling, result set
handling, etc.).
Thanks,
Greg
--- In SunONE-JATO@y..., "Craig V. Conover" <craig.conover@s...>
wrote:
I think the best approach would be to treat your Domain Objects
(DO) as
the Database (the enterprise tier) from JATO's perspective. You
could
create custom models that interface with our DO's and then the
JATO
Views could easily bind to the custom DO models just like anyother
model. This should eliminate the need for pushing data/objectsfrom
>
view
to model to database.
There is a JATO class called BeanAdapterModel that might be just
what
you need, however, I am not experienced with using it. Maybe
someone
else on my team or in the community could better explain how to
use
>
this
class.
craig
grschroeder wrote:
Venki,
Thanks for the response. Actually, I'm not sure if I can answer
all
of your questions because those are some of the same questions
that
we're trying to answer ourselves. Basically, what we're trying
to
>do
is incorporate our domain object model into the JATO framework.
My
thinking was that one way we could accomplish this was by
storing
>a
Javabean object in the HTTPSession to represent an object in the
domain model, and that the Viewbean and JATO Model could get and
set
data from there. If you have a better suggestion of how to
accomplish this, I'm definitely open to hearing it.
Thanks,
Greg
--- In SunONE-JATO@y..., Venki <heyvenki@y...> wrote:
OK grschroeder , first let me get this straight:
0. Are you going to pass this object to the model, or are u
going
>
to pass the session object to the model?
1. Is there any specific reason for this approach you are
taking?
2. Will there be a notification from the object u havementioned
>to
have the model persist the data?
3. What about the reverse case, when the model refreshes the
data,
how are you going to refresh you object?
4. The JavaBean Object that u are talking about, is it your own
object or is it implementation of an existing JATO interface?
~Venki
grschroeder wrote:I'm fairly new to JATO, but I think I now
have
>a
basic understanding
of how Viewbeans and Models interact. However, I want to
incorporate
the use of a Javabean object that will be stored in the HTTP
session
and will act as the connection between the Viewbean and Model
instead
of having the Viewbean and Model interact directly with each
other.
Basically I would like to have the Model set data in the object
stored in the session so that the Viewbean can pull it out to
display
it. And vice versa, once the user modifies the data and is
ready
>
to
persist it, I would like to have the Viewbean set data in the
object
stored in the session so that the Model can pull it out to
store
>it
in the database. I'm not sure what the best approach would be
to
accomplish this. Any help you could give would be greatly
appreciated.
Thanks,
Greg
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
Service.
Venki
IT Solutions
#6, Pycrofts Garden Road, Nugambakkam, Chennai - 600 006
91-44-4925740(Home) 91-44-8212877(Work)
* Luck is what happens when Preparation meets Opportunity.
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
>To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jspPersonally, I think there is little or no value to creating a "domain"
object that itself relies on a JATO QueryModel internally, but hides that
fact and requires use of BeanAdapterModel.
It would be more appropriate (and much less work, and more scalable) to just
derive a QueryModel subclass and add the domain-specific behavior to the
model. In other words, what's the point of creating an object that hides
JATO inside it when you're running in JATO to begin with? Now if the domain
object were doing plain JDBC, and thus trying to be JATO independent, that
would be different. However, you could still implement the Model interface
on the object (or use BeanAdapterModel) to integrate it seamlessly with the
View tier.
Todd
----- Original Message -----
From: "grschroeder" <grschroeder@y...>
Sent: Wednesday, July 31, 2002 12:00 PM
Subject: [SunONE-JATO] Re: Using an object to store and display data
Craig,
I think it all finally makes sense. First, your assumption is
correct regarding the process flow. The ViewBean will interact with
a custom Javabean which will then in turn interact with a SQL Model
to access the database. So now let me make sure I understand what I
need to do. Basically the custom Javabean will have a method to get
the SQLModel. I would then invoke the setValue method on the
SQLModel and call the appropriate execute method( e.g.,
executeUpdate, etc. ) just like I would do from a ViewBean. Does
this sound correct?
Thanks,
Greg
--- In SunONE-JATO@y..., "Craig V. Conover" <craig.conover@s...>
wrote:
Greg,
see below...
grschroeder wrote:
Thanks for the help Craig. I looked at the sample code that makes
use of the BeanAdapterModel. Basically it looks like it allows a
view to interact with a bean the same way it would interact with
any
other model. That part I think I understand.
This is correct.
The part I'm a little
unclear on still is how to interface this BeanAdapterModel( which
is
a very basic model ) that I now have with a query model toactually
interact with the database.
Not sure what you mean by "interface this BeanAdapterModel ... witha
query model". Does this mean that you have a ViewBean the interactswith
a custom JavaBean via the BeanAdpterModel wrapper, and from the
JavaBean you are interacting with the SQL Model?
So it looks like this: ViewBean > BeanAdapterModel(Custom JavaBean)
SQL Model > RDBMS
That's what I am reading anyway. Please explain this to me.
Would I need to make direct JDBC calls
from my custom model instead of letting JATO dynamically create
the
calls for me?
If my assumptions above are correct, then the custom JavaBean cansimply
use the SQL Model in exactly the same manner as the ViewBean,otherwise,
if no SQL Model is involved, then yes, you need to handle JDBCdirectly,
which is fine, if you do it "right" (connection pooling, result set
handling, etc.).
Thanks,
Greg
--- In SunONE-JATO@y..., "Craig V. Conover" <craig.conover@s...>
wrote:
I think the best approach would be to treat your Domain Objects
(DO) as
the Database (the enterprise tier) from JATO's perspective. You
could
create custom models that interface with our DO's and then the
JATO
Views could easily bind to the custom DO models just like anyother
model. This should eliminate the need for pushing data/objectsfrom
>
view
to model to database.
There is a JATO class called BeanAdapterModel that might be just
what
you need, however, I am not experienced with using it. Maybe
someone
else on my team or in the community could better explain how to
use
>
this
class.
craig
grschroeder wrote:
Venki,
Thanks for the response. Actually, I'm not sure if I can answer
all
of your questions because those are some of the same questions
that
we're trying to answer ourselves. Basically, what we're trying
to
>do
is incorporate our domain object model into the JATO framework.
My
thinking was that one way we could accomplish this was by
storing
>a
Javabean object in the HTTPSession to represent an object in the
domain model, and that the Viewbean and JATO Model could get and
set
data from there. If you have a better suggestion of how to
accomplish this, I'm definitely open to hearing it.
Thanks,
Greg
--- In SunONE-JATO@y..., Venki <heyvenki@y...> wrote:
OK grschroeder , first let me get this straight:
0. Are you going to pass this object to the model, or are u
going
>
to pass the session object to the model?
1. Is there any specific reason for this approach you are
taking?
2. Will there be a notification from the object u havementioned
>to
have the model persist the data?
3. What about the reverse case, when the model refreshes the
data,
how are you going to refresh you object?
4. The JavaBean Object that u are talking about, is it your own
object or is it implementation of an existing JATO interface?
~Venki
grschroeder wrote:I'm fairly new to JATO, but I think I now
have
>a
basic understanding
of how Viewbeans and Models interact. However, I want to
incorporate
the use of a Javabean object that will be stored in the HTTP
session
and will act as the connection between the Viewbean and Model
instead
of having the Viewbean and Model interact directly with each
other.
Basically I would like to have the Model set data in the object
stored in the session so that the Viewbean can pull it out to
display
it. And vice versa, once the user modifies the data and is
ready
>
to
persist it, I would like to have the Viewbean set data in the
object
stored in the session so that the Model can pull it out to
store
>it
in the database. I'm not sure what the best approach would be
to
accomplish this. Any help you could give would be greatly
appreciated.
Thanks,
Greg
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
Service.
Venki
IT Solutions
#6, Pycrofts Garden Road, Nugambakkam, Chennai - 600 006
91-44-4925740(Home) 91-44-8212877(Work)
* Luck is what happens when Preparation meets Opportunity.
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
>To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp -
I need probably to reorder Parent-Child relationships,
I have now
- ViewBean
---MenuItemsTiledView.class
---OrderCacheTiledView.class
---Button.class (append)
I will try to have
- ViewBean
---MenuItemsTiledView.class
------OrderCacheTiledView.class
---------Button.class (append)
And I will have to change:
<jato:tiledView name="MenuItems"
<jato:tiledView name="OrderCache"
<go method="post" href="<%=response.encodeURL
("../member/MenuItems") %>">
<postfield name="MenuItems.append" value=""/>
<postfield name="MenuItems.menuItemId"
value="<jato:getDisplayFieldValue
name='MenuItemId'/>" />
</go>
I think it is strict rule to have the same parent-child relationships in
JSP like as in classes
May I have more freedom like as with <jato:text name="...">, where name
could be relative (to parent, to container), absolute?
Fuad
-----Original Message-----
From: Fuad Efendi [mailto:<a href="/group/SunONE-JATO/post?protectID=230075113150035198105038066208231165163158211254234113172006048205015246">fuad.efendi@s...</a>]
Sent: Friday, May 17, 2002 12:02 PM
Subject: [SunONE-JATO] handle...Request() - in different TiledView?
Hello,
I use ViewBean, and two child TiledViews (WML sample).
<jato:tiledView name="TiledView1"
type="mobiledb.member.MenuItemsTiledView">
<go method="post" href="<%=
response.encodeURL("../member/MenuItems") %>">
<postfield name="MenuItems.append" value=""/>
<postfield name="MenuItems.menuItemId"
value="<jato:getDisplayFieldValue name='MenuItemId'/>" />
</go>
I think, "handleAppendRequest()" will work within TiledView1 (I didn't
try yet, I have this handler in ViewBean).
But, logically, better place for it is TiledView2 which contains cached
appended records...
I can have handler in ViewBean redirecting into TiledView2 of course,
What is the best way?
Thanks,
Fuad
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
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]Sorry for mistake with index,
<postfield name="MyJspPage.MyTiledView[2].Append" value=""/>
-----Original Message-----
From: Fuad Efendi [mailto:<a href="/group/SunONE-JATO/post?protectID=230075113150035198105038066208231165163158211254234113172006048205015246">fuad.efendi@s...</a>]
Sent: Saturday, May 18, 2002 12:42 PM
Subject: RE: [SunONE-JATO] handle...Request() - in different TiledView?
OK, I solved it (for WML),
If I use "virtual buttons" on JSP page (within <jato:tiledView.../>
tag), and this buttons are child of MyTiledView class (which is child of
MyViewBean), I can use
<postfield name="MyJspPage.MyTiledView.Append[2]" value=""/>
for emulation of button.
I don't use MyViewBean.MyTiledView.Append[2]!
Next step: I have to understand what to do with index in
MyTiledView.handleAppendRequest... Code seems harder than putting Button
and Handler in main MyViewBean...
[Non-text portions of this message have been removed] -
[SunONE-JATO] ModelTypeMapInfo
Rajiv,
(I renamed the subject to make it easier to follow)
The ModelTypeMapImpl is for mapping model interfaces to the model's
implementation so that you can get a reference to the model impl by
using is interface name.
This is from the javadocs for ModelTypeMap (an interface that
ModelTypeMapBase implements which is the super class for ModelTypeMapImpl):
* Allows for the mapping of a <code>Model</code> interface to a class that
* implements that interface. This class is used by the
<code>ModelManager</code>.
* Each JATO application should have a single implementation of this
interface.
Now this class was used predominately in JATO 1.2 and prior. In JATO
2.0, its use is no longer "pushed" but can still serve a purpose for
those who wish to use it. The reason it is not used in JATO 2.0 so much,
is that the IDE tools only generate one Model file (the implementation
which no longr carries the Impl suffix), and therefore, a mapping is not
necessary. It was not actually necessary in pre 2.0 apps either, we were
just encouraging its use for better decoupling of the Views from the Models.
Hope that helps.
I will answer the ListBox question in a separate thread.
craig
rajiv menon wrote:
I am new to JATO
can u pls tell me the usage of this file...
ModelTypeMapImpl.java
and can u tell me which method to call to populate a
listbox with some data recieved from the database.
To download the latest version of S1AF (JATO), please visit one of the
following locations:
Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community Edition:
http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html
Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise Edition:
http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html
Previous versions of JATO:
http://www.sun.com/software/download/developer/5102.htmlHi Todd,
I'm not sure I fully understand what the scope of a request is.....
But I can tell you that if I allow getDisplayFieldValue() to return a
string the string it prints is the string equivalent of the Node
Object I originally passed in. It is definately saving and
retrieving the correct data it is just converting it to a string
somewhere along the way.
Thanks,
Lucy
--- In SunONE-JATO@y..., Todd Fast <Todd.Fast@S...> wrote:
When are you calling getDisplayFieldValue()? Is it within the same request?
>
Todd
----- Original Message -----
From: "lucymbrophy" <lucy.brophy@s...>
Sent: Friday, May 24, 2002 3:32 AM
Subject: [SunONE-JATO] getDisplayFieldValue()
Hi all,
I am using setDisplayFieldValue() and am passing in a String and
an
Object. The object is of type class=Node
However, when I call getDisplayFieldValue() on the same display field
the Object that is returned to me is of type class=String. This
means that I can't cast it back to a Node.
Anybody have any ideas where I'm going wrong? Is this the expected
behaviour?
Thanks,
Lucy Brophy
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp -
OK, fair enough.
Look at the ServletConfig class.
c
Purvashada wrote:
>
We had that option. We decided against the
property files as we can get this dynamically.
There has been problems when this property
was set incorrectly at the time of installation.
Are there any api's to get the servername and
port number other than through request object..
--- "Craig V. Conover" <craig.conover@s...> wrote:
So I guess my question is, why do you need a user
request to get this
information?
You should be able to get this info when the
application is started up,
from a props file.
Does this info change from day to day? If not, why
not create a props
file on the machine that the app is running that has
this info?
Then in the servlet's init method, read this prop
file.
Does that work for you? Not sure how a user request
is needed to
determine this? If it is, please explain.
I have used this same technique for database
properties (servername,
instance name, uid, pwd, etc).
On the QA machine was the properties that pointed to
the QA database,
and on the Production machine, the property file
with the same name had
props that pointed to the Production database.
craig
Purvashada wrote:
It is a static data that is same for all theusers.
It is application level data but generateddynamically
to get the server name and the port number the appis
running on..
Thanks
--- "Craig V. Conover" <craig.conover@s...>wrote:
OK, so how does doing this only once help you.
Wouldn't you need to do
this for each individual end user?
I'm not suggesting that this is request scoped,but
maybe session scoped.
If so, then do this in the module servlet's
onNewSession event.
If this is per user, then storing it staticallyis
problematic because
all users will be using the same data which Idon't
think you want.
Let me know if my assumptions are correct.
craig
Purvashada wrote:
Basically, I need to pass the host url/request
url
to
another server which then posts the results
back to this server.
I need to get the host url dynamically.
This is what I am doing in my code to
get the host url..
URL =req.getScheme() + "://" +
req.getServerName()
+
":" + req.getServerPort();
Thanks
--- "Craig V. Conover" <craig.conover@s...>wrote:
Correct, that is a per request event.
Sounds like we need to figure out a newapproach.
Please elaborate on your requirements for
doing
whatever it is you require.
Maybe we can suggest an alternative, orperhaps
reveal that it may not
be necessary after all.
craig
Purvashada wrote:
I had added this code in the
initializeRequestContext(..)
Hoping it would be called once.
It looks like it is called for every
request.
HttpServletRequest req =requestContext.getRequest();
setActionURL(req);
If I add the code in the init() method
how can I get the HttpServletRequest
getRequest()
Thanks
--- "Craig V. Conover"
<craig.conover@s...>
wrote:
cool.
Be careful about how you update this URL
when
you
use setURL method.
The servlets in JATO are the only shared
(Application scope rather than
Request scope like ViewBeans and
Models),
and
that
you could potentially
have sync/multithread issues. You said
you
were
only
updating once at
the start of the App, so you should be
fine.
I
assume you are doing this
from an init method or init event in theservlet
class? If so, no worries.
Also, just to be sure everyone follows,
I am
not
suggesting that you
write syncronize code in the servlets asthis
will
be a potential bottle
neck in your app's scalibility. This is
not
a
JATO
shortcoming as there
are alternatives to do this sort of
coding.
craig
Purvashada wrote:
I made the method static and is
accessible..
--- "Craig V. Conover"<craig.conover@s...>
wrote:
I would assume it is a static
method, so
just
do:
MainAppServletBase.getURL()
right?
If not static, it probably should
be. If
you
feel it
should not be
static, let us know why/what your
requirements
are.
>
=== message truncated ===
To download the latest version of S1AF (JATO), please visit one of the
following locations:
Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community Edition:
http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html
Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise Edition:
http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html
Previous versions of JATO:
http://www.sun.com/software/download/developer/5102.htmlOK, fair enough.
Look at the ServletConfig class.
c
Purvashada wrote:
>
We had that option. We decided against the
property files as we can get this dynamically.
There has been problems when this property
was set incorrectly at the time of installation.
Are there any api's to get the servername and
port number other than through request object..
--- "Craig V. Conover" <craig.conover@s...> wrote:
So I guess my question is, why do you need a user
request to get this
information?
You should be able to get this info when the
application is started up,
from a props file.
Does this info change from day to day? If not, why
not create a props
file on the machine that the app is running that has
this info?
Then in the servlet's init method, read this prop
file.
Does that work for you? Not sure how a user request
is needed to
determine this? If it is, please explain.
I have used this same technique for database
properties (servername,
instance name, uid, pwd, etc).
On the QA machine was the properties that pointed to
the QA database,
and on the Production machine, the property file
with the same name had
props that pointed to the Production database.
craig
Purvashada wrote:
It is a static data that is same for all theusers.
It is application level data but generateddynamically
to get the server name and the port number the appis
running on..
Thanks
--- "Craig V. Conover" <craig.conover@s...>wrote:
OK, so how does doing this only once help you.
Wouldn't you need to do
this for each individual end user?
I'm not suggesting that this is request scoped,but
maybe session scoped.
If so, then do this in the module servlet's
onNewSession event.
If this is per user, then storing it staticallyis
problematic because
all users will be using the same data which Idon't
think you want.
Let me know if my assumptions are correct.
craig
Purvashada wrote:
Basically, I need to pass the host url/request
url
to
another server which then posts the results
back to this server.
I need to get the host url dynamically.
This is what I am doing in my code to
get the host url..
URL =req.getScheme() + "://" +
req.getServerName()
+
":" + req.getServerPort();
Thanks
--- "Craig V. Conover" <craig.conover@s...>wrote:
Correct, that is a per request event.
Sounds like we need to figure out a newapproach.
Please elaborate on your requirements for
doing
whatever it is you require.
Maybe we can suggest an alternative, orperhaps
reveal that it may not
be necessary after all.
craig
Purvashada wrote:
I had added this code in the
initializeRequestContext(..)
Hoping it would be called once.
It looks like it is called for every
request.
HttpServletRequest req =requestContext.getRequest();
setActionURL(req);
If I add the code in the init() method
how can I get the HttpServletRequest
getRequest()
Thanks
--- "Craig V. Conover"
<craig.conover@s...>
wrote:
cool.
Be careful about how you update this URL
when
you
use setURL method.
The servlets in JATO are the only shared
(Application scope rather than
Request scope like ViewBeans and
Models),
and
that
you could potentially
have sync/multithread issues. You said
you
were
only
updating once at
the start of the App, so you should be
fine.
I
assume you are doing this
from an init method or init event in theservlet
class? If so, no worries.
Also, just to be sure everyone follows,
I am
not
suggesting that you
write syncronize code in the servlets asthis
will
be a potential bottle
neck in your app's scalibility. This is
not
a
JATO
shortcoming as there
are alternatives to do this sort of
coding.
craig
Purvashada wrote:
I made the method static and is
accessible..
--- "Craig V. Conover"<craig.conover@s...>
wrote:
I would assume it is a static
method, so
just
do:
MainAppServletBase.getURL()
right?
If not static, it probably should
be. If
you
feel it
should not be
static, let us know why/what your
requirements
are.
>
=== message truncated ===
To download the latest version of S1AF (JATO), please visit one of the
following locations:
Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community Edition:
http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html
Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise Edition:
http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html
Previous versions of JATO:
http://www.sun.com/software/download/developer/5102.html -
Re: [SunONE-JATO] How to use a tiled view without a model
John,
Check out the docs for DefaultModel. There is an appendRow() method.
So get your tiledview's primary model (the tiledview's primary model
should be set to use an instance of DefaultModel), model.appendRow(),
then model.setValue("fieldname", value) for each value.
Rinse, repeat as needed.
c
jhoskins wrote:
I would like to use a tiled view, but populate the fields manually.
Any pointers about where I can set the size of the tiled view? I tried
setMaxDisplayTiles() in the beginDisplay, but it won't get down and
generate the rows.
John Hoskins
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jspCraig,
Thanks for the pointers. I ended up doing something else. I set the
models setSize() method to set the max size, and as the tiles fields
iterated, populated the value from some vectors I had the data in
already. Is this solution fraught with peril and will ultimately fail,
or should I try your way?
John
--- "Craig V. Conover" wrote:
John,
Check out the docs for DefaultModel. There is an appendRow() method.
So get your tiledview's primary model (the tiledview's primary model
should be set to use an instance of DefaultModel), model.appendRow(),
then model.setValue("fieldname", value) for each value.
Rinse, repeat as needed.
c
jhoskins wrote:
I would like to use a tiled view, but populate the fields manually.
Any pointers about where I can set the size of the tiled view? I tried
setMaxDisplayTiles() in the beginDisplay, but it won't get down and
generate the rows.
John Hoskins
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp -
Re: [SunONE-JATO] Frame Loading
Divakar,
A very challenging scenario for all app servers, especially J2EE web
containers, is concurrent access to session. The HttpSession API does
not provide an interface for either the container vendor or the
developer to manage concurrency issues or events discretely; therefore,
there is little JATO or any framework can do to help you with
concurrency issues AND not add container behavior. The container
vendors have to rely upon implementation details to manage these complex
scenarios. Be that as it may (which is mostly my opinion anyways), the
iAS engineers have worked long and hard the last year from iAS 6.0 sp2
thru 6.5 to deal with issues around session concurrency; the discussion
of which can be fairly verbose. What is important and in some ways
unfortunate, is that the handling on these concurrency scenarios is
different between releases. I believe that there is no blocking/locking
in sp2 and earlier (resembling NetDynamics 3.x behavior). In sp3 (your
case) concurrent access was serialized (resembling in some ways
NetDynamics 4.x and 5.x) In sp4 it was changed again and finally in 6.5
it was improved to ensure data coherency and stability with locking
while eliminating locks within the same JVM. If you would like details
email me offline at [matthew.stevens@s...] and I will see what I can do.
No matter what version of iAS you are using, please ensure that your
application is deployed with Sticky load-balancing such that request
process is handled by the same JVM per session. In this way, you avoid
the 'distributed' computing problem of locking across processes and
machines. In other words, you have far less chance of hung request
threads if you use sticky load-balancing.
You need to establish some debug techniques in your development
environment for J2EE to assess hangs or latencies (there are plenty of
synchronous APIs in any J2EE container so this is not just an iAS thing
or Session concurrency thing). If you are on Solaris you may issue a
kill -3 PID
of the JVM running the web container. Sending this SIGQUIT signal to
the JVM will trap the JVM and result in a full thread dump to the
STDERR. For instance, for iAS you would find the JVM (.kjs) spawned by
the kjs script and send it a SIGQUIT. You should very easily see in the
stack traces of the threads, your own thread which is above the dispatch
to your module servlet [ie. you will see the
<ApplicationServletBase.processRequest()] stack frame in the stack trace.
If you are on Win32 you can run the iAS engines in the foreground by
invoking iAS from the command line [kas -debug] in which case the KJS
will appear in its own console window which you can CTRLBREAK to see the
stack trace.
In this way, you can see what your web container is doing while it is
latent or hung.
In your case, you will probably see your request thread blocked in calls
to PlatformNASSession or PlatformLITESession. These two classes are the
HttpSession implementations for iAS. The 'NAS' session uses the HA
Dsync sub-system for replicated attribute backing store and the 'LITE'
session uses an regular HashTable for the backing store.
Again, concurrency issues are FAR MORE complex with the distributed
implementation. Therefore, as an isolation technique, you may want to
confirm that you are using session-impl=lite in your iAS deployment
descriptor so as to avoid the Dsync implementation. Using Session LITE
should eliminate the hangs during concurrent frame loads.
Is it possible for you to upgrade to iAS 6.5? What about iAS 6.0 sp4?
Please remember to leverage the JATO front controller events, even if it
is for debug. You have the onBeforeRequest event where you could
intercept the front controller before it has bothered with the
HttpSession APIs. For isolation purposes, you could enter a critical
section from your derived onBeforeRequest event to see whether
concurrency is an issue in your case.
I hope this "frames" the problem space for you 8-) Please post any
questions or results from your testing and we can try to help further.
The best information we can use to help you is the stack trace for the
hang condition.
thanks,
matt
padiyar wrote:
I am facing problems with FrameSet loading.
I have a frameset having two frames and src defined
for both. Sometimes one of the frames doesnt get loaded.
I am using iAS 6.0 with SP3 and JATO 1.2
<FRAMESET COLS="200,*" BORDER=0 FRAMEBORDER=no>
<FRAME NAME="Frame1" SRC="../AppName/pgMenu" MARGINHEIGHT=0
MARGINWIDTH=10 SCROLLING=auto NORESIZE >
<FRAME NAME="Frame2" SRC="../AppName/pgDetail" MARGINHEIGHT=6
MARGINWIDTH=12 SCROLLING=auto RESIZE >
</FRAMESET>
From the kjs logs i noticed that onAfterRequest is not getting called
while first frame's viewbean is being executed and kjs just hangs.
If I set the SRC for one of the frames as viewbean and the other one
a blank.html and trigger the loading of second frame using javascript
on load of the first frame it works fine. But i dont
want to go for this approach.
Did anybody faced this problem and know how to fix this without using
javascripts?
Thanks,
Divakar
To download the latest version of JATO, please visit:
http://www.sun.com/software/download/developer/5102.html
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsptest
-
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: Use Of models in utility classes
Hi all,
if you add the following to your spider2jato.xml
It will automatically map your CSpDataObject.executeImmediate to use
ExecuteImmediateUtil.executeImmediateSelect with the arguments mapped as
well.
Kostas
<mapping-rule>
<mapping-rule-primarymatch>
<![CDATA[CSpDataObject[.\s]*executeImmediate[\s]*\(([^,]*),([^)]*)\)]]>
</mapping-rule-primarymatch>
<mapping-rule-replacement>
<mapping-rule-match>
<![CDATA[CSpDataObject[.\s]*executeImmediate[\s]*\(([^,]*),([^)]*)\)]]>
</mapping-rule-match>
<mapping-rule-substitute>
<![CDATA[ExecuteImmediateUtil.executeImmediateSelect($1,$2,
getRequestContext())]]>
</mapping-rule-substitute>
</mapping-rule-replacement>
</mapping-rule>
-----Original Message-----
From: Matthew Stevens
Cc: vnamboori@y...
Sent: 11/29/01 11:23 AM
Subject: RE: [iPlanet-JATO] Re: Use Of models in utility classes
Namburi,
I have included an example in the file ExecuteImmediateUtil.java
The Yahoo Group will not handle the attached file we will put it in the
Files section shortly.
matt
-----Original Message-----
From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100253094145066046167121181">vnamboori@y...</a>]
Sent: Thursday, November 29, 2001 12:29 PM
Subject: [iPlanet-JATO] Re: Use Of models in utility classes
Matt,
For CSpSelect.executeImmediate() I have an example of custom helpermethod as a replacement which uses JDBC results instead of
CSpDBResult.
Can you send me this example.
Thanks
Namburi
--- In iPlanet-JATO@y..., "Matthew Stevens" <matthew.stevens@E...>
wrote:
Namburi,
I will post a document to the group site this evening which has thedetails
on various tactics of migrating these type of utilities.Essentially, you
either need to convert these utilities to Models themselves or keepthe
utilities as is and simply use the
RequestManager.getRequestContext.getModelManager().getModel()
to statically access Models.
For CSpSelect.executeImmediate() I have an example of custom helpermethod
as a replacement whicch uses JDBC results instead of CSpDBResult.
matt
-----Original Message-----
From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100208071048">vnamboori@y...</a>]
Sent: Tuesday, August 07, 2001 3:24 PM
Subject: [iPlanet-JATO] Use Of models in utility classes
Hi All,
In the present ND project we have lots of utility classes. These
classes in diffrent directory. Not part of nd pages.
In these classes we access the dataobjects and do the
manipulations.
So we access dataobjects directly like
CSpider.getDataObject("do....");
and then execute it.
Since the migration tool does not do much of conversion for these
utilities we have to do manually.
My question is Can we access the the models in the post migration
sameway or do we need requestContext?
We have lots of utility classes which are DataObject intensive.Can
someone suggest a better way to migrate this kind of code.
Thanks
Namburi
[email protected]
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]
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]Hi all,
if you add the following to your spider2jato.xml
It will automatically map your CSpDataObject.executeImmediate to use
ExecuteImmediateUtil.executeImmediateSelect with the arguments mapped as
well.
Kostas
<mapping-rule>
<mapping-rule-primarymatch>
<![CDATA[CSpDataObject[.\s]*executeImmediate[\s]*\(([^,]*),([^)]*)\)]]>
</mapping-rule-primarymatch>
<mapping-rule-replacement>
<mapping-rule-match>
<![CDATA[CSpDataObject[.\s]*executeImmediate[\s]*\(([^,]*),([^)]*)\)]]>
</mapping-rule-match>
<mapping-rule-substitute>
<![CDATA[ExecuteImmediateUtil.executeImmediateSelect($1,$2,
getRequestContext())]]>
</mapping-rule-substitute>
</mapping-rule-replacement>
</mapping-rule>
-----Original Message-----
From: Matthew Stevens
Cc: vnamboori@y...
Sent: 11/29/01 11:23 AM
Subject: RE: [iPlanet-JATO] Re: Use Of models in utility classes
Namburi,
I have included an example in the file ExecuteImmediateUtil.java
The Yahoo Group will not handle the attached file we will put it in the
Files section shortly.
matt
-----Original Message-----
From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100253094145066046167121181">vnamboori@y...</a>]
Sent: Thursday, November 29, 2001 12:29 PM
Subject: [iPlanet-JATO] Re: Use Of models in utility classes
Matt,
For CSpSelect.executeImmediate() I have an example of custom helpermethod as a replacement which uses JDBC results instead of
CSpDBResult.
Can you send me this example.
Thanks
Namburi
--- In iPlanet-JATO@y..., "Matthew Stevens" <matthew.stevens@E...>
wrote:
Namburi,
I will post a document to the group site this evening which has thedetails
on various tactics of migrating these type of utilities.Essentially, you
either need to convert these utilities to Models themselves or keepthe
utilities as is and simply use the
RequestManager.getRequestContext.getModelManager().getModel()
to statically access Models.
For CSpSelect.executeImmediate() I have an example of custom helpermethod
as a replacement whicch uses JDBC results instead of CSpDBResult.
matt
-----Original Message-----
From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100208071048">vnamboori@y...</a>]
Sent: Tuesday, August 07, 2001 3:24 PM
Subject: [iPlanet-JATO] Use Of models in utility classes
Hi All,
In the present ND project we have lots of utility classes. These
classes in diffrent directory. Not part of nd pages.
In these classes we access the dataobjects and do the
manipulations.
So we access dataobjects directly like
CSpider.getDataObject("do....");
and then execute it.
Since the migration tool does not do much of conversion for these
utilities we have to do manually.
My question is Can we access the the models in the post migration
sameway or do we need requestContext?
We have lots of utility classes which are DataObject intensive.Can
someone suggest a better way to migrate this kind of code.
Thanks
Namburi
[email protected]
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]
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] -
Namburi,
When you said you used the Reg Exp tool, did you use it only as
preconfigured by the iMT migrate application wizard?
Because the default configuration of the regular expression tool will only
target the files in your ND project directories. If you wish to target
classes outside of the normal directory scope, you have to either modify the
"Source Directory" property OR create another instance of the regular
expression tool. See the "Tool" menu in the iMT to create additional tool
instances which can each be configured to target different sets of files
using different sets of rules.
Usually, I utilize 3 different sets of rules files on a given migration:
spider2jato.xml
these are the generic conversion rules (but includes the optimized rules for
ViewBean and Model based code, i.e. these rules do not utilize the
RequestManager since it is not needed for code running inside the ViewBean
or Model classes)
I run these rules against all files.
See the file download section of this forum for periodic updates to these
rules.
nonProjectFileRules.xml
these include rules that add the necessary
RequestManager.getRequestContext(). etc prefixes to many of the common
calls.
I run these rules against user module and any other classes that do not are
not ModuleServlet, ContainerView, or Model classes.
appXRules.xml
these rules include application specific changes that I discover while
working on the project. A common thing here is changing import statements
(since the migration tool moves ND project code into different jato
packaging structure, you sometime need to adjust imports in non-project
classes that previously imported ND project specific packages)
So you see, you are not limited to one set of rules at all. Just be careful
to keep track of your backups (the regexp tool provides several options in
its Expert Properties related to back up strategies).
----- Original Message -----
From: <vnamboori@y...>
Sent: Wednesday, August 08, 2001 6:08 AM
Subject: [iPlanet-JATO] Re: Use Of models in utility classes - Pease don't
forget about the regular expression potential
Thanks Matt, Mike, Todd
This is a great input for our migration. Though we used the existing
Regular Expression Mapping tool, we did not change this to meet our
own needs as mentioned by Mike.
We would certainly incorporate this to ease our migration.
Namburi
--- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
All--
Great response. By the way, the Regular Expression Tool uses thePerl5 RE
syntax as implemented by Apache OROMatcher. If you're doing lotsof these
sorts of migration changes manually, you should definitely buy theO'Reilly
book "Mastering Regular Expressions" and generate some rules toautomate the
conversion. Although they are definitely confusing at first,regular
expressions are fairly easy to understand with some documentation,and are
superbly effective at tackling this kind of migration task.
Todd
----- Original Message -----
From: "Mike Frisino" <Michael.Frisino@S...>
Sent: Tuesday, August 07, 2001 5:20 PM
Subject: Re: [iPlanet-JATO] Use Of models in utility classes -Pease don't
forget about the regular expression potential
Also, (and Matt's document may mention this)
Please bear in mind that this statement is not totally correct:
Since the migration tool does not do much of conversion for
these
utilities we have to do manually.Remember, the iMT is a SUITE of tools. There is the extractiontool, and
the translation tool, and the regular expression tool, and severalother
smaller tools (like the jar and compilation tools). It is correctto state
that the extraction and translation tools only significantlyconvert the
primary ND project objects (the pages, the data objects, and theproject
classes). The extraction and translation tools do minimumtranslation of the
User Module objects (i.e. they repackage the user module classes inthe new
jato module packages). It is correct that for all other utilityclasses
which are not formally part of the ND project, the extraction and
translation tools do not perform any migration.
However, the regular expression tool can "migrate" any arbitrary
file
(utility classes etc) to the degree that the regular expressionrules
correlate to the code present in the arbitrary file. So first andforemost,
if you have alot of spider code in your non-project classes youshould
consider using the regular expression tool and if warranted adding
additional rules to reduce the amount of manual adjustments thatneed to be
made. I can stress this enough. We can even help you write theregular
expression rules if you simply identify the code pattern you wish to
convert. Just because there is not already a regular expressionrule to
match your need does not mean it can't be written. We have notnearly
exhausted the possibilities.
For example if you say, we need to convert
CSpider.getDataObject("X");
To
RequestManager.getRequestContext().getModelManager().getModel(XModel.class);
Maybe we or somebody else in the list can help write that regularexpression if it has not already been written. For instance in thelast
updated spider2jato.xml file there is already aCSpider.getCommonPage("X")
rule:
<!--getPage to getViewBean-->
<mapping-rule>
<mapping-rule-primarymatch>
<![CDATA[CSpider[.\s]*getPage[\s]*\(\"([^"]*)\"]]>
</mapping-rule-primarymatch>
<mapping-rule-replacement>
<mapping-rule-match>
<![CDATA[CSpider[.\s]*getPage[\s]*\(\"([^"]*)\"]]>
</mapping-rule-match>
<mapping-rule-substitute>
<![CDATA[getViewBean($1ViewBean.class]]>
</mapping-rule-substitute>
</mapping-rule-replacement>
</mapping-rule>
Following this example a getDataObject to getModel would look
like this:
<mapping-rule>
<mapping-rule-primarymatch>
<![CDATA[CSpider[.\s]*getDataObject[\s]*\(\"([^"]*)\"]]>
</mapping-rule-primarymatch>
<mapping-rule-replacement>
<mapping-rule-match>
<![CDATA[CSpider[.\s]*getDataObject[\s]*\(\"([^"]*)\"]]>
</mapping-rule-match>
<mapping-rule-substitute>
<![CDATA[getModel($1Model.class]]>
</mapping-rule-substitute>
</mapping-rule-replacement>
</mapping-rule>
In fact, one migration developer already wrote that rule andsubmitted it
for inclusion in the basic set. I will post another upgrade to thebasic
regular expression rule set, look for a "file uploaded" posting.Also,
please consider contributing any additional generic rules that youhave
written for inclusion in the basic set.
Please not, that in some cases (Utility classes in particular)
the rule
application may be more effective as TWO sequention rules ratherthan one
monolithic rule. Again using the example above, it will convert
CSpider.getDataObject("Foo");
To
getModel(FooModel.class);
Now that is the most effective conversion for that code if that
code is in
a page or data object class file. But if that code is in a Utilityclass you
really want:
>
RequestManager.getRequestContext().getModelManager().getModel(FooModel.class
So to go from
getModel(FooModel.class);
To
RequestManager.getRequestContext().getModelManager().getModel(FooModel.class
You would apply a second rule AND you would ONLY run this rule
against
your utility classes so that you would not otherwise affect yourViewBean
and Model classes which are completely fine with the simplegetModel call.
<mapping-rule>
<mapping-rule-primarymatch>
<![CDATA[getModel\(]]>
</mapping-rule-primarymatch>
<mapping-rule-replacement>
<mapping-rule-match>
<![CDATA[getModel\(]]>
</mapping-rule-match>
<mapping-rule-substitute>
<![CDATA[RequestManager.getRequestContext().getModelManager().getModel(]]>
</mapping-rule-substitute>
</mapping-rule-replacement>
</mapping-rule>
A similer rule can be applied to getSession and other CSpider APIcalls.
For instance here is the rule for converting getSession calls toleverage
the RequestManager.
<mapping-rule>
<mapping-rule-primarymatch>
<![CDATA[getSession\(\)\.]]>
</mapping-rule-primarymatch>
<mapping-rule-replacement>
<mapping-rule-match>
<![CDATA[getSession\(\)\.]]>
</mapping-rule-match>
<mapping-rule-substitute>
<![CDATA[RequestManager.getSession().]]>
</mapping-rule-substitute>
</mapping-rule-replacement>
</mapping-rule>
----- Original Message -----
From: "Matthew Stevens" <matthew.stevens@e...>
Sent: Tuesday, August 07, 2001 12:56 PM
Subject: RE: [iPlanet-JATO] Use Of models in utility classes
Namburi,
I will post a document to the group site this evening which has
the
details
on various tactics of migrating these type of utilities.
Essentially,
you
either need to convert these utilities to Models themselves or
keep the
utilities as is and simply use the
RequestManager.getRequestContext.getModelManager().getModel()
to statically access Models.
For CSpSelect.executeImmediate() I have an example of customhelper
method
as a replacement whicch uses JDBC results instead of
CSpDBResult.
matt
-----Original Message-----
From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100208071048">vnamboori@y...</a>]
Sent: Tuesday, August 07, 2001 3:24 PM
Subject: [iPlanet-JATO] Use Of models in utility classes
Hi All,
In the present ND project we have lots of utility classes.
These
classes in diffrent directory. Not part of nd pages.
In these classes we access the dataobjects and do themanipulations.
So we access dataobjects directly like
CSpider.getDataObject("do....");
and then execute it.
Since the migration tool does not do much of conversion forthese
utilities we have to do manually.
My question is Can we access the the models in the postmigration
sameway or do we need requestContext?
We have lots of utility classes which are DataObjectintensive. Can
someone suggest a better way to migrate this kind of code.
Thanks
Namburi
[email protected]
[email protected]
[Non-text portions of this message have been removed]
[email protected]
[email protected]Namburi,
When you said you used the Reg Exp tool, did you use it only as
preconfigured by the iMT migrate application wizard?
Because the default configuration of the regular expression tool will only
target the files in your ND project directories. If you wish to target
classes outside of the normal directory scope, you have to either modify the
"Source Directory" property OR create another instance of the regular
expression tool. See the "Tool" menu in the iMT to create additional tool
instances which can each be configured to target different sets of files
using different sets of rules.
Usually, I utilize 3 different sets of rules files on a given migration:
spider2jato.xml
these are the generic conversion rules (but includes the optimized rules for
ViewBean and Model based code, i.e. these rules do not utilize the
RequestManager since it is not needed for code running inside the ViewBean
or Model classes)
I run these rules against all files.
See the file download section of this forum for periodic updates to these
rules.
nonProjectFileRules.xml
these include rules that add the necessary
RequestManager.getRequestContext(). etc prefixes to many of the common
calls.
I run these rules against user module and any other classes that do not are
not ModuleServlet, ContainerView, or Model classes.
appXRules.xml
these rules include application specific changes that I discover while
working on the project. A common thing here is changing import statements
(since the migration tool moves ND project code into different jato
packaging structure, you sometime need to adjust imports in non-project
classes that previously imported ND project specific packages)
So you see, you are not limited to one set of rules at all. Just be careful
to keep track of your backups (the regexp tool provides several options in
its Expert Properties related to back up strategies).
----- Original Message -----
From: <vnamboori@y...>
Sent: Wednesday, August 08, 2001 6:08 AM
Subject: [iPlanet-JATO] Re: Use Of models in utility classes - Pease don't
forget about the regular expression potential
Thanks Matt, Mike, Todd
This is a great input for our migration. Though we used the existing
Regular Expression Mapping tool, we did not change this to meet our
own needs as mentioned by Mike.
We would certainly incorporate this to ease our migration.
Namburi
--- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
All--
Great response. By the way, the Regular Expression Tool uses thePerl5 RE
syntax as implemented by Apache OROMatcher. If you're doing lotsof these
sorts of migration changes manually, you should definitely buy theO'Reilly
book "Mastering Regular Expressions" and generate some rules toautomate the
conversion. Although they are definitely confusing at first,regular
expressions are fairly easy to understand with some documentation,and are
superbly effective at tackling this kind of migration task.
Todd
----- Original Message -----
From: "Mike Frisino" <Michael.Frisino@S...>
Sent: Tuesday, August 07, 2001 5:20 PM
Subject: Re: [iPlanet-JATO] Use Of models in utility classes -Pease don't
forget about the regular expression potential
Also, (and Matt's document may mention this)
Please bear in mind that this statement is not totally correct:
Since the migration tool does not do much of conversion for
these
utilities we have to do manually.Remember, the iMT is a SUITE of tools. There is the extractiontool, and
the translation tool, and the regular expression tool, and severalother
smaller tools (like the jar and compilation tools). It is correctto state
that the extraction and translation tools only significantlyconvert the
primary ND project objects (the pages, the data objects, and theproject
classes). The extraction and translation tools do minimumtranslation of the
User Module objects (i.e. they repackage the user module classes inthe new
jato module packages). It is correct that for all other utilityclasses
which are not formally part of the ND project, the extraction and
translation tools do not perform any migration.
However, the regular expression tool can "migrate" any arbitrary
file
(utility classes etc) to the degree that the regular expressionrules
correlate to the code present in the arbitrary file. So first andforemost,
if you have alot of spider code in your non-project classes youshould
consider using the regular expression tool and if warranted adding
additional rules to reduce the amount of manual adjustments thatneed to be
made. I can stress this enough. We can even help you write theregular
expression rules if you simply identify the code pattern you wish to
convert. Just because there is not already a regular expressionrule to
match your need does not mean it can't be written. We have notnearly
exhausted the possibilities.
For example if you say, we need to convert
CSpider.getDataObject("X");
To
RequestManager.getRequestContext().getModelManager().getModel(XModel.class);
Maybe we or somebody else in the list can help write that regularexpression if it has not already been written. For instance in thelast
updated spider2jato.xml file there is already aCSpider.getCommonPage("X")
rule:
<!--getPage to getViewBean-->
<mapping-rule>
<mapping-rule-primarymatch>
<![CDATA[CSpider[.\s]*getPage[\s]*\(\"([^"]*)\"]]>
</mapping-rule-primarymatch>
<mapping-rule-replacement>
<mapping-rule-match>
<![CDATA[CSpider[.\s]*getPage[\s]*\(\"([^"]*)\"]]>
</mapping-rule-match>
<mapping-rule-substitute>
<![CDATA[getViewBean($1ViewBean.class]]>
</mapping-rule-substitute>
</mapping-rule-replacement>
</mapping-rule>
Following this example a getDataObject to getModel would look
like this:
<mapping-rule>
<mapping-rule-primarymatch>
<![CDATA[CSpider[.\s]*getDataObject[\s]*\(\"([^"]*)\"]]>
</mapping-rule-primarymatch>
<mapping-rule-replacement>
<mapping-rule-match>
<![CDATA[CSpider[.\s]*getDataObject[\s]*\(\"([^"]*)\"]]>
</mapping-rule-match>
<mapping-rule-substitute>
<![CDATA[getModel($1Model.class]]>
</mapping-rule-substitute>
</mapping-rule-replacement>
</mapping-rule>
In fact, one migration developer already wrote that rule andsubmitted it
for inclusion in the basic set. I will post another upgrade to thebasic
regular expression rule set, look for a "file uploaded" posting.Also,
please consider contributing any additional generic rules that youhave
written for inclusion in the basic set.
Please not, that in some cases (Utility classes in particular)
the rule
application may be more effective as TWO sequention rules ratherthan one
monolithic rule. Again using the example above, it will convert
CSpider.getDataObject("Foo");
To
getModel(FooModel.class);
Now that is the most effective conversion for that code if that
code is in
a page or data object class file. But if that code is in a Utilityclass you
really want:
>
RequestManager.getRequestContext().getModelManager().getModel(FooModel.class
So to go from
getModel(FooModel.class);
To
RequestManager.getRequestContext().getModelManager().getModel(FooModel.class
You would apply a second rule AND you would ONLY run this rule
against
your utility classes so that you would not otherwise affect yourViewBean
and Model classes which are completely fine with the simplegetModel call.
<mapping-rule>
<mapping-rule-primarymatch>
<![CDATA[getModel\(]]>
</mapping-rule-primarymatch>
<mapping-rule-replacement>
<mapping-rule-match>
<![CDATA[getModel\(]]>
</mapping-rule-match>
<mapping-rule-substitute>
<![CDATA[RequestManager.getRequestContext().getModelManager().getModel(]]>
</mapping-rule-substitute>
</mapping-rule-replacement>
</mapping-rule>
A similer rule can be applied to getSession and other CSpider APIcalls.
For instance here is the rule for converting getSession calls toleverage
the RequestManager.
<mapping-rule>
<mapping-rule-primarymatch>
<![CDATA[getSession\(\)\.]]>
</mapping-rule-primarymatch>
<mapping-rule-replacement>
<mapping-rule-match>
<![CDATA[getSession\(\)\.]]>
</mapping-rule-match>
<mapping-rule-substitute>
<![CDATA[RequestManager.getSession().]]>
</mapping-rule-substitute>
</mapping-rule-replacement>
</mapping-rule>
----- Original Message -----
From: "Matthew Stevens" <matthew.stevens@e...>
Sent: Tuesday, August 07, 2001 12:56 PM
Subject: RE: [iPlanet-JATO] Use Of models in utility classes
Namburi,
I will post a document to the group site this evening which has
the
details
on various tactics of migrating these type of utilities.
Essentially,
you
either need to convert these utilities to Models themselves or
keep the
utilities as is and simply use the
RequestManager.getRequestContext.getModelManager().getModel()
to statically access Models.
For CSpSelect.executeImmediate() I have an example of customhelper
method
as a replacement whicch uses JDBC results instead of
CSpDBResult.
matt
-----Original Message-----
From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100208071048">vnamboori@y...</a>]
Sent: Tuesday, August 07, 2001 3:24 PM
Subject: [iPlanet-JATO] Use Of models in utility classes
Hi All,
In the present ND project we have lots of utility classes.
These
classes in diffrent directory. Not part of nd pages.
In these classes we access the dataobjects and do themanipulations.
So we access dataobjects directly like
CSpider.getDataObject("do....");
and then execute it.
Since the migration tool does not do much of conversion forthese
utilities we have to do manually.
My question is Can we access the the models in the postmigration
sameway or do we need requestContext?
We have lots of utility classes which are DataObjectintensive. Can
someone suggest a better way to migrate this kind of code.
Thanks
Namburi
[email protected]
[email protected]
[Non-text portions of this message have been removed]
[email protected]
[email protected] -
Re: [iPlanet-JATO] Use Of models in utility classes
Hi Matt,
Sounds like some of the stuff we need to migrate has a lot in common with
Namburi's project.
I would be very keen to get hold of a copy of the 'tactic' document you
mention below, as well as the sample code you mention to replace CspDBResult
stuff with JDBC results.
Thanks in advance,
Phil
----- Original Message -----
From: Matthew Stevens <matthew.stevens@E...>
Sent: Wednesday, August 08, 2001 7:56 AM
Subject: RE: [iPlanet-JATO] Use Of models in utility classes
Namburi,
I will post a document to the group site this evening which has thedetails
on various tactics of migrating these type of utilities. Essentially, you
either need to convert these utilities to Models themselves or keep the
utilities as is and simply use the
RequestManager.getRequestContext.getModelManager().getModel()
to statically access Models.
For CSpSelect.executeImmediate() I have an example of custom helper method
as a replacement whicch uses JDBC results instead of CSpDBResult.
matt
-----Original Message-----
From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100253094145066046167121181">vnamboori@y...</a>]
Sent: Tuesday, August 07, 2001 3:24 PM
Subject: [iPlanet-JATO] Use Of models in utility classes
Hi All,
In the present ND project we have lots of utility classes. These
classes in diffrent directory. Not part of nd pages.
In these classes we access the dataobjects and do the manipulations.
So we access dataobjects directly like
CSpider.getDataObject("do....");
and then execute it.
Since the migration tool does not do much of conversion for these
utilities we have to do manually.
My question is Can we access the the models in the post migration
sameway or do we need requestContext?
We have lots of utility classes which are DataObject intensive. Can
someone suggest a better way to migrate this kind of code.
Thanks
Namburi
[email protected]
[email protected]Hi Matt,
Sounds like some of the stuff we need to migrate has a lot in common with
Namburi's project.
I would be very keen to get hold of a copy of the 'tactic' document you
mention below, as well as the sample code you mention to replace CspDBResult
stuff with JDBC results.
Thanks in advance,
Phil
----- Original Message -----
From: Matthew Stevens <matthew.stevens@E...>
Sent: Wednesday, August 08, 2001 7:56 AM
Subject: RE: [iPlanet-JATO] Use Of models in utility classes
Namburi,
I will post a document to the group site this evening which has thedetails
on various tactics of migrating these type of utilities. Essentially, you
either need to convert these utilities to Models themselves or keep the
utilities as is and simply use the
RequestManager.getRequestContext.getModelManager().getModel()
to statically access Models.
For CSpSelect.executeImmediate() I have an example of custom helper method
as a replacement whicch uses JDBC results instead of CSpDBResult.
matt
-----Original Message-----
From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100253094145066046167121181">vnamboori@y...</a>]
Sent: Tuesday, August 07, 2001 3:24 PM
Subject: [iPlanet-JATO] Use Of models in utility classes
Hi All,
In the present ND project we have lots of utility classes. These
classes in diffrent directory. Not part of nd pages.
In these classes we access the dataobjects and do the manipulations.
So we access dataobjects directly like
CSpider.getDataObject("do....");
and then execute it.
Since the migration tool does not do much of conversion for these
utilities we have to do manually.
My question is Can we access the the models in the post migration
sameway or do we need requestContext?
We have lots of utility classes which are DataObject intensive. Can
someone suggest a better way to migrate this kind of code.
Thanks
Namburi
[email protected]
[email protected] -
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] Hanging tool
Todd,
I don't really know what element it is hanging on.
Do you mean to move the entire <Page> element to be the first <Page type>
element. Should we move all extremely large pages to the top?
Troy
-----Original Message-----
From: Todd Fast [mailto:<a href="/group/SunONE-JATO/post?protectID=101233080150035167169232031248066077000048234051197">Todd.Fast@S...</a>]
Sent: Friday, February 16, 2001 3:57 PM
Subject: Re: [iPlanet-JATO] Hanging tool
Hi Troy--
Mike will probably chime in on this too. There is a bug in the JavaSoft XML
parser that causes this issue. The workaround is to move some of the
elements around in your extracted XML file. For example, move the hanging
<page> element B before <page> element A. In all cases, simply moving the
problematic element around prevents the hang.
Todd
[email protected]
[Non-text portions of this message have been removed]Todd,
I don't really know what element it is hanging on.
Do you mean to move the entire <Page> element to be the first <Page type>
element. Should we move all extremely large pages to the top?
Troy
-----Original Message-----
From: Todd Fast [mailto:<a href="/group/SunONE-JATO/post?protectID=101233080150035167169232031248066077000048234051197">Todd.Fast@S...</a>]
Sent: Friday, February 16, 2001 3:57 PM
Subject: Re: [iPlanet-JATO] Hanging tool
Hi Troy--
Mike will probably chime in on this too. There is a bug in the JavaSoft XML
parser that causes this issue. The workaround is to move some of the
elements around in your extracted XML file. For example, move the hanging
<page> element B before <page> element A. In all cases, simply moving the
problematic element around prevents the hang.
Todd
[email protected]
[Non-text portions of this message have been removed] -
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.jspThank 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]
Maybe you are looking for
-
Issues with a recovery database
Hello everyone, I am trying to restore a mailbox from a backed up copy of a db. The backup copy was restored into a recovery db. Everything looks fine, database is mounted, no issues are being reported. When I run the New-MailboxRestoreRequest to res
-
How do I create a similar line effect to this:
I'm trying to figure out the best way to create a similar line effect to this in illustrator, any ideas? Thank you!
-
Apple Pro Speakers and iFire adaptor
I am using an iBook G4 and hooked it up to external Apple Pro speakers (the clear orbs by Harmon Kardon) via an iFire adaptor. I have been having problems since I purchased the adaptor in June. Griffin has been VERY helpful, and has replaced the unit
-
Computer only shows apple screen then stops.
I recently just got the iMAC G4. I updated the programs that it told me to when it gives you the update box. After it only updated a few of them the computer froze. Now when I attempt to turn it on, it gets to the apple screen and thats it. It stops
-
Cant play this video it is damaged
I purchased a music video from itunes store, played video dozen times or so, then tried playing it once more and box appeared informing me that it cant play video as it damaged, have sync to itunes since to update but still wont play help