Example of using a delegate in wpf forms to pass a paramater from a child to sub in parent
Hi
Looking for a example or explanation of how to use delegate to pass a parameter from a wpf form child to a sub in the parent to be executed in vb.net.
Thanks
Hi Paul
As trying to use a delegate as declaring and referencing along the lines of
https://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l=EN-US&k=k(vb.Delegate);k(SolutionItemsProject);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-VB)&rd=true
Thanks
RB_IA
My experience with using delegates is related to Multi-threading or otherwise accessing members/methods running on separate threads.
A WPF example of that would be something like this:
Option Strict On
Option Explicit On
Option Infer Off
Class MainWindow
Delegate Sub dSetTitle(window As Window, text As String)
Dim dispatched As Boolean = False
Private Sub btnSafeCall_Click(sender As Object, e As RoutedEventArgs) Handles btnSafeCall.Click
Dim th As New System.Threading.Thread(AddressOf SafeThread)
th.Start()
End Sub
Private Sub btnUnsafeCall1_Click(sender As Object, e As RoutedEventArgs) Handles btnUnsafeCall1.Click
Dim th As New System.Threading.Thread(AddressOf UnsafeThread)
th.Start()
End Sub
Sub SetTitle(window As Window, text As String)
If Not dispatched Then
dispatched = True
Dispatcher.Invoke(New dSetTitle(AddressOf SetTitle), window, text)
Else
dispatched = False
window.Title = text
End If
End Sub
Sub SafeThread()
SetTitle(Me, "test2")
End Sub
Sub UnsafeThread()
Me.Title = "test"
End Sub
End Class
“If you want something you've never had, you need to do something you've never done.”
Don't forget to mark
helpful posts and answers
! Answer an interesting question? Write a
new article
about it! My Articles
*This post does not reflect the opinion of Microsoft, or its employees.
Similar Messages
-
Any example code using Generic IVI Scope driver to get an External Trigger from a Scope?
I'm using a LeCroy WavePro 950.
I have done that using a "waverunner" if memory serves me correctly.
Did you check out the driver available for download from this site?
http://zone.ni.com/idnet97.nsf/9b2b33e1993d877786256436006ec498/bd22a2bf3d4a5503862569a7007778d7?OpenDocument
I first had to figure out how to get the scope trigger manually. Once I had that figured, I was able to adapt the example to do the triggering.
Hope this helps,
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
Used a template to create form. when I run it from a page, the template is not shown
I have created a form based on a template. When I run it from the applications page I can see the template. I then added it as an application component item with a folder in a content area. I have then published this folder as a portlet in a page. When I the form from the portlet within that page, it opens up in a new window but there is no template.
How do I get the template to show when I run it from the portlet ?It is true that the template is not shown when the form is run as a portlet. But, with a small amount of coding in the additional pl/sql section, you can display the template.
Steps :-
1> Edit the form and go to the additional pl/sql section.
2> Put the following code in the "...before displaying the page" area
declare
l_mid integer;
l_title varchar2(32767);
l_template varchar2(200);
begin
l_mid := p_session.get_module().id;
l_title := p_session.get_module().title;
l_template := p_session.get_module().template;
<portal_schema>.wwv_headings.show_header
p_template => l_template,
p_heading => l_title,
p_help_link => <portal_schema>.wwctx_api.get_proc_path('wwa_app_module.help')
|| '?p_module_id='||l_mid
end;
3> Put the following code in the "...after displaying the page" area
declare
l_template varchar2(200);
begin
l_template := p_session.get_module().template;
<portal_schema>.wwv_headings.show_footer
p_template => l_template
end;
Note: replace <portal_schema> with appropriate your portal schema . -
Good afternoon. I am using a Palm Centro I just bought (unlocked - from ATT - on Rogers network). All is working great BUT sending e-mails. Versamail is receiving just fine but refuses to send. It puts everything I try to send into the "outbox" and then tries to send only to later tell me that it unable to send. The server I go through is a POP server. It has never given me such an issue before - Any advice!!
Steve
Post relates to: Centro (Unlocked GSM)
This question was solved.
View Solution.Hello!
With POP/IMAP email, there are 2 server. One is incomming to whihc ur ok and the other is outgoing to which that one is not. Since you are using Rogers for service, use the SMTP server from them to which I do belive is still smtp.rogerswirelessdata.com for the outgoing mail server.
Even though the phone has been unlocked, the phone design is still ATT so the versamail application is probably still using ATT's SMTP by default and you need to make the manual change.
Message Edited by thetreoguy on 05-12-2009 04:41 PM -
WHY - give workable examples of using JHeadstart to convert forms into ADF.
Why give examples of how to use JHeadStart to convert forms in to ADF, but not allow it to be done with the evaluation version ... I assume it was possible with the 10g versions. Is it broken in 11g.
I was lookig to build a case for migrating an oracle forms application to Oracle Java and not a IBM or JBOSS or even .Net application, I can't build that case now, I have no budget to engage Oracle, have to do this of my own bat. Company has been take over by bigger company that has IBM stack.
Is Oracle this follish to allow the smaller users of Oralce to go by the way side, be lost to other languages etcWe deliberately did not include the Forms2ADFGenerator in the evaluation version.
Modernizing your forms application, possibly migrating it to ADF is a considerable effort that is often underestimated.
Migration tools like the Forms2ADFGenerator can help to a certain extent but are by no means a magic bullet. This is something we cannot stress enough, as over and over again we see people who think migration tools can make the difference. They cannot.
If you want to make a choice of development environment to modernize your forms application, then the availability of a migration tool should not play a role!
It is a fundamental and strategic decision to go for Oracle ADF which should not be influenced by a minor time saver like a migration tool.
To decide on the use of JHeadstart, the evaluation version with the tutorial should be convincing enough.
The real power of Jheadstart is not in the Forms2ADF Generator, this tool is just a lbonus that can save you a bit of time.
Here is some more info:
When does JHeadstart Forms2ADF Generator save time
The amount of work that can be saved by using the JHeadstart Forms2ADF Generator (JFG) very much depends on the structure of the Oracle Forms application at hand. The JHeadstart Forms2ADF Generator provides most savings for forms that have the following characteristics:
* Standard-Forms data retrieval and data manipulation through blocks based on database tables, with master-detail relations defined between the block
* Complex user interface, many (stacked) canvasses, many tabs, many list of values, and other display types
* PL/SQL logic mostly limited to user interface dynamics: conditionally showing/hiding user interface items, and conditionally changing the properties of user interface items. While JHeadstart does not convert PL/SQL logic, this type of logic is easily implemented in the ADF application because JHeadstart provides many declarative property settings to implement this behavior.
PL.SQL Logic
JHeadstart has made the deliberate choice to not automatically convert the PL/SQL logic to Java. The reasons for this are:
* It is impossible to automate the migration of a two-tier architecture (logic in Forms or in the database) to a three tier Model-View-Controller architecture as is common in JEE web applications, including ADF-based applications.
* The architecture of the converted application should be identical to the best-practice architecture of an ADF application that is build from scratch. If the architecture is the same, the same skill set can be used to maintain both migrated applications and ADF applications build from scratch. In addition, by going for a best practice architecture, the application is more flexible, and can be maintained easier at lower cost.
* When using the JHeadstart Forms2ADF Generator, you get this best-practice ADF architecture that is identical to ADF/JHeadstart applications that are built from scratch.
Other Forms2ADF Considerations
And even if it turns out the JFG adds a lot of value, there are many other questions you should ask yourself before embarking on a Foms2ADF project.
For example:
* Apart from technical reasons like old Forms verisons no longer supported, are there real business reasons and business benefits for migrating that justify the migration effort?
* To what extent is the application still meeting functional requirements?
* Are there issues with stability and end user friendliness?
* Old forms applications are typical "window-on-data" screens, you see the structure of the datamodel through the layout of the screens. Modern web 2.0 composite applications are more task-oriented with good support for human workflow. You should consider to what extent it wants to leverage all these new user interfaces capabilities that come with ADF Faces and WebCenter.
* How does the application fits in the overall IT landscape? What interfaces to other systems exist, what (old/obsolete?) technology is used to implement those interfaces?
* What about batch functionality and reporting facilities?
* May be part of the functionality of the current system can be replaced with standard off-the-shelf software?
* How sound, well structured and future proof is the underlying datamodel?
* To what extent are you looking at service-orientated architectures? Whats the SOA maturity level of your organisation?
* Above questions help to answer the key question: how desirable and benficial is it to migrate an old monolitic forms application 1:1 to a monolitic ADF aplication? How does that fit in overall IT strategy?
* Organisational isues: who will migrate the system, who will maintain the system? Is outsourcing considered? etc.
Next Steps
We offer a Forms2ADF assessment service in which we migrate a number of sample forms selected by the customer to assess the added value of the JFG, and we discuss all of the above questions
For example, I did one Forms2ADF assessment where it turned out that JFG added litlle or no value, but we were still able to convince the customer of the combined power of ADF and JHeadstart in (re-)building ADF apps from scratch.
You also might want to take a look at some presentations I did on this topic, and some online demo's:
* Guidelines for moving from Oracle Forms to Oracle ADF and SOA: http://www.slideshare.net/stevendavelaar/forms2-adfsoa-ukoug
* JHeadstart Forms2ADF Generator – Migrating from Oracle Forms to a Best-Practice ADF application: http://www.slideshare.net/stevendavelaar/jhs11-forms2-adfukoug
* 3 online demo's of forms2adf conversion process: http://www.oracle.com/technetwork/developer-tools/jheadstart/overview/index.html
Hope this helps,
Steven Davelaar,
JHeadstart Team.
Steven Davelaar,
JHeadstart Team. -
Example of using 'related lists' address validation in web forms
Post Author: br1
CA Forum: Data Quality and Data Insight
Hi,
Can anyone provide a url of their webform(s) that have integrated 'related list' functionality for the address data entry?
Much appreciated,Thanks for your answer Grant
Indeed I'm confused,it's a big quantity of information I have to read,in such short time as I haven't worked before with EJB,RMI,CORBA...
But I do have developed some PJCs with a lot a functionality ( emulating the client-server TEXT_IO package,enabling mouse events on text_items and push_buttons,enabling drag and drop functionality for push_buttons)..Duncan's advices were very valuables in this issue..So ,signing and designing PJCs isn't anymore a problem for me...
Look what is ambigous for me:
There is a part of the EJB wich is developed to the database server (with deployejb)...I've understood that this class is instantiated and receive a callback object from the middletier class(on the web server?),used for reply...
So ,where does the PJC interfiers?
I saw on the metalink that is possible to use the EJB on the forms server and use it from forms with java importer..the form can comunicate with any PJC by set_custom_property(get).I thinck that this can be a better way of development..
I'm trying to create a EJB wich executes a specific transmited database query,and ,return a answer when something is changed on the database table,view...
There is also another thing ambigous for me...in the docs,I saw a virtual directory on the database server...where should I define that virtual directory,as for me,the web server is on a different machine than the database server
Thanks for your time...
Sandu -
How to use a custom.dll in forms 6i
Hi,
i have made a small dll using a icon-making software, that software has made a .dll of the icon I made in that software
Now i want to use that .dll in my forms 6i. (client/server)
the dll contains only one icon named 'Icon1'
would any one please tell me how can I call that icon in that .dll to view in my forms button at run time..
is this possible..??
just for clarification, for security reasons I am not using the .ico of that icon diect from hardisk in my button thats why i made a .dll of that so that the user may not be able copy my icon
thanks in advance,Here is the doc
Doc ID: Note:99824.1
Subject: How to Display User-Defined Cursors and Icons in Forms
Type: BULLETIN
Status: PUBLISHED
Content Type: TEXT/X-HTML
Creation Date: 23-FEB-2000
Last Revision Date: 30-OCT-2002
PURPOSE
The purpose of this note is to explain how to display customized
cursors and icons in Forms 6.0 on Windows platform (32 bits).
Assumption is made that resources are stored in a DLL, which is
available in the path at runtime.
It is mandatory to store the cursor in a DLL to make it available
with Forms: .cur cursor files cannot be directly loaded from the
file system.
On the other hand, icons .cio files can directly be read from the
filesystem by Forms Runtime. However we will focus on icons which are
stored in a DLL.
The article is divided into two main parts:
- how to build a resource-only DLL with Visual C++ 5.0
- how to display the cursor and the icon in Forms 6.0
SCOPE & APPLICATION
The intended audience needs to have basic knowledge in Forms Builder
and also in Visual C++ (or any other Win32 compiler).
A typical environment is Forms 6.0, Visual C++ 5.0 and Windows NT.
WHAT IS A RESOURCE ?
A resource can be considered as some extra binary information that can
be added to an executable file. Windows resources are for example icons,
cursors, menus, dialog boxes, keyboard-accelerator tables and much more.
Resources are usually stored in a .rc file, which is compiled by the
resource compiler in order to provide a .res file. These compiled resources
can then be appended to a binary executable file or a DLL.
For instance, Visual C++ 5.0 includes a resource editor which allows you to
draw your icons and your cursors, and store them in a resource file.
Part I - BUILDING A RESOURCE-ONLY DLL
Consider the following setup:
- myicon.ico: icon file
- mycur.cur: cursor file
The objective of this section is to build a DLL called proj.dll which
contains both the icon and the cursor. This operation requires several steps.
Step 1: Create a project
In Visual C++, select menu File->New... In the dialog box, choose the Projects
tab and pick "Win32 Dynamic Link-Library". Fill the project name (e.g. Proj)
and the location (e.g. c:\MyProjects). Check 'Create new workspace', check
Win32 as target platform and click on OK.
This creates a directory c:\MyProjects\Proj, where necessary .rc and .cpp
files can be stored. Place the .ico and .cur files in this directory too.
Step 2: Add a resource file to the project
Create a proj.rc file, edit it and make sure it contains the following lines:
testcur CURSOR DISCARDABLE "mycur.cur"
testico ICON DISCARDABLE "myicon.ico"
This is the resource file. Using the Project->Add to Project->Files... menu,
select the proj.rc file and add it to the current project.
Step 3: Add a dummy C++ file to the project
Create a proj.cpp file, edit it and make sure it contains the following lines:
#include <windows.h>
extern "C"
BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID)
return 1;
This creates an entry-point in the DLL. This function does nothing but is mandatory
to have a DLL after the build of the project.
Add the proj.cpp file to the project as described in Step 2.
Step 4: Choose the target type
At this moment, you can choose if you need a 'DEBUG' or a 'RELEASE' flavour of
the DLL. As there is not much to debug in this DLL, the 'RELEASE' flavour is
recommended. Furthermore, it is much more compact.
Using the Build->Set Active Configuration... menu, choose the Proj - Win32 Release
as the active configuration.
Step 5: Build the DLL
Now, it is time to compile the resource file, compile the C++ file, link both
together and build the proj.dll DLL. This operation is performed by using the
Build->Rebuild All menu.
After a short time, you should see "Proj.dll - 0 error(s), 0 warning(s)" in
the Visual C++ message window. This means that the DLL was built successfully.
Step 6: Place the DLL in the appropriate directory
The proj.dll file is currently located under the c:\MyProjects\Proj\Release
directory. Copy it in an appropriate directory which is reachable in the
runtime environment path.
Part II - USING THE ICON AND CURSOR IN THE FORM
At this stage the DLL is created and can be used in the Form application.
Again, this is a multi-step procedure.
Step 1: Load the DLL in the Forms Runtime environment
Assuming the proj.dll DLL is placed in a directory pointed by the
PATH environment variable, below is the piece of PL/SQL code which loads
the DLL into the Forms Runtime environment. This code can be placed in the
WHEN-NEW-FORM-INSTANCE trigger for example:
declare
hDLL ORA_FFI.LIBHANDLETYPE;
begin break;
--Preload the DLL so the cursor and Icons can be found.
-- I'm assuming the DLL is in the path here
hDLL := ORA_FFI.LOAD_LIBRARY(NULL,'proj.dll');
exception
when ORA_FFI.FFI_ERROR then
for i in 1..TOOL_ERR.NERRORS LOOP
message(TOOL_ERR.MESSAGE(i));
end LOOP;
end;
Step 2: Display the cursor stored in the DLL
Now, you may want to change the cursor when the user clicks on
a specific button. This is an example of code that could be set
in the WHEN-BUTTON-PRESSED trigger:
set_application_property(CURSOR_STYLE,'<proj>TESTCUR');
<proj> refers to the proj.dll. Please note the < and > signs
which are mandatory there. TESTCUR is the name of the cursor resource
as defined in the proj.rc file.
Step 3: Display the icon stored in the DLL
You may also want to change the icon of an iconic button after
some specific end-user action. The appropriate code for that is:
set_item_property('IBUTTON',ICON_NAME,'<proj>TESTICO');
IBUTTON is a PushButton, with the Iconic property set to Yes.
TESTICO is the name of the icon resource as defined in the proj.rc file.
Asim. -
How to use Java Script in Oracle Forms 10g
Hello,
Appreciate if anyone could help me using Java Script in Oracle Forms 10g?
Thanks
GMThank you for your reply. I was reading on the metalink that we could use the to call the java script from oracle Forms 10g (Doc ID 265863.1)
Example:
WEB.SHOW_DOCUMENT ('javascript:void(window.open("http://www.oracle.com","","location=no,toolbar=no,menubar=no,status=no,"));self.close()','_blank');
I tried it but it did not open the any window as it claims. Am I missing anything? Is there any IE related setting which I need to modify for the above to work?
Regards
GM -
How to use BULK COLLECT in oracle forms
hi gurus,
I am using oracle forms
Forms [32 Bit] Version 10.1.2.0.2 (Production)
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionI wanna use bulk collect from database table lets say <employees>
while working on database level with collections and records it's working very well for me, but when I try to use that technique on oracle forms it hits me error
error 591 this feature is not supported in client side programmingI know I can use cursors to loop through the records of oracle tables ,
but I'm convenient while using collections and arrays
for example
Set Serveroutput On
Declare
Type Rec_T Is Record (
Empid Number ,
Empname Varchar2(100)
Type V_R Is Table Of Rec_T Index By Binary_Integer;
V_Array V_R;
Begin
Select Employee_Id , First_Name
Bulk Collect
Into V_Array
From Employees;
For Indx In V_Array.First..V_Array.Last Loop
Dbms_Output.Put_Line('employees id '||V_Array(Indx).Empid ||'and the name is '||V_Array(Indx).Empname);
End Loop;
End;I wanna use this same way on oracle forms , for certain purposes , please guide me how can I use ...
thanks...For information, you can use and populate a collection within the Forms application without using the BULK COLLECT
Francoisactually I want to work with arrays , index tables ,
like
record_type (variable , variable2);
type type_name <record_type> index by binary_integer
type_variable type_name;
and in main body of program
select something
bulk collect into type_variable
from any_table;
loop
type_variable(indx).variable , type_variable(indx).variable2;
end loop;
this is very useful for my logic on which I am working
like
type_variable(indx).variable || type_variable(indx-1);
if it's possible with cursors then how can I use cursor that can fullfill my this logic@Francois
if it's possible then how can i populate without using bulk collect?
thanks
and for others replies: if I can use stored procedures please give me any example..
thanks -
Using a perform in a form with sapscript
Hi,
I would like to print a field during the runtime in a form. This field it is not available in the program so i would like to find it using a perform in the sapcript.
Someone tell me that this is possible...but someone can tell me how? Is there some docs about this issue?
Best Regards
João FernandesHi,
following is the help link...
http://help.sap.com/saphelp_nw70/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm
Calling ABAP Subroutines: PERFORM
You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
The system does not execute the PERFORM command within SAPscript replace modules, such as TEXT_SYMBOL_REPLACE or TEXT_INCLUDE_REPLACE. The replace modules can only replace symbol values or resolve include texts, but not interpret SAPscript control commands.
Syntax in a form window:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
ENDFORM.
The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables.
The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.
From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (First page, Next page, Last page) is printed as local variable symbol.
Definition in the SAPscript form:
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/ &BARCODE&
Coding of the calling ABAP program:
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
READ TABLE IN_PAR WITH KEY PAGE.
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
READ TABLE IN_PAR WITH KEY NEXTPAGE.
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
READ TABLE OUT_PAR WITH KEY BARCODE.
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = |. "First page
ELSE.
OUT_PAR-VALUE = ||. "Next page
ENDIF.
IF NEXTPAGE = 0.
OUT_PAR-VALUE+2 = L. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Regards,
Bharat. -
Query about use activex control in Developer form
I'm an oracle developer and My name is milton datta.I cant' use activex control in forms.Pls. anybody would help me how to use activex control in developer forms.If possible provide me with some examples.
my email address is [email protected]Download the Oracle Forms demos and you'll see a sample.
Also read the documentation for Oracle Forms 6i the developer guide has a section about Active/X.
Just remember that they will not work once you take your Forms to the Web. So think twice before you use them. -
I want to use two actions in one form in struts,and without using javascript,is it possible?
I want to use two submit:
one is for adding message;
another is for editing message.
they must be in one form,but i dont know how to use
two actions in one formHi,
Hope this helps.
cheers,
jeric
<html>
<head>
<title>decision</title>
</head>
<body>
<br><br><br>
<center><h3><u>Two submits, one form</u></h3></center>
<%
String userChoice = request.getParameter("decision");
if( userChoice != null && userChoice.equals("add") == true)
// forward to addMessage.jsp, for example, or whatever
else
if( userChoice != null && userChoice.equals("edit") == true)
// forward to EditMessage.jsp, for example, or whatever
out.println( "<br><center> the value of userChoice after selection is ... " + userChoice + "</center><br>");
%>
<center>
<form method="post" action ="decision.jsp"> <!-- name of this page -->
<table width = "50%" align="center">
<tr><td width = "100%"><hr color ="red" ></td></tr>
<tr><td height = "10"></td></tr>
<tr><td align = "center">Do you want to <b>add</b> a message or <b>edit</b> a message?</td></tr>
<tr><td height = "10"></td></tr>
<tr><td align = "center">
<input name = "decision" type = "radio" value = add checked>?add a message??
<input name = "decision" type = "radio" value = edit>?edit a message?
</td></tr>
</table>
<br>
<input type="submit" value = " make your selection " >
</form>
<hr color ="red" width = "50%">
</center>
</body>
</html> -
Any Examples of using ActiveCollectionModelDecorator with POJO data control
Are there any Examples of using ActiveCollectionModelDecorator with POJO data control in any of the sample packs?
OK, here's an quick example. Create a new Windows Forms application and add a ScatterGraph and a Label to the form. Add a cursor to the ScatterGraph, then add the code below to the form. This generates 50 random data points when the form is loaded and plots them, then uses the cursor's AfterMove event to display the current X and Y positions in the label. Here's the code:
Private Sub OnFormLoad(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Const dataLength As Integer = 50
Dim xData(dataLength - 1) As Double
Dim yData(dataLength - 1) As Double
Dim rnd As Random = New Random
For i As Integer = 0 To dataLength - 1
xData(i) = i
yData(i) = rnd.NextDouble() * 10
Next
ScatterGraph1.PlotXY(xData, yData)
End Sub
Private Sub OnAfterMoveXYCursor(ByVal sender As Object, ByVal e As NationalInstruments.UI.AfterMoveXYCursorEventArgs) Handles XyCursor1.AfterMove
Label1.Text = String.Format("({0}, {1})", e.XPosition, e.YPosition)
End Sub
Hope this helps.
- Elton -
Example of using frames in JSF
I am considering using frames in my JSF/JSP page but am having trouble getting started. I'd like to display my page as
Frame 2 | Frame1
Frame 3 |
I started using iFrames in my JSP page but because I needed Frame1 to be resizable, I dropped iFrames and started using Frames.
I wrote my JSP page to contain these frames. My JSF project compiles successfully but at runtime, my page appears blank in the browser window.
Can someone give me an example of using frames in a JSF/JSP page or point out the error in my JSP.
My page looks like:
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<ui:page binding="#{Page1.page1}" id="page1">
<ui:html binding="#{Page1.html1}" id="html1">
<ui:head binding="#{Page1.head1}" id="head1">
<ui:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
</ui:head>
<ui:body binding="#{Page1.body1}" id="body1">
<frameset rows="16%,84%">
<frame name="top" src="faces/overview/overview.html"/>
<frameset cols="30%,70%">
<frame name="left" src="faces/overview/leftPage.jsp"/>
<frameset rows="20%,80%">
<frame name="right" src="faces/overview/rightPage.jsp"/>
<frame name="right2" src="faces/overview/rightPage.jsp"/>
</frameset>
</frameset>
</frameset>
</ui:body>
</ui:html>
</ui:page>
</f:view>
</jsp:root>
thanks,
tsc<frameset> should not be the child of the <body> element. It should be the child of <html> element.
This works:
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<ui:page id="page1">
<ui:html id="html1">
<ui:head id="head1">
<ui:link id="link1" url="/resources/stylesheet.css"/>
</ui:head>
<frameset cols="30%,70%">
<frame name="left" src="faces/Page1.jsp"/>
<frameset rows="80%,20%">
<frame name="top" src="faces/rightPage.jsp"/>
<frame name="bottom" src="faces/bottomPage.jsp"/>
</frameset>
</frameset>
</ui:html>
</ui:page>
</f:view>
<ui:form binding="#{bean.form1}" id="form1"/>
</jsp:root>
thanks,
tsc -
Can ColdFusion.Ajax.submitForm be used with a CF Flash Form ?
Hello,
Adobe has provided a great example of how
ColdFusion.Ajax.submitForm can be used to submit forms without
refreshing or redirecting the page (
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=JavaScriptFcns_01.html),
but does anyone know whether it can be used with flash forms ?
The attached code from the example compiles and runs
perfectly when the form has not been defined as flash, but when you
change <cfform name="myform"> to <cfform name="myform"
format="flash">, submitting produces the following error, likely
because it no longer recognizes the form name/ID:
Error!!! -1: ColdFusion.Ajax.submitForm: Form not found, form
id: myform
Does anyone know how to integrate this feature into a flash
form ?
Thanks !
LucienObviously it looks like you can not have <cfsetting
enablecfoutputonly="yes"> set in a cfm page that has Bind values
to a CFC, the behavior is unpredictable. I had to create an action
page to do the Asynch submit now it is returning a blank popup OK
form. The problem is still there and not returning any value
atall.
Maybe you are looking for
-
3G won't work after updating IPad3 to iOS6
After having upgrade my iPad3 from 5.1.1 to iOS 6 the best connection I seem to get is E. The same upgrade on my iPhone 4 worked perfectly fine and it connects by 3G where the iPad does not.
-
Switch error : error when starting a switch branch
Hello, I'm facing an issue on a simple switch : I have the following condition : &change& = X or &molga& = AE when the two conditions are OK, the WF is OK, but : when the second part is false (example : molga = 14 or molga = EG), the WF fails and I h
-
I am using Mac OS X 10.6.8, and I need to download Adobe Digital Editions. Is there any way to download an earlier version so I don't have to upgrade my system?
-
Possible to retrieve an '09 blog published on iWeb/MobileMe?
Argh. I published my family's travel blog a few years back using MobileMe (web.me.com/shwang), and stupidly forgot about it during the MobileMe/iCloud transition. Is there any way to retrieve the blog's contents, with or without comments?
-
Insert data from SQL Server 2008 St.Ed to ORACLE 11gr2 St. Edition
Dear all, I'm searching a solution for faster transmission of data of a db SQL Server (2008 St. edition) vs PROD db that is an ORACLE 11gr2 St. edition too. Actually this operation spend 1,5 hours but I'd like cut this time because size of the data g