How to store global values for the whole application to use ?
Hi,
In our application, we have global values that is store in a parameter table, I want only to query it once, and it will be used every where from the whole application.
e.g :
I have general parameter tables that store :
% Tax
Current Period
etc..
Then these values will be used in our business rules in the whole application.
How can I do that in ADF BC ?
Thank you,
xtanto
I would go ahead and create a transient VO with an attribute called "userLanguage" and store the value at the initialization step.
We generally call this type of VO as PVO which is a transient VO and contains only 1 record at any point of time. Keep this VO inside the RootAM and you can write a static util method as below..
public static String getUserLanguageFromPVO()
PVOImpl pvo = (PVOImpl)am.findViewObject("MyPVO");
if(pvo != null)
Row row = pvo.first(); //Always returns the one record
return (row == null ? null :
(String)row.getAttribute("UserLanguage"));
return null;
}
Similar Messages
-
Changing a color for the whole Application
Hi,
Is there a way to change the color, default purple of swing to some other color(say green) for the whole application without using themes? Is it possible through UIManager.put()?
Regards
SridharThanks Michael,
I just modified your code to fit my needs.
import java.awt.*;
import javax.swing.*;
import java.util.Enumeration;
class ApplicationColor
public ApplicationColor()
setApplicationColor(new Color(88, 140, 165));
JFrame frame = new JFrame();
frame.setLocation(400,300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel jp = new JPanel(new BorderLayout());
String[] temp = {"abc","123"};
JComboBox cbo = new JComboBox(temp);
JButton btn = new JButton("I'm a button");
jp.add(new JLabel("I'm a label"),BorderLayout.NORTH);
jp.add(cbo,BorderLayout.CENTER);
jp.add(btn,BorderLayout.SOUTH);
frame.getContentPane().add(jp);
frame.pack();
frame.setVisible(true);
public void setApplicationColor(Color color)
Enumeration enum = UIManager.getDefaults().keys();
while(enum.hasMoreElements())
Object key = enum.nextElement();
Object value = UIManager.get(key);
Color jfcBlue = new Color(204, 204, 255);
Color jfcBlue1 = new Color(153, 153, 204);
if (value instanceof Color)
if(value.equals(jfcBlue) || value.equals(jfcBlue1)){
UIManager.put(key, color);
public static void main(String[] args){new ApplicationColor();}
}Sridhar -
Set global font size for the whole application.
Is there a way of setting a font globally
What I mean I want to set a font size for the whole application.
Is this posable ??
Thanks CraigAfter posting over 300 questions I would think you would be passed the "New to Java TechnologY" stage.
The answer for Swing applications is yes this can be done.
I don't know how to do it for AWT components.
Since you posted the question in this forum (as oppose to the Swing forum for Swing related problems), I'm assuming this is an AWT related question and therefore I can't help you. -
I have a multi-row region based on a table in which I have two particular columns of interest. The first has an LOV defined for which I have set up a pick-list of codes associated with the item's status as "OK" or having some problem, for which there are a small number of set codes associated. Most rows will be OK, but when there is a problem, the pick-list will be used.
When that pick list has been used, there is an optional "comments" column that can be filled in. I want my screen to dynamically enable/disable a pushbutton that links to the comment based on the code. This being row-based, the push-button needs enabling or disabling by row, not as a whole "conditional column". That bit is ok, I think, but I don't know and can't find the syntax for how within the javascript onchange function I set the current row value for a different column to the one that triggered it.
My header function (that doesn't work) is going to be something like this (where the status column LOV having a value = 6 means "OK"). Note I'm using alert for a debug mechamism. The $s line is my failed attempt to set he column value, here with a hard-coded string "Changed COMMENTS":
<script type="text/javascript">
function doActivateButton(object)
if(parseInt(object.value)!='6')
alert('It is not 6!');
$s('#COMMENTS','Changed COMMENTS','Changed COMMENTS',TRUE);
else
alert('It is 6, you know!');
</script>
Ideally, I want any existing comments blanked if the user picks "OK" (6) as the new status, whereas for debug above I'm setting the hardcoded debug string. You will probably also note I realise I haven't properly understood the purpose of the third parameter in the $s API.
(This is a reports region, by the way. A detail block, in forms-speak, with a header block above it.)
Thanks for any assistance.
MarkSorry, versions are: Apex 4.1 on Oracle RDBMS 11.2.
-
How to choose optimal value for the OPEN_CURSOR parameter in init.ora?
15:05:35 SQL> select count(*) from v$open_cursor;
COUNT(*)
5159
15:06:28 SQL> select count(*) from v$open_cursor WHERE user_name='USER1';
COUNT(*)
2369
15:06:48 SQL> select count(*) from v$open_cursor WHERE user_name='USER2';
COUNT(*)
686
Currently, application using these number of open cursors?
How to set the optimal value for this application?Hi,
>>With the above setting I have yet to get any errors due to cursor limits. A good trade off memory v issues.
To see if you have set OPEN_CURSORS high enough, monitor v$sesstat dynamic performance view using the SQL below for the maximum opened cursors. If your sessions are running close to the limit, maybe you should increase the value of OPEN_CURSORS.
select max(a.value) as highest_open_cur, p.value as max_open_cur
from v$sesstat a, v$statname b, v$parameter p
where a.statistic# = b.statistic#
and b.name = 'opened cursors current'
and p.name= 'open_cursors'
group by p.value;In addition, I advise you to take a look at your PL/SQL code in order to see if the explicit cursors have been close (if it was the case), or if your SQL code can be tuned ...
Cheers
Legatti -
How to set new value for the existing jar file
Help:
I am wondering if there is a simple to update value for Manifest-Version in a existing jar file?
Thanks!The jar command's -u option is about as easy as I know.
See the jar command documentation for the details. -
Where to store "global variable" for a web application
There are some "global" variables in my portal web application. e.g. email server
name, admin email address etc. Will web.xml context-param a good place to store these
kind of information?
If so, how do I retrieve it back from a java class? It is easy in a jsp file: appalication.getAttribute(),
but how about a pipeline component or input processor which are all java file.
Please help!
Thank you very much
EllenI still believe that the information like connectivity parameters to remote
servers in the distributed environments would be best stored in the JNDI
tree. I agree, that it is not a "general storage area", but I am not talking
about storing application run-time data either.
In the clustered environments it would provide additional benefits of
centralizing this kind information across the cluster.
Regards,
Mike
"Subrahmanyam Allamaraju" <[email protected]> wrote in message
news:[email protected]..
>
JNDI is not a general-purpose storage area, although you could bind data
in a JNDI tree. A better (and simpler) way is to store them as context
parameters. You could read the initial values for these variables from a
servlet init parameters.
Subbu
Michael Goldverg wrote:
Ellen,
I would advise to put you global variable in JNDI tree.
You can use jndi.properties file to store name-value pairs, which will
get
loaded into jndi tree at the server startup. Just put this file in your
application class path.
The other method would be to code a startup class to store the global
variable in the jndi tree.
Regards,
Mike
"ellen" <[email protected]> wrote in message
news:[email protected]..
There are some "global" variables in my portal web application. e.g.
email
>>
server
name, admin email address etc. Will web.xml context-param a good place
to
>>
store these
kind of information?
If so, how do I retrieve it back from a java class? It is easy in a jspfile: appalication.getAttribute(),
but how about a pipeline component or input processor which are all javafile.
Please help!
Thank you very much
Ellen -
How to do multi select for the oracle forms textfields using openscript
hi
my scenario is to record by selecting 3 order number same time and do copy of that in the oracle order management module.
can anybody help me in to select the 3 order numbers and execute.
thanks
sudhiirhi Deepu,
the code you have given is not working.
Below is the code i have written
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_SHIFT);
FORMS.TEXTFIELD(ORDER_NUMBER_0).CLICK
FORMS.TEXTFIELD(ORDER_NUMBER_1).CLICK
FORMS.TEXTFIELD(ORDER_NUMBER_2).CLICK
robot.keyRelease(KeyEvent.VK_SHIFT);
even after adding the above code it is clicking on the each text field instead of selecting all the three text field which is my requirement.
i think their is some defect in openscript or my code is wrong.
thanks
sudhiir -
Generation of Annual Leave Quota at a time for the whole year
Hi All,
Kindly give some suggestions.
I am working on Time evaluation. We have a quota , Annual leave which is now given on monthly basis, means lets 12 annual leave are for whole year and employee are getting 1 leave on each month.
Now my requirement is to give this quota at a time in the start of every year. That means all the 12 annual leave should be generated in the start of a year.
When I select the option no pro rata calculation then I am getting all this leave in the start of the year. But when an employee is joined in the mid of the year then also 12 leave is been generated which is not correct.
Please suggest me how to make this leave as prorated so that for new joinee , this leave is generated taking into account the period and generate the prorate value for the whole year at the time of joining.
Thanks
Tanuja.Hi Sikinder,
I am using + time evaluation Status-2. We have to generate quota in PT60 for each period.
Write now we are getting annual leave quota getting generated in monthly basis. We want to genarate whole quota for the year in the 1st month of the year.
When I have given calender year in the accrual period , i am not getting any quota in the 1st month rather getting the whole quota in the end of the year.
Please suggest me what to do.
Regards,
Tanuja. -
Setting character encoding for the whole app
I have a MySQL base which uses latin1 character set. I don't know which Java uses, but when I print some polish signs it puts ? instead. How do I change the character set for the whole application? Or maybe there is some completely different way?
1. the base I have is capable of storing polish chars - at least when I view it within my visual manager it shows then no problem, so I think it's not that
2. I don't use the console - I use the JTable component to show the data
3. java stores using utf, but the app uses default system encoding - I checked it with:
Charset c = Charset.defaultCharset();
System.out.println(c.displayName());So which solution do you suggest?
And how can I change the encoding the application?
Thank's for your interest! -
ADF : Value change listener for the whole jsff page
Is there any feature to have a value change listener for the whole jsff page ?
How to know if user has change something in the page i.e. how to know whether the page is dirty ?User please tell us your jdev version!
Read this blog https://blogs.oracle.com/groundside/entry/ever_wondered_how_uncommitteddatawarning_works
Timo -
I downloaded the album the gap band greatest hits,but one song didnt play all the way through.the song was party train..i paid for the whole album,but didnt get what i paid for..how can i resolve this problem??
If your country's iTunes Store allows you to redownload purchased tracks, I'd delete your current copy of the track and try redownloading a fresh one. See the following document for instructions:
Downloading past purchases from the App Store, iBookstore, and iTunes Store
Otherwise, I'd report the problem to the iTunes Store.
Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
Find the item that is not playing properly. If you can't see "Report a Problem" next to the item, click the "Report a problem" button. Now click the "Report a Problem" link next to the item. -
How can I get null values for the later weeks
Hi All,
When I execute this code I get the records till current week.
How can I display the output so that I get null values for the later weeks. (with the help of v_numOfWeeks variable in the code)
Thanks,
Vikram
DECLARE
v_query VARCHAR2(4000);
TYPE ref_cursor IS REF CURSOR;
v_refcur ref_cursor;
v_sum NUMBER;
v_id NUMBER;
v_name VARCHAR2(1000);
v_weeknum NUMBER;
v_pernum NUMBER;
v_numOfWeeks NUMBER := 5;
BEGIN
v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
FROM s_postn) postn_tbl
WHERE lvl_6_id = 5767
AND fiscal_year = 2008
AND b.week_num < 4
AND b.period_num = 3
AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
ORDER BY postn_tbl.postn_name, b.week_num';
OPEN v_refcur FOR v_query;
LOOP
FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
EXIT WHEN v_refcur%notfound;
dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum);
END LOOP;
END;
This is the output when I execute this code.
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W2 COMM CNTRL TAM 216 12561.4
P3W3 COMM CNTRL TAM 216 2027.1
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
This is the output I'd like to get
P3W1 COMM CNTRL ISAM 213 26961.61
P3W2 COMM CNTRL ISAM 213 12870.4
P3W3 COMM CNTRL ISAM 213 245.88
P3W4 COMM CNTRL ISAM 213
P3W5 COMM CNTRL ISAM 213
P3W1 COMM CNTRL ISAM 273 72831.2
P3W2 COMM CNTRL ISAM 273 8739.38
P3W3 COMM CNTRL ISAM 273 3764.92
P3W4 COMM CNTRL ISAM 273
P3W5 COMM CNTRL ISAM 273
P3W1 COMM CNTRL TAM 213 49844
P3W2 COMM CNTRL TAM 213 20515.17
P3W3 COMM CNTRL TAM 213 16167.46
P3W4 COMM CNTRL TAM 213
P3W5 COMM CNTRL TAM 213
P3W1 COMM CNTRL TAM 273 -3336.71
P3W2 COMM CNTRL TAM 273 -1376.68
P3W3 COMM CNTRL TAM 273 19707.42
P3W4 COMM CNTRL TAM 273
P3W5 COMM CNTRL TAM 273
P3W1 Damon Walters -609.07
P3W2 Damon Walters 30030.24
P3W3 Damon Walters 37475.1
P3W4 Damon Walters
P3W5 Damon Walters Edited by: polasa on Oct 28, 2008 6:42 PMSure, in a Single SQL ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.01
satyaki>
satyaki>
satyaki>-- Start Of Test Data --
satyaki>with week_tab
2 as
3 (
4 select 1 period_num, 1 week_num, 10 bkg1 from dual
5 union all
6 select 1, 2, 40 from dual
7 union all
8 select 1, 3, 30 from dual
9 union all
10 select 1, 2, 20 from dual
11 union all
12 select 1, 1, 10 from dual
13 union all
14 select 1, 1, 20 from dual
15 union all
16 select 1, 3, 10 from dual
17 union all
18 select 2, 1, 15 from dual
19 union all
20 select 2, 2, 20 from dual
21 union all
22 select 2, 3, 10 from dual
23 union all
24 select 2, 1, 15 from dual
25 union all
26 select 2, 2, 30 from dual
27 union all
28 select 2, 3, 20 from dual
29 )
30 -- End Of Test Data --
31 select period_num,
32 week_num,
33 (
34 select sum(week_tab.bkg1)
35 from week_tab
36 where period_num = m.period_num
37 and week_num = m.week_num
38 group by week_num, period_num
39 ) sum_bkg1
40 from (
41 select dum.week_num,
42 wk.period_num
43 from (
44 select 1 week_num from dual
45 union all
46 select 2 from dual
47 union all
48 select 3 from dual
49 union all
50 select 4 from dual
51 union all
52 select 5 from dual
53 ) dum ,
54 (
55 select distinct period_num
56 from week_tab
57 ) wk
58 ) m;
PERIOD_NUM WEEK_NUM SUM_BKG1
1 1 40
1 2 60
1 3 40
1 4
1 5
2 1 30
2 2 50
2 3 30
2 4
2 5
10 rows selected.
Elapsed: 00:00:00.48
satyaki>Regards.
Satyaki De. -
How to get maximal value from the data/class for show in Map legend
I make WAD report that using Map Web Item.
I devide to four (4) classes for legend (Generate_Breaks).
I want to change default value for the class by javascript and for this,
I need to get maximal value from the class.
How to get maximal value from the data/class.
please give me solution for my problem.
Many Thx
Eddy Utomouse this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
How to get the values for the Authorization Object Fields....
Hi Everyone,
I'm pretty new to the SAP Security and have been working on the Basis sides...I created a new role in PFCG and added a few transactions (ME13) and clicked on the Authorizations tab. In there, the authorization tree is in yellow and red. After providing the Org Values, only the yellow lights remain (apart from the green one ofcourse). Now how do we get the values for the different auth obj fields that are in yellow... say for example
Conditions COND
Maintain Condition: Auth. for Use/Appl./Cond.Type/Table V_KOND_VEA
Activity 03 ACTVT
Application KAPPL
Condition table KOTABNR
Condition Type KSCHL
Usage of the condition table KVEWE
Here the values for V_KOND_VEA fields e.g. KAPPL, KOTABNR etc are missing.
My question is how do we get these values in regard to the requirement provided by the client...is it the functional guys who provide these values or else how is a security person supposed to know it...
All the help in this regard is sincerely appreciated along with the awarding of points...Hey thanks Alex and Catastrophe for the quick response...
I'll be sitting with the functional team and reviewing the roles created.
Thanks for all the help once more
Regards,
Akash.
Maybe you are looking for
-
Media Encoder crashing at end of rendering - why?
I've had issues with Premiere Pro and Media Encoder CC 2014 (on an iMac) crashing at the end of rendering for several months. I've found that PP is more reliable than ME. I've tried clearing the cache and other tips from various forums. Today I tried
-
How do I create an outline from a .JPG image?
I have Illustrator CS6 for Windows 7. I'm trying to create an outline for the image. It's just a single .jpg image.
-
Adobe Viewer for Android Phone
Hi guys, The Adobe Content Viewer from Google Play (May 1, 2013) is both compatible and works fine on my Nexus 4 phone. We understand that adding the Android phone compatibility might cause poor app rating as the buttons/controls will be hard to tap
-
Maximum number of simultaneously streaming AirPort Express stations?
Hi everyone, does anybody know how many AirPort Express (AirTunes) base stations iTunes can stream to? I know that you can select to use both your Mac's internal speakers and a wireless AirPort Express, but how many more stations can be used simultan
-
How to calculate Interest?
We have a unique requirement. We invest in a product which pays a particular rate of interest up to certain balance and a different interest rate beyond that balance. For example If our Investment is upto 10Million, the bank pays 0.1%. Any investment