Accessing instance variables within frames.
I have 2 jsf within frames that is having one managed bean.
i would like to access the instance variable defined in one jsf from another jsf. Since the managed bean is getting instantiated for the second jsf, the values in first jsf is getting reintialized.
Is it possible to access like this? or do we need to have a separate backing bean and call the first from second.
<script language="JavaScript">
var scriptVar = "<%= jspVar %>";
</script>
Similar Messages
-
Accessing Instance variables from within javascript
Is it possible to access Instance variables of a JSP using
javascript? If so, an example would be very much appreciated.
LaMont<script language="JavaScript">
var scriptVar = "<%= jspVar %>";
</script> -
Hi,
I am trying to make a presentation that shows all instance variables of a determined process's instance.
In order to do that, I have created a Gloabal Interactivity Activity with a presentation that ask for a key.
So, I want to show in the next presentation all the instance variables of the instance processes that has the key informed by the user on the previous presentation.
How can I do that?
Thanks very much
Marcos<script language="JavaScript">
var scriptVar = "<%= jspVar %>";
</script> -
Accessing instance variables from container
I am new to Flash. I am a programmer, not a designer so this
is my first foray into Actionscript.
I am creating a slide show player in Flash. It retrieves an
XML file containing other .swf files that should be played, the
order in which they should be played, the length of time each one
should show, and the text that should be displayed.
For example:
<presentation>
<globals>
<setting name="use_transitions" value="false"/>
<setting name="use_delays" value="false"/>
</globals>
<slide src="slide5.swf" text="Slide 1" delay="10"/>
<slide src="slide3.swf" text="Slide 2" delay="10"/>
</presentation>
I have everything working except for the loaded .swf file
picking up on the text to display.
I can set the Var: property on the dynamic text field to
_root.dynamic_text and it will load what is in the variable
dynamic_text just fine.
However, the slide3.swf and slide5.swf file have default text
in them that should who if there is no text specified.
It seems that variables inside a loaded movie are not in
scope.
I load the movie using:
loadMovie(slides[nIndex][0], "slideMovie");
However if my instance name on my dynamic text field is
"theText" this code does not work:
this.slideMovie.theText.text = dynamic_text;
How do I dereference the dynamic text field?
Thanks for any help.quote:
Originally posted by:
abeall
I didn't really follow your set up.
> this.slideMovie.theText.text = dynamic_text;
Where is that code placed? Where is theText? Where is
dynamic_text defined, or what is it? _txt usually signifies a
TextField instance, but if that was the case then the statement
would not do anything. Are you trying to access objects in the
external slide SWF before it has been loaded and initialized?
I'm sorry that I wasn't clear enough.
Maybe this will help.
============== Begin Code ==============
slide3.swf
========
_root
layer |------> Instance of Graphic Symbol
-----------------------> Dynamic Text Object named
'theText'
layer |------> Instance of Graphic Symbol
-----------------------> JPEG Graphic Background
layer |------> Actionscript Layer
slide_show engine.swf
==================
_root
layer |------> Movie Clip Object named 'slideMovie'
layer |------> Actionscript Layer
Actionscript code snippet:
/* This becomes a two dimentional array of slides.
* slides[index][0] is the .swf file to load.
* slides[index][1] is the transistion to load. (Not
currently used.)
* slides[index][2] is the delay to wait (in seconds) until
the next slide shows.
* slides[index][3] is the customized text to show the loaded
slide. If blank show the default text.
var slides = new Array();
var dynamic_text;
var nIndex = 0;
var main:Object = new Object();
main.switch_slides = function()
if (nInterval != -1)
clearInterval(nInterval);
if (nIndex >= slides.length)
return;
_root.dynamic_text = slides[nIndex][3];
loadMovie(slides[nIndex][0], "slideMovie");
this.slideMovie.theText.text = _root.dynamic_text;
nInterval = setInterval(main, "switch_slides",
(slides[nIndex++][2] * 1000));
// Code to load and parse the configuration file deleted for
brevity.
============== End Code ==============
The slides are made by our designer. Most of which animate
the background image and then fade in the text.
The text object usually does not exist in the first key
frame. So my workaround is probably the only way this can be done.
The workaround needs to go in every slide's actionscript
layer on the first key frame.
The only real problem I have with it is that I need to put
the default text in the actionscript. Putting a Var reference in
the dynamic text will remove the text there if the variable is
empty.
However trying to dynamically create the var reference does
not seem to work. For example:
In the slide3.swf file if I have the following code on the
actionscript layer, the var reference in the dynamic text does not
get pulled in properly:
if (_root.dynamic_text)
this.dynamic_text = _root.dynamic_text;
I need to put the var reference at the top with the default
text. For example:
var dynamic_text = "default text";
if (_root.dynamic_text)
this.dynamic_text = _root.dynamic_text; -
Accessing member variable within an anonymous inner class
I'm getting a compiler error with the following snippet which resides in a constructor (error below):
final String fullNamesArr[] = new String[ lafsArr.length ];
String lafNamesArr[] = new String[ lafsArr.length ];
JMenuItem namesMenuItemArr[] = new JMenuItem[ lafsArr.length ];
for ( int i = 0 ; i < lafsArr.length ; i++ )
StringTokenizer tokenizer;
fullNamesArr[ i ] = lafsArr[ i ].getClassName();
tokenizer = new StringTokenizer( fullNamesArr[ i ] );
while ( tokenizer.hasMoreTokens() )
lafNamesArr[ i ] = tokenizer.nextToken( "." );
namesMenuItemArr[ i ] = new JMenuItem( lafNamesArr[ i ] );
lafMenu.add( namesMenuItemArr[ i ] );
namesMenuItemArr[ i ].addActionListener(new ActionListener()
public final void actionPerformed(final ActionEvent e)
String actionCommand = e.getActionCommand();
int iCount = 0;
for ( int index = 0 ; index < fullNamesArr.length ; index++ )
if ( fullNamesArr[ index ].contains( actionCommand ))
iCount = index;
break;
System.out.println( "Setting LAF to '" +
fullNamesArr[ iCount ] + "'" );
try
UIManager.setLookAndFeel( fullNamesArr[ iCount ] );
catch ( UnsupportedLookAndFeelException ulafe )
System.out.println( fullNamesArr[ iCount ] +
" : Not a valid LAF class." );
catch ( ClassNotFoundException cnfe )
System.out.println( fullNamesArr[ iCount ] +
" : Class not found." );
catch ( InstantiationException ie )
System.out.println( fullNamesArr[ iCount ] +
" : Can't instantiate class." );
catch ( IllegalAccessException iae )
System.out.println( fullNamesArr[ iCount ] +
" : Illegal access." );
DBBuilder.java:1280: cannot resolve symbol
symbol : method contains (java.lang.String)
location: class java.lang.String
if ( fullNamesArr[ index ].contains( actionCommand ))
^
1 error
BUILD FAILED
My question: Why can I access fullNamesArr in other spots in the anon-inner class,but not with the String.contains() method? BTW, the carrot is under the left bracket '['.
TIA,
JeffMy question: Why can I access fullNamesArr in other
spots in the anon-inner class,but not with the
String.contains() method? BTW, the carrot is under
the left bracket '['.You're misinterpreting the message. The problem is not your variable fullNamesArr, but rather the method contains(java.lang.String). Since that method was only added in Java 5 (aka 1.5) you might look if you're compiling with JDK 1.4 or earlier. -
How to access APEX variables within compiled pl/sql function.
Hi,
My initial problem is to create pl/sql code returning column names for my custom calendar report.
There are 7 columns for each day of the week and I want it to be on two rows - first the day of the week, such as 'Monday' and below it (with BR tag) the date, such as '18-08-2008'.
What I want is to set additional tags for underline, italics, etc. on the column heading which date is currently selected for viewing (I have DATE item for this purpose).
But as the code is getting quite complex, I decided to write a function in my schema that would return the column delimited values for the headings.
What I can't do is the following.
1) How do I reference an APEX item value, such as my DATE item? using v('P4_DATE') results in unknown function 'v'.
2) How do I use char-date and vice versa conversion using the already set application format mask, available in APEX 3.1? So that when I change the date format mask within the application, it would still work.
10x and I hope I'm not repeating s.o. else's question.Hi,
I won't try to create the entire function here, just enough to point you in the right direction.
Create a function something like:
create or replace FUNCTION "GETHEADINGS" (inDATE IN VARCHAR2, inFORMAT IN VARCHAR2)
RETURN VARCHAR2
IS
BEGIN
DECLARE
vTHISDATE DATE;
vSTRING VARCHAR2(1000);
BEGIN
vTHISDATE := TO_DATE(inDATE, inFORMAT);
vSTRING := TO_CHAR(vTHISDATE, inFORMAT);
RETURN vSTRING;
END;
ENDinDate would receive the item's date value and inFORMAT receives the date format. vTHISDATE converts the date supplied into a date using the date format and vSTRING turns that into a string, again using the date format. Obviously, this example will just return the original date.
To add styling to any column, just surround the column text with the appropriate tags whilst building up your string. For example:
'<i>' || columnheading || '</i>'Now, in your report's Report Attributes, change the Headings Type to PL/SQL and enter in something like:
DECLARE
vHEADINGS VARCHAR2(1000);
BEGIN
SELECT GETHEADINGS(:P1_DATE_FIELD, :PICK_DATE_FORMAT_MASK) INTO vHEADINGS FROM DUAL;
RETURN vHEADINGS;
END;When you've created the function you need, the string returned should be in the column headings delimited with colons.
Andy -
I want to access that BEA instance variable inside of a external java class
Hi,
This is N.pradeep. I am a java programmer, and I am new to BEA AquaLogic BPM studio5.7. I have a question regarding how to retrieve an instance variable of BEA Aqua Logic to an external Java Program. i.e. I want to access that BEA instance variable inside of a external java class, and vice versa.You can use PAPI or PAPI-WS for accessing BPM instance variable from a Java code, thougt I am not sure how the reverse will be done. Assuming that you are aware aof PAPI-WS and have created the necessary stubs out of the PAPI-WS WSDL using Axis, you can access instance variables using the API's or operations defined therein.
Thanks and Regards
Vivek Nandey
BEA Certified Developer for Integration Solutions
[email protected] -
Accessing a javascript variable within a EL, does anyone ....
know how to do this.
I have a variable, say eventid, defined as:
<SCRIPT>
var eventid = "GA20045533";
</SCRIPT>
and a button defined as:
<hx:commandExButton >
<f:param id="param_eventID" name="eventID" value = "#{window.eventid}" ></f:param>
</hx:commandExButton>but this somehow fails. How can I access this variable within the EL for the param tag??if you want to access the variable in the same page at the same time?
you can't
if you want to access the variable in other page? wich is called from the form? then you just call the parameter request.getParameter("province")
the value must be the same that the selected index, otherwise use a hidden input for store the selectedIndex -
JDEVELOPER 10G, ADF BC: Passivate static instance variables in AM?
I understand the need to passivate/activate instance variables but what about static instance variables within an application module?
Thanks,
WesStatic variables - being class variables and not instance variables - persist without a need for passivation. Is there a particular reason or scenario why to use static variables? You have to consider that since all AM instances will share it, changing it in one AM instance - i.e. one user session - will affect all other AM instances - i.e. all other user sessions! You also have to consider the implications of multithreading when attempting to modify the static variable.
-
How to access Workflow variables in Form Designer?
Hello,
I am wanting to set certain subforms to readonly depending on which part of the workflow the form is currently on. I already have the JavaScript code working to set the subform fields to readonly, but now I cannot figure out how to trigger this and where do I keep a variable to keep track of which part of the workflow I am currently in.
I assume I will have a variable in the workflow itself and then I can use the Set Value QPAC to change the variable for each workflow step before it goes to the User QPAC, but what about within the form? I don't understand how the form javascript will know to execute, so how does my workflow "talk" to the form to set these fields to readonly?
Right now the JavaScript code is sitting in the root::initialize part of the form. I was assuming I could have something like "if my workflow variable is equal to XX then set this subform to read only". But, how do I access my workflow variable in the form designer?
Also, since I have digital signatures, I am having to pass all the form data in document variables, will this affect how I need to do this? I was also thinking of possibly accessing/setting a hidden field in the form, but thought the above way may be better.
I hope that made sense!
Thank you,
JenniferTo follow-up, I spoke with Adobe support this morning and they said that I cannot access Workflow variables within Designer (besides those Workflow variables that are already provided).
He mentioned that if I use the hidden fields, that I would need to Render the form each time before going to the User to trigger this to happen. So, I am not sure what I will do just yet. I probably not worry about making the fields readonly for the time being; it was a little extra thought I had and isn't required for our process.
Thank you,
Jennifer -
Not able to access parent instance variable in outside of methods in child
Hi,
I am not getting why i am not able to access parent class instance variable outside the child class intance methods.
class Parent
int a;
class Child extends Parent
a = 1; // Here i am getting a compilation error that Syntax error on token "a", VariableDeclaratorId expected after this token
void someMethod()
a = 1; // Here i am not getting any compilation error while accessing parent class variable
}Can any one please let me know exact reason for this and what is the error talks about?
Thanks,
Uday
Edited by: Udaya Shankara Gandhi on Jun 13, 2012 3:30 AMYou can only put assignments or expressions inside methods, constructors or class initializors, or when declaring a variable.
It has nothing to the with Child extending Parent.
class Parent {
int a = 1;
{ a = 1; }
public Parent() {
a = 1;
public void method() {
a = 1;
} -
How to access a variable from within a symbol.
How do I access a variable set outside a symbol from within that symbol?
ThanksIf you set a variable on stage ,say
sym.setVariable("stageVariable", "I am stage variable");
You can access it from within a symbol using :
var myVariable = sym.getComposition().getStage().getVariable("stageVariable");
Basically you need to get handle to the symbol in which the variable is defined. -
Access Process instance ID within ccBPM?
Hi All,
Is there anyway to access the process instance id within a BPM like for example in a container operation? I searched the forum but could not find any leads.
What I am trying to achieve is to use User Decision step. I have configured this and in the transaction BSWP I can find this item in the Inbox. The heading of this item shows the step name used in BPM design not any meaningful title. I can modify this title but want to access and display process instance id. Otherwise, there can be a lot of items in the User Inbox and nobody can say which item belongs to which process instance.
Any clues?
Thanks & Regards,
SudheerHi Sudheer,
I suggest to use a transaction ID from the payload of the messages you use in the process. The process ID comes from a number range in PI. A transaction ID from the payload may have higher value for the user.
If you cannot use the payload, have a look at the existing [context objects|http://help.sap.com/saphelp_nw73/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/content.htm] provided in the condition editor during container operation or in message mapping. You might find something of use for you, e.g. the MessageId.
Regards, Martin -
Access variables within a timer
How can I access variables within a timer?
I mean variables, that I can use in another class that extends applet i.e.?The Code can be compiled now with the Java Compiler.
But the image won't move on the screen.
import java.applet.*;
import java.awt.*;
import java.util.*;
public class ChangingApplet extends Applet {
private Image EricsBild;
private int x,y;
private TimerTask update;
public void start() {
EricsBild = getImage(getCodeBase(), "heuschrecke.gif");
x=5;y=5;
update = new TimerTask() {
public void run() {
if (x<300) x++;
if (y<200) y++;
if (x>3) x--;
if (y>2) y--;
repaint();
Timer t = new Timer(false);
t.schedule(update, 1000, 1000);
public void stop() {
update.cancel();
public void paint(Graphics g) {
g.drawImage(EricsBild,x,y,this);
} -
Access of Instance variable in servlet
hi,
If i declare a instance variable in servlet , can i access that variable throughout my application??.
please let me know.
thanks in advance.Servlets are Java classes. They follow all the rules of Java.
Maybe you are looking for
-
I thought I had purchased the best extended warranty available. Apparently the 3-year warranty I bought didn't include the Hard Drive Recovery Service. I can't help but wonder why it wasn't mentioned when I bought the extended warranty. Now I have
-
Crash when opening Exchange ActiveSynch e-mail account settings (DAEAS)
Hi, I created an Exchange ActiveSynch email account on a brand new IPAD with about 1 GB MEM in use and 10 Apps on it. I deleted all other email accounts from my IPAD. All worked fine for some days, but now opening email app crashes and app is closed
-
Vertical Scroller in ADF table
hi, Can anyone tell me how to add vertical scroller/scrollbar for ADF table? Thanks, Senthil
-
How can I get access to all the disk capacity?
I want to use all the disk capacity of SCSI target disks. When I call prtvtoc for these disks, it written something like this: cylinders number is N, available cylinders number is N-2, so Solaris takes 2 cylinders from each disk. Is there any way to
-
How to store SQL sproc, scripts from Visual Studio 2012 in source control TFS?
I have VS 2012, SQL Management 2012. From VS 2012, how do I store my sproc and table scripts in TFS source control?