How to pass a variable in current class for access in next class.
Hi Everyone,
I'm new in this iphone development.so please anyone help me .
My question is How can we declare a variable for, select a row in current class which read as input string in next class Soap Message.
Means in my 1st class i am getting web response in array as a name like john, now if i m clicking on john so its call another web service for john details.so how can i select ( john ) cell to call in next class Soap Message.
Please anyone help me..
Sorry for bad english.
Regards:
Maddy
You need to ask in the iPhone Developer forums:
http://devforums.apple.com
Similar Messages
-
How to pass a variable from one class to another class?
Hi,
Is it possible to pass a variable from one class to another? For e.g., I need the value of int a for calculation purpose in method doB() but I get an error <identifier> expected. What does the error mean? I know, it's a very, very simple question but once I learn this, I promise to remember it forever. Thank you.
class A {
int a;
int doA() {
a = a + 1;
return a;
class B {
int b;
A r = new A();
r.a; // error: <identifier> expected. What does that mean ?
int doB() {
int c = b/a; // error: operator / cannot be applied to a
}Thank you!elaine_g wrote:
I am wondering why does (r.a) give an error outside the method? What's the reason it only works when used inside the (b/r.a) maths function? This is illegal syntax:
class B {
int b;
A r = new A();
r.a; //syntax error
}Why? Class definition restricts what you can define within a class to a few things:
class X {
Y y = new Y(); //defining a field -- okay
public X() { //defining a constructor -- okay
void f() { //defining a method -- okay
}... and a few other things, but you can't just write "r.a" there. It also makes no sense -- that expression by itself just accesses a field and does nothing with it -- why bother?
This is also illegal syntax:
int doB() {
A r = new A();
r.a; // error: not a statement
}Again, all "r.a" does on its own is access a field and do nothing with it -- a "noop". Since it has no effect, writing this indicates confusion on the part of the coder, so it classified as a syntax error. There is no reason to write that. -
Instead of using session How to pass the variable from action class to JSP
Im using Struts1.2 version.Created the Sample application to get the username.Upto action class im getting the username then i have to display the username in the JSP.Is there any options rather than using session variable to display the username.
did you check the answer in your previous thread
Passing Variable from Javascript to Controller -
How to pass session variables as a parameters for the procedure
hi all gurus
i have created one procedure,it contains user information (usrname ,password(it is encrypted)) and it returns true or false
if this value is true i want to allow the user to login other wise i don't want to login the use into dashboard
how can i achieve this ???
my procedure name is E_t_A_P it returns true(1) false(0)
if i get 1 then user can see the dashboard
other wise not
what are the steps i have to follow to achieve this task
please help me out
thnks
Sreedhar
Edited by: 791907 on Sep 24, 2010 3:15 AMhi saichand
what we are doing means
we are using encrypted passwords in the back end ,so whenever user enter with theirs user name and password ,from initialization box we can call this function
like select function_Name(':USER',':PASSWORD') from dual from this we can call the back end function ,there decryption and encryption process will be done
and that function returns 1 or 0 as out put
based on this result we have to provide the authentication , i mean if it returns 1 then user can login other wise user is not
can you help me out
other wise do u have any ideas to full fill this requirement ?
Thanks
Sreedhar
Edited by: 791907 on Sep 24, 2010 5:20 AM -
How to pass session variable value with GO URL to override session value
Hi Gurus,
We have below requirement.Please help us at the earliest.
How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
Please provide step by step solution.No vague answers.
I followed below steps mentioned.
RPD:
****-> Created a session variable called STATUS
-> Create Session Init block called Init_Status with SQL
select 'ACTIVE' from dual;
-> Assigned the session variable STATUS to Init block Init_Status
authenticationschemas.xml:
Added
<RequestVariable source="url" type="informational"
nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
Report
Edit column "Contract Status" and added session variable as
VALUEOF(NQ_SESSION.STATUS)
URL:
http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
Issue:
When I run the URL above with parameter EXPIRED, the report still shows for ACTIVE only. The URL is not making any difference with report.
Report is picking the default value from RPD session variable init query.
could you please let me know if I am missing something.Hi,
Check those links might help you.
Integrating Oracle OBIEE Content using GO URL
How to set session variables using url variables | OBIEE Blog
OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
Thanks,
Satya -
How to pass a variable more than one values?
How to pass a variable more than one values?
You can't.
During 1 session, 1 ODI variable can have only 1 value at a time.
If you need more than 1 value, you will have to do somethink like a loop inside your package, and refresh the variable value each time. -
How to pass a variable value into a custom planning function via a web
Can some one tell me
How to pass a variable value into a custom planning function via a web template?
What are the different types of Planning function parameters available and what is the difference between them?
Thanks
babuHi Sutrtha,
Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
Am I missing something?
Regards
B -
How to pass importing parameter of super class method to subclass method?
hi all,
i have defined a class
CLASS CUST_REPORT DEFINITION.
PUBLIC SECTION.
METHODS:DATA_RETRIVE IMPORTING CUSTID_LOW TYPE ZCUSTOMER-ZCUSTID
CUSTID_HIGH TYPE ZCUSTOMER-ZCUSTID.
DATA:IT_CUST TYPE TABLE OF ZCUSTOMER,
WA_CUST TYPE ZCUSTOMER.
ENDCLASS. "cust_report DEFINITION
The method DATA_RETRIVE in this class has two importing parameters named CUSTID_LOW and CUSTID_HIGH.
then i have defined subclas of this clas.
LASS CUST_ORD DEFINITION INHERITING FROM CUST_REPORT.
PUBLIC SECTION.
DATA:IT_ORD TYPE TABLE OF ZORDER.
METHODS:DATA_RETRIVE REDEFINITION,
DISPLAY.
ENDCLASS. "cust_ord DEFINITION
Method DATA_RETRIVE is redefined.
So how to pass importing parameteres of super class method to sub class method with the same name.
Thanks and Regards,
ArpitaHi,
I tried like this.
METHOD DATA_RETRIVE.
CALL METHOD SUPER->DATA_RETRIVE
EXPORTING
CUSTID_LOW = I_CUSTLOW
CUSTID_HIGH = I_CUSTHIGH.
ENDMETHOD.
But parameters I_CUSTLOW and I_CUSTHIGH are not getting values after call to method.
Thanks and Regards,
Arpita -
Error while passing ODI variable in JNDI Url for JMS Queue XML
Hi,
Facing a weird problem while passing ODI variable in JNDI Url for JMS Queue XML.
Below is the JNDI Url configured under ODI Topology:
JNDI Url: t3://<host_location>?d=#TEST.SCHEMA_FILE&s=<schema_name>&JMS_DESTINATION=jms/<queue_name>
where,
#TEST.SCHEMA_FILE --> ODI variable storing xsd name and location
Issue Description:
If we restart ODI server then for the first run of any ODI interface using JMS Queue XML, it is unable to get the value for ODI variable present in JNDI Url (d=#TEST.SCHEMA_FILE).
It throws error message saying: No XSD found
Temporary Resolution:
As a temporary fix if we hard-code and pass the value in that ODI variable as shown below, it will successfully go through.
eg: JNDI Url: t3://<host_location>?d=C:\XSD\test.xsd&s=<schema_name>&JMS_DESTINATION=jms/<queue_name>
Reverting it back to variable later will have no issues and subsequent run will succeed.
But again anytime later if server is restarted then first run will have this issue.
Want to have permanent fix for it.
Any one having idea on it please share. Appreciate your help!What ODI version are you using? It could be related to the bug in the older version as described in support note Doc ID 1290326.1
-
How to pass custom search help(F4 help) for a field in ALV output?
Hi,
I want to activate the F4 help in ALV output for a field for which we do not have search help assigned at table ,data element and domain level.
In field catalog i have enabled it by below line.
ls_fcat-F4AVAILABL = 'X'.
but because there are no standard input help available it is giving message as "No input help is available".
so how to pass our custom search help (g_search) for any field in ALV output.
I am using object oriented ALV grid display.
Thanks!!!
Rajesh Gupta.hi,
check this out:
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/acdefb13-0701-0010-f1a2-8eeefa7d3780
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b3d5e890-0201-0010-c0ac-bba85ec2ae8d?quicklink=index&overridelayout=true -
How can I make "No Proxy" the default for accessing the internet?
How can I make "No Proxy" the default for accessing the internet?
*Tools > Options > Advanced > Network : Connection > Settings
If you do not need to use a proxy to connect to internet then try to select "No Proxy" if "Use the system proxy settings" or one of the others do not work properly.
See "Firefox connection settings":
*https://support.mozilla.org/kb/Firefox+cannot+load+websites+but+other+programs+can -
ADF : How to pass a variable from one frame to another frame ?
Hi,
I have an html page divided into 3 frames, all inside a frameset. Each frame are linked to a specific .jsf page (src attribute). When I list a list thanks to a ADF datatable in ONE frame, each row has a "show more" button. When I click this button I succeeded to print row detail inside the same frame thanks to the processScope ADF's native variable. The problem is that I want to display the row detail in another frame, clicking from this current frame. So for this I need to reload the other frame which display the content of the processScope variable.
For this I use the javascript code :
=> parent.frames['bottomRight'].location.reload()
Just before refreshing, I put the variable in the processScope of course like it appears in the backing bean :
FacesContext context = FacesContext.getCurrentInstance();
CLPRMBuilding building = (CLPRMBuilding)
context.getApplication().getVariableResolver().resolveVariable(context, "building");
if (building == null)
return "error";
AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
afContext.getProcessScope().put("buildingDetail", building);
Next, when the user click on the button "show more" a binding CoreCommandButton component is done. And the accessor's code is executed :
public void setShowMoreCommandButton(CoreCommandButton showMoreCommandButton) {
this.showMoreCommandButton = showMoreCommandButton;
showMoreCommandButton.setOnclick("parent.frames['bottomRight'].location.reload()");
And so the other frame is reloaded ! But the "buildingDetail" variable seems not to be present in the processScope because in the jsf page displayed by the other frame no content is printed, like if the variable were not initialized. How to do then ? How to pass the buildingDetail variable to the other frame which I need to reload to refresh it's content ?elaine_g wrote:
I am wondering why does (r.a) give an error outside the method? What's the reason it only works when used inside the (b/r.a) maths function? This is illegal syntax:
class B {
int b;
A r = new A();
r.a; //syntax error
}Why? Class definition restricts what you can define within a class to a few things:
class X {
Y y = new Y(); //defining a field -- okay
public X() { //defining a constructor -- okay
void f() { //defining a method -- okay
}... and a few other things, but you can't just write "r.a" there. It also makes no sense -- that expression by itself just accesses a field and does nothing with it -- why bother?
This is also illegal syntax:
int doB() {
A r = new A();
r.a; // error: not a statement
}Again, all "r.a" does on its own is access a field and do nothing with it -- a "noop". Since it has no effect, writing this indicates confusion on the part of the coder, so it classified as a syntax error. There is no reason to write that. -
Hi,
I am relatively new to JSP/Java and am currently trying to figure out how to pass a value gotten from running a query into another query.
My code is below .. I am trying to pass 'tsid'. For simplicity I have hard-coded some values. I have tried 2 different methods (c:set & String) and bolded them below. I wanted to pass the tsid into the sql2 query.
<%@ page import="java.sql.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
Connection connection = null;
try{
String tpid="1";
String tdate="2005-11-11";
String tsr01="3";
String tsr02="54";
String tsr03="64";
String tsr04="90";
String tsr05="54";
String tsr06="17";
String tsr07="null";
String tsr08="null";
String tsr09="null";
String tsr10="null";
String tsr11="null";
String tsr12="null";
String tsr13="null";
String tsr14="null";
String tsr15="null";
String tz_1l1="111";
String tz_1u1="111";
String tz_1l2="111";
String tz_1u2="111";
String tz_1l3="111";
String tz_1u3="111";
String tz_1l4="111";
String tz_1u4="111";
String tz_1l5="111";
String tz_1u5="111";
String tz_2l1="111";
String tz_2u1="111";
String tz_2l2="111";
String tz_2u2="111";
String tz_2l3="111";
String tz_2u3="111";
String tz_2l4="111";
String tz_2u4="111";
String tz_2l5="111";
String tz_2u5="111";
Class.forName("org.postgresql.Driver");
connection = DriverManager.getConnection("jdbc:postgresql:dbName","postgres","dbPassword");
Statement stmt1 = connection.createStatement();
Statement stmt2 = connection.createStatement();
Statement stmt3 = connection.createStatement();
String sql1="INSERT INTO t_test_setup_results (tsr_tpid, tsr_tester, tsr_athlete, tsr01, tsr02, tsr03, tsr04, tsr05, tsr06, tsr07, tsr08, tsr09, tsr10, tsr11, tsr12, tsr13, tsr14, tsr15, tsr_date) VALUES ('"+tpid+"' , '15', '9', "+tsr01+", "+tsr02+", "+tsr03+", "+tsr04+", "+tsr05+", "+tsr06+", "+tsr07+", "+tsr08+", "+tsr09+", "+tsr10+", "+tsr11+", "+tsr12+", "+tsr13+", "+tsr14+", "+tsr15+", '"+tdate+"' );";
stmt1.executeUpdate(sql1);
ResultSet rs2 = stmt2.executeQuery("SELECT tsr_id FROM t_test_setup_results WHERE tsr_date='"+tdate+"' AND tsr_tpid='"+tpid+"' AND tsr_athlete='9';");
%>
<c:set param="tsid2" value="${rs2.rows[0].tsr_id}" />
<%
String tsid="$rs2.rows[0].tsr_id}";
String sql2="INSERT INTO t_test_zones (tz_tsrid, tz_1l1, tz_1u1, tz_1l2, tz_1u2, tz_1l3, tz_1u3, tz_1l4, tz_1u4, tz_1l5, tz_1u5, tz_2l1, tz_2u1, tz_2l2, tz_2u2, tz_2l3, tz_2u3, tz_2l4, tz_2u4, tz_2l5, tz_2u5) VALUES ('"+tsid+"', "+tz_1l1+", "+tz_1u1+", "+tz_1l2+", "+tz_1u2+", "+tz_1l3+", "+tz_1u3+", "+tz_1l4+", "+tz_1u4+", "+tz_1l5+", "+tz_1u5+", "+tz_2l1+", "+tz_2u1+", "+tz_2l2+", "+tz_2u2+", "+tz_2l3+", "+tz_2u3+", "+tz_2l4+", "+tz_2u4+", "+tz_2l5+", "+tz_2u5+");" ;
stmt2.executeUpdate(sql2);
%>
<result>success</result>
<%
catch (Exception e) {
e.printStackTrace();
%>
<result>failure</result>
<%
} finally {
try {
connection.close();
} catch (SQLException e) {
%>this is the error I get with the above:
org.apache.jasper.JasperException: /my-apps/Peak/Jsp/submitNewTestData.jsp(64,1) Attribute param invalid for tag set according to TLD
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:234)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:989)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Validator.validate(Validator.java:1489)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:157)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)OK,
here is what I currently have:
%>
<c:set var="tsid2" value="${rs2.rows[0].tsr_id}" />
<%
String tsid= tsid2;
String sql2="INSERT INTO t_test_zones (tz_tsrid, tz_1l1, tz_1u1, tz_1l2, tz_1u2, tz_1l3, tz_1u3, tz_1l4, tz_1u4, tz_1l5, tz_1u5, tz_2l1, tz_2u1, tz_2l2, tz_2u2, tz_2l3, tz_2u3, tz_2l4, tz_2u4, tz_2l5, tz_2u5) VALUES ('"+tsid+"', "+tz_1l1+", "+tz_1u1+", "+tz_1l2+", "+tz_1u2+", "+tz_1l3+", "+tz_1u3+", "+tz_1l4+", "+tz_1u4+", "+tz_1l5+", "+tz_1u5+", "+tz_2l1+", "+tz_2u1+", "+tz_2l2+", "+tz_2u2+", "+tz_2l3+", "+tz_2u3+", "+tz_2l4+", "+tz_2u4+", "+tz_2l5+", "+tz_2u5+");" ;
stmt2.executeUpdate(sql2);NOW I get sucess (which is what it should be) OR that tsid2 could not be resolved. Why the back and forth errors? is it a timing thing? (ie it sometimes takes longer to query the database?? )
If it is a timing thing, how can i fix this? -
How to call a variable in another class????
if i have two classes in a package. From one class, how do i get the value of one of the variable in the other class.
For example;
Class A have a variable call totalNum which have a value initialise.
Class B wan to get the value variable totalNum in class A.
So do i go abt calling it?
CheersFor example;
Class A have a variable call totalNum which have a
value initialise.
Class B wan to get the value variable totalNum in
class A.Your explanation is far from clear. Is the variable in class A a field? If yes, is it a static field? Is it declared public, private, etc.?
If you don't understand the above questions, you should do the following:
1) Learn the basics of the Java language from the Java Tutorial and/or from an entry-level book: http://java.sun.com/docs/books/tutorial/
2) Post future question in the New To Java Technology forum. -
Passing a variable from one class to another
Hello:
I am new to java programming. I am developing an application in Java
At a particular JTextField call it jtf3, I am invoking Calendar application by clikcing a jbutton.
I would like to set text in jtf by obtaining the date clicked by the user. I am storing complete date string in the Calendar application during ActionPerformed event at Calendar Application level.
I do not know how to pass this string to calling frame as it does not listen to the button event happening at the Calendar Application.
Much appreciated
Thanks a lot for your time
regardsThis is the application from which the I am calling the calendar application.
The method setDate set the date obtained from calendar class during actionperformed event.
The actionperfomed event from CalendarClass is pasted below as well.
Much appreciated
import javax.swing.JFrame;
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
import java.awt.*;
public class TestDrive
public static void main(String[] args) {
DatePanelFrame dpf = new DatePanelFrame();
dpf.addWindowListener(new WindowAdapter( ) {
public void windowClosing(WindowEvent we) { System.exit(0); }
dpf.pack();
dpf.setVisible(true);
class DatePanelFrame extends JFrame {
JTextField djtf;
String dateInput;
public DatePanelFrame() {
setTitle("Date Panel");
setSize(100, 800);
setLocation(300, 100);
Container content = getContentPane();
JPanel datePanel = new JPanel();
JButton calButton = new JButton(".....");
datePanel.add(calButton, BorderLayout.SOUTH);
djtf = new JTextField(" ");
datePanel.add(djtf, BorderLayout.NORTH);
content.setLayout(new BorderLayout());
content.add(datePanel, BorderLayout.CENTER);
calButton.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent event)
JFrame fr = new CalendarClass();
fr.setSize(400, 400);
fr.setLocation(600, 100);
ObjCal oc = new ObjCal();
fr.setVisible(true);
public void setDate(String d)
djtf.setText(d);
repaint();
System.out.println(djtf.getText());
The ActionPerformed event from CalendarClass
jbtArray.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent event)
if (event.getActionCommand() != " ")
daySelected = event.getActionCommand();
yearSelected = jtfYear.getText();
int intYearSelected = Integer.valueOf(yearSelected).intValue();
monthSelected = jtfMonth.getText();
intDaySelected = Integer.valueOf(daySelected).intValue();
int intMonthSelected = getMonthNum(monthSelected);
dateSelected = getDate(intYearSelected, intMonthSelected, intDaySelected);
TestDrive td = new TestDrive();
DatePanelFrame dpf = new DatePanelFrame();
dpf.setDate(dateSelected);
Maybe you are looking for
-
Songs are not showing up on my ipod, even though...
So I have a playlist on my ipod with 35 podcasts in it. I manually loaded the podcasts. When I connect to my computer I can see the songs on the ipod and play them on my computer. However, when I turn on my ipod and go to that playlist it is empty. I
-
Whole Functionalities of Fixed Asset in SAP R/3
I just need some document o whole Funcitionalities of Fixed Assets In Sap R/i.e ECC 6.0. Best Regards, Sudhanshu Dang
-
How to get Print settings dialogue?
I have a Mac and a canon P9000 Mark 2 printer with Photoshop CS5. I can find no way to change the size or type of paper I am using. I know the print settings box has been removed from the file menu. I go to Print Settings at the color management m
-
Finder media encoder, how can I add audio formats support?
I've noticed the feature where if you right click on a media file, you get an option in the popup menu to encode the file to some Apple-friendly format, I suppose. I am trying to find a way to enhance this program's support for audio formats. I have
-
AS2 Reciver Communication Channel error
Hi, I am doing FILE to AS2 ... I configured the Scenatio with Synchronous MDN , I have Created the Sender for MDN report too.. beow is my Error At AS2 reciver Communication Channel... Message processing failed. Cause: javax.resource.ResourceExceptio