How to add checkboxes to frame
So I have two classes in my package. I am having trouble adding the checkbox group to my frame. I got it to add to my applet but I can not figure out how to add it to my frame. Here is what I have so far. When I run this program it puts the checkboxes in my applet and not in my frame.
this is my painter class:
package pt;
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2006</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
public class painter extends Applet {
private int xValue=-10, yValue=-10;
MyFrame x;
Checkbox Red, Black, Magenta, Blue, Green, Yellow;
CheckboxGroup cbg;
public void init()
x= new MyFrame("Christie's Window");
x.show();
x.resize(250,100);
cbg = new CheckboxGroup();
Red = new Checkbox("Red", cbg,true);
Black = new Checkbox("Black", cbg,false);
Magenta = new Checkbox("Magenta",cbg,false);
Blue = new Checkbox("Blue", cbg, false);
Green = new Checkbox("Green", cbg, false);
Yellow = new Checkbox("Yellow", cbg, false);
add(Red);
add(Black);
add(Magenta);
add(Blue);
add(Green);
add(Yellow);
addMouseMotionListener(new MotionHandler(this));
public void paint(Graphics g)
g.drawString("Drag the mouse to draw", 10, 20);
g.fillOval(xValue, yValue, 4,4);
//Override Component class update method to allow all ovals
// to remain on the screen by not clearing the background
public void update(Graphics g) { paint(g); }
// set the drawing coordinates and repaint
public void setCoordinates(int x, int y)
xValue = x;
yValue = y;
repaint();
// Class to handle only mouse drag events for the Drag applet
class MotionHandler extends MouseMotionAdapter {
private painter dragger;
public MotionHandler(painter d) { dragger = d; }
public void mouseDragged( MouseEvent e)
{ dragger.setCoordinates( e.getX(), e.getY() ); }
} and here is MyFrame class:
package pt;
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2006</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
public class MyFrame extends Frame {
MyFrame(String x){
super(x);
public boolean handleEvent(Event evtObj) {
if(evtObj.id==Event.WINDOW_DESTROY) {
hide();
return true;
return super.handleEvent(evtObj);
}
here's your conversion, with listeners to change the color
//import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
//public class painter extends Applet {
class painter extends Frame {
Color color = Color.RED;
private int xValue=-10, yValue=-10;
//MyFrame x;
Checkbox Red, Black, Magenta, Blue, Green, Yellow;
CheckboxGroup cbg;
//public void init()
public painter()
//x= new MyFrame("Christie's Window");
setTitle("Christie's Window");
//x.show();
//x.resize(250,100);
setSize(600,400);
setLocation(200,100);
cbg = new CheckboxGroup();
Red = new Checkbox("Red", cbg,true);
Red.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent ie){
if(Red.getState()) color = Color.RED;}});
Black = new Checkbox("Black", cbg,false);
Black.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent ie){
if(Black.getState()) color = Color.BLACK;}});
Magenta = new Checkbox("Magenta",cbg,false);
Magenta.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent ie){
if(Magenta.getState()) color = Color.MAGENTA;}});
Blue = new Checkbox("Blue", cbg, false);
Blue.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent ie){
if(Blue.getState()) color = Color.BLUE;}});
Green = new Checkbox("Green", cbg, false);
Green.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent ie){
if(Green.getState()) color = Color.GREEN;}});
Yellow = new Checkbox("Yellow", cbg, false);
Yellow.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent ie){
if(Yellow.getState()) color = Color.YELLOW;}});
Panel p = new Panel();
p.add(Red);
p.add(Black);
p.add(Magenta);
p.add(Blue);
p.add(Green);
p.add(Yellow);
add(p,BorderLayout.NORTH);
addMouseMotionListener(new MotionHandler(this));
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent we) { System.exit(0); }});
public void paint(Graphics g)
super.paint(g);
g.setColor(color);
g.drawString("Drag the mouse to draw", 10, 75);
g.fillOval(xValue, yValue, 4,4);
//Override Component class update method to allow all ovals
// to remain on the screen by not clearing the background
public void update(Graphics g) { paint(g); }
// set the drawing coordinates and repaint
public void setCoordinates(int x, int y)
xValue = x;
yValue = y;
repaint();
// Class to handle only mouse drag events for the Drag applet
class MotionHandler extends MouseMotionAdapter {
private painter dragger;
public MotionHandler(painter d) { dragger = d; }
public void mouseDragged( MouseEvent e)
{ dragger.setCoordinates( e.getX(), e.getY() ); }
public static void main(String[] args){new painter().setVisible(true);}
}
Similar Messages
-
How to add checkboxes to frames?
Hi,
I am trying to add checkboxes to a frame which will then be instantiated from an applet. I can launch the frame correctly from my applet but it always displays the last checkbox added only. So in my code below it would always display the 'Black' checkbox.
Could anyone please tell me what I am doing wrong or not doing here?
import java.awt.*;
import java.applet.*;
class Chooser extends Frame {
Chooser(String title) {
super(title);
Checkbox cRed;
Checkbox cBlack;
CheckboxGroup cbg = new CheckboxGroup( );
cRed = new Checkbox("Red", cbg, true);
cBlack = new Checkbox("Black", cbg, false);
add(cRed);
add(cBlack);
public boolean handleEvent(Event evtObj) {
if (evtObj.id == Event.WINDOW_DESTROY) {
hide( );
return true;
return super.handleEvent(evtObj);
public void paint(Graphics g) {
g.drawString("Chooser Frame",10,40);
}Thanks
Avi
Message was edited by:
avi22
Message was edited by:
avi22add a pack() statement to your Chooser constructor as the last statement before the end of the constructor
Chooser(String title){
// your code here
this.pack(); -
How to Add Checkbox and icon in ALVGRID
Hi Experts,
i have one Requirement. i need to add Checkbox, Selectall,icon(Unlock or inactive) infront of Contracts of ALV GRID.How to achive that.
Thanks,
Venkat.Hi
For check box
At declaring field catalog using structure LVC_S_FCAT
mark CHECKBOX = 'X' and also EDIT = 'X'.
For reference check below subroutine in program BCALV_EDIT_05.
form build_fieldcat changing pt_fieldcat type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'SFLIGHT'
changing
ct_fieldcat = pt_fieldcat.
*§A2.Add an entry for the checkbox in the fieldcatalog
clear ls_fcat.
ls_fcat-fieldname = 'CHECKBOX'.
* Essential: declare field as checkbox and
* mark it as editable field:
ls_fcat-checkbox = 'X'.
ls_fcat-edit = 'X'.
* do not forget to provide texts for this extra field
ls_fcat-coltext = text-f01.
ls_fcat-tooltip = text-f02.
ls_fcat-seltext = text-f03.
* optional: set column width
ls_fcat-outputlen = 10.
append ls_fcat to pt_fieldcat.
endform.
For Icon:
CONSTANTS:
icon_id_failure LIKE icon-id VALUE ' ((Content component not found.)) @',
icon_id_okay LIKE icon-id VALUE ' ((Content component not found.)) @'.
TYPES: BEGIN OF ls_tab,
matnr LIKE equi-matnr,
maktx LIKE makt-maktx,
b_werk LIKE equi-werk,
b_lager LIKE equi-lager,
lgobe LIKE t001l-lgobe,
sernr LIKE equi-sernr,
icon LIKE icon-id,
objnr LIKE equi-objnr,
END OF ls_tab.
*Table that display the data for the ALV.
DATA: itab TYPE ls_tab OCCURS 0 WITH HEADER LINE.
PERFORM get_h_date .
IF h_date => sy-datum .
itab-icon = icon_id_okay.
ELSE .
itab-icon = icon_id_failure.
ENDIF.
Regards
Sudheer -
Hi Experts, oo hierarchical alv, how to add checkbox on every header?
Hi Experts,
I am working on oo hierarchical alv, how can I add checkbox on every header? thanks in advance!
Kind regards
DawsonHi Dawson,
Just refer the below program & pass the check box functionality (mentioned in bold) in REUSE_ALV_HIERSEQ_LIST_DISPLAY in your program.
TYPE-POOLS : slis.
Data
DATA : BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE t001.
DATA : flag tyPE c,
END OF itab.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : alvly TYPE slis_layout_alv.
Select Data
SELECT * FROM t001 INTO TABLE itab.
*------- Field Catalogue
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
Display
alvly-box_fieldname = 'FLAG'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
i_callback_program = sy-repid "<-------Important
i_callback_user_command = 'ITAB_USER_COMMAND' "<------ Important
is_layout = alvly
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
CALL BACK FORM
FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
slis_selfield.
LOOP AT itab.
itab-flag = 'X'.
MODIFY itab.
ENDLOOP.
IMPORTANT.
WHATROW-REFRESH = 'X'.
ENDFORM. "ITAB_user_command
Regards
Abhii... -
Hi,
I want to add CheckBox in Table. my requirement is multiselection. I Implemented the following steps, but it's not working. anyone can tell me,what mistake i did?
I created two "Value Attribute"(check,Name) under a "Value Node"(Student) in context.
check - Boolean
Name - mapped a Dictionary simple Type(5 values)
Include a Table in Layout and select Create Binding on right clicking of Table.
Checked only Student and check -> Next
Selected the Editor as checkbox -> Finish
Selected Name from context and assigned to checkbox text property.
Then I deployed the application. But only one checkbox is displayed in Table without any text.
Please give me the suggestion, how to do this.
Thanks in Advance
RajakumarHello,
I think you have a fundamental misunderstanding on how Checkboxes work. A Checkbox triggers a boolean value with true (checked) or false (uncheked).
When you map your name attribut to text you will see the content of that attribute as text behind. But not the metadata.
You may want to use a RadiobuttonGroup or CheckboxGroup for your purpose.
Frank -
How to add CheckBoxs to a scrollPane
I have a file I�m getting user info out of and finding certain information the
User enters, I�m making a query, I�m taking the found items and making an array of Checkboxes out of them witch is working my problem is adding the Checkboxes to the scroll Pane
public class Frame1 extends JFrame{
public static Panel listan = new Panel();
JCheckBox[] jCheckBox1 ;
JScrollPane scrollPane1 = new JScrollPane(list);
//other Window objects
//first method
private void jbInit() throws Exception {
//puts all window objects together
// Constructs user screen
list.setLayout(verticalFlowLayout1);
panel1.add(scrollPane1, new XYConstraints(118, 32, 128, 195));
// i have a find buttion that takes all infoamtion out of file
// and puts in an array then finds user enterd infomation
// this is just example code that just adds CheckBoxs to the scrollPane
// and is Basically the same way the other program does
// second method
void addcheckbox_actionPerformed(ActionEvent e) {
jCheckBox1 = new JCheckBox[50];
for (int i = 0; i < 50; i++) {
String checkboxText = ("Checkbox #: " + (i + 1));
jCheckBox1[i] = new JCheckBox(checkboxText);
for (int i = 0; i < 50; i++) {
list.add(jCheckBox1, null);
My problem is that I can�t add the checkboxes at the second method but it works in the first, I can add in the first because I initialize in the second.If you want something to compile here is all my example code
I will incorporate it to my 30 page program
Here is what I want my code to do
package list;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import java.awt.Checkbox;
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2008</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
public class Frame1 extends JFrame {
public static boolean ch=true;
JPanel contentPane;
GridLayout gridLayout1 = new GridLayout();
JPanel panel1 = new JPanel();
XYLayout xYLayout1 = new XYLayout();
JButton jButton1;
JButton jButton2;
JButton addcheckbox;
JCheckBox[] jCheckBox1 ;
JScrollPane scrollPane1 = new JScrollPane();
JPanel list = new JPanel();
VerticalFlowLayout verticalFlowLayout1 = new VerticalFlowLayout();
//Construct the frame
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
catch (Exception e) {
e.printStackTrace();
//Component initialization
// method one
private void jbInit() throws Exception {
contentPane = (JPanel)this.getContentPane();
jButton1 = new JButton();
jButton2 = new JButton();
addcheckbox = new JButton();
this.setContentPane(contentPane);
this.setLocale(java.util.Locale.getDefault());
this.setResizable(false);
this.setSize(new Dimension(400, 300));
this.setState(Frame.NORMAL);
this.setTitle("Frame Title");
contentPane.setOpaque(true);
contentPane.setRequestFocusEnabled(true);
contentPane.setLayout(gridLayout1);
panel1.setLayout(xYLayout1);
jButton1.setSelected(false);
jButton1.setText("Print");
jButton1.addActionListener(new Frame1_jButton1_actionAdapter(this));
jButton2.setText("select all/none");
jButton2.addActionListener(new Frame1_jButton2_actionAdapter(this));
addcheckbox.setBorderPainted(true);
addcheckbox.setText("add");
addcheckbox.addActionListener(new Frame1_addcheckbox_actionAdapter(this));
scrollPane1.setLocale(java.util.Locale.getDefault());
list.setLayout(verticalFlowLayout1);
contentPane.add(panel1, null);
panel1.add(scrollPane1, new XYConstraints(118, 32, 128, 195));
scrollPane1.getViewport().add(list, null);
//scrollPane1.add(listan, null);
panel1.add(jButton1, new XYConstraints(261, 92, 90, 39));
panel1.add(jButton2, new XYConstraints(262, 152, 108, 30));
panel1.add(addcheckbox, new XYConstraints(25, 49, -1, 35));
//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
void jButton1_actionPerformed(ActionEvent e) {
String checkprint = "selected:\n";
for (int x = 0; x < jCheckBox1.length; x++) {
if (jCheckBox1[x].isSelected()) {
checkprint = checkprint + jCheckBox1[x].getText()+"\n";
System.out.println(checkprint);
void jButton2_actionPerformed(ActionEvent e) {
for (int x = 0; x < jCheckBox1.length; x++) {
if (ch == true) {
jCheckBox1[x].setSelected(true);
else{
jCheckBox1[x].setSelected(false);
if (ch == true)
ch=false;
else
ch=true;
//method two
void addcheckbox_actionPerformed(ActionEvent e) {
jCheckBox1 = new JCheckBox[50];
for (int i = 0; i < 50; i++) {
String checkboxText = ("Checkbox #: " + (i + 1));
jCheckBox1[i] = new JCheckBox(checkboxText);
for (int i = 0; i < 50; i++) {
list.add(jCheckBox1, null);
class Frame1_jButton1_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jButton1_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
class Frame1_jButton2_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jButton2_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
class Frame1_addcheckbox_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_addcheckbox_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
public void actionPerformed(ActionEvent e) {
adaptee.addcheckbox_actionPerformed(e);
}doesn�t work but if I take all of method two and put it in one it workspackage list;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
import java.awt.Checkbox;
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2008</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
public class Frame1 extends JFrame {
public static boolean ch=true;
JPanel contentPane;
GridLayout gridLayout1 = new GridLayout();
JPanel panel1 = new JPanel();
XYLayout xYLayout1 = new XYLayout();
JButton jButton1;
JButton jButton2;
JButton addcheckbox;
JCheckBox[] jCheckBox1 ;
JScrollPane scrollPane1 = new JScrollPane();
JPanel list = new JPanel();
VerticalFlowLayout verticalFlowLayout1 = new VerticalFlowLayout();
//Construct the frame
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
catch (Exception e) {
e.printStackTrace();
//Component initialization
private void jbInit() throws Exception {
// this is the same code in method two
jCheckBox1 = new JCheckBox[50];
for (int i = 0; i < 50; i++) {
String checkboxText = ("Checkbox #: " + (i + 1));
jCheckBox1[i] = new JCheckBox(checkboxText);
for (int i = 0; i < 50; i++) {
list.add(jCheckBox1[i], null);
contentPane = (JPanel)this.getContentPane();
jButton1 = new JButton();
jButton2 = new JButton();
addcheckbox = new JButton();
this.setContentPane(contentPane);
this.setLocale(java.util.Locale.getDefault());
this.setResizable(false);
this.setSize(new Dimension(400, 300));
this.setState(Frame.NORMAL);
this.setTitle("Frame Title");
contentPane.setOpaque(true);
contentPane.setRequestFocusEnabled(true);
contentPane.setLayout(gridLayout1);
panel1.setLayout(xYLayout1);
jButton1.setSelected(false);
jButton1.setText("Print");
jButton1.addActionListener(new Frame1_jButton1_actionAdapter(this));
jButton2.setText("select all/none");
jButton2.addActionListener(new Frame1_jButton2_actionAdapter(this));
addcheckbox.setBorderPainted(true);
addcheckbox.setText("add");
addcheckbox.addActionListener(new Frame1_addcheckbox_actionAdapter(this));
scrollPane1.setLocale(java.util.Locale.getDefault());
list.setLayout(verticalFlowLayout1);
contentPane.add(panel1, null);
panel1.add(scrollPane1, new XYConstraints(118, 32, 128, 195));
scrollPane1.getViewport().add(list, null);
//scrollPane1.add(listan, null);
panel1.add(jButton1, new XYConstraints(261, 92, 90, 39));
panel1.add(jButton2, new XYConstraints(262, 152, 108, 30));
panel1.add(addcheckbox, new XYConstraints(25, 49, -1, 35));
//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
void jButton1_actionPerformed(ActionEvent e) {
String checkprint = "selected:\n";
for (int x = 0; x < jCheckBox1.length; x++) {
if (jCheckBox1[x].isSelected()) {
checkprint = checkprint + jCheckBox1[x].getText()+"\n";
System.out.println(checkprint);
void jButton2_actionPerformed(ActionEvent e) {
for (int x = 0; x < jCheckBox1.length; x++) {
if (ch == true) {
jCheckBox1[x].setSelected(true);
else{
jCheckBox1[x].setSelected(false);
if (ch == true)
ch=false;
else
ch=true;
void addcheckbox_actionPerformed(ActionEvent e) {
class Frame1_jButton1_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jButton1_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
class Frame1_jButton2_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_jButton2_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
class Frame1_addcheckbox_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;
Frame1_addcheckbox_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
public void actionPerformed(ActionEvent e) {
adaptee.addcheckbox_actionPerformed(e);
}Edited by: deme on Feb 27, 2008 6:48 AM
Edited by: deme on Feb 27, 2008 6:51 AM -
FInvoice How to add the SOAP frame thru XSLT transform
Dear All,
i have the following problem i have implemented as xslt codeto send data from SAP Idoc invoic to WS Finvoic .
the coding looking as following :
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output encoding="ISO-8859-1"/>
<xsl:template match="/">
<!-- Create SOAP-Envelope -->
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
<!-- Create Header Container -->
<SOAP-ENV:Header>
<eb:MessageHeader xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd" SOAP-ENV:mustUnderstand="1" eb:id="">
<eb:From>
<eb:PartyId>
<xsl:value-of select="Finvoice/SellerOrganisationUnitNumber"/>
</eb:PartyId>
<eb:Role>Sender</eb:Role>
</eb:From>
<eb:From>
<eb:PartyId>
<xsl:value-of select="Finvoice//SellerBic"/>
</eb:PartyId>
<eb:Role>Intermediator</eb:Role>
</eb:From>
<eb:To>
<eb:PartyId>
<xsl:value-of select="Finvoice//InvoiceRecipientAddress"/>
</eb:PartyId>
<eb:Role>Receiver</eb:Role>
</eb:To>
<eb:To>
<eb:PartyId>
<xsl:value-of select="Finvoice//InvoiceRecipientIntermediatorAddress"/>
</eb:PartyId>
<eb:Role>Intermediator</eb:Role>
</eb:To>
<eb:CPAId>yoursandmycpa</eb:CPAId>
<eb:Service>Routing</eb:Service>
<eb:Action>ProcessInvoice</eb:Action>
<eb:MessageData>
<eb:MessageId>
<xsl:value-of select="Finvoice//SellerReferenceIdentifier"/>
</eb:MessageId>
<eb:Timestamp>
<xsl:value-of select="Finvoice//InvoiceDate"/>
</eb:Timestamp>
</eb:MessageData>
</eb:MessageHeader>
</SOAP-ENV:Header>
<!-- Create Body -->
<SOAP-ENV:Body>
<eb:Manifest eb:id="Manifest" eb:version="2.0">
<eb:Reference eb:id="Finvoice" xlink:href="1009">
<eb:schema eb:location="http://www.finvoice.info/yrityksen_verkkolasku/ladattavat/Tekniset tiedostot/schemat/Finvoice.xsd"/>
</eb:Reference>
</eb:Manifest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<!-- Add Finvoice msg. as Payload Container-->
<xsl:text disable-output-escaping="yes">
<?xml version="1.0" encoding="ISO-8859-15"?>
</xsl:text>
<xsl:text disable-output-escaping="yes">
<!DOCTYPE Finvoice SYSTEM "Finvoice.dtd">
</xsl:text>
<xsl:processing-instruction name="xml-stylesheet">type="text/xsl" href="Finvoice.xsl"</xsl:processing-instruction>
<xsl:copy-of select="*"/>
</xsl:template>
</xsl:stylesheet
My problem is that I don't know how to add the doctype part via xslt:
<?xml version="1.0" encoding="ISO-8859-15"?>
<!DOCTYPE Finvoice SYSTEM "Finvoice.dtd">
could sombody give me input concerning this
Thank in advace.
Best regards !Hi,
I don't know if I completely understand your requirements,
however, if you have the field DocType in your Idoc Structure Message, like follow:
<EDI34243 doctype="XXX"/>
You can use:
<xsl:value-of select="@doctype"/> -
How can add the thrid frame in JSplitPane?
Hi,
I want to know how can I add the thrid or more frame in a JSplitPane. As I know it only can add right-left or top-bottom frames. ThanksWell, actually it's piece of cake to put a three way divider to work (e.g. like Netscapes display in the mail window)
Create a vertical splitted JSplitPane, put your left component into that SplitPane
Create another JSplitPane (horizontal split) and put it into the first SplitPane on the right hand side.
Now put the upper right component as the upper component into the second split pane and put the lower right component as the lower component into the scond split pane as wel.
That's it. No big deal.
Thomas -
How to add checkbox in ALV OO?
how to change editable mode and able to input???
REPORT ZZ_ALV_TEST.
data:
ispfli type table of spfli.
data: gr_table type ref to cl_salv_table.
data: gr_functions type ref to cl_salv_functions.
data: gr_display type ref to cl_salv_display_settings.
DATA: GR_COLUMNS TYPE REF TO CL_SALV_COLUMNS_TABLE,
GR_COLUMN TYPE REF TO CL_SALV_COLUMN_TABLE.
start-of-selection.
select * into table ispfli from spfli.
cl_salv_table=>factory( importing r_salv_table = gr_table changing
t_table = ispfli ).
gr_functions = gr_table->get_functions( ).
gr_functions->set_all( abap_true ).
GR_COLUMNS = GR_TABLE->GET_COLUMNS( ).
TRY.
GR_COLUMN ?= GR_COLUMNS->GET_COLUMN( 'CARRID' ). "Column which you
* want to make checkbox
GR_COLUMN->SET_CELL_TYPE( 1 ).
CATCH CX_SALV_NOT_FOUND.
ENDTRY.
gr_table->display( ).I understand the CARRID column is not a checkbox, so you might mean something else entirely. If all you need is to toogle a checkbox value on click, then
- first make the checkbox a hotspot
gr_column->set_cell_type( if_salv_c_cell_type=>checkbox_hotspot ). " constant value 6
- implement a handler to the hotspot event
DATA gr_events TYPE REF TO cl_salv_events_table.
gr_events = gr_table->get_event( ).
SET HANDLER ??->handle_hotspot_click FOR gr_events.
- Your handler must toogle the checkbox value and refresh the display, something like
METHOD handle_hotspot_click.
FIELD-SYMBOLS <ls_item> TYPE spfli.
READ TABLE ispfli INDEX row ASSIGNING <ls_item>.
CHECK sy-subrc EQ 0.
CASE column.
WHEN 'CARRID'. " your checkbox column
* Toogle Value
IF <ls_item>-carrid EQ 'X'.
<ls_item>-carridl = space.
ELSE.
<ls_item>-carrid = 'X'.
ENDIF.
gr_table->refresh( ).
ENDCASE.
ENDMETHOD.
J.N.N -
Eclipse: How to add checkbox on screen
Hi,
I am working on Eclipse, can u please give me example how we can create Checkbox.Hi Nishant ,
Follow the API documentation of SAP UI 5 for all the simple and complex controls.
Here is the link for the checkbox control - CheckBox - SAPUI5 Demo Kit
Example :
// create a simple CheckBox
var oCB = new sap.ui.commons.CheckBox({
text : 'I want to receive the newsletter',
tooltip : 'Newsletter checkbox',
checked : true,
change : function() {if(oCB.getChecked()){alert('YES')}else{alert('NO')};}
// attach it to some element in the page
oCB.placeAt("sample1"); -
How to add checkbox in dropdown box
hi to all
please help me urgent
can we add check box in to the drop down box in screen painter..?
if yes then please tell me in detail.
thank you...Hi,
In drop down ( combo box) u can select only one item at a time. so why do u need check box ? -
How to add checkboxes in InDesign CS3 for use in pdf?
I need to create a page with checkboxes for the user to select various options. I can create buttons and hyperlinks, but I am unable to create checkboxes. Is it even possible to do so in InDesign?
Thanks Bob. Just wondering though, I need to generate an electronic form, meaning I need to be able to use these checkboxes for scripting. I don't think the auto form recognition feature works for that... does it?
-
I'm just trying out CC and can hardly get past get-go :-(
I surfed for help for 45 minutes and found nothing useful.
Sadly after telling people people for at least 15 years that Adobe has great products but the worst help files of probably any major company, it's still true.
Adobe help still assumes that you know the answer that your looking for :-( Whenever I surf for help I try anything before a URL marked Adobe.
Anyway that's why I"m here ;-)
I'm staring at the CC timeline and I wan't to fade in both picture and sound; so how do I add key frames?
Thanks,
Michael@Shooternz
Firstly, I really do appreciate your help and thanks to it I now know how to add the key frames.
But to give you an example of Adobe type help and to show that I'm not just being a grouch ;-)
I followed your link which took me to - Premiere Pro / Adding, navigating, and setting keyframes.
Great!
But does the article start with "How to add key frames"?
No it doesn't :-(
The article is presented in this order,
View keyframes and graphs
Move the current-time indicator to a keyframe
Add, select, and delete keyframes
Modify keyframe values
Why?
Why doesn't it start with Add, select, and delete keyframes which would be logical?
Thanks to you I also managed to find http://helpx.adobe.com/pdf/premiere_pro_reference.pdf
Michael -
How do I add a border to my pages?
In the templates that are available to use with Pages there is one that is titled "Johnson Newsletter." I would like to know how to make the border that is around the red section as well as how to get the border that surrounds that first page of the newsletter.
I know how to add the picture frame that is available by going to Graphics and then Stroke. But, I can't find any other style options.The border around the red box is created by using a white dashed line.
You can see the construction in:
+Inspector > Objects (the square-circle icon) > Stroke > Line+
The double rule surrounding the page is 2 boxes nested inside each other the inside one having a lighter shade.
You can't edit it because it is locked, to unlock it and see how it works:
+Menu > Arange > Unlock+ then go to +Inspector > Objects > Stroke > Line+ again.
To get the neat parallel effect, create the outer box and copy and paste it over itself, then shrink the dimensions on all sides equally and change its color.
Another way to get parallel lines is to make 2 equal size boxes on top of each other, with the bottom one having a much thicker rule and the top one having a white or different colored rule but no fill color. The top box will cover up the middle of the bottom box's rule making it look like a parallel line. You can make more boxes stacked on top of each other to create more parallel effects and experiment with different styles of rules, dashed, dotted etc. -
How to add selected values from table(selected using checkbox)to table?
Hi All,
i have created simple page with search panel with table in table i have created one column as check box for selecting.
here what my requirement is i need to do search multiple times to add some roles to from some different categories.here whenever i searched i ll get some roles into table there i ll select some role and i ll click add buttion. whenever i click add i need to add those roles into some other table finally i ll submit added roles.
here i followed one link http://www.oracle.com/technetwork/developer-tools/adf/learnmore/99-checkbox-for-delete-in-table-1539659.pdf
i used same code and able to see selected row in console, as object array how to add these into table.
please help me out
Thanks in advance
siva shankarThank you for a quick reply
i used the same thing before i go for table check box concept.here what i observed is when i search i am getting some results i am able to shuttle.but if i search again the shuttle is refreshing with new values even not available list its refreshing selected list. IF dont want refresh selected ones.
my usecase after make some searches I will select some roles from different categories at finally i ll submit.
i hope you understand me requirement. please suggest me is this requirement is possible in shuttle component? if yes please guide me.
thanks
Siva Sankar
Maybe you are looking for
-
Goodevening... When I started my iMovie in my new MacBook why is already a name in the Directed by Text Box... I want to get rid of that and replace it with my own name... I can't do that please help me... Thank You...
-
ISight green light on, but not working.. PLEASE HELP!!
HELP PLEASE! My built in iSight green light is on, which means the camera on... but when i try to use it in iMovie, it is a blank white screen and when I try to use photo booth, its a blank green screen. Tried restarting the computer, did not help. S
-
Can I install Logic X and still use Logic 9?
Id like to buy and install Logic X but I would like to keep Logic 9 on my Mac. Is this possible and if so, how do I install Logic X so that it will not "over wri
-
Getting started - What libraries to rely on?
Hi all, I want to get started with a web project using JSF. What libraries/frameworks should this web project be based on? I have taken a quick look at MyFaces, Facelets and Apache Shale. Because I am new to the topic I cannot not judge what the best
-
Clone Stamp Tool limitations?
When I try to use the clone stamp tool it seems it will paint over light colored areas but not dark colored areas. Am I doing something wrong, or is this a limiting characteristic built into this tool?