Programming logic, passing data from a page to another
Hi,
I just began with developing with APEX 4.1.1, and I think I don't get how I should use it efficiently, I am more used to C-like programming.
I have a table which contains the state of some electricity meters taken at some non-regularly spaced dates. I want to make a chart of the electricity consumption, e.g for each month. This (I think) implies that the application must do that (I used this logic for the same application made with php and sqlite and it worked):
- User chooses a meter
- Application tells him the available range of dates and the mean interval between measurements
- User chooses the range of dates and the interval
- Application verifies that the range of dates is valid (not outside the real data)
- Interpolate the state of the meters at the requested regular interval
- Calculate the consumption for each interval (simply a difference)
- Draw the chart
For now, I created some procedures which should pass a custom data type containing all the meta-data about the chart and a PL/SQL table containing the actual data to be charted, but I'm stuck at the point of interacting with the user (meaning writing the output of the procedures on a page and passing them to the next procedure and also charting that pl/sql table).
Maybe should I create a temporary table ? But of what I read, this is a "real" table stored on the disk, and I just need this data once (and it is a small dataset, at most 20 points or so) for drawing a chart. This table should also be specific to the chart currently being created, it could happen that the same user or different users make multiple charts at the same time (like in two firefox tabs).
I hope my post is not too confused..
Ben
940065 wrote:
Hi,
I just began with developing with APEX 4.1.1, and I think I don't get how I should use it efficiently, I am more used to C-like programming.Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "940065".
APEX is intended for the development of database centric applications. It's a physical implementation of Tom Kyte's philosophy of database application development—possibly replacing Java with JavaScript ;-) .
To use it efficiently you need to stop thinking procedurally in C-like terms and think in terms of the set operations that SQL uses effectively.
I have a table which contains the state of some electricity meters taken at some non-regularly spaced dates. I want to make a chart of the electricity consumption, e.g for each month. This (I think) implies that the application must do that (I used this logic for the same application made with php and sqlite and it worked):
- User chooses a meter
- Application tells him the available range of dates and the mean interval between measurements
- User chooses the range of dates and the interval
- Application verifies that the range of dates is valid (not outside the real data)
- Interpolate the state of the meters at the requested regular interval
- Calculate the consumption for each interval (simply a difference)
- Draw the chart
For now, I created some procedures which should pass a custom data type containing all the meta-data about the chart and a PL/SQL table containing the actual data to be charted,
but I'm stuck at the point of interacting with the user (meaning writing the output of the procedures on a page and passing them to the next procedure and also charting that pl/sql table).It seems that you don't really get APEX yet: have you read the introductory documentation and taken the <i>Oracle® Database 2 Day + Application Express Developer's Guide</i> tutorial in order to understand basic APEX techniques and terminology?
You should be aiming to collect and validate the required parameters in APEX session state values and use the built-in charting capability with SQL data sources that use these parameter values in query predicates.
If you really can't generate the chart series from queries run on the original table, generate the chart data using an APEX collection rather than a "PL/SQL table" (preferred terminology is "collection type", but it's even better to specifically say "associative array", "nested table" or "varying array") or temporary database table.
Maybe should I create a temporary table ? But of what I read, this is a "real" table stored on the disk, and I just need this data once (and it is a small dataset, at most 20 points or so) for drawing a chart. This table should also be specific to the chart currently being created, it could happen that the same user or different users make multiple charts at the same time (like in two firefox tabs).Temporary tables are rarely required in any Oracle application, but standard Oracle Global Temporary Tables are database-session specific and so have no concurrency issues. However there are issues when using them in APEX, so APEX collections are the preferred method for temporary, session-based storage.
Similar Messages
-
How to pass data from one page to another
i have a table with multiselect and i want that in the moment i select some rows and press on a button in the other page should be displayed only those data i have selected from previous one.... how can i do this? any link or example for this case?
thanks in advance :)If the data you are retrieving from the excel file is just a few fields, then you can get them all on the first page and store them as public variables and use those variables on the different pages. But if you are getting a lot of data per page, then it would still be a good idea to get them all on the first page but store them as arrays. Then, on each page you can use the array you need.
-
Passing data from one page to another page using form bean
hi,
refer to above question, i had follow the sample found at weblogic sample application
,but unfortunately when i create my own application. The following error occur:
[Caught exception when evaluating expression '{actionForm.note}' with available
binding contexts [currentTag, session, pageContext, request, response, application].
Root exception cause: com.bea.wlw.netui.script.xscript.IllegalContextStateException:
The action form for the expression "actionForm["note"]" could not be found
can anymore tell me what has i miss !
{program flow -
pageA.jsp[userinput] ->getConfirmationAction-> pageB.jsp[confirmation]
-> protected Forward getConfirmation(TransferBean
form) throws Exception
return new Forward( "show_confimation" ,form);
thanks & rgds
cassyCassy,
If your page flow looks like this:
first.jsp -> actionA(FooForm) -> second.jsp -> actionB()
Then I think the problem is that there is no action form in scope as
second.jsp is rendering. This is because the action raised by
second.jsp is actionB, which has no form, and hence no {actionForm}.
You have two options:
Option A - use page inputs (available in the upcoming Service Pack 2)
---- JSP:
<%-- At the top of your second JSP... --%>
<netui-data:declarePageInput name="myPageInput" type="APageInput"/>
<netui:label value="{pageInput.myPageInput.name}"/>
---- JPF:
* @jpf:action
* @jpf:forward name="success" path="second.jsp"
protected Forward actionA(FooForm form)
APageInput input = new APageInput(form.getName());
return new Forward("success", "myPageInput", input);
Option B - since the form is still technically in the request, use it as
a workaround until option A is available to you.
<netui:label value="{request.fooForm.name}"/>
I hope this helps.
Thomas
Eddie O'Neil wrote:
Cassy--
Is there a <netui:form> tag on the page which displays this error
(pageB.jsp?)?
The "actionForm" binding context can only be used inside of a
<netui:form> tag. To display data in a read-only page (no form), you
can put the data in the request and reference it with the "request"
binding context.
Hope that helps...
Eddie
cassy wrote:
hi,
refer to above question, i had follow the sample found at weblogic
sample application
,but unfortunately when i create my own application. The following
error occur:
[Caught exception when evaluating expression '{actionForm.note}' with
available
binding contexts [currentTag, session, pageContext, request, response,
application].
Root exception cause:
com.bea.wlw.netui.script.xscript.IllegalContextStateException:
The action form for the expression "actionForm["note"]" could not be
found
can anymore tell me what has i miss !
{program flow -
pageA.jsp[userinput] ->getConfirmationAction-> pageB.jsp[confirmation]
-> protected Forward
getConfirmation(TransferBean
form) throws Exception
return new Forward( "show_confimation" ,form);
thanks & rgds
cassy -
Passing data from a container to another
Hi,
Let's say I have two containers (Container1=application , Container2). Container1 gets some data from user, perform some database lookup and displays Container2 with the results from database lookup.
Container1 --(call and display)--> Container2
Below shows how I am using a bindable variable in Container1 to pass the data from Container1 to Container2. Also shows how I display Container2 from Container1.
<!-- Container1 -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
[Bindable] public var foo:String = "bar";
private function loginHandler(event:LoginEvent):void
mycontainer2 = new Container2();
mycontainer2.name = "mycontainer2";
this.addChild(mycontainer2);
</mx:Application>
I am accessing the data in Container2 as follow:
<!-- Container2 -->
{mx.core.Application.application.foo}
Q1) Is there a better way to pass data from one container to another and access the data?
Q2) Is this the only way to call and display Container2 from Container1?
Q3) How can I move back to Container1 from Container2, i.e. Container2 call and display Container1
Container2 --(back to)--> Container1Best practices call for using custom events to share data between components. Here is my Flex 3 Cookbook post on the topic:
http://cookbooks.adobe.com/index.cfm?event=showdetails&postId=15466
To switch easily between containers 1 & 2 use a ViewStack, the gold standard for such interaction, and manipulate the selectedIndex or selectedChild property:
http://livedocs.adobe.com/flex/3/html/help.html?content=navigators_3.html
If this post answered your question or helped, please mark it as such. -
Hi Experts,
i am new to the SRM, i am facing problem in passing data from one screen to another.
my requirement is that when we select one shopping cart and press the PROPOSE SOURCES OF SUPPLY button, we will fetch all the contracts that are attached to the shopping cart.
we have implemented a BADI implementation of BBP_SOS_BADI (method BBP_SOS_CHECK) for passing some changed values to the contracts of the shopping cart into the popup screen that is displayed when we press PROPOSE SOURCES OF SUPPLY button and when we select any contract and press ASSIGN ONLY button in the popup screen the badi BBP_DOC_CHANGE_BADI is triggered.
i have implemented another BADI implementation of BBP_DOC_CHANGE_BADI for fetching the selected contract and pass the values to another screen, but the problem is that when we select one contract and press the assign only button we are fetching the wrong contract number ( that is in the BADI method BB_SC_CHANGE parameter IT_ITEM we are fetching the wrong contract), if we again do the same procedure for the second time we are getting the correct contract.
i am unable to understand why we are getting the wrong contract in the first time( that is we are getting contract other than the selected one).
as per my understanding i think when we are passing data to the popup screen using BBP_DOC_CHANGE_BADI we are not updating the shopping cart with the changed data.
can anyone tell me how we can update the SHOPPING CART with the changed contracts data, i have used BBP_PD_SC_UPDATE, BBP_PD_SC_SAVE and other shopping cart FM but nothing is happening.
Thanks
TanveerHello,
What version of SRM are you on? Have you check for OSS Notes? I have had trouble with BBP_DOC_CHANGE_BADI but it was because of other issues. The BADI works pretty well and it is called almost every time something happens to the shopping cart.
I have noticed that sometimes that values are not changed til the second calling of the BADI. I have yet understand why but I think it has to do with prompt processing. Usually, we train our requisitioners to click the 'Check' button to flush things out.
I don't know if I was helpful.... another thought.... could there be an error caught by BBP_DOC_CHECK_BADI that is preventing change in BBP_DOC_CHANGE_BADI?
Regards, Dean. -
Hi All,
I am new to TestStand. Still in the process of learning it.
What are Parameters? How are they differenet from Variables? Why can't we use variables for passing data from one sequnece to another? What is the advantage of using Parameters instead of Variables?
Thanks in advance,
LaVIEWan
Solved!
Go to Solution.Hi,
Using the Parameters is the correct method to pass data into and out of a sub sequence. You assign your data to be passed into or out of a Sequence when you are in the Edit Sequence Call dialog and in the Sequence Parameter list.
Regards
Ray Farmer -
Passing paremeters from one page to another
Hi,
I want to pass parameters from one page to another page. On the first page, I
have a form portlet based on scott.dept and one the second page I have another
form portlet based on scott.emp. Now I intend to pass deptno as parameter to
get the detailed info on the other page.
Any help would be highly appreciated.
ThanksSearching in these forums will answer most of your questions
please see :-
Select permissions for different schemas
Re: PL/SQL Tuning Issues
Where I can get Dealership for sale of Oracle E-Business Suite 11i -
Getting error , while passing parameters from one page to another page
Hello friends,
i am getting error, while passing parameters from one page to another page, below code i wrote.
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
ArrayList arl=new ArrayList();
EresFrameworkAMImpl am=(EresFrameworkAMImpl)pageContext.getApplicationModule(webBean);
ERecordImpl ERecordObj=new ERecordImpl();
HashMap hMap = new HashMap();
hMap.put("1",ERecordObj.getTransactionName());
hMap.put("2",ERecordObj.getTransactionKey());
hMap.put("3",ERecordObj.getDeferredMode());
hMap.put("4",ERecordObj.getUserKeyLabel());
hMap.put("5",ERecordObj.getUserKeyValue());
hMap.put("6",ERecordObj.getTransactionAuditId());
hMap.put("7",ERecordObj.getRequester());
hMap.put("8",ERecordObj.getSourceApplication());
hMap.put("9",ERecordObj.getPostOpAPI());
hMap.put("10",ERecordObj.getPayload());
// hMap.put(EresConstants.ERES_PROCESS_ID,
if(pageContext.getParameter("item1")!=null)
pageContext.forwardImmediately(EresConstants.EINITIALS_FUNCTION,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
hMap,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES
Error(71,2): method forwardImmediately(java.lang.String, byte, null, java.util.HashMap, boolean, java.lang.String) not found in interface oracle.apps.fnd.framework.webui.OAPageContext
Thanks
krishna.Hi,
You have imported the wrong class for HashMap.
Import
com.sun.java.util.collections.HashMap; instead of java.util.HashMap
Thanks,
Gaurav -
Pass data from a variable to another page
Hi,
I have a "select one choice" field from a page. I want to pass the data from that field to another page.
Any ideas on how to do it?
Thanks!drag and drop a list form data control onto your page as SOC.
In the value change event get value like, valueChangeEvent.getNewValue()
<af:selectOneChoice value="#{bindings.Return.inputValue}"
label="Plan:"
autoSubmit="true"
unselectedLabel="Please select a value
id="soc1"
valueChangeListener="#{MyBean.planValueChangeEvent}">
<af:forEach items="#{bindings.Return.items}"
var="pln">
<af:selectItem label="#{pln.label}"
value="#{pln.value}" id="si3"/>
</af:forEach>
</af:selectOneChoice> -
Need help in passing data from one page to other page in oaf
Dear All,
I have a requirement as below.
I am doing some selection in one page and populating the data in another page table region, next time when i am selecting another row and pressing the button i need to display the previous row as well as new row, how can i achieve this, currently i am able to see only the first row what i selected first.
Ex: 1 st scenario: after passing the selected data from one page to base page the data looks like below in base page.
1 test desc
2nd scenarios: when i am again selcting data and passing to the base page it should be like that
1 test desc
2 test desc
but currently it is showing
1 test desc only for the 2nd case, can any one please help me on thsi , its little bit urgent
ThnaksHow are you passing the values to the base page? Are you using setting the retainAM parameter to true while doing a forward.
-
Passing data from calling page to popup window
Hi All,
We are developing a BSP application for business card.I need to provide a preview button .
when the user clicks this button a
poopup window should open with the preview of business card.
My problem is how to pass the values like name , designation etc from the main page to popup window.
The code for previre image:
<h t m l b : i m a g e s r c = " s _ b _ d e tl . g i f " a l t = " P r e v i e w C a r d " o n C l i c k="addr" on C l i e n t C l i c k = " c a l l W i n d o w ( ) ; "/>
<s c r i p t t y p e = " t e x t / j a v a s c r i p t ">
f u n c t i o n c a l l W i n d o w ()
w i n d o w .o p e n ( " p r e v i e w . h t m " ) ;
</s c r i p t >
preview.htm is a simple HTML page . i need to pass values from main page to this page.
OR
Is it possibel to restrict the size of a VIEW to use it as a popup window?
OR
is there any other way to achieve this like.. the <bsp:call comp_id=" " />
tag , but i have no idea how to use it.
Thanks,
Anubhav.
Edited by: Anubhav Jain on Sep 12, 2008 3:38 PMHi Raja,
I did as suggested by you...but it is behaving strangely.
It works fine in debuging mode but when executed directly ....it is not working.
the scenario is:
Thers an image for preview as follows:
<htmlb:gridLayoutCell columnIndex="3" rowIndex="13">
<htmlb:i m a g e s r c = " s _ b _ d e t l . g i f " a l t = " P r e v i e w C a r d " o n C l i c k = " a d d r " o n C l i e n t C l i c k = " c a l l W i n d o w ( ) ; " / >
</htmlb:gridLayoutCell>
The JS code is:
f u n c t i o n c a l l W i n d o w ( )
<%
data: title(5),
fname(20),
lname(20),
comp(20),
addr(20),
city(20),
state(20),
pcode(20),
country(20),
phone(20),
fax(20),
email(241).
alt_addr-title = request->get_form_field( 'title' ) .
alt_addr-firstname = request->get_form_field( 'fname' ) .
alt_addr-lastname = request->get_form_field( 'lname' ) .
company = request->get_form_field( 'comp' ) .
alt_addr-street = request->get_form_field( 'addr' ) .
alt_addr-city = request->get_form_field( 'city' ) .
alt_addr-region = request->get_form_field( 'state' ) .
alt_addr-inhouse_ml = request->get_form_field( 'pcode' ) .
alt_addr-country = request->get_form_field( 'country' ) .
alt_addr-tel1_numbr = request->get_form_field( 'phone' ) .
alt_addr-fax_number = request->get_form_field( 'fax' ) .
alt_addr-e_mail = request->get_form_field( 'email' ) .
CALL METHOD cl_bsp_server_side_cookie=>set_server_cookie
EXPORTING
name = 'FORMFIELDS'
application_name = runtime->application_name
application_namespace = runtime->application_namespace
username = sy-uname
session_id = runtime->session_id
data_value = alt_addr
data_name = 'alt_addr'
expiry_date_rel = 1.
%>
w i n d o w . o p e n ( " . . / z _ b i z c a r d / p r e v i e w . h t m " , " W i n E " , " w i d t h = 2 4 0 , h e i g h t = 3 0 0 , t o o l b a r = n o , r e s i z a b l e = no ")
I was doing something similar...created a controller and a view , was calling the controller from window.open method with all other parameters for sizing etc.
How to pass a structure conatining data,from controller to the view...
Now in the onCreate event of the page PREVIEW.HTM in using;
CALL METHOD cl_bsp_server_side_cookie=>get_server_cookie
EXPORTING
name = 'FORMFIELDS'
application_name = runtime->application_name
application_namespace = runtime->application_namespace
username = sy-uname
session_id = runtime->session_id
data_name = 'alt_addr'
CHANGING
data_value = alt_addr.
and in the layout of PREVIEW.HTM in am using this alt-addr:
But if put a break point at the onCreate event of preview.htm and the execute i get the values in alt_addr but if i execute directly...it is empty in the layout?
What is the problem?
Thanks,
Anubhav. -
How to handle the date attribute,passing parameter from one page to another
hi Friends,
i want to pass data attribute from one page to another page-
i am passing like below ,in jdev log window i am getting below error.
String StatusUpdateDate = row.getAttribute("StatusUpdateDate");
params.put("StatusUpdateDate",StatusUpdateDate)
Error(121,50): incompatible types; found: java.lang.Object, required: java.lang.String
Suppose i am passing like below , while moving one page to another i am getting below error in application
String StatusUpdateDate = row.getAttribute("StatusUpdateDate").toString()
Status Update Date - JBO-25009: Cannot create an object of type:oracle.jbo.domain.Date with value:26-MAR-2009
please can any suggest me how to handle this error.
Thanks and Regards,
vamshiHi Pratap, Thanks for your help
it was my mistake that previously property it was varchar2, now i have changed as you suggested every thing. still i am getting error. this is my code-
AM CODE-
public void xxselection(String Name, String Email,String Product,String Region, DATE StatusUpdateDate)
DetailVOImpl vo1=getDetailVO1();
vo1.initQuery2(Name);
Row detailRow = vo1.createRow();
detailRow.setAttribute("Name", Name);
detailRow.setAttribute("Email", Email);
detailRow.setAttribute("Product", Product);
detailRow.setAttribute("Region", Region);
detailRow.setAttribute("StatusUpdateDate", StatusUpdateDate);
vo1.last();
vo1.next();
vo1.insertRow(detailRow);
detailRow.setNewRowState(Row.STATUS_INITIALIZED);
Controller- Process Form Request- Source page
if (pageContext.getParameter("Detail")!= null)
String Name=row.getAttribute("Name").toString();
String Email=row.getAttribute("Email").toString();
String Product=row.getAttribute("Product").toString();
String Region=row.getAttribute("Region").toString();
DATE StatusUpdateDate =(DATE)row.getAttribute("StatusUpdateDate");
HashMap params =new HashMap();
params.put(" Name", Name);
params.put("Email",Email);
params.put("Product",Product);
params.put("Region",Region);
pageContext.putTransactionTransientValue("StatusUpdateDate",StatusUpdateDate); //As you suggested
pageContext.forwardImmediately("OA.jsp?page=/xxm/oracle/apps/pos/stg/webui/DetailStagePG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
params,
true, // retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
another page Controller-Process request-Destination page-
String Name = pageContext.getParameter("Name");
String Email = pageContext.getParameter(" Email");
String Product = pageContext.getParameter("Product");
String Region = pageContext.getParameter("Region");
DATE StatusUpdateDate=(DATE)pageContext.getTransactionTransientValue("StatusUpdateDate");
Timestamp tstmpStatusDate=StatusUpdateDate.timestampValue();
System.out.println("tstmpStatusDate"+tstmpStatusDate);
Serializable[] parameters1 = {Name,Email,Product,Region,tstmpStatusDate};
am.invokeMethod("xxselection", parameters1);
Error - getting at while running the application page to page
No method with signature - No method with signature - xxselection(class java.lang.String, class java.lang.String, class java.lang.String, class java.lang.String, class java.lang.String)
every thing is getting passed except DATE Attribute, please check the code and update me
Thanks in Advace-
vamshi -
Pass value from one page to another
Hi All,
"How to pass the value from one Flex page to anothere Flex
page".
In First Flex page contains One Inputtext and one button is
there.After entering the data in inputtext box,the user clicks on
the button then get the data from inputtext box and then i need to
send that value to another flex page and display there.
Can u tel me plz............
Thanks & Regards,
Nagarjuna.I believe you are thinking in terms of HTML and traditional
page coding. As an old school ColdFusion guy I understand it is
difficult to leave that behind. (at least it was for me.) Unless
you literally have two different HTML pages that each have their
own Flex app running in them you do not need to send data from one
page to the next like you would with Web Forms. (If you are doing
that you may want to simply write the data to a Shared Object, Pass
it to a server to store and then feed back into the second Flex App
when it loads or perhaps use the ExternalInterface to then pass it
through as a series of URL parameters that can be loaded into the
next Flex App.)
In Flex you do not have to worry about loosing state between
pages because there are literally no pages. Only different views.
You would not "Send" the value from one page to another. You
provide a mechanism for the second view to reference the same model
or data object (most call them ValueObjects) that the first view is
setting via the form fields.
You would want to use a ValueObject in the first VIEW and
then fill the object with the form data using setter methods on the
object. For example set the fields onChange event to call the
setter on the object and pass it the form fields value as the
property. Alternately you could bind the values of the model
directly to the fields so that they automatically obtain the data
that is being filled in.
Depending on how complex of an application you are going to
build and how scalable it must eventually be you have many
different options to choose from to allow the second View to use
the data set but the first. However to make the application
ultimately more scalable you are going to want to keep your view
separated from the controller and that separated from the
Model/ValueObject. (By seperated I mean in different classes.)
I would suggest looking up the subject of MVC in Flex and
also the Mediator Design pattern. There are many great sources of
information.
Here are a few links that may help with ideas.
http://flexblog.faratasystems.com/?p=246
http://pages.cpsc.ucalgary.ca/~heatond/mediator/
http://livedocs.adobe.com/flex/3/html/help.html?content=introbd_2.html -
Pass ID From One Page To Another To View Details
I have a very basic problem. I am Trying To view details of a product from one page To another with itemID. But not getting The desired output. Code below:
<asp:HyperLink ID="View" runat="server" Text="View" NavigateUrl='<%# "~/Approval.aspx?id=" + Eval("PurchaseOrderLine_ID") %>'></asp:HyperLink>
using (var context = new SMAPPDBMSEntities())
int id = Convert.ToInt32(Session["PurchaseOrderLine_ID"]);
string ID = Request.QueryString["PurchaseOrderLine_ID"];
int m = Convert.ToInt32(ID);
var con = (from c in context.SMPurchase_Order_Line
where c.PurchaseOrderLine_ID == m
select c).ToList();
GridView1.DataSource = con;
GridView1.DataBind();
Where do I have The error?? This code passes but doesn't show The details.1. are you sure the hyperlink is being written in the page with the currect url?
2. r u sure that u get to that code?
3. r u sure that bith id and ID and m get values inserted to them?(u need better names btw)
4. context.SMPurchase - check that it has the corresponding data
5. make sure you dont override the GV data anywhere like in pageload or somewhere else -
Passing data from one frame to another frame
hello all, i am having a problem with passing data from one frame from another. I have a main frame when you click on connect button it display the second frame(class) that has 2 text fields and 2 buttons. When i click on connect it check if the data is correct. If the data is correct i want that frame to close and pass the data back to main frame. How can i do that.
thank youhello all, i am having a problem with passing data
from one frame from another. I have a main frame when
you click on connect button it display the second
frame(class) that has 2 text fields and 2 buttons.
When i click on connect it check if the data is
correct. If the data is correct i want that frame to
close and pass the data back to main frame. How can
i do that.
thank you
the original problem sounded like an ideal opportunity to use Modal Dialog. if you want one frame to display another to get user input then you need to stop the method in the main frame from executing until you recieve a valid input.
you can use your own class and keep all of the components that you have in the connect frame but you would have to extend JDialog instead of JFrame.
there is a way around it!
if you must use JFrame for both, then you need to have access to the main frame in the connect frame, maybe pass the pointer to the constructor??
anyway, when the connect frame is done with its duties, you have to use the pointer to call another method in the main frame that will continue the process. otherwise main frame doesn't know when connect frame is done and by that time, the method in main frame that instantiated the connect frame has long since died.
also, it allows things to happen in the other window that you may not want to happen until the connect frame is done
typically users of software start clicking around on things and you could have three or four connect frames going at the same time
it's really best to use a Modal Dialog, it really can look just like a JFrame!!!!!!!!!!!!!!
Maybe you are looking for
-
Office 2010, Windows 7 64 bit, BB sync, everything has been fine since forever. All of a sudden between Saturday and today, *poof* I can't get the calendar view. I have tried the switches, /resetfolder and all the rest, repair install Office, etc., n
-
Lacie D2 External Hard Drive suddenly won't appear on desktop or profiler??
I started my Mac today- and my external firewire 500 gig LacieD2 did not appear on my desktop. I went to Disk Utilities, and it is not showing up. In the profiler- it is listed as Unknown Device? The blue light is continually flashing. I unplugged it
-
Hi, I get a blank page on the url - Shop Online - http://oraclestore.oracle.com Nicolas.
-
I created a report that will use Excel as a datasource. The report runs fine from my desktop. I would like to place this report on the Business Objects Server. Can anyone tell me what I would need to do in regards to the excel file. In addition to th
-
How to invike methods in wallet application?
Hi All, I am trying to run my first application wallet and understanding javacard technology , i have set up development kit 2.2 successfully . After building and running i have checked expected out file it show same result. But how to invoke differe