Creating a application dynamically for a component
Hi,
Does any one know how to create an application dynamically for a component, so without using SE80?
I already found class cl_wdy_md_application, but I do not know if this is the right direction. Maybe somebode already solved this issue.
Regards,
Remco
Hi Thomas,
In SRM it is possible to call own made webdynpro components and fill them with data, and then process these data into a new shopping card. This can be done by filling a so called HOOK_URL. In SRM you have to do customizing and fill in the URL to be used of the WebDynpro application. So far, still no problems.
I have built a component by which an user can fill several Z tables and then he can display a form he has made by himself (a so called free order form). So the component will check all Z tables, and generate in one view, the context dynamically as also the layout dynamically. In all Z tables one field has been used as one of the keyfields and that is free order form name and this is also a parameter of the application so that this application knows which data to get from the Z tables to generate a form.
And because it is possible to generate more then one forms, I have create per form 1 application with the specific parameter, and this URL can be entered in the customizing of SRM.
This application creation I did myself, but now I want to accomplish, when the user creates a new form by filling specific tabels via webdynpro, that he can generate the application by himself.
Maybe I can create a FM/BAPI for the BDC recording and then call this from my web dynpro application as there is no API.
Do you maybe have another solution?
Regards,
Remco
Similar Messages
-
Problem when creating Drag Tags Dynamically for Drag & Drop UI element
In one of my requirement,
I need to populate the TREE dynamically ( only 2 levels fixed),
This TABLE TREE is drag enabled ( which acts as a Target & Source ) to move records to another table.
Both tables are created at design time and are having DRAG SOURCE INFO element.
In Modify View method, I am trying to ADD DROP TARGET INFO with tags for the table based on the records.
Even after assigning it to the table(dynamicallY), it is giving dump as
There is no DropTargetInfo in the DropOnRowTarget aggregation with this ID
Here is the code.....
DATA l_tags TYPE string.
DATA lo_nd_tgt_ip_end_notes TYPE REF TO if_wd_context_node.
DATA lt_tgt_ip_end_notes TYPE wd_this->Elements_tgt_ip_end_notes.
DATA ls_tgt_ip_end_notes TYPE wd_this->Element_tgt_ip_end_notes.
DATA lr_table TYPE REF TO cl_wd_table.
DATA l_name TYPE string.
DATA l_id TYPE string.
data l_index TYPE string.
IF first_time = abap_true.
" reading the context
* navigate from <CONTEXT> to <TGT_IP_END_NOTES> via lead selection
lo_nd_tgt_ip_end_notes = wd_context->get_child_node( name = wd_this->wdctx_tgt_ip_end_notes ).
lo_nd_tgt_ip_end_notes->get_static_attributes_table( importing table = lt_tgt_ip_end_notes ).
" get the reference of the table
lr_table ?= view->get_element( 'TBL_TGT_IP_ENDNOTES' ).
"Creating DROP TARGET INFO for all the RECORDS in the Table
LOOP AT lt_tgt_ip_end_notes INTO ls_tgt_ip_end_notes WHERE parent_key = ''.
" Tag name & Name of DROP TARGET INFO
l_name = ls_tgt_ip_end_notes-ip_number.
CALL METHOD CL_WD_DROP_TARGET_INFO=>NEW_DROP_TARGET_INFO
EXPORTING
* BIND_ENABLED =
ENABLED = 'X'
ID = |TGT_DROP_TARGET_INFO{ sy-tabix }|
NAME = l_name
SCOPE = '00'
TAGS = l_name
RECEIVING
CONTROL = lr_dti.
" binding the DROP TARGET INFO to the TABLE
CALL METHOD LR_TABLE->SET_DROP_TARGET_INFO
EXPORTING
THE_DROP_TARGET_INFO = lr_dti.
ENDLOOP.
ENDIF.
any idea...on this.
Thanks in Advance,
Anil Danda
I apologize for wrong Posting
I don't know, how to move this thread, it would be great, if any Moderator can move this thread to Web Dynpro ABAP forum
Edited by: danda aneel on Mar 10, 2011 6:36 PMHi,
As far as i know , you need to insert a droptargetinfo only once in the table level not on every row.
Try to do on design time what you are dynamically doing ? You would not get a chance to to insert a droptragetinfo on every row. -
APM how to create APM application group for same application but different application paths
Hi all,
We have few applications which are of same name but different application path.
Please check the screenshot. When we create different application groups using APM wizard, we still get errors mentioning the conflict. How to resolve this issue.
Thanks
Manish
ManishI cannot see any screenshot here, what do you mean same application name but different path?
-
Hi, is it possible to create different application folder for a different drive?
Hi,
My OSX is 10.9.5, processor speed is 1.8GHz i5, 4 GB 1600MHz DDR3, MacBook Air Mid 2012.
I have partitioned my drive in two.
Itunes was previously saved on MAC HD, but due to lack of space i would like to shift it to MAC HD 2. So, i removed Itunes from MAC HD saved all my media on a hard drive. I downloaded the .dmg file for Itunes and would like to save it on MAC HAD 2.
I have noticed that you need drag and drop Itunes in the APPLICATIONS folder, which by default saves it on MAC HD.
THE QUESTION
CAN I MAKE AN APPLICATION FOLDER FOR MAC HD 2, SO I CAN INSTALL ITUNES ON IT OR IS THERE SOME OTHER WAY?? (IN SHORT I NEED 2 APPLICATION FOLDERS)My OSX is 10.9.5, processor speed is 1.8GHz i5, 4 GB 1600MHz DDR3, MacBook Air Mid 2012. I have partitioned my drive in two.
That doesn't give you any more disk space. it just limits the storage on each partition to 1/2 or less of what was on the unpartitioned drive. What you need is a portable external HD like this one to put your iTunes library (and other seldom used files) on and run from there. -
Create internal table dynamically for IDoc fields
Hi,
I need to create an internal table dynamically based on the segment field names that are returned in the table pt_fields when calling function 'IDOCTYPE_READ_COMPLETE'. I see many posts suggesting classes such as 'cl_wrf_dynamic_table=>create_dynamic_table', but it does not work for me. The problem I have with the classes is that it doesn't allow you to have the same column name more than once. But in the scenario I am testing, I have some column names that are duplicated, and I cannot remove the duplicates. Are there any functions or classes that I can use to create a dynamic internal table that will not check if a column name is used twice?
Thanks,
CarrieHello Carrie
My first thought was that RTTI might be able to do this but it does not (see the dump below). And it is obvious that RTTI behave likes this.
Error analysis
An exception occurred which is explained in detail below.
The exception, which is assigned to class 'CX_SY_STRUCT_COMP_NAME', was not
caught and
therefore caused a runtime error.
The reason for the exception is:
Multiple Specification of the Name 'CUSTOMER' as a Component Name (Component 7)
Just think about any way to define statically an itab or structure containing duplicated field names. You will always get a syntax error irrespective of whether you use a DDIC structure, a TYPE or a DATA variable.
If there is no way to define such a structure statically why should it be different when defining dynamically?
Regards
Uwe -
I am using visual studio .net. And it works fine on computers where Visual Studio and Measurement Studio is installed. The cwui.ocx from the redistrabution cd is installed in the computer. The problem is only with controls which are dynamically created, controls
creadted with the IDE work fine.Check out the Knowledge Base article How Do I Create Controls Dynamically in Visual C++ When Using MFC without the Demo Mode Message Wind....
- Elton -
Creating a Custom event for my Component
Hi All,
im currently working in a swing component, and i would like to know how to give to my component the ability to react to some user changes.
Basically im creating a DateTime Picker using NetBeans, im able to see any new property justed created on the Property Editor but i would like to know how to add my custom events on the Event Editor as well, i.e:
monthChanged - (when the user just change the month dropdown)
yearChanged - (when the user just change the year box)
dayChanged - (when the user just change the selection day)
Thanks in advanceThanks, i just found it also here:
http://www.exampledepot.com/egs/java.util/CustEvent.html
i need to define the following class:
- Custom Listener extending the EventListener interface
- Custom Event extending EventObject class
and then finally add the corresponding:
addXXXListener
removeXXXListener
fireXXXEvent
in my component.
This work Great in the NetBeans GUI Builder.
Thanks, -
Possible to create a custom renderer for rendering standard component ?
This is in context for creating dynamic Data tables. Is it possible to create a custom Renderer for rendering component (standard) without creating a custom component?
namancLet's assume you want to create a custom renderer which will be used to render the error-messages (the h:messages tag). The component-family in this case is: javax.faces.Messages, the renderer-type javax.faces.Messages.
Therefor in your application's faces-config.xml add this renderer-statement (inside a render-kit, obviuosly):
<faces-config>
<!-- other stuff like components, managed beans, navigation-rules,... -->
<render-kit>
<renderer>
<component-family>javax.faces.Messages</component-family>
<renderer-type>javax.faces.Messages</renderer-type>
<renderer-class>my.very.special.MessagesRenderer</renderer-class>
</renderer>
</render-kit>
<!-- other renderers... -->
</faces-config>The code for MessagesRenderer is very dependent on your needs, therefor I will not post something here. Basically you need to extend javax.faces.render.Renderer. For help in that camp, surf to the online tutorials or get yourself a book (I learned a lot from Kito Mann's "JSF in Action"). Additionally grab the source for Sun's RI AND Myfaces and dig into that java-code. There is a huge learning potential looking at that source-material.
hth
Alexander -
Creating a Webservice for portal Component
Hi experts ,
i have portal component , for which i want to create webservice , i e. wanted to publish it as a wsdl ,
Im using NWDS 7.01 and here i have already created a portal component of type JSPDynpage , now in nwds after opening Webservice Perspective ,
im not able to create VI and WSD for the component ,as im getting error as Project does not have the right nature. please provide a solution .
Regards
Govardan RajHi,
go thro this thread, that discusses same topic and has explanations.
/thread/36796 [original link is broken]
the following thread may also help you.
Creating a new web service...
regards,
P.Venkat -
Error during creation of application entity for the plug-in.
Hi Experts,
As part of creating Content Database source for SES....
We,
1 Activated the Oracle Internet Directory identity plug-in for the Oracle Content
Database instance.
2) However after activating Identity plug-in for Oracle Internet Directory.... ......... we used the csPlugin.ldif file to create an application entity for the plug-in by running the following command "$ORACLE_HOME/bin/ldapmodify -h oidHost -p OIDPortNumber -D "cn=oracle" -w password -f csPlugin.ldif" ....but in the process executing the above command.... getting the following error(we gave correct login details):
SASL/DIGEST-MD5 authentication started
ldap_sasl_interactive_bind_s: Invalid credentials (49)
How can i resolve this.
I have another query...in the command "$ORACLE_HOME/bin/ldapmodify -h oidHost -p OIDPortNumber -D "cn=oracle" -w password -f csPlugin.ldif" which user name should i specify..... is it "cn=oracle" or "cn=orcladmin"
Thanks
peter.Hi Raford,
Thanks for your reply.
We tried to create Content Database Source with the details we have...
However in this process getting an exception....
11:20:20:778 INFO main
11:20:20:784 INFO main Oracle Secure Enterprise Search, Crawler: Release 10.1.8.2
11:20:20:785 INFO main Copyright © 2006, 2007, Oracle. All rights reserved.
11:20:20:785 INFO main
11:20:20:785 INFO main ================== Crawling settings ==================
11:20:20:785 INFO main Reading configuration file from /mnt/u08/SOADEVIL/seshome/search/data/config/crawler.dat
11:20:20:785 INFO main Agent = Oracle Secure Enterprise Search
11:20:20:807 INFO main User = EQ_TEST
11:20:20:807 INFO main Database connect string = jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=devilrays.appsassociates.com)(PORT=1525))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=Devilses.devilrays.appsassociates.com)))
11:20:20:807 INFO main Source type is User-defined
11:20:20:807 INFO main Source is "BJ_Cont"
11:20:20:807 INFO main Document access control policy is user-defined
11:20:20:808 INFO main Number of crawling threads = 5
11:20:20:808 INFO main Queue table = I1S8
11:20:20:808 INFO main URL table = EQ$URL
11:20:20:808 INFO main Maximum documents to crawl = no limit
11:20:20:808 INFO main Maximum depth to crawl = 2
11:20:20:808 INFO main Document size limit = 10M
11:20:20:808 INFO main Locale of the crawler message is "en_US"
11:20:20:808 INFO main URL exclusion rule = (?i:(?:\.gif)|(?:\.jpg)|(?:\.jar)|(?:\.tif)|(?:\.bmp)|(?:\.war)|(?:\.ear)|(?:\.mpg)|(?:\.wmv)|(?:\.mpeg)|(?:\.scm)|(?:\.iso)|(?:\.dmp)|(?:\.dll)|(?:\.cab)|(?:\.so)|(?:\.avi)|(?:\.wav)|(?:\.mp3)|(?:\.wma)|(?:\.bin)|(?:\.exe)|(?:\.iso)|(?:\.tar)|(?:\.png))$
11:20:20:808 INFO main URL exclusion rule = \?.*(.*\+)\1{3}
11:20:20:812 INFO main Document read timeout threshold = 30 second(s)
11:20:20:812 INFO main Crawler default character set is "8859_1"
11:20:20:812 INFO main Crawler default language is "en"
11:20:20:813 INFO main Auto language detection is on
11:20:20:813 INFO main Auto character set detection is off
11:20:20:813 INFO main Document service pipeline is "Default pipeline"
11:20:20:813 INFO main Verbose mode is on
11:20:20:935 INFO main Caching on: directory = /mnt/u08/SOADEVIL/sesdata/Devilses/cache/I1DS8/, max size = 250, action = SES_TASK
11:20:20:935 INFO main Filtering on: filter path = /mnt/u08/SOADEVIL/seshome/ctx/bin/ctxhx, number of filters = 2
11:20:20:935 INFO main MIME inclusions = text/html text/plain application/pdf application/x-msexcel application/vnd.ms-excel application/ms-excel application/x-mspowerpoint application/vnd.ms-powerpoint application/msword
11:20:20:935 INFO main URL table attributes = url, depth, signature, last_modified, status, url_id, access_url, enqueue_status, TITLE, DESCRIPTION, AUTHOR, CRAWLED_DATE, CONTENT_LENGTH, CONTENT_TYPE, LANG, CACHE_FILE_PATH, DS_ID
11:20:20:936 INFO main SQL callback statement is "begin eq_crw.crawler_callback(?,?,?,?); exception when eq_def.search_error then eq_err.raise; when others then eq_err.raise; end;"
11:20:20:936 INFO main Cookie support is enabled
11:20:20:937 INFO main Maximum number of cookies = 300
11:20:20:939 INFO main Maximum number of cookies per host = 20
11:20:20:939 INFO main Maximum size of cookie = 4096 bytes
11:20:20:940 INFO main Cache file deletion is disabled
11:20:20:940 INFO main Crawler plug-in manager class is "oracle.search.plugin.ocs.cservices.OCSCSPluginMgr"
11:20:20:940 INFO main SQL hook ID is "8"
11:20:20:940 INFO main SQL command hook statement is "begin ? := eq_crw.crawler_get_command(?,?,?,?); end;"
11:20:20:940 INFO main SQL response hook statement is "begin ? := eq_crw.crawler_send_response (?,?,?,?,?,?,?,?,?,?,?,?,?); end;"
11:20:20:940 INFO main Crawler launched by schedule "BJ_Cont"
11:20:20:940 INFO main
11:20:20:940 INFO main =================== Crawling status ===================
11:20:20:941 INFO main Crawling started at 9/18/07 11:20 AM
11:20:21:912 INFO main URL manager connecting to Oracle...
11:20:21:974 INFO main connected
11:20:22:586 INFO main Queue manager connecting to Oracle...
11:20:22:631 INFO main connected
11:20:23:497 INFO main Invoking "oracle.search.plugin.ocs.cservices.OCSCSPluginMgr"
11:20:23:501 INFO main URL manager connecting to Oracle...
11:20:23:529 INFO main connected
11:20:23:531 INFO main Initializing crawler plug-in manager "oracle.search.plugin.ocs.cservices.OCSCSPluginMgr"
11:20:23:531 ERROR main SES keystore location: null
11:20:23:532 ERROR main null oracle.search.sdk.crawler.PluginException oracle.search.plugin.ocs.cservices.OCSCSPluginMgr:getParamValue:351 oracle.search.plugin.ocs.cservices.OCSCSPluginMgr:init:479 oracle.search.crawler.WebCrawler:begin:1076 ImtCrawler:run:1831 ImtCrawler:main:480
11:20:23:532 ERROR main null oracle.search.sdk.crawler.PluginException oracle.search.plugin.ocs.cservices.OCSCSPluginMgr:getParamValue:351 oracle.search.plugin.ocs.cservices.OCSCSPluginMgr:init:479 oracle.search.crawler.WebCrawler:begin:1076 ImtCrawler:run:1831 ImtCrawler:main:480
11:20:23:676 INFO Thread-1 Remote command "reportstatistics" received, argument = "quit"
11:20:23:676 INFO Thread-1 Executing remote command "reportstatistics"
11:20:23:697 INFO Thread-1 Send back remote command execution result
11:20:25:944 INFO main Shutting down all crawling threads...
11:20:25:948 INFO main
11:20:25:949 INFO main =================== Crawling results ===================
11:20:25:949 INFO main Crawling started at 9/18/07 11:20 AM
11:20:25:949 INFO main Crawling stopped at 9/18/07 11:20 AM
11:20:25:949 INFO main Total crawling time = 0:0:5
11:20:25:949 INFO main
11:20:25:954 INFO main Total number of documents fetched = 0
11:20:25:954 INFO main Document fetch failures = 0
11:20:25:954 INFO main Document conversion failures = 0
11:20:25:954 INFO main Total number of unique documents indexed = 0
11:20:25:954 INFO main Total data collected = 0 bytes
11:20:25:954 INFO main Total number of non-indexable documents = 0
11:20:25:955 INFO main
11:20:25:955 INFO main Number of times disk cache is full = 0
We have followed the installation details provided in "SESAdmiistratorGuide".
In that guide.... during creation of Content Database source he did not mention any entry for "SES keystore location", and the exception which we are getting is related to "SES keystore location: null" (please look into the exception stack).
could you please guide us.
Thanks
peter. -
"Error when interpreting the runtime repository" for IUICOBJD component
Hello experts,
I create an enhancement set for IUICOBJD component, and the systems return my the error:
"Error when interpreting the runtime repository"
Then in ICWEB, this enhancement affect to the view connectionObject. And this view doesn't appear.
Someone had some problems to create an enhancement set for IUICOBJD component ??
Is necesary to make somenthing with IUICOBJ component before to create the enhancement for IUICOBJD.
Could you tell me the steps to solve this??
Thanks in advance.
Best regards.Hello Ismail, thanks for you help, I have tried to make this and the repository is the same code.
Do you know if is necesary to make something special to create an enhancement for IUICOBJD component ?? make something first with IUICOBJ and then with IUICOBJD???
I haven't any problems with other components for example with IUICMD the enhancement run ok.
Thanks in advance.
Best regards. -
Error 1603 in deploying Office 2003 by creating an application object using its MSI package!
Hello,
I got the error of 1603 when I ran Office 2003 MSI package through NAL. I
have no idea how to resolve this problem. Even though I enabled logging in
Office 2003 installation, I still could not figure out what went wrong and
what caused the error.
I have used Snapshot to create an application object for a long time with
little problem. However, I could not successfully deploy any MSI package
created by an application object. I knew ZenWork Managing Application has
the feature, but I don't know how to make it work in our environment.
Do I have to know more about Microsoft Window Installer ?
Appreciate your comments and experience in advance
Thanks
Joe Liu
email: [email protected][email protected],
> I got the error of 1603 when I ran Office 2003 MSI package through NAL
>
Start here:
http://support.novell.com/techcenter...tation&x=0&y=0
Yes, understanding MSI helps. FWIW I have deployed 2003 this way.
- Anders Gustafsson, Engineer, CNE6, ASE
NSC Volunteer Sysop
Pedago, The Aaland Islands (N60 E20)
Novell does not monitor these forums officially.
Enhancement requests for all Novell products may be made at
http://support.novell.com/enhancement
Using VA 5.51 build 315 on Windows 2000 build 2195 -
Select Dynamic for Select Option
Hi. Good Night.
I have the following screen of selection for a user. I need create a Select Dynamic for the table ANLA, Having in count the values selected by the user in each option of the screen.
SELECTION-SCREEN BEGIN OF BLOCK SEL WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:
BUKRS FOR ANLA-BUKRS,
ANLKL FOR ANLA-ANLKL,
KOSTL FOR ANLZ-KOSTL,
GDLGRP FOR ANLA-GDLGRP,
INVNR FOR ANLA-INVNR.
SELECTION-SCREEN END OF BLOCK SEL.
How can do this?
Thank in advance for your help.
Regards.This is the error:
Err.tmpo.ejec. SAPSQL_WHERE_ILLEGAL_VALUE
Excep. CX_SY_DYNAMIC_OSQL_SEMANTICS
Fecha y hora 17.08.2010 10:05:08
This is my source code.
SELECTION-SCREEN BEGIN OF BLOCK SEL WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: SOCIEDAD FOR ANLA-BUKRS, "
CLASEAF FOR ANLA-ANLKL, "
CENCOST FOR ANLZ-KOSTL,"
CARRESP FOR ANLA-GDLGRP,
NUMINV FOR ANLA-INVNR.
SELECTION-SCREEN END OF BLOCK SEL.
DATA: l_lines(72) TYPE c.
itab for fields selection
DATA: lt_condition LIKE TABLE OF l_lines(72),
lt_fields LIKE TABLE OF l_lines(72).
DEFINE m_add_fields.
l_lines = &1.
append l_lines to lt_fields.
END-OF-DEFINITION.
m_add_fields 'BUKRS'.
m_add_fields 'ANLK'.
m_add_fields 'GDLGRP'.
m_add_fields 'INVNR'.
*bukrs
l_lines = 'BUKRS in SOCIEDAD'.
APPEND l_lines TO lt_condition.
ANLK
l_lines = 'AND ANLK in CLASEAF'.
APPEND l_lines TO lt_condition.
Select statement
SELECT INVNR ANLKL SERNR ANLN1 TXT50 AKTIV ZUGDT
BSTDT LIFNR LIEFE ORD41 ORD42 ORD43 AIBN1
AIBN2 VMGLI FLURN
INTO TABLE it_tabla
FROM ANLA
WHERE (lt_condition).
Thank in advance for your help.
Regards -
I would like to create a view dynamically based on “Employee” table
A view in each database should contain every column in “Employee” table except column called “year”. “Employee” table exists in every database but has different columns except “year” column ,so
the employee view should contain different columns based on which database you create a view
How can I create a view dynamically for each database? I am using SQL server 2008 R2Try this... (Note the @Debug parameter is there to allow you to preview the code before you create the view... 1 to view the dynamically generated code, 0 tt simply execute it.)
DECLARE
@DeBug BIT = 1,
@ColumnString VARCHAR(MAX),
@sql VARCHAR(MAX)
SELECT
@ColumnString = COALESCE(@ColumnString + ',' + CHAR(10) + CHAR(9), '') + c.COLUMN_NAME
FROM
INFORMATION_SCHEMA.COLUMNS c
JOIN INFORMATION_SCHEMA.TABLES t ON c.TABLE_NAME = t.TABLE_NAME AND c.TABLE_SCHEMA = t.TABLE_SCHEMA
WHERE 1 = 1
AND t.TABLE_TYPE = 'BASE TABLE'
AND c.TABLE_NAME = 'Employee'
AND c.COLUMN_NAME <> 'Year'
ORDER BY
c.ORDINAL_POSITION
SET @sql = '
CREATE VIEW dbo.v_Employee
AS
SELECT
' + @ColumnString + '
FROM dbo.Employee'
IF @DeBug = 1
BEGIN
PRINT (@sql)
END
ELSE
BEGIN
EXEC (@SQL)
END
HTH,
Jason
Jason Long -
How can I create events dynamic for a Group/List?
Hey,
atm I'm programming a little application where i want to add elements to my center-pane.
Simpyfied I got:
- Center Pane : here shall the elements appear on right click in bottom-pane. This pane shall be used as anything like a playground where you can drag/drop and connect items from the bottom-pane
- Bottom Pane: here I got about 180 elements which are quite equal. This is sth like a menu of items which you can use. I realised them in java classes extended from a parent class with differend calulations.
What I want:
I want to create an event handler for EACH of the "menu" elements dynamically. Just sth like:
for (int i = 0; i < basic_menu_list.size(); i++)
final Element el = hbox_bottom.getChildren().get(i);
hbox_bottom.getChildren().get(i).setOnMouseClicked(new EventHandler<MouseEvent>()
public void handle(MouseEvent event)
if (event.isSecondaryButtonDown())
playground.add(el);
redrawPlayground();
}But as i expected this doesnt work...
Now my question:
How can I solve this problem? Is there any option to listen to all elements of a group without hard-coding every single listener?
Thanks for your help,
MartinHello User,
Why did you expect that it wouldn't work?
You have an example with "transition" apply on a bunch of circles in the Getting Started with JavaFx (http://download.oracle.com/javafx/2.0/get_started/jfxpub-get_started.htm)
Here a basic example class...
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.TextBox;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class HelloWorld extends Application {
//~ ----------------------------------------------------------------------------------------------------------------
//~ Methods
//~ ----------------------------------------------------------------------------------------------------------------
public static void main(String[] args) {
// Entry point
Application.launch(args);
@Override
public void start(Stage mainStage) throws Exception {
Pane pane = new Pane();
Scene scene = new Scene(pane, 200, 200);
VBox vBox = new VBox();
TextBox input1 = new TextBox();
TextBox input2 = new TextBox();
vBox.getChildren().addAll(input1, input2);
for (Node input : vBox.getChildren()) {
input.setOnMouseClicked(new EventHandler<MouseEvent>() {
public void handle(MouseEvent event) {
System.out.println("test click");
pane.getChildren().add(vBox);
mainStage.setScene(scene);
mainStage.setVisible(true);
}Niculaiu
Maybe you are looking for
-
How to get all LiveFeatures in a specific rectangle?
Hi forum I use MapViewer 10.1.3, and I need to return an array of the LiveFeatures contained in a specific rectangle on the map; for this purpose, I've been looking at several methods in the Java API to achieve this: findLiveFeatures(int x, int y, in
-
My hard drive fried. I can't reinstall from the OSX utilities because it only shows the recovery partition. I was thinking about adding an SSD drive. But I dont know how to install OSX mountain lion without any media. What are my choices? What s
-
I have a new iPhone and wanted to activate iCloud from my MB Air, but am afraid I'll lose all my contacts/phone numbers on my iMac which is running Snow Leopard. I don't want to put Lion on the iMac, but I'd like to use iCloud between my new iPhone
-
Back ground running of Standard reports
Hi, I have some requirement in report processing. I need to run(in back ground) statndard structure reports for project def, WBS and activities and CM51 and CJI3. Then output should be saved in predefined folder in an excel format. The whole process
-
Query on system object types??
Hello, Here is the situation. O-R table "LocatedEntity392_TAB" was created by oracle during XML schema registration. I could not find the object It has "COCT_MT070001.LocatedEn390_T" type "COCT_MT070001.LocatedEn390_T" type have SYS_XDBPD$ with XDB.X