A bug using nested GridBagLayouts ?
Hallo,
if I am nesting JPanels using the GridBagLayout the component width are not calculated correctly. In the following example the component width is not evenly distributed:
Any hints to solve this?
best Regards,
Thomas
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
public class GridPanelTest {
public static void main(String[] args) {
GridBagConstraints gbc = new GridBagConstraints();
JPanel pane = new JPanel(new GridBagLayout());
JPanel pane1 = new JPanel(new GridBagLayout());
gbc.gridx = 0;
gbc.gridy = 0;
gbc.weightx = 1.0;
gbc.fill = GridBagConstraints.HORIZONTAL;
JPanel fix = new JPanel(new GridBagLayout());
fix.add(new JButton("test1"), gbc);
pane1.add(fix, gbc);
gbc.gridx = 0;
gbc.gridy = 0;
gbc.weightx = 0.5;
gbc.fill = GridBagConstraints.HORIZONTAL;
pane.add(pane1, gbc);
JPanel pane2 = new JPanel(new GridBagLayout());
gbc.gridx = 0;
gbc.gridy = 0;
gbc.weightx = 0.5;
gbc.fill = GridBagConstraints.HORIZONTAL;
pane2.add(new JButton("test2"), gbc);
gbc.gridx = 1;
gbc.gridy = 0;
gbc.weightx = 0.5;
gbc.fill = GridBagConstraints.HORIZONTAL;
pane2.add(new JButton("test3"), gbc);
gbc.gridx = 1;
gbc.gridy = 0;
gbc.weightx = 0.5;
gbc.fill = GridBagConstraints.HORIZONTAL;
pane.add(pane2, gbc);
JDialog dlg = new JDialog();
dlg.setContentPane(pane);
dlg.pack();
dlg.setVisible(true);
}
java Version 1.5.0_3
The right panel should divided half the size of the left panel but the size in the example is not distributed correctly if i am using nested GridBagLayouts. Here is a tidy version of the code:
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
public class GridPanelTest {
public static void main(String[] args) {
// left panel
JPanel left = new JPanel(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 1.0;
left.add(new JButton("left"), gbc);
// right panel
JPanel right = new JPanel(new GridBagLayout());
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 0.5;
right.add(new JButton("right1"), gbc);
gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 0;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 0.5;
right.add(new JButton("right2") , gbc);
// main panel
JPanel mainPanel = new JPanel(new GridBagLayout());
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 0.5;
mainPanel.add(left, gbc);
gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 0;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 0.5;
mainPanel.add(right, gbc);
JDialog dlg = new JDialog();
dlg.setContentPane(mainPanel);
dlg.pack();
dlg.setVisible(true);
}
Similar Messages
-
How to use nested tables in adobe form
Hi All,
I have to use nested tables in adobe form for table display. I have used Subforms for displaying table data. I have changed accessibility of the subforms. Currently i am able to print print the table correctly if there is single material record in table 1 and single corresponding record in table 2. But the requirement is that i will have multiple lines in table 1 for single material and only one record in table 2.
EX: form is for Sales order. in line items if the order is for 100 units then we if we have delivered material as 80, 10, 10, then table 1 will have 3 lines for this. Table 2 will always have only 1 corresponding record.
item--materialdescription-ordered qty--delivered qty--delivery date-price
xxx--xxxxxxx-xxxxxxxxx-10080xxxxxxxxxx-xxxx
10----
xxxxxxxxxx
10----
xxxxxxxxxx
yyyyyyyyyyyyyyyyyyy------yyyyyyyyyyyyyyyyyyyyy
xxxxxx is table 1 and will have multiple lines
yyyyyy is table 2 and will have only 1 entry for item xxx
and this group will be repeate as per no of items. table 1 can have any no of lines per item.
I am currently able to display 1 line for table 1 and 1 line for table 2.
But how to show multiple lines for table 1 and 1 line for table 2.HI,
Set the body page as flowed and set the tables also flowed.
go to bodypage>object->subform-->select flowed option.
I thihnk this will work..if u are getting all the records properly into the tables 1 and 2.
Thanks,
Mahdukar -
Using nested Joins in abap prog
Hi All,
please help me out in using nested joins in abap progrmaming. I dont know about joins in abap.specially in case of outer join.
I have 5 internal tables.. mara ,marc, mvke,mbew,ampl. am using a select query with certain fields from all these tables.
I need to disply all the materials of a mara for a particular date irrespective of the values in fields of other tables.
Even if that materail is not present in other table for certain condtion ,that material should get displyed with all other fields showing null value..Hi RK,
the code am using is of the same way...but my problem was with the joins..in the select query am using nested join combining inner and outer join.. but i could not able to display all the materials of mara of a particular date..
The code looks like this..
SELECT <some fields.......>
INTO TABLE i_materials
FROM ( marc AS b
INNER JOIN mara AS a ON amatnr = bmatnr
INNER JOIN mvke AS c ON cmatnr = amatnr
INNER JOIN ampl AS g ON gbmatn = amatnr
LEFT OUTER JOIN mbew AS d ON dmatnr = bmatnr
AND dbwkey = bwerks )
WHERE a~matnr IN s_matnr AND .................
Else
SELECT <some fields.......>
INTO TABLE i_materials
FROM ( marc AS b
INNER JOIN mara AS a ON amatnr = bmatnr
INNER JOIN mvke AS c ON cmatnr = amatnr
INNER JOIN ampl AS g ON gbmatn = amatnr
LEFT OUTER JOIN mbew AS d ON dmatnr = bmatnr
AND dbwkey = bwerks )
FOR ALL ENTRIES IN i_mara
WHERE a~matnr = i_mara-matnr AND ............ -
Stored Proc to create XML (using nested cursors)?
From previous posts and from the
documentation for XSQL I have
discovered the joys of the
CURSOR operator to create
nested tables: i.e:
SELECT dname,
CURSOR (SELECT ename, sale....) as employees
FROM dept
However, I can not find any other
documentation on how to program (PL/SQL)
this functionality.
I would like to use XSQL as
it is exactly what I need, but
I can not because my client does
not want to use Java and they
require IIS, but do not want to
use JRUN, etc... (I tried this
first).
Since I only need to do an XML
dump to a variable for processing
by other parts of the program, life
is fairly easy. I have already done
this using Microsoft Data Shapes in
VB (client does not want VC++ either...)
However this was slow.
In order to speed things up I want to
create a stored procedure in Oracle to
dump out the XML hierarchy to a variable given
an SQLQuery input. If I use
nested CURSORS this should be very easy.
I would like to create a recursive PL/SQL
function to handle this, but I have the
following questions:
1) I want the function to have an
input of an open cursor,
My plan is to detect the column
type, when it is a nested cursor
I would recurse with the open cursor
to handle the nested cursor.
2) I can not find a reference on to
programatically handle "untyped collections
based on an SQL statement" in anything
other than the XSQL documentation.
I am assuming that I can detect the
column type of nested cursor somehow
and then recurse on this to handle
dump the recordset to an XML tagset.
But I wuold like to find some documentation
or examples on the calls, type statements,
etc....I think the CURSOR() thing is an invention of the XSQL Servlet; not available elsewhere.
You can accomplish nesting via user defined types and object views, using the "cast(multiset())" syntax, which is not documented particularly well either. This does require some setup, and so is not particularly dynamic. -
Advantages of using nested iViews
Hi All,
Could anybody point out what are the major advantages of using nested iViews? Under what circumstances is the usage of nested iViews desired or recommended? Thanks!
cheers
PrachiHi Prachi
The nested iviews comes handy in case where in you model expects numerable UI elements or heavy UI screen.
Nested iview is a way of achieving componentized models and also avoids re-work.
You could avoid error like these:-
"Error in compiling Flex application:
Error: Branch between 8479 and 41869 around line 0 exceeds 32K span.
If possible, please refactor this component.
Failed to compile AAD8T3.mxml"
This is the well known 32K limitation from Adobe Flex 1.x. The compiled applications are not allowed to be larger than 32K. That usually happens with larger models.
Solution:-
In order to solve this issue, you need to redesign your application and use nested iViews (basically splitting the model into multiple components)
To instantiate you,go through this thread:-
Re: Multiple input forms problem
Regards
Navneet -
Building Tree hierarchy Using nested loops and class cl_gui_column_tree
Hello gurus,
I want to create a tree report using custom container and class cl_gui_column_tree. I have read and understood the standard demo report which SAP has provided i.e. SAPCOLUMN_TREE_CONTROL_DEMO. But in this report all the levels nodes are created as constants and hardcoded. I want to create hierarchy using nested loops. For this i took one example of a hierarchy of VBAK-VBELN->VBAP-POSNR Like One sales order has many line items and each line item can have number of line items in billing plan.
I have done some coding for it.
FORM build_tree USING node_table TYPE treev_ntab
item_table TYPE zitem_table. " i created the zitem_table table type of mtreeitm in SE11.
DATA: node TYPE treev_node,
item TYPE mtreeitm.
node-node_key = root.
CLEAR node-relatkey.
CLEAR node-relatship.
node-hidden = ' '.
node-disabled = ' '.
CLEAR node-n_image.
CLEAR node-exp_image.
node-isfolder = 'X'.
node-expander = 'X'.
APPEND node TO node_table.
item-node_key = root.
item-item_name = colm1.
item-class = cl_gui_column_tree=>item_class_text.
item-text = 'Root'.
APPEND item TO item_table.
item-node_key = root.
item-item_name = colm2.
item-class = cl_gui_column_tree=>item_class_text.
item-text = 'Amount'.
APPEND item TO item_table.
LOOP AT it_vbeln INTO wa_vbeln.
node-node_key = wa_vbeln-vbeln.
node-relatkey = root.
node-relatship = cl_gui_column_tree=>relat_last_child.
node-hidden = ' '.
node-disabled = ' '.
CLEAR node-n_image.
CLEAR node-exp_image.
node-isfolder = 'X'.
node-expander = 'X'.
APPEND node TO node_table.
item-node_key = wa_vbeln-vbeln.
item-item_name = colm1.
item-class = cl_gui_column_tree=>item_class_text.
item-text = wa_vbeln-vbeln.
APPEND item TO item_table.
item-node_key = wa_vbeln-vbeln.
item-item_name = colm2.
item-class = cl_gui_column_tree=>item_class_text.
item-text = wa_vbeln-netwr.
APPEND item TO item_table.
LOOP AT it_posnr INTO wa_posnr.
node-node_key = wa_posnr-posnr.
node-relatkey = wa_vbeln-vbeln.
node-relatship = cl_gui_column_tree=>relat_last_child.
node-hidden = ' '.
node-disabled = ' '.
CLEAR node-n_image.
CLEAR node-exp_image.
node-isfolder = ' '.
node-expander = ' '.
APPEND node TO node_table.
item-node_key = wa_posnr-posnr.
item-item_name = colm1.
item-class = cl_gui_column_tree=>item_class_text.
item-text = wa_posnr-posnr.
APPEND item TO item_table.
item-node_key = wa_posnr-posnr.
item-item_name = colm2.
item-class = cl_gui_column_tree=>item_class_text.
item-text = wa_posnr-netpr.
APPEND item TO item_table.
ENDLOOP.
ENDLOOP.
ENDFORM.
Now this program compiles fine and runs till there is only one level. That is root->vbeln. But when i add one more loop of it_posnr it gives me runtime error of message type 'X'. The problem i found was uniqueness of item-item_name as all the sales order have posnr = 0010. What could be done? I tried giving item_name unique hierarchy level using counters just like stufe field in prps eg. 10.10.10, 10.10.20,10.20.10,10.20.20,20.10.10 etc.. etc.. but still i am getting runtime error when i add one more hierarchy using nested loop. Plz guide.
Edited by: Yayati6260 on Jul 14, 2011 7:25 AMHello all,
Thanks the issue is solved. The node key was not getting a unique identification as nodekey. I resolved the issue by generating unique identification for each level. Thanks all,
Regards
Yayati Ekbote -
Using nested styles to break blocks of text into different pages
Hello everyone,
I'm treating data collected through a Google Docs form and I've already set it up so that the questions appear on the left and are followed by the respective answers sequentially so that I have a simple way to copy paste the whole information to Indesign. Then I'm going to use nested styles to define individual styles for the questions and answers.
What I can't do, however... and I'm not even sure if it's possible, is how to tell Indesign to break text that is laid out sequentially into different lines or to break blocks of text so that they start in the beggining of the next page without having to resize the text frames by hand.
As a visual example this is what the data I've exported out of excel looks like:
Question 1 (tab) Answer A1 (line break)
Question 2 (tab) Answer A2 (line break)
Question 3 (tab) Answer A3 (line break)
Question 1 (tab) Answer B1 (line break)
Question 2 (tab) Answer B2 (line break)
Question 3 (tab) Answer B3 (line break)
(and so on in groups of 3 questions)
And I want to turn it into:
Question 1 (turn the tabs into line breaks)
Answer A1
Question 2
Answer A2
Question 3
Answer A3
(and then start at the beggining of a new page)
Question 1
Answer B1
Question 2
Answer B2
Question 3
Answer B3
I can't define the size of the text frames so that the next group of questions+answers starts at the beggining of a new page because some of the answers are multi-line fields and thus the number of lines of the answers are variable and they can come short of the text frame edge or pass it.
Can anyone share some insight of how to do this (or if it is at all possible)?
Thank you very much!
MACCThank you very much for your input.
I'm trying to automate this process as much as possible because I don't want to have to crunch the data manually myself later on, instead just teach someone else how to do it.
The first search and replace action seems basic enough but regarding the second one I would have to manually assign that paragraph style to the line where the data would break because one can only assign character styles in nested styles, right?
Also I've heard that ID CS5 automatically creates new pages based on a template when you paste information inside the first page, is that so? That would be great because that way the person wouldn't have to manually create pages and link the contents throughout the document but instead simply open my template and paste the information within the first master page. That's not possible with CS4, is it?
Thank you very much! -
When to use Nested Class/Inner Classes ?
I am not very clear, when to use nested/inner classes..
The scenario is :-
class ABC
//ABC need to store multiple instance of class XYZ
class XYZ
int member1;
int member2;
One approach is
class ABC
class XYZ
//vector of class XYZ instances is stored in class-ABC
or another approach is Class XYZ can be in separate JAVA file.
Query:-
1) Is there any difference between nested or Inner class...or are they same?
2) When should they be used....Is it good to use in above scenario.
3) What are the disadvtanges/advantages of using the Nested
class.Query:-
1) Is there any difference between nested or Inner
class...or are they same?I really don't get it. Yes there is a difference between having an inner class, and a class in a separate file, but a nested class is an inner class.
2) When should they be used....Is it good to use in
above scenario.To write an inner class is a design decision. Do other classes need to know about the class XYZ or not? Do the XYZ class need to know about the inner working of the ABC class? How complex is the XYZ class etc.
>
3) What are the disadvtanges/advantages of using the
Nested
class.See above.
/Kaj -
Storing data in data bse using nested tables
using nested tables data can be stored in data base or not.
if yes i need simple example for taht and how to retireve the data from data base.http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11822/adobjvew.htm#ADOBJ00511
http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17126/composites.htm#LNPLS99981 -
How to use nested tag in Struts
Hi..
Can any one guide me how to use nested tag in Struts. So far i already tried bean tag with no error but when i try to use nested tag i got error like
javax.servlet.ServletException: Cannot find bean: "" in any scope
Below are my class:
action class
session.setAttribute ("MyDetailList", detailList);
JSP page
<logic:iterate id="list" name="MyDetailList">
Company ID : <bean:write name="list" property="companyID" />
</logic:iterate>
For bean tag, i got no error at all and below are my code for nested tag
action class
session.setAttribute ("MyDetailList", detailList);
JSP Page
<nested:nest property="MyDetailList">
Make : <nested:text property="make"/>
Car ID : <nested:text property="carID"/>
</nested:nest>
When i run the code, i got error message
javax.servlet.ServletException: Cannot find bean: "" in any scope
Any body can help me?
zulwhat am I doing wrong?You will notice above that I mentioned
YOU CAN'T USE CUSTOM TAGS AS ATTRIBUTES TO OTHER CUSTOM TAGS
(was that loud enough for you to notice this time)?
Try
<html:text styleId="instruction" styleClass="text" size="50" name="instruction" property="value"/>
//or
<html:text styleId="instruction" styleClass="text" size="50" property="instruction" value="<%= instruction.getValue() %>"/>
better alternative: populate your formbean with your action and just have:
<html:text styleId="instruction" styleClass="text" size="50" property="instruction"/>
If you set the "instruction" property of your formBean in the action, the value will be automagically reflected here.
Cheers,
evnafets -
Recommended steps to generate a web service using nested complex types
Hello,
I need to generate a web service that uses nested complex types with built in types on the bottom layer. I hve posted an attempt at a WSDL. Please give advice on if I am doing it correctly.
I have the suspicion that I should nest the complex types into the final complex type VendorStockingInterface. Please confirm.
<?xml version="1.0" encoding="utf-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/"
xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:s0="http://www.openuri.org/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
targetNamespace="http://www.openuri.org/">
<types>
<s:schema targetNamespace="http://www.openuri.org/"
xmlns:s="http://www.w3.org/2001/XMLSchema">
<s:element name="RegisterServiceRequest">
<s:complexType>
<s:sequence>
<s:element name="DeviceCapabilities">
<s:complexType>
<s:sequence>
<s:element name="OSName" type="s:string" nillable="true"/>
<s:element name="OSVersion" type="s:string" nillable="true"/>
<s:element name="BRType" type="s:string" nillable="true"/>
<s:element name="DisplayColors" type="s:string" nillable="true"/>
<s:element name="DisplayTechnology" type="s:string" nillable="true"/>
<s:element name="NetworkAccess" type="s:boolean" nillable="true"/>
<s:element name="DownloadMethod" type="s:string" nillable="true"/>
<s:element name="DownloadVersion" type="s:string" nillable="true"/>
<s:element name="Protocols" type="s:string" nillable="true"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="LicenseType">
<s:complexType>
<s:sequence>
<s:element name="Licences" type="s:string" nillable="false"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="PriceValue">
<s:complexType>
<s:sequence>
<s:element name="Value" type="s:float" nillable="false"/>
<s:element name="CurrencyType" type="s:string" nillable="false"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="RevenueModelType">
<s:complexType>
<s:sequence>
<s:element name="VSRP" type="RegisterServiceRequest:PriceValue" nillable="true"/>
<s:element name="WholesalePrice" type="RegisterServiceRequest:PriceValue" nillable="true"/>
<s:element name="VendorSplitPercentage" type="s:float" nillable="true"/>
<s:element name="VendorPurchasePrice" type="RegisterServiceRequest:PriceValue" nillable="true"/>
<s:element name="License" type="RegisterServiceRequest:LicenseType" nillable="false"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="VendorItemIdentifierType">
<s:complexType>
<s:sequence>
<s:element name="VendorProductDisplay" type="s:string" nillable="false"/>
<s:element name="VendorProductVersion" type="s:string" nillable="false"/>
<s:element name="VendorProductCode" type="s:string" nillable="false"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="VendorBriefType">
<s:complexType>
<s:sequence>
<s:element name="VendorID" type="s:string" nillable="false"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="VendorItemBriefType">
<s:complexType>
<s:sequence>
<s:element name="VendorProductID" type="RegisterServiceRequest:VendorItemIdentifierType" nillable="false"/>
<s:element name="VendorID" type="RegisterServiceRequest:VendorBriefType" nillable="false"/>
<s:element name="VendorDescription" type="s:string" nillable="true"/>
<s:element name="VendorPricing" type="RegisterServiceRequest:RevenueModelType" nillable="false"/>
<s:element name="DownloadURL" type="s:string" nillable="true"/>
<s:element name="ShortCode" type="s:string" nillable="true"/>
<s:element name="ApplicationCode" type="s:string" nillable="true"/>
<s:element name="DRMMethod" type="s:string" nillable="true"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ContentType">
<s:complexType>
<s:sequence>
<s:element name="Categorization" type="s:string" nillable="false"/>
<s:element name="MIMEType" type="s:string" nillable="true"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="VendorStockingInterface">
<s:complexType>
<s:sequence>
<s:element name="VendorItemInfo" type="RegisterServiceRequest:VendorItemBriefType" nillable="false"/>
<s:element name="ProductType" type="RegisterServiceRequest:ContentType" nillable="false"/>
<s:element name="DeviceRequirements" type="RegisterServiceRequest:DeviceCapabilitiesType" nillable="true"/>
<s:element name="VendorPricing" type="RegisterServiceRequest:RevenueModelType" nillable="false"/>
<s:element name="ProgramMemory" type="s:int" nillable="true"/>
<s:element name="DataMemory" type="s:int" nillable="true"/>
<s:element name="Author" type="s:string" nillable="true"/>
<s:element name="Language" type="s:string" nillable="true"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="RegisterServiceResponse">
<s:complexType>
<s:sequence>
<s:element name="Message" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</types>
<message name="RegisterServiceSoapIn">
<part name="parameters" element="s0:RegisterServiceRequest"/>
</message>
<message name="RegisterServiceSoapOut">
<part name="parameters" element="s0:RegisterServiceResponse"/>
</message>
<portType name="RegisterServiceSoap">
<operation name="RegisterService">
<input message="s0:RegisterServiceSoapIn"/>
<output message="s0:RegisterServiceSoapOut"/>
</operation>
</portType>
<binding name="RegisterServiceSoap" type="s0:RegisterServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="RegisterService">
<soap:operation soapAction="http://www.openuri.org/RegisterService" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="RegisterService">
<port name="RegisterServiceSoap" binding="s0:RegisterServiceSoap">
<soap:address location="http://localhost:7001/RegisterService.jws"/>
</port>
</service>
</definitions>
I'd like the the consumer of the web service to send it a document with the fields formatted to the VendorInterface complextype which contains the other complextypes. In return the consumer will get another document with some acknowledgement messages.
To make this happen I'd like to generate the web service, creating the complex type classes and XMLBeans. I'd like advice on the steps to take once I get a good WSDL.
There is also the option to go from the other direction. Is it better to attempt to create a schema XSD document instead and use that to work towards the web service and WSDL? If so, could someone give an example of how to format an XSD using my example needs.I think I have got it all in place, though I have not tested it as of yet. For others who are looking at this, here is my XSD file from which all my complextypes were generated and lastly here is the actual web service file.
?xml version="1.0"?>
<xs:schema targetNamespace="http://openuri.org/RegisterService"
xmlns:rs="http://openuri.org/RegisterService"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
xmlns:tns="http://temp.openuri.org/VerizonBOBO/RegisterServiceRequestDocument.xsd">
<xs:element name="RegisterServiceRequest" type="rs:VendorStockingInterface"/>
<xs:complexType name="DeviceCapabilitiesType">
<xs:sequence>
<xs:element name="OSName" type="xs:string" nillable="true"/>
<xs:element name="OSVersion" type="xs:string" nillable="true"/>
<xs:element name="BRType" type="xs:string" nillable="true"/>
<xs:element name="DisplayColors" type="xs:string" nillable="true"/>
<xs:element name="DisplayTechnology" type="xs:string" nillable="true"/>
<xs:element name="NetworkAccess" type="xs:boolean" nillable="true"/>
<xs:element name="DownloadMethod" type="xs:string" nillable="true"/>
<xs:element name="DownloadVersion" type="xs:string" nillable="true"/>
<xs:element name="Protocols" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LicenseType">
<xs:sequence>
<xs:element name="Licences" type="xs:string" nillable="false"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PriceValue">
<xs:sequence>
<xs:element name="Value" type="xs:float" nillable="false"/>
<xs:element name="CurrencyType" type="xs:string" nillable="false"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RevenueModelType">
<xs:sequence>
<xs:element name="VSRP" type="rs:PriceValue" nillable="true"/>
<xs:element name="WholesalePrice" type="rs:PriceValue" nillable="true"/>
<xs:element name="VendorSplitPercentage" type="xs:float" nillable="true"/>
<xs:element name="VendorPurchasePrice" type="rs:PriceValue" nillable="true"/>
<xs:element name="License" type="rs:LicenseType" nillable="false"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="VendorItemIdentifierType">
<xs:sequence>
<xs:element name="VendorProductDisplay" type="xs:string" nillable="false"/>
<xs:element name="VendorProductVersion" type="xs:string" nillable="false"/>
<xs:element name="VendorProductCode" type="xs:string" nillable="false"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="VendorBriefType">
<xs:sequence>
<xs:element name="VendorID" type="xs:string" nillable="false"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="VendorItemBriefType">
<xs:sequence>
<xs:element name="VendorProductID" type="rs:VendorItemIdentifierType" nillable="false"/>
<xs:element name="VendorID" type="rs:VendorBriefType" nillable="false"/>
<xs:element name="VendorDescription" type="xs:string" nillable="true"/>
<xs:element name="VendorPricing" type="rs:RevenueModelType" nillable="false"/>
<xs:element name="DownloadURL" type="xs:string" nillable="true"/>
<xs:element name="ShortCode" type="xs:string" nillable="true"/>
<xs:element name="ApplicationCode" type="xs:string" nillable="true"/>
<xs:element name="DRMMethod" type="xs:string" nillable="true"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ContentType">
<xs:sequence>
<xs:element name="Categorization" type="xs:string"/>
<xs:element name="MIMEType" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="VendorStockingInterface">
<xs:sequence>
<xs:element name="VendorItemInfo" type="rs:VendorItemBriefType"/>
<xs:element name="ProductType" type="rs:ContentType"/>
<xs:element name="DeviceRequirements" type="rs:DeviceCapabilitiesType"/>
<xs:element name="VendorPricing" type="rs:RevenueModelType"/>
<xs:element name="ProgramMemory" type="xs:int"/>
<xs:element name="DataMemory" type="xs:int"/>
<xs:element name="Author" type="xs:string"/>
<xs:element name="Language" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RegisterServiceResponse">
<xs:sequence>
<xs:element name="Message" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
The Web Service File:
import org.openuri.registerService.RegisterServiceResponse;
import org.openuri.registerService.RegisterServiceRequestDocument;
import com.verizon.hp.registerservice.*;
public class RegisterService implements com.bea.jws.WebService
static final long serialVersionUID = 1L;
* @common:operation
* @jws:protocol form-post="false" form-get="false"
public org.openuri.registerService.RegisterServiceResponse RegisterService(org.openuri.registerService.RegisterServiceRequestDocument RegisterServiceDoc)
VendorStockingInterface vsInterface = (VendorStockingInterface)RegisterServiceDoc.getRegisterServiceRequest();
System.out.println(vsInterface.toString());
com.verizon.hp.registerservice.RegisterServiceResponse serviceResponse = new com.verizon.hp.registerservice.RegisterServiceResponse();
serviceResponse.setMessage("Register New Service Message has been received successfully");
org.openuri.registerService.RegisterServiceResponse response = (org.openuri.registerService.RegisterServiceResponse)serviceResponse;
return response;
} -
Hi All,
Why do we use Nested Classes ? Explain it with example ....
If we say - It is a way of logically grouping classes that are only used in one place. Then we can say we use it through "Package" so why inner class ??
Thanks in advance ....A real life example to jschell's explaination may be this.
The pistons in your automobile engine are encapsulated by the engine block -- or the engine block encapsulates the pistons inside. This is the desired effect because as soon as we take the pistons out of the engine block, and put them say, in the backseat of the car instead, they no longer perform the function they were intended. There is another side effect to this analogy. When the pistons are properly installed in the engine block, there is only one movement the pistons can move -- up and down movement, that's it... they cannot rotate, spin, twist around or anything inside the engin block. Furthermore, the up and down movement is the only useful thing a piston can do. As soon as we throw the pistons in the backseat of the car, they can roll around, spin, and generally rotate to any configuration or orientation -- which does not produce any useful power.
Inner classes are generally the same way. So we can see this example with a little code -- which we like.
public class Engine
Piston[] pistons = new Piston[8];
class Piston
// the usual methods here..
}Of course, if your program is extremely sohisticated, this may not be a good solution -- for example, if you are making a catalog of automotive parts, then you would probably want your <tt>Piston</tt> class to be stand-alone.
Edited by: pierrot_2. Also notice that the class <tt>Piston</tt> is not an INNER class of Backseat! -
How to use nested tables object in oracle form
Hello forum
How all r u ..
i need ur help guys, pls help me out...
i m using an object oriented approach to design my database by using nested tables and
varrays. it is quite done successfully.
but the problem is when i m trying to use that object of nested table into the datablock of the form it is not been added to item list of that block.
so what is the proper way to use these type of objects to the form.
all ideas are welcomed and vry much required.
pls give example if possible so easy to understand or have any demo form related to above case then pls post me to my id i.e [email protected]
thank u all and expecting some expert solutionsHello Francois Degrelle...
How r u doing ... i have searched the forum abt the above mentioned topic then i found that u have some demo form which will help out to explain the functionality of the nested table in forms ..
will u pls me that form to my i.e [email protected] pls mail all the detail u have regarding using nested tables to forms and reports
lots of thanks to u n advance. -
Problem in using Nested IF-ELSE in Crystal Report formula
Hi Experts ,
I am having some problem using Nested IF-ELSE in Crystal Report formula ,
there is no error in the formula but only one condition is working. other condition is not working
i am using this concept in formula workshop :-
' if{EXCISE_INVOICE;1.Basic Excise Duty BED@10 %}<>0 and{EXCISE_INVOICE;1.Education Cess @2%}<>0 and {EXCISE_INVOICE;1.Secondary Education Cess @1%}<>0 and {EXCISE_INVOICE;1.Central Sales Tax(CST)@2%}<>0
then
Sum ({EXCISE_INVOICE;1.Amount}) + {EXCISE_INVOICE;1.BedAmount@10%} + {EXCISE_INVOICE;1.EcessAmount@2%} + {EXCISE_INVOICE;1.SecCessAmount@1%} + {EXCISE_INVOICE;1.CSTAmount@2%}
else
if {EXCISE_INVOICE;1.Basic Excise Duty BED@10 %}<>0 and {EXCISE_INVOICE;1.Education Cess @2%}<>0 and {EXCISE_INVOICE;1.Secondary Education Cess @1%}<>0 and {EXCISE_INVOICE;1.Input VAT@5%}<>0 and {EXCISE_INVOICE;1.Addtional Tax@1%}<>0
then
Sum ({EXCISE_INVOICE;1.Amount}) + {EXCISE_INVOICE;1.BedAmount@10%} + {EXCISE_INVOICE;1.EcessAmount@2%}+{EXCISE_INVOICE;1.SecCessAmount@1% } + {EXCISE_INVOICE;1.VATAmount@5%} +{EXCISE_INVOICE;1.AddTaxAmount@1%(for VAT@4)}
I want that all conditions should work and the condition which is applicable there according to formula it display the result, if i add another condition then it should also work.
kindly tell me the solution of this problem
Regards
RahulTry this logic:
if{EXCISE_INVOICE;1.Basic Excise Duty BED@10 %}!=0 and{EXCISE_INVOICE;1.Education Cess @2%} !=0 and {EXCISE_INVOICE;1.Secondary Education Cess @1%} !=0
then
Sum ({EXCISE_INVOICE;1.Amount}) + {EXCISE_INVOICE;1.BedAmount@10%} + {EXCISE_INVOICE;1.EcessAmount@2%} + {EXCISE_INVOICE;1.SecCessAmount@1%}
else
0
+
IF {EXCISE_INVOICE;1.Central Sales Tax(CST)@2%} !=0
then
{EXCISE_INVOICE;1.CSTAmount@2%}
else
IF {EXCISE_INVOICE;1.Central Sales Tax(CST)@5%} !=0
then
{EXCISE_INVOICE;1.CSTAmount@5%}
+
if {EXCISE_INVOICE;1.Addtional Tax@1%} !=0
then
EXCISE_INVOICE;1.AddTaxAmount@1%(for VAT@4)}
else
0
If not work, try SQL command.
Thanks,
Gordon -
Hi experts,
is there a way of using nested tables, for example:
Field1
---value1-1
------example1-1
------example1-2
------example1-3
---value1-2
------example2-1
------example2-2
------example2-3
------example2-4
------example2-5
---value1-3
------example3-1
------example3-2
Field2
---value2-1
------example1-1
------example1-2
Or isn't it possible?
Thanks
MichaelHi,
Nested table is not allowed but if it is property structure like address etc which can be included in more than one entities then you can use complex type Complex Types - SAP NetWeaver Gateway Foundation (SAP_GWFND) - SAP Library
you can refer this Odata Services with Complex Types and Netweaver Gateway : Multiple Output Tables : Odata | SCN
Regards,
Chandra
Maybe you are looking for
-
Windows 8 upgrade for z560??
When is the upgrade for z560 laptops expected?
-
Service Reuqest Custom Fields on Reports
Hi, I Added 3 new custom fields of type "Integer" to Service Reuqest. Now, when I come to combine them in an analysis (Going to Reports -> Design Analysis -> under REPORTING choosing "Service Reuqests" I can't see these fields, when looking in "Servi
-
Computer detects router but won't connect online - help
I came home from work and all of the sudden my computer wouldn't connect at all to anything. We have another computer on the network which I'm using to send this message and it works fine, but mine won't connect. It detects the router and everything
-
Error:-No delivery type defined for supplying plant and document type RB
Hi, Here issue is such that while creating purchase order(Return order type)the error coming as follows. "No delivery type defined for supplying plant and document type RB" Scenario:-There are some damaged goods which are coming
-
Identity for Singleton in cluster
Hello all, Is it possible to use JNDI based naming service (J2EE appserver's) as a storage for identifier variables for Singleton objects in J2EE based cluster? I have a following problem: - I have a cluster with 4 nodes - Each node has a it's own si