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.jsp
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
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 -
How to use X-Fi Effects without selecting SB as the default sound device?
How to use X-Fi Effects without selecting SB as the default sound device?Hello everyone,
That's my situation.
I have Sound Blaster X-Fi Go sound card and I am using SRS HD Audio Lab. SRS HD Audio Lab was selected as the default audio device and X-Fi effects (X-Fi CMSS-3d, Equalizer etc.) was working without any problem in Windows Xp. I have Windows 7 now and when i select SRS HD Audio Lab as the default device, Creative effects are not working, i must select "SB X-Fi Go!" to get them working but i can't use SRS HD Audio Lab in that case. SRS is also using SB X-Fi Go sound card as the output and volume adjustment on console launcher is working but something is disabling the effects. Any solutions to enable effects ?
Thanks.If the kernel modules for your sound card and webcam both support the index parameter (use modinfo to find out) then adding
options <name_of_preferred_card's_kernel_module> index=0
options <name_of_second_card's_kernel_module> index=1
to /etc/modprobe.d/modprobe.conf (or another modprobe conf file of your choice) should solve the problem. -
How to use "find my phone" without using iCloud
How to use “find my phone” without using iCloud?
Previously, when I used my mobile me account I was not forced to use iCloud. Is there a way around this?Just ignore any prompts you get. Don't click the move to iCloud button and don't visit me.com/move. Just keep using mobileme as you have been.
The ONLY clickable button is "Open iCloud.com". I have NO other options. (Using Mac OS on a MacPro)
( somehow my reply was marked as a correct answer, I did not do this, and I can find a way to remove it.) -
How to use a Table View in AppleScriptObjC
How can I use a table view and add data to it? And how can I display a button cell and image cell in the table? Thanks.
Hi all,
Actually i need some more clarification. How to use the same select statement, if i've to use the tabname in the where clause too?
for ex : select * from (tab_name) where....?
Can we do inner join on such select statements? If so how?
Thanks & Regards,
Mallik. -
How to use Crystal report viewer in a portlet based web application
I am using JRC to view crystal reports in porlet based web application. Following is the code in JSP
<%@ page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer,
com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,
com.crystaldecisions.sdk.occa.report.application.ReportClientDocument,
com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase" %>
<portlet:defineObjects />
<%
// This sample code calls methods from the CRJavaHelper class, which
// contains examples of how to use the BusinessObjects APIs. You are free to
// modify and distribute the source code contained in the CRJavaHelper class.
try {
String reportName = "ProactiveEventsSummaryData.rpt";
ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
if (clientDoc == null) {
// Report can be opened from the relative location specified in the CRConfig.xml, or the report location
// tag can be removed to open the reports as Java resources or using an absolute path
// (absolute path not recommended for Web applications).
clientDoc = new ReportClientDocument();
//clientDoc.setReportAppServer(ReportClientDocument.inprocConnectionString);
clientDoc.setReportAppServer("inproc:jrc");
// Open report
clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
// Store the report document in session
session.setAttribute(reportName, clientDoc);
// ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
// Create the CrystalReportViewer object
CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
String reportSourceSessionKey = reportName+"ReportSource";
Object reportSource = session.getAttribute(reportSourceSessionKey);
if (reportSource == null)
reportSource = clientDoc.getReportSource();
session.setAttribute(reportSourceSessionKey, reportSource);
// set the reportsource property of the viewer
crystalReportPageViewer.setReportSource(reportSource);
// Apply the viewer preference attributes
// Process the report
crystalReportPageViewer.processHttpRequest(request, response, application, null);
// ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
} catch (ReportSDKExceptionBase e) {
out.println(e);
%>
With this code , report gets displayed in the portlet but none of the actions on thre report like next page click , search button , opening subreport , clicking on drill-downs are working . The error in the explorer console is as shown below
Error: CrystalViewerCrystalEvent is not defined
javascript:CrystalViewerCrystalEvent('CrystalViewer',%20'tb=next')
PageSource of the web page shows the CrystalViewerCrystalEvent javascript function defined but for somereason its not recognized by the portlet. Has anyone worked on displaying crystalreports in a portlet ?Code attached
<%@ page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer,
com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,
com.crystaldecisions.sdk.occa.report.application.ReportClientDocument,
com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase" %>
<portlet:defineObjects />
<%
// This sample code calls methods from the CRJavaHelper class, which
// contains examples of how to use the BusinessObjects APIs. You are free to
// modify and distribute the source code contained in the CRJavaHelper class.
try {
String reportName = "ProactiveEventsSummaryData.rpt";
ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
if (clientDoc == null) {
// Report can be opened from the relative location specified in the CRConfig.xml, or the report location
// tag can be removed to open the reports as Java resources or using an absolute path
// (absolute path not recommended for Web applications).
clientDoc = new ReportClientDocument();
//clientDoc.setReportAppServer(ReportClientDocument.inprocConnectionString);
clientDoc.setReportAppServer("inproc:jrc");
// Open report
clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
// Store the report document in session
session.setAttribute(reportName, clientDoc);
// ****** BEGIN CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
// Create the CrystalReportViewer object
CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
String reportSourceSessionKey = reportName+"ReportSource";
Object reportSource = session.getAttribute(reportSourceSessionKey);
if (reportSource == null)
reportSource = clientDoc.getReportSource();
session.setAttribute(reportSourceSessionKey, reportSource);
// set the reportsource property of the viewer
crystalReportPageViewer.setReportSource(reportSource);
// Apply the viewer preference attributes
// Process the report
crystalReportPageViewer.processHttpRequest(request, response, application, null);
// ****** END CONNECT CRYSTALREPORTPAGEVIEWER SNIPPET ****************
} catch (ReportSDKExceptionBase e) {
out.println(e);
%>
Edited by: teethoma on Nov 30, 2009 10:06 AM -
How to use functions and views in SMP2.3
Hi all,
I am new to SUP/SMP, I did some samples for hwc like create the MBO with object queries and operations using tables. Now i have a doubt
Is it possible to use sql functions in smp2.3?
If it possible how to use them?
for Select Query can i use stored procedure?
Ex: Select * from Employee where EmpID=:empid for this querey i wrote a stored procedure like this
Create procedure Emp_sp(@empID int)
as
begin
Select * from Employee where EmpID=@empID;
end
This procedure shown in my database connections profile.
I created an operation,
when i invoke the operation this procedure is visible in the operations list, i give the success screen in that i put a listview but here the attributes are not comming.
Is there any mistake in my approach,
Please suggest me.
Thank you.I will suggest you to look at official document for more understanding:
SyBooks Online -
How to Use Column Selector View in Reports
Hi all,
Can someone please advise on how to use the column selector view in CROMD's reporting tool?
Whenever I add a Column Selector view, and check the Enable checkbox of a certain column, a message appears "Click the columns in the selection pane to add more choices". However there is no selection pane, and the only thing I can do within the column is input a column label.
Am I missing any crucial steps here?
Thanks.Hi,
Choose a column as column selector by enabling the check box and click the columns that has to get into column selector in the left navigation.
On click the columns would get in one by one. After that field that you choose would be displayed in the position of the column in the report table
Typically the purpose is something like this. If you want to dynamically change the first field say by Account Type, Account Region, Account Status and see the revenue then it can be used
-- Venky CRMIT -
please tell me how to use default pdf reader in firefox ? when i give windows in my pc pdf file open in firefox deafultly but suddenly its not working how to fix this ? pdf not open when i give ok with preview in firefox its not open its offer again same message
In order to change the default pdf reader please see: [[View PDF files in Firefox without downloading them]]
In order to change the file association: [[Applications panel - Set how Firefox handles different types of files]] -
How to use as audio player without adding to music list?
I bought a Thai language program that is an Adobe Reader PDF file. It has literally thousands of 4 second MP3 audio files that you can click on to hear the thai word pronounced by a native Thai person. iTunes plays each little file but then adds it to my music library, so when I want to play music randomly, I get these thai words. It's very annoying, and it's clogging up the library. How can I use this language program without adding to the music library?
I don't think there is any way to really avoid this as iTunes will only play items in its Library.
In the PDF, Can you right click the link to the mp3 and select to play with quicktime player?
This would allow you to play your audio and take iTunes out of the equation. -
How to use table maintenance view in module pool screen
hi ,
want to use table maintenance view in a module pool screen so that i can edit, insert, delete and update date in to the ztable.please help.You can simply call it via SM30. Or you can call the table maintence view from any program(report or module pool) using a function module.
call function 'VIEW_MAINTENANCE_CALL'
exporting
action = 'U'
view_name = 'Z_Table_Name'
exceptions
client_reference = 1
foreign_lock = 2
invalid_action = 3
no_clientindependent_auth = 4
no_database_function = 5
no_editor_function = 6
no_show_auth = 7
no_tvdir_entry = 8
no_upd_auth = 9
only_show_allowed = 10
system_failure = 11
unknown_field_in_dba_sellist = 12
view_not_found = 13
others = 14.
Regards,
RIch Heilman -
How to use a Text View to show the current user
Hi Experts,
I am using a Text View to show the current logged on user.
Also i need to retrieve the date of creation of proposal and show it as output parameter.
I am using the following code but it is not working properly.
Please help me out regarding the same.
Method technicalDescription()
//Attribute User to store user name
IGPAttributeInfo user = output.addAttribute("USER", IGPAttributeInfo.BASE_STRING);
user.setMultiplicity(IGPAttributeInfo.MULITIPLICITY_1_1);
//Attribute date to store current system date
IGPAttributeInfo date = output.addAttribute("DATE", IGPAttributeInfo.BASE_DATE);
date.setMultiplicity(IGPAttributeInfo.MULITIPLICITY_1_1);
Method execute()
//getting current system date
Date currDate = new Date(System.currentTimeMillis());
contextElement.setDate(currDate);
//Retrieve Current User Details
try {
IWDClientUser user = WDClientUser.getCurrentUser();
String firstName = user.getFirstName();
String lastName = user.getLastName();
String userName = lastName + " " + firstName;
contextElement.setUserName(userName);
} catch (WDUMException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
Method complete()
output.setAttributeValue("USER", wdContext.currentContextElement().getUserName());
output.setAttributeValue("Date", wdContext.currentContextElement().getDate());
Thanks a lot.
Cheers
Gaurav RaghavThere are a few ways, for example declare an IBOutlet for the text field and then use it with NSControl's stringValue: method (inherited by the NSTextField), or bind the value of the text field to a property, etc. What have you got so far?
-
How to use a Text View to show the current user in WDJ
Hi Experts,
I am using a Text View to show the current logged on user.
Also i need to retrieve the date of creation of proposal and show it as output parameter.
I am using the following code but it is not working properly.
Please help me out regarding the same.
Method technicalDescription()
//Attribute User to store user name
IGPAttributeInfo user = output.addAttribute("USER", IGPAttributeInfo.BASE_STRING);
user.setMultiplicity(IGPAttributeInfo.MULITIPLICITY_1_1);
//Attribute date to store current system date
IGPAttributeInfo date = output.addAttribute("DATE", IGPAttributeInfo.BASE_DATE);
date.setMultiplicity(IGPAttributeInfo.MULITIPLICITY_1_1);
Method execute()
//getting current system date
Date currDate = new Date(System.currentTimeMillis());
contextElement.setDate(currDate);
//Retrieve Current User Details
try {
IWDClientUser user = WDClientUser.getCurrentUser();
String firstName = user.getFirstName();
String lastName = user.getLastName();
String userName = lastName + " " + firstName;
contextElement.setUserName(userName);
} catch (WDUMException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
Method complete()
output.setAttributeValue("USER", wdContext.currentContextElement().getUserName());
output.setAttributeValue("Date", wdContext.currentContextElement().getDate());
Thanks a lot.
Cheers
Gaurav RaghavYou can use a text string as the reference.
If you use the VISA Find Resource function, it will return an array of strings which you can index in your code, and store either the index, or store the string itself. You can even use strings like COM1 and COM2, assuming those ports are available.
The challenge is when you move from one machine to another, where the serial ports may be different on the other machine.
Message Edited by LabViewGuruWannabe on 01-07-2008 06:33 AM
Message Edited by LabViewGuruWannabe on 01-07-2008 06:37 AM
Attachments:
VISA find.png 5 KB -
How to make an alert view without buttons on iphone?
Hi,
I'm trying to create an alert view without buttons. On my iphone application I have to run a process, while the process is running I want to display an alert view with info about the process, and then when the process is done I want to dismiss that alert view.
Any ideas about how to do this?
Thx!this is what i use. I added in an ActivityIndicator just for looks
UIActivityIndicatorView *loadingInd = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(120.0, 90.0, 30.0, 30.0)];
alertView = [[UIAlertView alloc] initWithTitle:@"Loading" message:@"Telling your Mom" delegate:self cancelButtonTitle:nil otherButtonTitles: nil];
loadingInd.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
[loadingInd startAnimating];
[alertView addSubview:loadingInd];
[loadingInd release];
[alertView show];
[alertView release]; -
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
Maybe you are looking for
-
ALV in WD ABAP: add a text field in aggregation line
Hi, I implemented the SALV_WD_TABLE in a web dynpro and I add a column sum; in the new aggregation line I would to edit a field inserting a text: is it possible? I think not because the class cl_salv_wd_aggr_rule has not useful methods, any ideas? th
-
Address Ref should be the same
Hi, I ve a query to be run in ODI. The issue is I ve a staging table with the values CUST_REF SITE_CODE ADD_REF ADDRESS1 ADDRESS2 CITY STATE POST_CODE CUSTOMER_NAME 03071755201 BILL_TO 03071755201 11 LYNETTE AVE EVANS ST CARLINGFORD NSW 2118 AMANDA 0
-
Pencil & Paintbrush Tools do not show line while drawing
I am using CS4. When I use the Pencil Tool or the Paintbrush Tool, I do not get the blue dotted "preview line" I am supposed to get. Actually, with the Paintbrush Tool, isn't it supposed to show the actual brush stroke as you paint? Anyway, it's very
-
Hello SolMan users ! I am playing around with the new Work Centers, and what I'd like to setup first is the Job Management Work Center. Currently, when I open this work center, in the Overview, I have all the sections (Job Requests, Job Monitoring, .
-
OK, so.. we're learning about superclasses etc. I have a couple of problems. First of all I need to calculate profit in the SoldCar class below - one number - profit - can be declared within that class. The other number needed, dealerCost is within a