Binding UI elements to Java Listeners
Hi All,
Can someone please give me the possibility of binding a WD UI element to a Java listener?
(Please consider this as a continuation of the discussion at Web Dynpro Java)
I know as such this is not possible in WD, but any workarounds ???
Thanks in advance,
Best Regards,
Nibu.
Message was edited by: Nibu Wilson
Hello,
Create action handler with 2 parameters - actionname and elementID.
Iterate through your UI elements and bind available actions to one action handler and add action mapping to UI element ID and to type of action (onEnter, onAction etc.)
After you can create map with vector of listeners as value and action name as key.
In action handler (which is only one for all UI elements) you can extract list of listeners using actionname and call each of them passing UI element ID.
Regards, Maxim R.
Similar Messages
-
Jaxb -binding specific elements of schema to class
Is there a way to bind only specific elements from a schema to a class instead of binding everything in the schema. If yes, how do you specify this.
The <class> binding declaration customizes the binding of a schema element.
http://java.sun.com/xml/jaxb/users-guide/jaxb-custom.html#customdesc_class -
How to bind an element in an arrayList to a table column
Hi everyone, I need your help.
I have an ObjectListDataProvider to bind a class MyClass to a table. Inside of MyClass, there is a property called dynNumOfElements of type ArrayList. I need dynamically create the columns of the table to match the number of elements in ArrayList, and bind each element in the ArrayList to a column.
However I dont know how to do it? It is going to be something like createValueBinding("#{currentRow.value(['dynNumOfElements[1]']}"). Obviously this does not work.
Can you tell me a way to solve this problem?
Is it possible to bind a column to an element in a collection?
Thanks in advanceThanks Winston,
Following is what I did. They are all in Page1.jsp
public String getMyData(){
// Make sure to check for nulls
return myList.get(count++).toString();
private ArrayList myList = new ArrayList();
private int count = 0;
public String button3_action() {
// TODO: Replace with your code
//initialize list
myList.add("string 1");
myList.add("Stirng 2");
myList.add("string 3");
TableColumn tc1 = new TableColumn();
tc1.setId("tc1");
tc1.setHeaderText("tc1");
tableRowGroup2.getChildren().add(tc1);
StaticText st1 = new StaticText();
st1.setValueBinding("text", getApplication().createValueBinding("#{Page1.myData}"));
tc1.getChildren().add(st1);
return null;
The error message is "Error getting property 'getMyData' from bean of type helloweb.Page1"
Can you help me to fix the problem? Thanks a lot. -
How to typecast string to xml DOM element in java
hai
i need a string to be converted to xml DOM element in java, can any help me
i have done in this way
NodeList children = lParentRule.getElementsByTagName("parentruledetails").item(0).getChildNodes();
for
(int i = 0; i < children.getLength(); i++) {Node nod = children.item(i);
if
(nod.getNodeName().contains("parentcustomdetails")){Element parentcustom = (Element)nod.getNodeName(); // i get typecast error at this line}
i need to convert the string to element
can any one help me
Thanks in AdvanceHello. You can't cast a string to an element, you need to create that element.
Maybe this can help up: http://www.genedavis.com/library/xml/java_dom_xml_creation.jsp -
Howto dynamicly bind XML element to a TextInput using BindingUtils?
The question is: Howto dynamicly bind XML element to a
TextInput component using BindingUtils?
Now I use following codes:
<!--
[Bindable] private var xml: XML =
<item><label>list1</label></item>;
// initialize code for application's initialize event
private function init(): void {
BindingUtils.bindProperty(txtDemo, "text", xml, "label");
//click event
private function test(): void {
xml.label = "something";
// txtDemo.executeBindings(); //---- no use anymore
-->
<mx:TextInput id="txtDemo"/>
<mx:Button label="Test" click="test()"/>
My really idea is when bindable xml property is changed, then
the textinput will be updated as hoped. However, no update happens
to me when I click the Test button.
But, if I make codes like that:
<mx: TextInput id="txtDemo" text="{xml.label}"/>
the text will updated when xml changs.
So, what happened, I indeed need the dynamicly bind to the
textinput compont.
Help me. thanks.You could use an ObjectProxy since all subproperties will
then be bindable:
private var _xml:XML =
<item><label>list1</label></item>;
private var _opXML:ObjectProxy = new ObjectProxy(_xml);
then in your init() function you declare _opXML as the host
object with the bindable property "label"...
// initialize code for application's initialize event
public function init(): void {
BindingUtils.bindProperty(txtDemo, "text", _opXML, "label");
//click event
private function test(): void {
_opXML.label = "something";
You'll notice that if you check your original _xml.label
property with ChangeWatcher.canWatch(), it returns false. But if
you create a dedicated object with a property that can be declared
as bindable, canWatch() returns true. You'd probably be best off to
write a lightweight class that can act as your model if you want to
work with dynamic XML binding using Actionscript. This will allow
you to use a bindable getter and setter that will give you the
dynamic functionality you're looking for.
Hope that helps. -
Difference between Property binding, Aggregation Binding and Element binding?
what is difference between Property binding, Aggregation Binding and Element binding?
HI Rajesh,
Firstly ,
A binding path can either be absolute (starting with a slash), or relative (starting with a name token)
1. Element Binding:
Here we specify the refrenced object.
eg if you bind company object to a layout, like
var oMatrixLayout = new sap.ui.commons.layout.MatrixLayout();
oMatrixLayout.bindElement("/company");
then all the children of this layout can refer to the context of this object. like suppose company has name attribute, then we can directly pass it to the child like:
oMatrixLayout.createRow(
new sap.ui.commons.Label({text: "Name:"}),
new sap.ui.commons.TextField({value: "{name}"})
All the relative bindings within the control and all of its children are resolved relatively
2. Property binding is similar to the context mapping in WebdnyPro. We bind it to a property of the UI. It is automatically updated when its vlaue is changed.
3. Aggregation binding (basically a list) defines a template(a model which others can copy) and this template is cloned for each entry of the list. When we make an entry in the list, a clone of the template is created.When the clone is created, the context is set to the entry in the list. Thus all the binding to the template are resolved relative to the entry. This is maily used for large data sets where we will only clone the current entry and not the complete list.
Regards,
Nikhil -
How to bind UI Element with Context Node Attribute Element
Hi,
I'm building my view dynamically in the wdDoModifyView method.
Is it possible to bind a "TextView" element to a specific element of an attribute node?
Scenario:
Node_Employees
|
+- Attribute_Code
|
+- Attribute_Name
Node Contents:
Employees
|
+- Code: 1, Name: Employee 1
|
+- Code: 2, Name: Employee 2
|
+- Code: 3, Name: Employee 3
I need to do something like binding a TextView UI element to the "Name" attribute of the element #2, what would result to show "Employee 2" on my view.
How can I do this?
Thanks in advance,
Geraldo.Hi Saravanan,
First I populate the context node and it won't change during view's lifecycle. After that, I build my view and bind the TextView UI elements to the node context attributes elements.
If the node has 10 elements, I will build 10 TextView UI elements and bind them to each attribute element.
Regards,
Geraldo Brígido. -
Add 1 single element in Java Mapping
I have quite a simple requirement for my Java Mapping, however as I have done just message mappings and XSLT mappings maybe you could help how to achieve the following:
I have an input message with attachment, what I want to do now is to read a string out of the attachment (this is already what I have done) and append a single element to the input message. No other elements should be changed.
What would be a simple way to do this?
Thank you very much
Edited by: Florian G. on Nov 12, 2009 9:02 PM
Edited by: Florian G. on Nov 12, 2009 9:03 PMHi,
You can access your attachements in:
1. UDFs (by using package com.sap.aii.mappingtool.tf7.rt interface GlobalContainer method getInputAttachments())
2. Java mappings (by using package com.sap.aii.mapping.api class TransformationInput method getInputAttachments())
3. Adapter Modules
For each area, you can find how to acccess the payloads by referring to the javadocs:
http://help.sap.com/javadocs/pi/SP3/xpi/index.html?index-all.html
They will all give you your attachment as text or binary data, but you will need to parse the data yourself. If your attachment itself is an XML as well, you might use DOM, SAX, stAX or other parsers if the structure is complex. Otherwise, a simple Java regex or any simple String parsing will do as well for simple cases.
Regards,
S. Gökhan TOPÇ -
Digitally Signing specific SOAP elements using Java Mapping
Hello SDNers,
Iu2019m having trouble creating java mappings to sign and verify digital signatures. Iu2019m new to Java so this is proving difficult. I understand the basic concepts of OO programming and utilizing classes/objects to build the program, but Iu2019m having trouble with the conceptual understanding of how I would like to get this done.
I have outbound and inbound messages. The outbound messages are originating from an ECC backend. The messages are processed through PI with a basic Message Mapping, then it is wrapped in a SOAP envelope with specific information using a XSL mapping and then I would like to use a Java Mapping to Digitally Sign specific portions of the entire message; specifically around an element in the SOAP header and sign the SOAP body. I also need to verify these sections for all inbound messages.
The simple pseudo code I have for the outbound messages is as follows:
<ol>
<li>1. read in xml (file input stream)</li>
<li>2. find the (specific information)</li>
<ol>
<li>a. assign that string to a variable</li>
<li>b. sign this variable with the security profile (keystore, private key)</li>
<li>c. e-write the variable into the main xml file</li>
</ol>
<li>3. find the soap body</li>
<ol>
<li>a. assign that string to a variable</li>
<li>b. sign this variable with the security profile (keystore, private key)</li>
<li>c. re-write the variable into the main xml file</li>
</ol>
<li>4. write the output file with both variables written (file output stream)</li>
</ol>
Currently Iu2019m using PI 7.1 so there is no more Visual Administrator tool.
Iu2019ve seen the examples from the last link, but I canu2019t seem to put it together when mixed with basic java mapping example. I have been searching the SDN forums for a while now, but hereu2019s my specific question: how do you create a java mapping to sign and verify specific elements of a SOAP message?
Thanks in advance,
JasonHi Jason, did you ever architect a solution for this?
-
RE:Reading SOAP Element in java
Hi All,
I am calling one web service in java the output of web service is SOAP Element
when i tried to print that it gave the follwing o/p
<CheckKeyActivationResult xmlns="http://tempuri.org/">
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="TrialDays" type="xs:int" minOccurs="0"/>
<xs:element name="DownloadType" type="xs:string" minOccurs="0"/>
<xs:element name="NoOfLicense" type="xs:int" minOccurs="0"/>
<xs:element name="NoOfTimesActivated" type="xs:int" minOccurs="0"/>
<xs:element name="LicenseUsedNumber" type="xs:int" minOccurs="0"/>
<xs:element name="ProductActivationId" type="xs:int" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<Table diffgr:id="Table1" msdata:rowOrder="0">
<TrialDays>15</TrialDays>
<DownloadType>Trial</DownloadType>
<NoOfLicense>1</NoOfLicense>
<NoOfTimesActivated>1</NoOfTimesActivated>
<LicenseUsedNumber>0</LicenseUsedNumber>
<ProductActivationId>334</ProductActivationId>
</Table>
</NewDataSet>
</diffgr:diffgram>
</CheckKeyActivationResult>
now how can i extract the data individually for each elements
Please help
Thanks
ManojCan you post your code here. Ideally you must be using web service client (Axis2 etc).
-
How programmatically set size of report element in Java
In topic
[How programmaticaly set size of some field?|How programmaticaly set size of some field?]
someone changing programmatically report element, but I think this part of code
is in .NET framework
For example I mean something like following snippet
BoxObject box = (BoxObject) reportClientDocument
.getReportDefController().findObjectByName("headerBox");
BoxObject newBoxObject=new BoxObject(box);
Border border=new Border();
border.setBorderColor(new Color(255,255,255));
newBoxObject.setBorder(border);
newBoxObject.setFillColor(new Color(255,255,255));
reportClientDocument
.getReportDefController().getReportObjectController().modify(box, newBoxObject);
Why I think this is in .NET framework because java object "ReportClientDocument" don't have "getReportDefController()" method (I donu2019t know .NET).
What I want to do, I want to take "Details" (part of report) and change size.
If there is no way to take "Details" how can I take other report element e.g. Text ObjectErnest,
What enviroment are you working in? Because my ReportClientDocument object does have the getReportDefController method. How are you declaring your object?
Try something like:
private static com.crystaldecisions.sdk.occa.report.application.ReportClientDocument myRCD;
BoxObject box = (BoxObject) myRCD.getReportDefController().findObjectByName("headerBox");
Cheers
Darren -
Web Service Model transforms dateTime elements to java.util.Calendar
The issue is that my EJB returns a java.util.Date object, the WS that exposes this EJB states in the wsdl that it returns a dateTime element (see attachment). Web Dynpro web-service model, when given the wsdl generates proxies that receive a java.util.Calendar. Later this Calendar object cant be bound to UI elements (e.g. tables) see error below.
Has anybody encountered this problem in the past? Do you have a solution, besides manually transferring the java.util.Calendar objects to java.util.Date object?Hi Valery,
I tried changing my return type in a method in the EJB from java.util.Date to java.sql.Date, the problem that I ran into is that I was not able to expose that method in the web service afterwards. This is a bit strange since java.sql.Date is suppose to be supported as a web service Endpoint. I checked this twice just to make sure. -
What's disadvantages when using bind variables always in java?
Hello everyone .. Could someone tell me what's the disadvantage when using bind variable in java ? I heard it somecases since before.. Thanks in advance!
99% of the time, you should be using bind variables. If you have columns which are highly skewed, however, you may want to consider using literals (assuming CURSOR_SHARING=EXACT), since that may allow the CBO to make a better decision.
If you have an orders table, for example, you may have a status column that specifies whether the order is complete, in transit, or new. If you've been running for a while, 99% of your orders will be complete, so
SELECT COUNT(*)
FROM orders
WHERE status = :1should do a full table scan if you specify 'COMPLETE'. If you passed in 'IN TRANSIT', though, an index scan might be more appropriate. If you want to pass in different values and get different query plans, you need to use literals. 99% of the time, though, you want the same plan, so you want to use bind variables.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Hello everybody!
We are using the "Network" UI element (JNet) in one of our WD Java applications (NW 7.3.1 SP 11). This element consists of an obviously unsigned Java applet (which my local Java 7 JVM complained about for some time). Anyway the applet was working o.k. and the defnied Graphs were rendered (almost) as expected.
Today, I updated my local JVM to Java 1.8.0_45. When using my WebDynpro application, my Browser (IE9) shows the applet area with the Java wait logo, then complains about the unsigned applet as before. When I decide to execute the applet anyway, the applet area turns white, then light blue, but nothing else happens. No graph gets rendered. The same behaviour can be seen using Firefox 32.
The java console essentially shows nothing except the JNet version:
Java-Plug-in 11.45.2.14
JRE-Version verwenden 1.8.0_45-b14 Java HotSpot(TM) Client VM
0
ACF version: 7.1000.1.07
JNet 1.1342.15002
UR L&F version: 7.1000.0.12
What did I do wrong ? Did anyone come across this behaviour ? Is there any patch available that resolves the "unsigned applet" problem or can we get a newer version of this applet somehow ?
Regards
MichaelHi Ravi!
Yes, we added our portal URL to the JVM security exception list when we upgraded the local JVM to Java 7.
I would like the JNet applet shipped with the WebDynpro runtime to be signed, though, to avoid all these complications. Since the "Network" seems to be an official ui element, I'd expect it to be up to date, to be patched to work with current JVMs and so on. Maybe we missed some notes or patches ?
Regards
Michael -
Droppable UI element in Java Swing
Hi,
I want to develop an application in Java Swing. The application I am going to develop is an application for developing other applications. I want my application to include a button which also acts as a drag and drop UI element. For example, I want my application to include a button for adding a picture. There are 4 buttons of different pictures. If a user wants to add a picture he can either click on one of these buttons and that picture will be added somewhere on the screen or dragging this button and drop it and that picture will be added where he dropped that button.
Could anyone please tell me
1. If I can develop an application which includes Drag and Drop UI element if I develop it in Java Swing
2. If a button (or other UI element) can act as both a button and a drag and drop element if I develop my application in Java Swing
Thanks in advancedHi there,
Thanks for the useful link.
Could you please tell me where I can find some screenshots of applications which has been developed in Java Swing? I am not familiar with this program and I am not that good at programming, so I would like to get some impression of how it might look like.
Thanks again
Maybe you are looking for
-
How to call bsp application in workflow and process it...
The requirement is ... HR as (admin) -- in standard workflow selects apprasiee for 360 degree apprasial process(bsp application developed by me).. aprasiee selects 10 employees and sends to HR HR checks the employees list and their relationships
-
My Canon MX5320 printer prints purple text on anything from internet. Tried restarts, cleaning ink heads, new ink even when not empty. Reloading the soft ware worked briefly. Was fine for 2 years?? No problem with our office printer. Black text print
-
Using default application date format substitution string
I'd like to reference something like ":app_default_date_format" to set date formats in sql statements. Does a substitution string exist that returns the default application date format? Thanks, -Ken
-
Switcover production to DR and DR to production in SAP server
Dear All, How I switch over production to DR and DR to production in SAP server R3 server? thanks manas
-
Sluggish / slow Apple TV menus
I had this annoyance before upgrading to 3.0 I think, but I can't help feeling it's now worse. Essentially, menus are just sluggish and slow to respond to clicks on the Apple Remote. Sometimes clicks will register instantly, but more often than not t