ValueRef and scope variables
It seems that the valueRef attribute is always associated to a bean variable.
If I want to use scope variables like in JSTL I have to use the rtexprvalue="true" for valueRef.
Can the variables pageScope, sessionScope, param, etc. be reserved so that they can be accessed
thru valueRef?
E.g. <h_output_text valueRef="pageScope.mySSN" /> or use the JSTL syntax:
<h_output_text valueRef="${pageScope.mySSN}" />
Does somebody know the rationale behind valueRef being limited to beans exclusively?
I am not very clear abot this, but maybe it is because of some issue in making the Faces Components
device-independent.
Perhaps, you can try using <c:set> to copy the data from page-scope bean to a managed bean
and then use the managed bean property in the valueRef.
Ajay
Similar Messages
-
Suggestion: JavaScript scope variables and event listeners
Invoking Java from JavaScript in ADF Mobile is surprisingly efficient although it is still relatively expensive compared to plain HTML5/JavaScript/CSS stuff in the native UIWebView. But whenever you want to do something "dynamic" you have to revert to invoking Java, even for simple use cases. As far as I can see it as soon as you use listeners on components, managed beans or data controls you're in the Java world.
Why not add similar concepts that are pure JavaScript implementations for performance. As an example I want to have a SelectOneButton component and depending on its state I want to enable/disable an InputText component. As far as I can see it I would need Java to make this happen. First, I would need a Java managed bean to keep the enabled/disabled state. Then I would set the value property of the SelectOneButton with an EL expression to this managed bean property, or for other scenarios use a Java based ActionListener to change the state. Then the InputText component could use an EL expression in its Disabled property.
For this simple use case this would still perform fast, but real applications grow more complex.
Why not have the option of creating JavaScript based managed "beans"? The could live on javaScriptPageFlowScope or javaScriptViewScope. Then the AMX components could reference this from EL and it would be even better if we can create pure javascript ActionListeners (or other listeners). This would make it similar to the choice with ADF Faces application between doing a server roundtrip with partial-page-rendering and using pure clientListeners and clientAttributes for optimal performance.
For situations where we do need to power of Java, it would be great if we can access these javascript scope variables from Java.This is a good suggestion, Wilfred. We haven't gotten to this level of optimization in the framework yet. At some point it's likely we'll have an option for the developer to specify the layer to handle the method.
Thanks -
Session scope variables and weird behaviour of AdfContext()
Hello,
what is the best method and correct API to create a session scope variable?
I am currently using ADFContext().getCurrent().getSessionScope().get()/put(), but it looks like it has some problems: for some unkown reasons I loose the variable, that is get() returns null when called from a method of a (overridden)ViewRowImpl. Why does this happen?
Thanks you in advanceThere are a couple of ways you can set values on a sessions scope but I would have to question if you really need a scope as high as session to accomplish what you want to do. At any rate, you should be able to store the value using the method you described but you could also try setting it using EL by using the setExpressionValue and resolveExpression methods in JSFUtils.java (you can find this in the latest fusion demo application). JSFUtils also has a getFromSession and storeOnSession that you could try.
With all that said I don't think it is good practice to access scope variables from your model layer. You should write your method in the ViewRowImpl class to accept the value as a method parameter and then pass the value in through the binding layer or when invoking the method from your bean class. -
Scope of globle and locale variable of a Package
I have query about scope of variable declared in spec and body of a package. like
create or replace package pk_test as
v_var varchar2(50);
procedure pk_p_test;
end ;
create or replace package body pk_test as
v_var varchar2(50) := 'aaa';
procedure pk_p_test
is
--v_var varchar2(50) := 'bbbb' ;
begin
null;
--dbms_output.put_line(pk_p_test.v_var);
dbms_output.put_line(pk_test.v_var);
dbms_output.put_line(*v_var*);
end;
end;
declare
begin
pk_test.v_var := 'qqqqq';
--dbms_output.put_line(pk_test.v_var);
pk_test.pk_p_test() ;
end ;
package is allowing to declare variable having same name in spec and body.
But its not allowing to access. is it bug or .. can we access that variable using some methodsAh, I think I can see what you are saying.
Yes, it can be declared in either place, or even declared in both places, but it shouldn't be declared in both.
One is a "public" state variable and the other is a "private" state variable, so when it creates the package state, they are both marked differently within the state and therefore unique, hence it compiles.
The public one can be accessed from outside the package, because it's clear to Oracle which is being referred to...
SQL> create or replace package pk_test as
2 v_var varchar2(50);
3 procedure pk_p_test;
4 end ;
5 /
Package created.
SQL> ed
Wrote file afiedt.buf
1 create or replace package body pk_test as
2 v_var varchar2(50) := 'aaa';
3 procedure pk_p_test is
4 begin
5 null;
6 end;
7* end;
SQL> /
Package body created.
SQL> exec pk_test.v_var := 'aaa';
PL/SQL procedure successfully completed.
SQL> set serverout on
SQL> exec dbms_output.put_line(pk_test.v_var);
aaa
PL/SQL procedure successfully completed.However if you try and access the variable from inside the package, the body is able to reference both the public and private variables, so it doesn't know which one to use. Hence the compilation error previously seen.
It's not a bug, because the packages are being flexible to allow for public and private variables, but what you are experiencing just indicates poor package design and lack of understanding of package state variables. -
Method Scope variables controls Multi-Threading !
Hye there Experts !
First, let me thank you all for such a brain-stuff sharing around; feel nice to be a part here.
While browsing through the below article, found something confusing...kindly clarify.
http://www.javaworld.com/javaworld/jw-07-2004/jw-0712-threadsafe.html?page=1
Extract from the above discussion I understand :
when a variable is moved to method scope instead of instance scope, synchronization is achieved.
How is this true for servlets ???
Method scope variables are available only during method call I think...here, since this is a servlet, there will be only one instance and if many (lets say 10) requests hits this servlet object, all these threads will read same counter as all of them enter into this only one method of this object,
so...this should be still not thread safe I guess.
I didn't want to execute and see results of this code, but I am trying to understand the key at first.
Please guide me before brain blows... :-)
Would also appreciate any references that really says true things about
'synchronization for enterprize (handle huge requests) web apps - technques for servlets and any other stuff'
Thanks again guys, have a wonderful time.feel nice to be a part here.Welcome to the mad-house ;-)
Method scope variables are available only during method callWARNING: I'm no guru, so this may be misleading or just plain wrong.. but as I understand it:
Yep a "local" variable exists only the context of the execution of it's containing method... so a local variable is implicitly bound to the thread that created it (by invoking the method in which the local is declared)... a local variable can't be accessed directly by another thread simply because the other thread has no access-path to the variable (you can't expose a local through getters & setters)... hence locals are thread safe.
The important bit is that it's the thread which "owns" the local variable... not the declaring method... if the method is executed concurrently by two threads, each thread will have its own private copy of all the local variables.
One other question though: are locals in static methods still thread safe? I'm not sure.
package forums;
class NonfinalLocalVariableInThreadTest
public static void main(String[] args) {
try {
new Thread(new Runnable() {
public void run() {
System.out.println(args[0]);
}).start();
} catch (Exception e) {
e.printStackTrace();
compiler error
C:\Java\home\src\forums>"C:\Program Files\Java\jdk1.6.0_07\bin\javac.exe" -Xlint -d c:\java\home\classes -cp c:\java\home\src;.;c:\java\home\classes c:\java\home\src\forums\NonfinalLocalVariableInThreadTest.java
C:\Java\home\src\forums\NonfinalLocalVariableInThreadTest.java:9: local variable args is accessed from within inner class; needs to be declared final
System.out.println(args[0]);
^
1 error
Output completed (0 sec consumed) -
Xml in trh:script and requestScope variable
Hi,
I owuld like to create a xml in a function of trinidad html script. It is not taking the normal way to create a xml and store it in a variable. I need to create the xml which i need to send to the web server with the updated data. Further please tell me if can acces the request scope variable in the javascript. Actually i would use this variable to update the xml created in the trh:script.
Is trh:script somewhat different from html script ?
Any inputs ??
Regards
Sishant
Edited by: user784337 on May 25, 2010 7:01 AMHi,
Is trh:script somewhat different from html script ?
No.
please tell me if can acces the request scope variable in the javascript
No, it cannot access the requestScope memory
Frank -
Dataype of cfdocument scope variables
Hello,
It seems that since I installed the 8.0.1 updater the
datatype of the cfdocument scope variables (eg totalpagecount and
currentpagenumber) has been changed. Before the update the datatype
was numeric, but now it seems unknown. This means I can't use
mathematical expressions to these variables. Is this a new bug in
CF 8.0.1 or....??
FrankI have done some tests and it seems that the variables are
replaced by {currentpagenumber} and {totalpagecount} and I think
these variables are filled in by the pdf reader. I think we need
some pdf programming guide to find out how to manipulate these
variables.
I have no clue why Adobe decided to change this behaviour in
CF 8.0.1. -
Initialization of global/scope variables ONLY through ASSIGN?
Is it only possible to initialize global resp. scope variables through an explicit ASSIGN?
Or can I place e.g. a value="...." attribute inside the BPEL source code at the variable declaration
to initialize it directly?
Or even better: can I init the variable through JDeveloper GUI?
PeterI looked this up on Oracle Support and there was one thread that it said that it could be resolved with a 11.1.1.6. to 11.1.1.6.2 patch update.
We have one test environment on 11.1.1.6.6 to which we have uploaded the RPD to receive the same error, although it now additionally indicated a "Blacklisted Connection Pool". Here are the error details:\
[2013-01-22T00:30:32.000-08:00] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 004osJjn__ADCgH_qt0FyY0006Py000000] [tid: e9c8a950] [nQSError: 17014] Could not connect to Oracle database. [[
[nQSError: 17001] Oracle Error code: 12545, message: ORA-12545: Connect failed because target host or object does not exist
at OCI call OCIServerAttach.
[nQSError: 43059] Init block ‘XYZ’: Dynamic refresh of repository scope variables has failed.
[2013-01-22T00:30:32.000-08:00] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 004osJjn__ADCgH_qt0FyY0006Py000000] [tid: e9c8a950] [43143] Blacklisted connection pool: 'ABC'
This is the way I have defined the DSN for the OCI 10g/ 11g within the RPD connection pool:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.36.93)(PORT=1541))(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.36.94)(PORT=1541))(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.36.95)(PORT=1541))(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.36.96)(PORT=1541))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=a.b.c)))
My next test would be to individually test each host and see which one causes it to error out.
Any insights of what I could look to additionally do?
PS: The DBA is yet to get back with the exact version of the Oracle 11g DB but it is greater than 11.1.0.7 since that was the version they were running 6 months back and might have upgraded. -
Print memory scope variables value
All,
How do i print all the memory scope variable and their values that are set via the MB or the taskflow or the UI page using setAction/PropertyListener ?
I mean where should i write the code ?
thnks
Jdev11.1.1.5
Edited by: in the line of fire on Oct 13, 2011 9:50 AM@Frank
if you can detail this +"If the managed bean uses a HashMap to store values then the bean itself can be used to expose an interface for all of what you want it to do. So its an architecture decision to make (which you should do when designing the application)"+
As of now what i am doing is
public void printMemoryVariables(){
logger.info("inside printMemoryVariables");
AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
// get the PageFlowScope Params
Map<String, Object> scopePageFlowScopeVar= adfFacesCtx.getPageFlowScope();
// get the requestScope Params
Map<String, Object> scopeRequestScopeVar= adfFacesCtx.getViewScope();
Collection scopePageFlowScopeVarValues = scopePageFlowScopeVar.values();
Collection scopePageFlowScopeVarKeys = scopePageFlowScopeVar.keySet();
//obtain an Iterator for Collection
Iterator itrValues = scopePageFlowScopeVarValues.iterator();
Iterator itrKeys = scopePageFlowScopeVarKeys.iterator();
//iterate through HashMap values iterator
while(itrValues.hasNext() && itrKeys.hasNext()){
logger.info("Key : " + itrKeys.next() + "Values: " + itrValues.next());
}And calling this in the initializer of the taskflow. But is it possible to get the values during the task flow execution -
Application scope variables ... an easier way or not ?
Instead of sharing application scope variables through the
servletContext()/application I am using a normal singleton class (or maybe
static class) to share all my application varaiable. It works fine and it
takes a lot less code to write.
It seamed logical to do this a static classes or singletons are shared
within a single servletContext/application (which there seems to be only one
per WL instance anyway). (singleton is quite nice pattern coz. all
jsp:useBeans with the application scope are by definition singletons)
Has anoyne tried something similar or maybe know of the problem with this
approach. I assume that server will never reinitialise application level
variables ...... hope the assumption is correct. ....
When you specify application scope, the JSP stores/retrieves the value
into/from the servlet context. You may already know this, but it sounded
like what you thought you were somehow avoiding.
Cameron Purdy
http://www.tangosol.com
"Bohinc D" <[email protected]> wrote in message
news:[email protected]..
> Instead of sharing application scope variables through the
> servletContext()/application I am using a normal singleton class (or maybe
> static class) to share all my application varaiable. It works fine and it
> takes a lot less code to write.
>
> It seamed logical to do this a static classes or singletons are shared
> within a single servletContext/application (which there seems to be only
one
> per WL instance anyway). (singleton is quite nice pattern coz. all
> jsp:useBeans with the application scope are by definition singletons)
>
> Has anoyne tried something similar or maybe know of the problem with this
> approach. I assume that server will never reinitialise application level
> variables ...... hope the assumption is correct. ....
>
>
>
-
Trying to pass and object variable to a method
I have yet another question. I'm trying to display my output in succession using a next button. The button works and I get what I want using test results, however what I really want to do is pass it a variable instead of using a set number.
I want to be able to pass the object variables myProduct, myOfficeSupplies, and maxNumber to method actionPerformed so they can be in-turn passed to the displayResults method which is called in the actionPerformed method. Since there is no direct call to actionPerformed because it is called within one of the built in methods, I can't tell it to receive and pass those variables. Is there a way to do it without having to pass them through the built-in methods?
import javax.swing.JToolBar;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.JScrollPane;
import javax.swing.JPanel;
import java.net.URL;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Panel extends JPanel implements ActionListener
protected JTextArea myTextArea;
protected String newline = "\n";
static final private String FIRST = "first";
static final private String PREVIOUS = "previous";
static final private String NEXT = "next";
public Panel( Product myProduct, OfficeSupplies myOfficeSupplies, int maxNumber )
super(new BorderLayout());
int counter = 0;
//Create the toolbar.
JToolBar myToolBar = new JToolBar( "Still draggable" );
addButtons( myToolBar );
//Create the text area used for output.
myTextArea = new JTextArea( 450, 190 );
myTextArea.setEditable( false );
JScrollPane scrollPane = new JScrollPane( myTextArea );
//Lay out the main panel.
setPreferredSize(new Dimension( 450, 190 ));
add( myToolBar, BorderLayout.PAGE_START );
add( scrollPane, BorderLayout.CENTER );
myTextArea.setText( packageData( myProduct, myOfficeSupplies, counter ) );
setCounter( counter );
} // End Constructor
protected void addButtons( JToolBar myToolBar )
JButton myButton = null;
//first button
myButton = makeNavigationButton( FIRST, "Display first record", "First" );
myToolBar.add(myButton);
//second button
myButton = makeNavigationButton( PREVIOUS, "Display previous record", "Previous" );
myToolBar.add(myButton);
//third button
myButton = makeNavigationButton( NEXT, "Display next record", "Next" );
myToolBar.add(myButton);
} //End method addButtons
protected JButton makeNavigationButton( String actionCommand, String toolTipText, String altText )
//Create and initialize the button.
JButton myButton = new JButton();
myButton.setActionCommand( actionCommand );
myButton.setToolTipText( toolTipText );
myButton.addActionListener( this );
myButton.setText( altText );
return myButton;
} // End makeNavigationButton method
public void actionPerformed( ActionEvent e )
String cmd = e.getActionCommand();
// Handle each button.
if (FIRST.equals(cmd))
{ // first button clicked
int counter = 0;
setCounter( counter );
else if (PREVIOUS.equals(cmd))
{ // second button clicked
counter = getCounter();
if ( counter == 0 )
counter = 5; // 5 would be replaced with variable maxNumber
setCounter( counter );
else
counter = getCounter() - 1;
setCounter( counter );
else if (NEXT.equals(cmd))
{ // third button clicked
counter = getCounter();
if ( counter == 5 ) // 5 would be replaced with variable maxNumber
counter = 0;
setCounter( counter );
else
counter = getCounter() + 1;
setCounter( counter );
displayResult( counter );
} // End method actionPerformed
private int counter;
public void setCounter( int number ) // Declare setCounter method
counter = number; // stores the counter
} // End setCounter method
public int getCounter() // Declares getCounter method
return counter;
} // End method getCounter
protected void displayResult( int counter )
//Test statement
// myTextArea.setText( String.format( "%d", counter ) );
// How can I carry the myProduct and myOfficeSupplies variables into this method?
myTextArea.setText( packageData( product, officeSupplies, counter ) );
myTextArea.setCaretPosition(myTextArea.getDocument().getLength());
} // End method displayResult
* Create the GUI and show it. For thread safety,
* this method should be invoked from the
* event dispatch thread.
public void createAndShowGUI( Product myProduct, OfficeSupplies myOfficeSupplies, int maxNumber )
//Create and set up the window.
JFrame frame = new JFrame("Products");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Add content to the window.
frame.add(new Panel( myProduct, myOfficeSupplies, maxNumber ));
//Display the window.
frame.pack();
frame.setVisible( true );
} // End method createAndShowGUI
public void displayData( Product myProduct, OfficeSupplies myOfficeSupplies, int maxNumber )
JTextArea myTextArea = new JTextArea(); // textarea to display output
JFrame JFrame = new JFrame( "Products" );
// For loop to display data array in a single Window
for ( int counter = 0; counter < maxNumber; counter++ ) // Loop for displaying each product
myTextArea.append( packageData( myProduct, myOfficeSupplies, counter ) + "\n\n" );
JFrame.add( myTextArea ); // add textarea to JFrame
} // End For Loop
JScrollPane scrollPane = new JScrollPane( myTextArea ); //Creates the JScrollPane
JFrame.setPreferredSize(new Dimension(350, 170)); // Sets the pane size
JFrame.add(scrollPane, BorderLayout.CENTER); // adds scrollpane to JFrame
JFrame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); // Sets program to exit on close
JFrame.setSize( 350, 170 ); // set frame size
JFrame.setVisible( true ); // display frame
} // End method displayData
public String packageData( Product myProduct, OfficeSupplies myOfficeSupplies, int counter ) // Method for formatting output
return String.format( "%s: %d\n%s: %s\n%s: %s\n%s: %s\n%s: $%.2f\n%s: $%.2f\n%s: $%.2f\n%s: $%.2f",
"Product Number", myOfficeSupplies.getProductNumber( counter ),
"Product Name", myOfficeSupplies.getProductName( counter ),
"Product Brand",myProduct.getProductBrand( counter ),
"Number of Units in stock", myOfficeSupplies.getNumberUnits( counter ),
"Price per Unit", myOfficeSupplies.getUnitPrice( counter ),
"Total Value of Item in Stock is", myOfficeSupplies.getProductValue( counter ),
"Restock charge for this product is", myProduct.restockingFee( myOfficeSupplies.getProductValue( counter ) ),
"Total Value of Inventory plus restocking fee", myOfficeSupplies.getProductValue( counter )+
myProduct.restockingFee( myOfficeSupplies.getProductValue( counter ) ) );
} // end method packageData
} //End Class Panelmultarnc wrote:
My instructor has not been very forthcoming with assistance to her students leaving us to figure it out on our own.Aren't they all the same! Makes one wonder why they are called instructors. <sarcasm/>
Of course it's highly likely that enough information was imparted for any sincere, reasonably intelligent student to actually figure it out, and learn the subject in the process.
And if everything were spoonfed, how would one grade the performance of the students? Have them recite from memory
public class HelloWorld left-brace
indent public static void main left-parenthesis String left-bracket right-bracket args right-parenthesis left-brace
And everywhere that Mary went
The lamb was sure to go
db -
Use of Return and Notify_url variables offered by PayPal
I have been integrating PayPal into my application (ASP NET MVC) where I made some analysis about PayPal (went through their documentation about the integration). Created a PayPal sandbox account and can transfer the amount.What I want to know is about the `return` and `notify_url` variables. I have enabled `auto return` in my account and also enabled `PDT`. My form variable is like this:<input type="hidden" name="notify_url" value="http://localhost:xxx/xx/Notify">
<input type="hidden" name="return" value="http://localhost:xx/xx/Return">As I have surfed in net, what they state about `Return` and `notify_url` is:> The "return" URL to which PayPal redirects buyers’ browser after they complete their payments. For example, specify a URL on your site that displays a “Thank you for your payment” page. Default is nothing is specified – PayPal redirects the browser to a PayPal webpage. Note, you must have "Auto Return" enabled in your Account Profile settings in order for this variable to work.
>PayPal returns data back to your site via what they call IPN. Its really just a callback to a URL you specify. You can set this URL via the variable `notify_url` you can send to PayPal.From the above quotes what I understand is that PayPal will post `IPN` variables to `notify action` once the payment done before auto redirecting to the page I set (I mean customer may go the application page or they may close the session).But only return action alone hitting not the `Notify_url`.Correct me if I misunderstood the concept and let me know if it was still Unclear.Yes, it's not present in the code I have posted but I have tried this as well.
It didn't work, as expected, because soap/axis is on top of http and not https and because my proxy uses http as well (or at least that's what I have learned so far).
In fact, I have tried all combinations between http.\*, https.\*, and Authenticator without success.
I think the problem is more soap/axis related. The solution for axis2 seems somewhat 'trivial' (and well explained over the web) while it's not for axis1.
Regards
Rob
Edited by: RobR on Nov 29, 2007 4:37 AM
Edited by: RobR on Nov 29, 2007 9:56 AM -
Open module for managing property file and environment variables
Looking for an open module for managing property files and environment variables (like CLASSPATH) set in a shell script. For handeling properties (preserving comments, supporting includes, appending new entries, and more) I have looked at SuperProperties from openadaptor but find certain functionality lacking. As for interfacing with common shell scripts/files containing setting for CLASSPATH, JAVA_HOME, other system/application variables another type of object editor is needed. Maybe JFIG?
Any ideas are greatly welcomed.You seem wright, you hit a brick wall here with Air to find the location
of the command console on windows...
So in fact I never build an exe tool, but this little problem was a nice
case to test it and I tried it.:
I downloaded monodevelop
-GTK# for .NET 2.12.10*
-MonoDevelop 2.4.2*
from http://monodevelop.com/Download
created a console project and had an exe in 5 minutes !
You can download the findconsole tool and the projectfiles here:
http://greencollective.nl/temp/dump/findconsole_monoproject.zip
findconsole.exe will reveal the path/location of cmd.exe on a windows system.
Cheers,
Latcho -
Report in new page does not know of session and presentation variables
I have a question about GOURL.
I am using GOURL as a column function in one report (report A), so that when i click on that column it takes me to another report(report B) that open in new popup window.
the first report (A) also uses some session and presentation variables, which is also used by Report B as filters. I am curious that if I add these filters which are using variables to report B, why can't report B get the value of these, (it just errors out ) because it didn't found any value to those variables in the filter.
Becuase I am ending up with passing all these variables in GOURL and setting them as 'isprompted'.
Does this report (B) knows nothing else than what it finds in GOURL?
thanksIn a nutshell, if u use gourl then its parameters will be only using in navigated report. This is functionality
-
How to change value of instance variable and local variable at run time?
As we can change value at run time using debug mode of Eclipse. I want to do this by using a standalone prgram from where I can change the value of a variable at runtime.
Suppose I have a class, say employee like -
class employee {
public String name;
employee(String name){
this.name = name;
public int showSalary(){
int salary = 10000;
return salary;
public String showName()
return name;
i want to change the value of instance variable "name" and local variable "salary" from a stand alone program?
My standalone program will not use employee class; i mean not creating any instance or extending it. This is being used by any other calss in project.
Can someone tell me how to change these value?
Please help
Regards,
Sujeet SharmaThis is the tutorial You should interest in. According to 'name' field of the class, it's value can be change with reflection. I'm not sure if local variable ('salary') can be changed - rather not.
Maybe you are looking for
-
How to suppress blank page in sapscript
Hi All, I am working on cheque printing, after I run the transaction F110, it will print the sap script which I have developed, everything is working fine and good. But its printing an extra blank page in addition with cheque. I have tested thinking
-
When I click on the Mozilla icon on my desktop, I get the error message "The procedure entry point is Threaddesktopcomposited could not be located in the dynamic link library USER32.dll. == This happened == Every time Firefox opened == I upgraded to
-
Hello Everyone, I've just started using Photoshop to work on my photos and one thing I was getting into was cropping them down with the crop tool. It was working fine for the past couple of days, but all of a sudden now when I go to crop something it
-
Retina macbook pro super drive to apple tv
I can not airplay from superdrive to apple tv
-
Weird Memory behavior on a Quad G5 8 GB, --- memory limited to 6 GB
Hello I am using Kontakt 2 standalone that I load 3 times with 3 different banks (Strings, Winds, Brass) I cannot use more than 6 GB of Memory ( see figures after) Figures ar given by "Activity monitor" When I load String, brass and winds in that ord