Coding in contextual panel
Hi,
I have created an application which has a contextual panel.I am Filling the panel using the below code in SUPPLY_VIEW_SWITCH function:
DATA TAB TYPE WD_THIS->ELEMENTS_N_VIEW_SWITCH.
DATA LINE TYPE WD_THIS->ELEMENT_N_VIEW_SWITCH.
LINE-TEXT = 'Invoice'. "#EC NOTEXT
LINE-ENABLED = ABAP_TRUE.
APPEND LINE TO TAB.
LINE-TEXT = 'Delivery Status'. "#EC NOTEXT
LINE-ENABLED = ABAP_TRUE.
APPEND LINE TO TAB.
Now I want to show an ALV report when the user presses the Invoice button. Please suggest how to write code in method ONACTIONON_VIEW_SWITCH (Action on Selection in View Switch). I guess we have tohandle it using the cases, but dont know the coding part of it.
Hi Ashutosh,
In order to use ALV, you have to define the usage of the component SALV_WD_TABLE in your component.
You could refer the below link for the detailed step by step procedure.
[ALV Document|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3439404a-0801-0010-dda5-8c14514d690d?overridelayout=true]
You can alternatively use Table UI Element to achieve the same.
Edited by: Anurag Chopra on Dec 9, 2009 2:44 PM
Similar Messages
-
Links not getting displayed in the contextual panel
Hi,
I have created a contextual panel inside a transparent container. And created a method in the same view supply_values of type supply function to supply the values to the panel.Inside the method I have coded like:
DATA TAB TYPE WD_THIS->ELEMENTS_N_VIEW_SWITCH.
DATA LINE TYPE WD_THIS->ELEMENT_N_VIEW_SWITCH.
LINE-TEXT = 'User Manual'. "#EC NOTEXT
LINE-ENABLED = ABAP_TRUE.
APPEND LINE TO TAB.
LINE-TEXT = 'Logout'. "#EC NOTEXT
LINE-ENABLED = ABAP_TRUE.
APPEND LINE TO TAB.
NODE->BIND_TABLE( TAB ).
Also in the context of the view I have created a node and supplied the method 'supply_values' in the supply function.Under the node I have 2 attributes named text and enabled. Text is of string type and enabled is of boolean type. In the properties of the contextual panel I have bound the visible property with the enabled attribute.
Now when I am running this application , links are not getting displayed in the contextual panel. Though when I debug TAB contains the values. Please suggest if I have missed out something or I need to look into the properties of the contextual panel. Any pointers will be really helpful.
Regards,
AshutoshHi,
Can you elaborate ' ItemEnable property of ViewSwitch'.
I have already bound the enable property of the panel with a context attribute of type wdy_boolean but it is still not working.
Regards,
Ashutosh -
How to use Contextual panel ?
Hi,
Can u please expalin me what are the properties of contextual panel ? and How to use contextual panel with in Contextual panel?
Thanks,
kishore.Check out this link
http://help.sap.com/saphelp_nwce10/helpdata/en/45/01754e5ba20c4be10000000a11466f/frameset.htm -
Hi friends,
I am using horizontal contextual panel in my View.
In horizontal contextual panel action, i am calling the Views based on the tab I have clicked.
In signatuer part of the Action i have given index as Importing parameter, but i am unable to get the index of the contextual panel that i have clicked.
please help me in getting index of the contextual panel that i have clicked.
Regards,
Xavier.PI have delclared varaible in signatuer part of action refering to IF_WD_CONTEXT_ELEMENT
-
Contextual Panel of GP in collapsable window like Navigation Panel
hi all
i want to put the Contextual Panel of Guided Procedure in the collapsable window LIKE the Navigation Panel of the portal (not in Navigation Panel).
For this to achieve, In Portal Content,
I created a copy of "Navigation Panel & Content Area Layout" and made its "Object is a Template" as TRUE.
Then I created a new page of Default Page Template so that i can use my "Navigation Panel & Content Area Layout" and put the Contextual Panel of GP in "Navigational Panel".
Now when I added this page into "Portal Content -> Content Provided by SAP -> Platform Add-Ons -> Guided Procedures -> Pages -> Process Instance" page, a warning message appears saying "The object you have added is not fully compatible with the page. Therefore, its Isolation Method property has been set to URL and read only." and does so, and because of this the Contextual Panel of GP comes in the collapsable Navigational Panel as per my requirement but the height of the page is not sufficient enough to display the whole page in the required format.
Thus, defeats my sole purpose.
So please help to solve this problem.
Thanks & Regards
Vivekhi all
lets leave the above requirement aside.
even if that works, it won't solve my purpose because
i found that even if i get the gp's Contextual Panel / Process Activies Panel in a collapsable window
or i hide the it, this won't appear in the collapsable window or get hidden when i initiate the process using the generated URL.
As per my requirement, i need a URL which will initiate a new GP process and doesn't show
Contextual Panel / Process Activies Panel on the left side.
But the generated URL doesn't hide it.
I think there should be some additional parameter which I should pass along the URL and the started process won't show the Contextual Panel / Process Activies Panel.
If anyone knows how to get rid of Contextual Panel / Process Activies Panel, please reply.
Thanks & Regards
Vivek -
Contextual Panel Height Adjustment
I have a scenario:
There are 2 Contextual Panels in my application, left panel is a navigation panel and right panel is a content panel which depends on the viewswitch selected in the left panel.
The right panel height is variable depending on the contents. I have tried many properties settings like 100% height and stretchedVertically for the Transparent Container which is Matrix Layout to make both panels height equal during runtime, but i couldn't.
Any comment is appreciated. Thanks!Hi Mary,
Even I faced similar problem , thought its not a permanent solution it might be of some help I guess.
Firstly, we can adjust the heights of free contextual area in your contextual panel . You can bind the content height property of the free contextual area to a variable or attribute and can set it accordingly. Further you need to make sure you put transparent containers in these free contextual area's which have auto scrollable mode, then you can fix the height of these containers.
P.S It'll take a number of hits and misses to finally get the two contextual panel to be of same height.
I hope it helps.
thanks and regards,
sunny -
How to create Contextual Panel?
Dear Friends..
I want to make Contextual Panel in WD4A..
But I don't know..how to create Contextual Panel..
Please answer me..^^
Thanks..Oh... I'm Sorry.
I can't write english well..and I can't understand Navigation list and contexual panel.
So.. I can study that.
But..
I make Contextual Panel reference CTX_NAV_PANEL View in WDR_TEST_EVENTS Component.
'com.lang.abap.sap' line has right arrow just like '>'
i think.. '>' click then.. another action happens..
for example.. display sublist..
'comp.lang.abap.sap.webdynpro'
'comp.lang.abap.sap.webdynpro.viewdesigner'
'comp.lang.abap.sap.webdynpro.runtime,X'
'comp.lang.abap.sap.webdynpro.libraries'
and so on..
But nothing happens..
How can I display sublist.. -
Hi All,
I'm trying to use the ContextualPanel. Problem is that you cannot set the panel to a 100% height.
Does anyone created a workaround for this? The screen would look much nicer if this UI element has a 100% height.
Regards,
BertHi Bert,
is it that 100% doesn't fill the whole page? Do any other UI elements that you put in that container fill the page if you use 100%? It's worth remembering that 100% means 100% of the current view container - if that container is not stretched to 100% of the overall view. Grid layout has stretched horizontal/vertical options, etc.
Chris -
Can we achieve Vertical Collapsable trayOREnlarge Navigation Panel Feature
Hi All,
To overcome horizontal scroll issue of diffrerent sections of page, we thought
a) Vertical Collapsable tray feature [like Collapsable tray we have - which gets shrinked of vertical height but horizontal width still retained]
b) Enlarge Navigation Panel Feature - [like we have: Having 2 arrow marks which help to shrink or expand navigation panel of portal ]
c) Collapsable Navigatiop Panel- Expand Navigation Panel
Can we achieve any of above features by custom development or is there any standard reuse component.
Please guide.
Regards,
Ganga
Edited by: Gangadharayya Hiremath on Mar 25, 2009 12:24 PMhi all
lets leave the above requirement aside.
even if that works, it won't solve my purpose because
i found that even if i get the gp's Contextual Panel / Process Activies Panel in a collapsable window
or i hide the it, this won't appear in the collapsable window or get hidden when i initiate the process using the generated URL.
As per my requirement, i need a URL which will initiate a new GP process and doesn't show
Contextual Panel / Process Activies Panel on the left side.
But the generated URL doesn't hide it.
I think there should be some additional parameter which I should pass along the URL and the started process won't show the Contextual Panel / Process Activies Panel.
If anyone knows how to get rid of Contextual Panel / Process Activies Panel, please reply.
Thanks & Regards
Vivek -
Scrolling Thumbnail Panel Problems
I'm creating a personal portfolio website in flash. the
address is
http://homepages.nildram.co.uk/~motiv8/AlexBimpson/AlexBimpson%20New/
On the "photo" page, by clicking on view portfolio a
scrolling humbnail gallery appears, however as you can see it moves
extremely jerkily.
This seems to be because the "photo" page is a seperate flash
movie loaded into the main navigation page, a parent swf file,
hence you see the loading animations when you switch pages on the
website.
If you access the photo swf file alone the scrollbar seems to
work fine. its address is
http://homepages.nildram.co.uk/~motiv8/AlexBimpson/AlexBimpson%20New/flash/photo/photo.swf
the coding for the panel is taken from a video tutorial, and
seems to work fine. i have displayed this below
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
var b = stroke.getBounds(_root);
function scrollPanel() {
if (_xmouse<b.xMin || _xmouse>b.xMax ||
_ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
if(panel._x >= 214) {
panel._x = 214;
if(panel._x <= -1272) {
panel._x = -1272;
var xdist = _xmouse - 384;
panel._x += -xdist / 8;
where 'panel' is the mask object used to create the bounding
area for the thumbnail panel and 'stroke' is a surrounding outline,
hidden as white colour.
Is anyone able to tell me why loading one movie into another
is having this effect, and how I go about overcoming this problem?
I've noticed that the panel seems 2 work with the mouse below
the thumbnail panel in the parent site, so it all seems a little
buggy - im guessing there's something that needs changing in the
referencing for the stroke and panel, but as of yet I havent found
a solution.
Any help would be greatly appreciated. thanks very much
alexok, i think ive figured out where the problem lies, but not
how to solve it.
the movie "stroke" is used there because apparently a flash
scrollPanel does not recognise button actions. Therefore, when you
are over the panel, it is no longer set as a scrollPanel. however,
once you move outside the stroke, it will again.
the boundaries of the stroke are gathered using the getbounds
function, as in this code
var b = stroke.getBounds(_root);
function scrollPanel() {
if (_xmouse<b.xMin || _xmouse>b.xMax ||
_ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
however, because this movie is loaded within another swf,
something is going wrong with getting the bounds. at the moment it
uses _root to reference the stroke, but this doesnt seem 2 work
when loaded within the parent movie. I've tried using _parent but
this has no effect.
i guess i need 2 change that 2 something else??? -
Hi All
What is Object Type HLPF in SAP.....?
Thanks In Advance,
ChetanCreating Business Logic Callable Objects
Use
You use the Business Logic callable object type to make process flow decisions based on dynamic expressions. They can be defined for output parameters and result states and are evaluated at runtime depending on the actual values of the input parameters. This is possible without any coding or use of an external rule engine.
To construct dynamic expressions, you can use a built-in expression editor that provides predefined operators and functions, as well as a validation tool.
The following categories are available:
· Text functions
· Numeric functions
· Date functions
· Time functions
· Conditional functions
· Scientific functions
· Operators
Prerequisites
You have the appropriate rights to work with Guided Procedures (GP) design time.
For more information, see Portal Roles.
Procedure
1. Open the gallery and from the contextual panel choose Create Callable Object.
2. From the Type list, select Process Control ® Business Logic and enter the required basic data as follows:
Parameter
Description
Name
Enter a name for the new object.
Description
Provide a short and meaningful description.
Original Language
Choose the language in which the translatable texts of the callable object definition are created.
Folder
Select a destination folder in the gallery.
You can either use an existing folder, or create a new one.
3. Choose Next.
The Define Object screen appears. You can see a short description of the object characteristics and purpose. Continue by choosing Next.
4. On the Define Input screen, choose Insert New to create input parameters. You can define an arbitrary set of input parameters.
5. Once you have created the parameters you need, choose Next to continue.
6. On the Define Output screen, choose Insert New to add output parameters.
You can have an arbitrary number of output parameters on the root level. However, you cannot create parameters of type Structure.
7. Choose Next to continue.
8. On the Set Configuration screen, enter expressions for the output parameters defined previously:
a. Select an output parameter from the list and choose (Browse).
b. If you are familiar with expression syntax, enter an expression in the text area on the left.
c. If you are not sure about the syntax, use the predefined functions from the list on the right.
For a list of some frequently used functions, see Frequently-Used Dynamic Expressions in the SAP Visual Composer Documentation.
d. To insert a function into the text area, expand a node and select the relevant entry.
Each of these functions provides a quick info text description with syntax rules and examples. To view this information, point at the specific entry in the list.
e. To test the expression, choose Validate.
f. Once you have defined the expression, choose Apply to save it.
9. If you want to define result states for the callable object, choose the Add option under Result States.
10. Enter a name for the new result state and choose Add State.
The state appears in the list.
11. Repeat steps 9 through 10 to define an arbitrary number of result states.
12. To define expressions for the result states you have created, select a result state from the list and follow the procedure in step 8.
Result state expressions should evaluate to Boolean.
13. Choose Next and Finish and Open.
Result
You can test the callable object in GP design time or include it in a process to test it in runtime. If you insert it in an action, you should be able to see all result states that you have defined.
Example
You can create a callable object that calculates the monthly payments to redeem a certain credit amount based on a specified interest rate and time period. It approves the credit request if the monthly payment does not exceed half the monthly income of the person and outputs the amount of the payment. Otherwise, it rejects the credit request.
This callable object has the following characteristics:
Parameter Type
Name
Type
Dynamic Expression (uses the technical names of the input parameters)
Input
First Name
Last Name
Income (monthly)
Credit amount
Period (years)
Interest rate (percent)
String
String
Double
Double
Integer
Double
Output
Name
Monthly Payment
String
Double
CAPITAL(@FirstName)& & CAPITAL(@LastName)
ROUND(@credit* POW((1+@interest/100), @period) /(12@period)100)/100
Result states
(all result states evaluate to Boolean)
Approved
@credit* POW((1+@interest/100), @period) /(12*@period)<(@income/2)
Rejected
@credit* POW((1+@interest/100), @period) /(12*@period)>=(@income/2) -
Help needed to display my form,very urgent
i have a Main.java to display my tabs, then a PlayerTab.java which contains all the buttons, Create, Update, Delete and View and a CreatePanel.java which contain the form for adding new members.
The flow is like this when user click on the PlayerTab it will show the 4 buttons.Then when user click on the Create button, i want to show the create panel which contains the form which is inside CreatePanel.java.Then click on other buttons will show other forms. Please teach me how to hide the forms too thanks.
Main.java
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.Graphics;
import java.awt.Toolkit;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
public class Main extends JFrame {
// Constructor
public Main(){
setSize(800,600);
setTitle("S-League Management System");
setResizable(false);
setVisible(true);
Container frame=getContentPane();
//centralise the screen
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
frame.setLocation((screenSize.width - frameSize.width) / 2,
(screenSize.height - frameSize.height) / 2);
// create new tabbedPane object
JTabbedPane tabbedPane = new JTabbedPane(){
ImageIcon imageIcon = new ImageIcon("");
Image image = imageIcon.getImage();
public void paintComponent (Graphics g) {
g.setColor(new Color(220,220,220));
g.fillRect(0,0,800,74);
g.drawImage(image, 0, 4, this);
super.paintComponent(g);
//tabbedPane.addTab(" Team Management ", null, new TeamTab());
tabbedPane.addTab(" Player Registration ",null, new PlayerTab());
//tabbedPane.setSelectedIndex(1);
tabbedPane.setBorder(BorderFactory.createEmptyBorder(78,0,0,0));
frame.add(tabbedPane);
public static void main(String[] args) {
Main main = new Main();
main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
main.toFront();
main.show();
PlayerTab.java
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class PlayerTab extends JPanel implements ActionListener{
//JPanel mainPanel = new JPanel();
JButton createbutton = new JButton("Create");
JButton updateButton = new JButton("Update");
JButton deleteButton = new JButton("Delete");
JButton viewButton = new JButton("View");
public PlayerTab() {
this.setLayout(null);
createbutton.setBounds(new Rectangle(10, 16, 79, 27));
updateButton.setBounds(new Rectangle(10, 64, 79, 27));
deleteButton.setBounds(new Rectangle(10, 113, 79, 27));
viewButton.setBounds(new Rectangle(10, 161, 79, 27));
this.add(createbutton, null);
createbutton.addActionListener(this);
this.add(updateButton, null);
updateButton.addActionListener(this);
this.add(deleteButton, null);
deleteButton.addActionListener(this);
this.add(viewButton, null);
viewButton.addActionListener(this);
public void actionPerformed(ActionEvent e)
String cmd = e.getActionCommand();
if ("Create".equals(cmd))
JPanel createPanel = new CreatePanel();
createPanel.show();
}//close of if
}//close of action perform
CreatePanel.java
import java.awt.*;
import javax.swing.*;
public class CreatePanel extends JPanel {
JPanel createPanel = new JPanel();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JLabel jLabel3 = new JLabel();
JLabel jLabel4 = new JLabel();
JLabel jLabel5 = new JLabel();
JLabel jLabel6 = new JLabel();
JLabel jLabel7 = new JLabel();
JLabel jLabel8 = new JLabel();
JLabel jLabel9 = new JLabel();
JTextField nricNo = new JTextField();
JTextField name = new JTextField();
JRadioButton singleRadio = new JRadioButton();
JRadioButton marriedRadio = new JRadioButton();
JRadioButton divorcedRadio = new JRadioButton();
JComboBox position = new JComboBox();
JComboBox team = new JComboBox();
JTextField address = new JTextField();
JTextField salary = new JTextField();
JTextField contactNo = new JTextField();
JTextField dob = new JTextField();
JButton submitButton = new JButton();
JButton clearButton = new JButton();
JButton retrieveButton = new JButton();
public CreatePanel() {
createPanel.setBounds(new Rectangle(108, 10, 690, 472));
createPanel.setLayout(null);
jLabel1.setText("NRIC:");
jLabel1.setBounds(new Rectangle(14, 6, 41, 17));
jLabel2.setText("Name:");
jLabel2.setBounds(new Rectangle(14, 48, 41, 17));
jLabel3.setText("Address:");
jLabel3.setBounds(new Rectangle(14, 90, 57, 17));
jLabel4.setText("Salary:");
jLabel4.setBounds(new Rectangle(14, 132, 41, 17));
jLabel5.setText("Contact No:");
jLabel5.setBounds(new Rectangle(14, 174, 68, 17));
jLabel6.setText("Marital Status:");
jLabel6.setBounds(new Rectangle(14, 216, 83, 17));
jLabel7.setText("Position:");
jLabel7.setBounds(new Rectangle(14, 258, 58, 17));
jLabel8.setText("D.O.B:");
jLabel8.setBounds(new Rectangle(14, 300, 41, 17));
jLabel9.setText("Team:");
jLabel9.setBounds(new Rectangle(14, 342, 41, 17));
nricNo.setText("jTextField1");
nricNo.setBounds(new Rectangle(101, 3, 63, 21));
name.setText("jTextField2");
name.setBounds(new Rectangle(101, 44, 63, 21));
singleRadio.setSelected(true);
singleRadio.setText("Single");
singleRadio.setBounds(new Rectangle(102, 210, 103, 25));
marriedRadio.setText("Married");
marriedRadio.setBounds(new Rectangle(221, 210, 103, 25));
divorcedRadio.setText("Divorced");
divorcedRadio.setBounds(new Rectangle(340, 210, 103, 25));
position.setBounds(new Rectangle(102, 256, 128, 24));
team.setBounds(new Rectangle(102, 337, 128, 24));
address.setText("jTextField3");
address.setBounds(new Rectangle(101, 87, 63, 21));
salary.setText("jTextField4");
salary.setBounds(new Rectangle(101, 130, 63, 21));
contactNo.setText("jTextField5");
contactNo.setBounds(new Rectangle(101, 171, 63, 21));
dob.setText("jTextField6");
dob.setBounds(new Rectangle(103, 299, 63, 21));
submitButton.setText("Submit");
submitButton.setBounds(new Rectangle(114, 409, 79, 27));
clearButton.setText("Clear");
clearButton.setBounds(new Rectangle(332, 409, 79, 27));
retrieveButton.setText("Retrieve");
retrieveButton.setBounds(new Rectangle(356, 0, 105, 27));
createPanel.add(clearButton, null);
createPanel.add(submitButton, null);
createPanel.add(jLabel1, null);
createPanel.add(nricNo, null);
createPanel.add(jLabel2, null);
createPanel.add(name, null);
createPanel.add(jLabel3, null);
createPanel.add(address, null);
createPanel.add(jLabel4, null);
createPanel.add(salary, null);
createPanel.add(jLabel5, null);
createPanel.add(contactNo, null);
createPanel.add(jLabel6, null);
createPanel.add(singleRadio, null);
createPanel.add(marriedRadio, null);
createPanel.add(divorcedRadio, null);
createPanel.add(jLabel7, null);
createPanel.add(position, null);
createPanel.add(jLabel8, null);
createPanel.add(dob, null);
createPanel.add(jLabel9, null);
createPanel.add(team, null);
createPanel.add(retrieveButton, null);
add(createPanel);1. make createPanel an instance variable
public class PlayerTab extends JPanel implements
ActionListener{JPanel createPanel = null;
2. consistent with how you are coding, add the panel,
public void actionPerformed(ActionEvent e)
String cmd = e.getActionCommand();
if ("Create".equals(cmd))
{if( null == createPanel ) {
createPanel = new CreatePanel();
createPanel.setBounds( 20, 16, 300, 300 );
add( createPanel, null );
createPanel.show();
}//close of ifyou can also search for the specific panel, remove and then add a new instance rather then reusing the same createPanel once it is instantiated. -
Portal using Webdynpro for ABAP
Hi Gurus!
I am using one portal using 'Webdynpro For ABAP'. It contains Contextual Panel as well as ViewUIContainer. Contextual Panel contains all the reqd options available for user; while ViewUIContainer contains diff views as requested.
Now, I'm trying to make a copy of that Webdynpro with some other name. What happens is --
Application is not there and when I try to make one - it says
"Interface View Does Not Exists."
Further, when I try to make an Interface View with the new name - it says
"Interface View Does Not Exists."
Therefore, what I could conclude about the case is -- may be Interface View is default to certain Webdynpro components/interface. Hence, my question is how can I make use of same webdynpro application with some other name. This requirement arises due to the fact that we have to add some more functionalities to that and I dont want to play with the efforts made so far.
Kumar Saurav.Issue Resolved.
Kumar Saurav. -
Hi,
I am working on Java Swings and Iam new to it.
Can anybody help me with my problem please...
I have 5 panels and all these are palced in one main panel.
I have :
Panel1
Panle2
Panel3
Panel4
Panle5
Panel6
panel7
All these are placed in main panel according to the ActionListener.
when event1 is triggered,I need to place panel1,Panel2,Panel3,Panel4,Panel5 in Main panel.
When event2 is triggered ,I need to place panel1,panel6,panel3,panel4,panel5 in main Panel.
When event3 is triggered ,I need to palce panel1,panel2,panel7,panel4,panel5 in main panel.
I coded all the panels and placed the components.But I when i place the panels ,I am getting spacing problems.
and when I resize the main panel,I am losing components in the panels.
Can anybody help with code please.
I also need calender textfield with small icon besides it that pops up calender and when user selects date it should take in "yyyymmdd" format.
Thanks,
Tutika.Don't forget to use the [url
http://forum.java.sun.com/help.jspa?sec=formatting]Cod
e Formatting Tags so the posted code retainsits original formatting.
If you add components to a visible panel then you
need to revalidate() the panel so the layout manager
can be invoked again.
sorry,
Here is my view code:
public class CalenderAdmin1 extends JFrame {
private static final long serialVersionUID = 1L;
// Top panel to which all the panels are attached
// based upon events
public JPanel jContentPane = null;
private JScrollPane jScrollPaneContent = null;
// Main panel variadle declaration
private JPanel mainPanel = null;
private JLabel jLblCalender = null;
private JComboBox jCmbBxCalender = null;
private JRadioButton jRBttnDay = null;
private JRadioButton jRBttnEvent = null;
// counselorPanel variable declaration
private JPanel counselorPanel = null;
private JLabel jLblCounselor = null;
private JLabel jLblLocation = null;
private JLabel jLblType = null;
private JLabel jLblType1 = null;
private JComboBox jCmbBxCounselor = null;
private JComboBox jCmbBxLocation = null;
private JComboBox jCmbBxType = null;
private JRadioButton jRBttnOffice = null;
private JRadioButton jRBttnCounselor = null;
// officePanel variable declaration
private JPanel officePanel = null;
private JLabel jLblPanelOfficeType = null;
private JLabel jLblPanelOfficeLocation = null;
private JComboBox jCmbBxPanelOfficeLocation = null;
private JComboBox jCmbBxPanelOfficeType = null;
// timepanel variable declaration
private JPanel timePanel = null;
private JLabel jLblStartDate = null;
private JLabel jLblStartTime = null;
private JLabel jLblEndTime = null;
private JTextField jTxtFStartDate = null;
private JComboBox jCmbBxStartTimeHrs = null;
private JLabel jLblStartTimeColon = null;
private JComboBox jCmbBxStartTimeMin = null;
private JComboBox jCmbBxEndTimeHrs = null;
private JLabel jLblEndTimeColon = null;
private JComboBox jCmbBxEndTimeMin = null;
// recurrencePanel variable declaration
private JPanel recurrencePanel = null;
private JLabel jLblRecurrence = null;
private JLabel jLblSunday = null;
private JLabel jLblMonday = null;
private JLabel jLblTuesday = null;
private JLabel jLblWednesday = null;
private JLabel jLblThursday = null;
private JLabel jLblFriday = null;
private JLabel jLblSaturday = null;
private JCheckBox jChkBxMonday = null;
private JCheckBox jChkBxTuesday = null;
private JCheckBox jChkBxWednesday = null;
private JCheckBox jChkBxThursday = null;
private JCheckBox jChkBxFriday = null;
private JCheckBox jChkBxSaturday = null;
private JCheckBox jChkBxSunday = null;
private JLabel jLblEndDate = null;
private JTextField jTxtFEndDate = null;
// butonsPanel varaiable declaration
private JPanel buttonsPanel = null;
private JButton jBttnCancel = null;
private JButton jBttnSave = null;
// eventsPanel variable declaration
private JPanel eventsPanel = null;
private JLabel jLblEvents = null;
private JLabel jLblEventType = null;
private JLabel jLblEventStartTime = null;
private JLabel jLblEventEndTime = null;
private JComboBox jCmbBxEventType = null;
private JComboBox jCmbBxEventStartTimeHrs = null;
private JComboBox jCmbBxEventStartTimeMin = null;
private JComboBox jCmbBxEventEndTimeHrs = null;
private JComboBox jCmbBxEventEndTimeMin = null;
private JLabel jLblEventStartTimeColon = null;
private JLabel jLblEventEndTimeColon = null;
private JButton jBttnAdd = null;
String[] calender,counselor,location,type,type1;
// Contructor
public CalenderAdmin1() {
super();
initialize();
* This method initializes this
* @return void
private void initialize() {
this.setSize(750, 500);
this.setPreferredSize(new Dimension(600, 600));
this.setContentPane(getJScrollPaneContent());
this.setTitle("Calender Administrator");
this.setVisible(true);
// Scroll Pane
private JScrollPane getJScrollPaneContent() {
if (jScrollPaneContent == null) {
jScrollPaneContent = new JScrollPane();
jScrollPaneContent.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
jScrollPaneContent.setViewportView(getJContentPane());
return jScrollPaneContent;
* This method initializes jContentPane
* @return javax.swing.JPanel
public JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(null);
//jContentPane.setLayout(new GridLayout(5,0,0,0));
//jContentPane.setLayout(new BoxLayout(jContentPane,BoxLayout.Y_AXIS));
jContentPane.add(getmainPanel(),null);
//jContentPane.add(getofficePanel(),null);
jContentPane.add(getcounselorPanel(),null);
//jContentPane.add(geteventsPanel(),null);
jContentPane.add(gettimePanel(),null);
jContentPane.add(getrecurrencePanel(),null);
jContentPane.add(getbuttonsPanel(),null);
return jContentPane;
private JPanel getmainPanel(){
if (mainPanel ==null){
mainPanel = new JPanel();
mainPanel.setLayout(null);
//jPanel1.setBorder(new javax.swing.border.TitledBorder("1"));
mainPanel.setBounds(new Rectangle(0, 0, 700, 85));
mainPanel.add(getjLblCalender(),null);
mainPanel.add(getjCmbBxCalender(),null);
mainPanel.add(getjRdBttnDay(),null);
mainPanel.add(getjRdBttnEvent(),null);
return mainPanel;
public JPanel getcounselorPanel(){
if(counselorPanel==null){
counselorPanel = new JPanel();
//jPanel2.setLayout(new BoxLayout(jPanel2,BoxLayout.Y_AXIS));
counselorPanel.setLayout(null);
//jPanel2.setBorder(new javax.swing.border.TitledBorder("2"));
counselorPanel.setBounds(0, 65, 700, 125);
counselorPanel.add(getjLblCounselor(),null);
counselorPanel.add(getjCmbBxCounselor(),null);
counselorPanel.add(getjLblLocation(),null);
counselorPanel.add(getjCmbBxLocation(),null);
counselorPanel.add(getjLblType(),null);
counselorPanel.add(getjCmbBxType(),null);
counselorPanel.add(getjLblType1(),null);
counselorPanel.add(getjRdBttnOffice(),null);
counselorPanel.add(getjRdBttnCounselor(),null);
return counselorPanel;
private JPanel gettimePanel(){
if (timePanel == null){
timePanel=new JPanel();
//jPanel3.setBorder(new javax.swing.border.TitledBorder("3"));
timePanel.setLayout(null);
timePanel.setBounds(0, 170, 700, 100);
timePanel.add(getjLblStartDate(),null);
timePanel.add(getjTxtFStartDate(),null);
timePanel.add(getjLblStartTime(),null);
timePanel.add(getjCmbBxStartTimeHrs(),null);
timePanel.add(getjLblStartTimeColon(),null);
timePanel.add(getjCmbBxStartTimeMin(),null);
timePanel.add(getjLblEndTime(),null);
timePanel.add(getjLblEndTimeColon(),null);
timePanel.add(getjCmbBxEndTimeHrs(),null);
timePanel.add(getjCmbBxEndTimeMin(),null);
JLabel jLblC1 = new JLabel ();
jLblC1.setBounds(new Rectangle(25, 70, 60, 20));
jLblC1.setText("new");
jPanel3.add(jLblC1);
JLabel jLblC2 = new JLabel ();
jLblC2.setBounds(new Rectangle(25, 90, 60, 20));
jLblC2.setText("new");
jPanel3.add(jLblC2);
JLabel jLblC3 = new JLabel ();
jLblC3.setBounds(new Rectangle(25, 110, 60, 20));
jLblC3.setText("new");
jPanel3.add(jLblC3);
JLabel jLblC4 = new JLabel ();
jLblC4.setBounds(new Rectangle(25, 130, 60, 20));
jLblC4.setText("new");
jPanel3.add(jLblC4);
JLabel jLblC5 = new JLabel ();
jLblC5.setBounds(new Rectangle(25, 150, 60, 20));
jLblC5.setText("new");
jPanel3.add(jLblC5);
JLabel jLblC6 = new JLabel ();
jLblC6.setBounds(new Rectangle(25, 170, 60, 20));
jLblC6.setText("new");
jPanel3.add(jLblC6);
JLabel jLblC7 = new JLabel ();
jLblC7.setBounds(new Rectangle(25, 190, 60, 20));
jLblC7.setText("new");
jPanel3.add(jLblC7);
//jPanel3.add(getjLblEndTime(),null);
//jPanel3.add(getjTxtFEndTime(),null);
return timePanel;
private JPanel getrecurrencePanel(){
if (recurrencePanel == null){
recurrencePanel=new JPanel();
//jPanel4.setBorder(new javax.swing.border.TitledBorder("Reccurrence"));
recurrencePanel.setLayout(null);
recurrencePanel.setBounds(0, 240, 700, 120);
recurrencePanel.add(getjLblRecurrence(),null);
recurrencePanel.add(getjChkBxSunday(),null);
recurrencePanel.add(getjLblSunday(),null);
recurrencePanel.add(getjChkBxMonday(),null);
recurrencePanel.add(getjLblMonday(),null);
recurrencePanel.add(getjChkBxTuesday(),null);
recurrencePanel.add(getjLblTuesday(),null);
recurrencePanel.add(getjChkBxWednesday(),null);
recurrencePanel.add(getjLblWednesday(),null);
recurrencePanel.add(getjChkBxThursday(),null);
recurrencePanel.add(getjLblThursday(),null);
recurrencePanel.add(getjChkBxFriday(),null);
recurrencePanel.add(getjLblFriday(),null);
recurrencePanel.add(getjChkBxSaturday(),null);
recurrencePanel.add(getjLblSaturday(),null);
//jPanel4.add(new JSeparator(), BorderLayout.CENTER);
recurrencePanel.add(getjLblEndDate(),null);
recurrencePanel.add(getjTxtFEndDate(),null);
return recurrencePanel;
private JPanel getbuttonsPanel(){
if (buttonsPanel == null){
buttonsPanel=new JPanel();
//jPanel5.setBorder(new javax.swing.border.TitledBorder("5"));
buttonsPanel.setLayout(null);
buttonsPanel.setBounds(0, 360, 700, 90);
buttonsPanel.add(getjBtnCancel(),null);
buttonsPanel.add(getjBtnSave(),null);
return buttonsPanel;
public JPanel getofficePanel(){
if (officePanel == null){
officePanel=new JPanel();
officePanel.setLayout(null);
//jPanel6.setBorder(new javax.swing.border.TitledBorder("6"));
officePanel.setBounds(0, 70, 700, 80);
officePanel.add(getjCmbBxPanelOfficeType(),null);
officePanel.add(getjLblPanelOfficeLocation(),null);
officePanel.add(getjCmbBxPanelOfficeLocation(),null);
officePanel.add(getjLblPanelOfficeType(),null);
return officePanel;
private JPanel geteventsPanel(){
if (eventsPanel == null){
eventsPanel=new JPanel();
eventsPanel.setLayout(null);
//jPanel7.setBorder(new javax.swing.border.TitledBorder("7"));
eventsPanel.setBounds(0, 120, 700, 150);
eventsPanel.add(getjLblEvent(),null);
eventsPanel.add(getjLblEventType(),null);
eventsPanel.add(getjLblEventStartTime(),null);
eventsPanel.add(getjLblEventEndTime(),null);
//jPanel7.add(new JSeparator(), new Dimension(180,10));
eventsPanel.add(getjCmbBxEventType(),null);
eventsPanel.add(getjCmbBxEventStartTimeHrs(),null);
eventsPanel.add(getjLblEventStartTimeColon(),null);
eventsPanel.add(getjCmbBxEventStartTimeMin(),null);
eventsPanel.add(getjCmbBxEventEndTimeHrs(),null);
eventsPanel.add(getjLblEventEndTimeColon(),null);
eventsPanel.add(getjCmbBxEventEndTimeMin(),null);
eventsPanel.add(getjBtnAdd(),null);
//jPanel7.add(getjCmbBxPanel6Location(),null);
return eventsPanel;
* mainPanel methods to get components
private JLabel getjLblCalender()
if(jLblCalender==null){
jLblCalender = new JLabel ();
jLblCalender.setBounds(new Rectangle(25, 25, 60, 20));
jLblCalender.setText("Calender");
System.out.println(jLblCalender.getBounds());
//jLblCalender.setBounds(20, 20, 100, 16);
return jLblCalender;
public JComboBox getjCmbBxCalender(){
if (jCmbBxCalender == null){
calender = new String[] {"Office","Counselor"};
jCmbBxCalender = new JComboBox (calender);
jCmbBxCalender.setBounds(new Rectangle (90,25,140,20));
return jCmbBxCalender;
private JRadioButton getjRdBttnDay(){
if(jRBttnDay==null){
jRBttnDay=new JRadioButton();
jRBttnDay.setBounds(new Rectangle(350,25, 60, 20));
jRBttnDay.setText("Day");
//jRBttnOffice.addItemListener( rhandler );
return jRBttnDay;
private JRadioButton getjRdBttnEvent(){
if(jRBttnEvent==null){
jRBttnEvent=new JRadioButton();
jRBttnEvent.setBounds(new Rectangle(350, 50, 60, 20));
jRBttnEvent.setText("Event");
//jRBttnEvent.addItemListener( rhandler );
return jRBttnEvent;
* counselorPanel methods to get components
private JLabel getjLblCounselor()
if(jLblCounselor==null){
jLblCounselor = new JLabel ();
jLblCounselor.setBounds(new Rectangle(25,25,60,20));
jLblCounselor.setText("Counselor");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblCounselor;
private JLabel getjLblLocation()
if(jLblLocation==null){
jLblLocation = new JLabel ();
jLblLocation.setBounds(new Rectangle(25,60,60,20));
jLblLocation.setText("Location");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblLocation;
private JLabel getjLblType()
if(jLblType==null){
jLblType = new JLabel ();
jLblType.setBounds(new Rectangle(25,95,60,20));
jLblType.setText("Type");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblType;
private JLabel getjLblType1()
if(jLblType1==null){
jLblType1 = new JLabel ();
jLblType1.setBounds(new Rectangle(350, 25, 40, 20));
jLblType1.setText("Type :");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblType1;
public JComboBox getjCmbBxCounselor(){
if (jCmbBxCounselor == null){
counselor = new String[] {"John","Jason","Sam"};
jCmbBxCounselor = new JComboBox (counselor);
jCmbBxCounselor.setBounds(new Rectangle (90,25,140,20));
return jCmbBxCounselor;
public JComboBox getjCmbBxLocation(){
if (jCmbBxLocation == null){
location = new String[] {"Oakland","Sanfrancisco"};
jCmbBxLocation= new JComboBox(location);
jCmbBxLocation.setBounds(new Rectangle (90,60,140,20));
return jCmbBxLocation;
public JComboBox getjCmbBxType(){
if (jCmbBxType == null){
type = new String[] {"Regular","Non Regular"};
jCmbBxType = new JComboBox (type);
jCmbBxType.setBounds(new Rectangle (90,95,140,20));
return jCmbBxType;
private JRadioButton getjRdBttnOffice(){
if(jRBttnOffice==null){
jRBttnOffice=new JRadioButton();
jRBttnOffice.setBounds(new Rectangle(490, 25, 60, 20));
jRBttnOffice.setText("Office");
//jRBttnOffice.addItemListener( rhandler );
return jRBttnOffice;
private JRadioButton getjRdBttnCounselor(){
if(jRBttnCounselor==null){
jRBttnCounselor=new JRadioButton();
jRBttnCounselor.setBounds(new Rectangle(400, 25, 90, 20));
jRBttnCounselor.setText("Counselor");
//jRBttnCounselor.addItemListener( rhandler );
return jRBttnCounselor;
* timePanel methods to get components
private JLabel getjLblStartDate()
if(jLblStartDate==null){
jLblStartDate = new JLabel ();
jLblStartDate.setBounds(new Rectangle(25,25,60,20));
jLblStartDate.setText("Start Date ");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblStartDate;
private JLabel getjLblStartTime()
if(jLblStartTime==null){
jLblStartTime = new JLabel ();
jLblStartTime.setBounds(new Rectangle(350,25,70,20));
jLblStartTime.setText("Start Time ");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblStartTime;
private JLabel getjLblEndTime()
if(jLblEndTime==null){
jLblEndTime = new JLabel ();
jLblEndTime.setBounds(new Rectangle(350,60,70,20));
jLblEndTime.setText("End Time ");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblEndTime;
private JTextField getjTxtFStartDate() {
if (jTxtFStartDate == null) {
jTxtFStartDate = new JTextField();
//jTxtFRefNum.setBounds(new Rectangle(86, 51, 109, 20));
jTxtFStartDate.setBounds(new Rectangle(90,25,140,20));
jTxtFStartDate.setText("Start Date");
return jTxtFStartDate;
private JComboBox getjCmbBxStartTimeMin(){
if (jCmbBxStartTimeMin == null){
counselor = new String[] {"00","02","03","04"};
jCmbBxStartTimeMin = new JComboBox (counselor);
jCmbBxStartTimeMin.setBounds(new Rectangle (490,25,40,20));
return jCmbBxStartTimeMin;
private JComboBox getjCmbBxStartTimeHrs(){
if (jCmbBxStartTimeHrs == null){
counselor = new String[] {"00","02","03","04"};
jCmbBxStartTimeHrs = new JComboBox (counselor);
jCmbBxStartTimeHrs.setBounds(new Rectangle (425, 25,40,20));
return jCmbBxStartTimeHrs;
private JLabel getjLblEndTimeColon()
if(jLblEndTimeColon==null){
jLblEndTimeColon = new JLabel ();
jLblEndTimeColon.setBounds(new Rectangle(475,60,5,20));
jLblEndTimeColon.setText(":");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblEndTimeColon;
private JLabel getjLblStartTimeColon()
if(jLblStartTimeColon==null){
jLblStartTimeColon = new JLabel ();
jLblStartTimeColon.setBounds(new Rectangle(475,25,5,20));
jLblStartTimeColon.setText(":");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblStartTimeColon;
private JComboBox getjCmbBxEndTimeMin(){
if (jCmbBxEndTimeMin == null){
counselor = new String[] {"00","02","03","04"};
jCmbBxEndTimeMin = new JComboBox (counselor);
jCmbBxEndTimeMin.setBounds(new Rectangle (490,60,40,20));
return jCmbBxEndTimeMin;
private JComboBox getjCmbBxEndTimeHrs(){
if (jCmbBxEndTimeHrs == null){
counselor = new String[] {"00","02","03","04"};
jCmbBxEndTimeHrs = new JComboBox (counselor);
jCmbBxEndTimeHrs.setBounds(new Rectangle (425,60,40,20));
return jCmbBxEndTimeHrs;
* recurrencePanel methods to get components
private JLabel getjLblSunday()
if(jLblSunday==null){
jLblSunday = new JLabel ();
jLblSunday.setBounds(new Rectangle(125, 50, 50, 20));
jLblSunday.setText("Sunday");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblSunday;
private JLabel getjLblMonday()
if(jLblMonday==null){
jLblMonday = new JLabel ();
jLblMonday.setBounds(new Rectangle(205,50,50,20));
jLblMonday.setText("Monday");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblMonday;
private JLabel getjLblTuesday()
if(jLblTuesday==null){
jLblTuesday = new JLabel ();
jLblTuesday.setBounds(new Rectangle(285,50,50,20));
jLblTuesday.setText("Tuesday");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblTuesday;
private JLabel getjLblWednesday()
if(jLblWednesday==null){
jLblWednesday = new JLabel ();
jLblWednesday.setBounds(new Rectangle(370, 50,70,20));
jLblWednesday.setText("Wednesday");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblWednesday;
private JLabel getjLblThursday()
if(jLblThursday==null){
jLblThursday = new JLabel ();
jLblThursday.setBounds(new Rectangle(475,50,60,20));
jLblThursday.setText("Thursday");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblThursday;
private JLabel getjLblFriday()
if(jLblFriday==null){
jLblFriday = new JLabel ();
jLblFriday.setBounds(new Rectangle(565,50,40,20));
jLblFriday.setText("Friday");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblFriday;
private JLabel getjLblSaturday()
if(jLblSaturday==null){
jLblSaturday = new JLabel ();
jLblSaturday.setBounds(new Rectangle(635,50,60,20));
jLblSaturday.setText("Saturday");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblSaturday;
private JCheckBox getjChkBxSunday() {
if (jChkBxSunday == null) {
jChkBxSunday = new JCheckBox ("Sunday",false);
jChkBxSunday.setBounds(new Rectangle(100,50,20,20));
return jChkBxSunday;
private JCheckBox getjChkBxMonday() {
if (jChkBxMonday == null) {
jChkBxMonday = new JCheckBox ("Monday",false);
jChkBxMonday.setBounds(new Rectangle(180,50,20,20));
return jChkBxMonday;
private JCheckBox getjChkBxTuesday() {
if (jChkBxTuesday == null) {
jChkBxTuesday = new JCheckBox ("Tuesday",false);
jChkBxTuesday.setBounds(new Rectangle(260,50,20,20));
return jChkBxTuesday;
private JCheckBox getjChkBxWednesday() {
if (jChkBxWednesday == null) {
jChkBxWednesday = new JCheckBox ("Wedneday",false);
jChkBxWednesday.setBounds(new Rectangle(345,50,20,20));
return jChkBxWednesday;
private JCheckBox getjChkBxThursday() {
if (jChkBxThursday == null) {
jChkBxThursday = new JCheckBox ("Thursday",false);
jChkBxThursday.setBounds(new Rectangle(450,50,20,20));
return jChkBxThursday;
private JCheckBox getjChkBxFriday() {
if (jChkBxFriday == null) {
jChkBxFriday = new JCheckBox ("Friday",false);
jChkBxFriday.setBounds(new Rectangle(540,50,20,20));
return jChkBxFriday;
private JCheckBox getjChkBxSaturday() {
if (jChkBxSaturday == null) {
jChkBxSaturday = new JCheckBox ("Saturday",false);
jChkBxSaturday.setBounds(new Rectangle(610,50,20,20));
return jChkBxSaturday;
private JLabel getjLblEndDate()
if(jLblEndDate==null){
jLblEndDate = new JLabel ();
jLblEndDate.setBounds(new Rectangle(25,85,60,20));
jLblEndDate.setText("End Date");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblEndDate;
private JTextField getjTxtFEndDate() {
if (jTxtFEndDate == null) {
jTxtFEndDate = new JTextField();
//jTxtFRefNum.setBounds(new Rectangle(86, 51, 109, 20));
jTxtFEndDate.setBounds(new Rectangle(90,85,140,20));
jTxtFEndDate.setText("End Date");
return jTxtFEndDate;
private JLabel getjLblRecurrence()
if(jLblRecurrence==null){
jLblRecurrence = new JLabel ();
jLblRecurrence.setBounds(new Rectangle(25,25,80,20));
jLblRecurrence.setText("Recurrence ");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblRecurrence;
* buttonsPanel methods to get components
private JButton getjBtnCancel(){
if(jBttnCancel==null){
jBttnCancel=new JButton();
jBttnCancel.setBounds(new Rectangle(510,25,80,20));
jBttnCancel.setText("Cancel");
return jBttnCancel;
private JButton getjBtnSave(){
if(jBttnSave==null){
jBttnSave=new JButton();
jBttnSave.setBounds(new Rectangle(600,25,80,20));
jBttnSave.setText("Save");
return jBttnSave;
* OfficePanel methods to get components
private JLabel getjLblPanelOfficeType()
if(jLblPanelOfficeType==null){
jLblPanelOfficeType = new JLabel ();
jLblPanelOfficeType.setBounds(new Rectangle(25,25,60,20));
jLblPanelOfficeType.setText("Type");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblPanelOfficeType;
private JLabel getjLblPanelOfficeLocation()
if(jLblPanelOfficeLocation==null){
jLblPanelOfficeLocation = new JLabel ();
jLblPanelOfficeLocation.setBounds(new Rectangle(25,60,60,20));
jLblPanelOfficeLocation.setText("Location");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblPanelOfficeLocation;
public JComboBox getjCmbBxPanelOfficeLocation(){
if (jCmbBxPanelOfficeLocation == null){
String[] Officelocation = new String[] {"OakLand","San Fransisco"};
jCmbBxPanelOfficeLocation = new JComboBox (Officelocation);;
jCmbBxPanelOfficeLocation.setBounds(new Rectangle (90,60,140,20));
return jCmbBxPanelOfficeLocation;
private JComboBox getjCmbBxPanelOfficeType(){
if (jCmbBxPanelOfficeType == null){
String [] Officetype = new String[] {"Regular","OnCall"};
jCmbBxPanelOfficeType = new JComboBox (Officetype);
jCmbBxPanelOfficeType.setBounds(new Rectangle (90,25,140,20));
return jCmbBxPanelOfficeType;
* eventsPanel methods to get components
private JComboBox getjCmbBxEventType(){
if (jCmbBxEventType == null){
counselor = new String[] {"John","Jason"};
jCmbBxEventType = new JComboBox (counselor);
jCmbBxEventType.setBounds(new Rectangle (120,90,130,20));
return jCmbBxEventType;
private JComboBox getjCmbBxEventStartTimeHrs(){
if (jCmbBxEventStartTimeHrs == null){
counselor = new String[] {"12","00"};
jCmbBxEventStartTimeHrs = new JComboBox (counselor);
jCmbBxEventStartTimeHrs.setBounds(new Rectangle (290,90,40,20));
return jCmbBxEventStartTimeHrs;
private JComboBox getjCmbBxEventStartTimeMin(){
if (jCmbBxEventStartTimeMin == null){
counselor = new String[] {"00","02","03","04"};
jCmbBxEventStartTimeMin = new JComboBox (counselor);
jCmbBxEventStartTimeMin.setBounds(new Rectangle (355,90,40,20));
return jCmbBxEventStartTimeMin;
private JComboBox getjCmbBxEventEndTimeHrs(){
if (jCmbBxEventEndTimeHrs == null){
counselor = new String[] {"00","02","03","04"};
jCmbBxEventEndTimeHrs = new JComboBox (counselor);
jCmbBxEventEndTimeHrs.setBounds(new Rectangle (470,90,40,20));
return jCmbBxEventEndTimeHrs;
private JComboBox getjCmbBxEventEndTimeMin(){
if (jCmbBxEventEndTimeMin == null){
counselor = new String[] {"John","Jason","Sam"};
jCmbBxEventEndTimeMin = new JComboBox (counselor);
jCmbBxEventEndTimeMin.setBounds(new Rectangle (535,90,40,20));
return jCmbBxEventEndTimeMin;
private JLabel getjLblEventType()
if(jLblEventType==null){
jLblEventType = new JLabel ();
jLblEventType.setBounds(new Rectangle(150, 60,60,20));
jLblEventType.setText("Type");
//System.out.println(jLblCalender.getBounds());
//jLblCalender.setBounds(20, 20, 100, 16);
return jLblEventType;
private JLabel getjLblEvent()
if(jLblEvents==null){
jLblEvents = new JLabel ();
jLblEvents.setBounds(new Rectangle(325, 25, 60, 20));
jLblEvents.setText("Events");
//System.out.println(jLblCalender.getBounds());
//jLblCalender.setBounds(20, 20, 100, 16);
return jLblEvents;
private JLabel getjLblEventStartTime()
if(jLblEventStartTime==null){
jLblEventStartTime = new JLabel ();
jLblEventStartTime.setBounds(new Rectangle(310, 60,60,20));
jLblEventStartTime.setText("Start Time");
//System.out.println(jLblCalender.getBounds());
//jLblCalender.setBounds(20, 20, 100, 16);
return jLblEventStartTime;
private JLabel getjLblEventEndTime()
if(jLblEventEndTime==null){
jLblEventEndTime = new JLabel ();
jLblEventEndTime.setBounds(new Rectangle(500, 60,60,20));
jLblEventEndTime.setText("End Time");
//System.out.println(jLblCalender.getBounds());
//jLblCalender.setBounds(20, 20, 100, 16);
return jLblEventEndTime;
private JLabel getjLblEventStartTimeColon()
if(jLblEventStartTimeColon==null){
jLblEventStartTimeColon = new JLabel ();
jLblEventStartTimeColon.setBounds(new Rectangle(340,90,5,20));
jLblEventStartTimeColon.setText(":");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblEventStartTimeColon;
private JLabel getjLblEventEndTimeColon()
if(jLblEventEndTimeColon==null){
jLblEventEndTimeColon = new JLabel ();
jLblEventEndTimeColon.setBounds(new Rectangle(520,90,5,20));
jLblEventEndTimeColon.setText(":");
//jLblCalender.setBounds(0, 0, 33, 16);
return jLblEventEndTimeColon;
private JButton getjBtnAdd(){
if(jBttnAdd==null){
jBttnAdd=new JButton();
jBttnAdd.setBounds(new Rectangle(25,115,80,20));
jBttnAdd.setText("Add");
return jBttnAdd;
// Action Listeners
public void addCmbBoxCalenderListener (ItemListener eve){
if (this.jCmbBxCalender != null){
jCmbBxCalender.addItemListener(eve);
}Here is my controller code:
private class JCmbBxCalenderListener implements ActionListener {
public void actionPerformed( ActionEvent event ){
try{
if(((JComboBox) event.getSource()).getSelectedItem().equals("Office Calender")){
//calenderAdmin_View.jContentPane.revalidate();
calenderAdmin_View.jContentPane.remove(calenderAdmin_View.getcounselorPanel());
calenderAdmin_View.getcounselorPanel().setVisible(false);
calenderAdmin_View.jContentPane.add(calenderAdmin_View.getofficePanel(),1);
calenderAdmin_View.getofficePanel().setVisible(true);
calenderAdmin_View.jContentPane.validate();
else
if(((JComboBox) event.getSource()).getSelectedItem().equals("Counselor Calender"))
//calenderAdmin_View.jContentPane.revalidate();
calenderAdmin_View.jContentPane.remove(calenderAdmin_View.getofficePanel());
calenderAdmin_View.getofficePanel().setVisible(false);
calenderAdmin_View.jCo -
Exceptions happen when creating Actions
Hello,
I am new to the CAF and GP.
I installed NetWeaver2004s Sneak Preview SP9.
Then I made a user, and assigned rolls for using Guided Procedure.
I launched the GP design time, and choose Create Action from the contextual panel in the gallery.
But the following exceptions happen!
com.sap.engine.lib.xml.parser.ParserException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >:(:main:, row:1, col:491)
What is thought as a problem?
Where is the XML file?
Server:Windows 2003 Server Standard Edition SP2
CPU:Pentium4 2.8GHz
Memory:1GB
Detailed Error Information is following:
com.sap.tc.webdynpro.repository.RepositoryRuntimeException: Failed to get Related Model Object for the object ontoBrowser, relation UsedComponent.
at com.sap.tc.webdynpro.repository.model.DelegatorRepositoryModelClass.getRelatedModelObject(DelegatorRepositoryModelClass.java:640)
at com.sap.tc.webdynpro.progmodel.repository.IWDComponentUsageInfo$Implementation.getUsedComponentInternal(IWDComponentUsageInfo.java:216)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.<init>(ComponentUsage.java:67)
at com.sap.tc.webdynpro.progmodel.controller.Component.createComponentUsage(Component.java:822)
at com.sap.tc.webdynpro.progmodel.controller.Component.getComponentUsageInternal(Component.java:472)
at com.sap.tc.webdynpro.progmodel.controller.Component.subscribeToEvent(Component.java:695)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.subscribeSelfToEvent(DelegatingView.java:109)
at com.sap.caf.eu.gp.dt.grouping.wdp.InternalVGroup.wdDoInit(InternalVGroup.java:301)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:724)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:43)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.bind(ViewManager.java:555)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.makeVisible(ViewManager.java:789)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.onComponentCreated(ViewManager.java:258)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.fireComponentCreated(ComponentUsage.java:575)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponentInternal(ComponentUsage.java:175)
at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.createComponent(ComponentUsage.java:116)
at com.sap.caf.eu.gp.ui.hdt.activitydt.CActivityDT.initializeComponentData(CActivityDT.java:565)
at com.sap.caf.eu.gp.ui.hdt.activitydt.CActivityDT.internalInit(CActivityDT.java:412)
at com.sap.caf.eu.gp.ui.hdt.activitydt.wdp.InternalCActivityDT.internalInit(InternalCActivityDT.java:175)
at com.sap.caf.eu.gp.ui.hdt.activitydt.CActivityDTView.onPlugfromDispatch(CActivityDTView.java:185)
at com.sap.caf.eu.gp.ui.hdt.activitydt.wdp.InternalCActivityDTView.wdInvokeEventHandler(InternalCActivityDTView.java:145)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:826)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:873)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:144)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:711)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:665)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:232)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:152)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sap.tc.webdynpro.repository.RepositoryRuntimeException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >: (:main:, row:1, col:491)
at com.sap.tc.webdynpro.repository.persistence.xml.XMLConfigurationParserWriter.startParsing(XMLConfigurationParserWriter.java:178)
at com.sap.tc.webdynpro.repository.persistence.xml.XMLPersistence.doReadVMO(XMLPersistence.java:126)
at com.sap.tc.webdynpro.repository.persistence.RepositoryPersistence.readVMO(RepositoryPersistence.java:356)
at com.sap.tc.webdynpro.repository.persistence.RepositoryPersistence.doFindRepositoryObject(RepositoryPersistence.java:598)
at com.sap.tc.webdynpro.repository.persistence.RepositoryPersistence.findRepositoryObject(RepositoryPersistence.java:170)
at com.sap.tc.webdynpro.repository.model.Repository.findRepositoryObjectInternal(Repository.java:590)
at com.sap.tc.webdynpro.repository.model.RepositoryObjectRelation$XMLGuidWrapper.getModelObject(RepositoryObjectRelation.java:462)
at com.sap.tc.webdynpro.repository.persistence.RepositoryPersistence.getCurrentLayerObject(RepositoryPersistence.java:702)
at com.sap.tc.webdynpro.repository.model.Repository.getCurrentLayerObject(Repository.java:1483)
at com.sap.tc.webdynpro.repository.model.NonSharedRelationToOne.doMergeInheritedTarget(NonSharedRelationToOne.java:85)
at com.sap.tc.webdynpro.repository.model.NonSharedRelationToOne.mergeInheritedTargets(NonSharedRelationToOne.java:49)
at com.sap.tc.webdynpro.repository.model.RelationToOne.getTarget(RelationToOne.java:93)
at com.sap.tc.webdynpro.repository.model.AbstractRepositoryModelClass.getRelatedModelObject(AbstractRepositoryModelClass.java:234)
at com.sap.tc.webdynpro.repository.model.DelegatorRepositoryModelClass.getRelatedModelObject(DelegatorRepositoryModelClass.java:636)
... 60 more
Caused by: com.sap.engine.lib.xml.parser.NestedSAXParserException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >: (:main:, row:1, col:491)(:main:, row=1, col=491) -> com.sap.engine.lib.xml.parser.ParserException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >:(:main:, row:1, col:491)
at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:148)
at com.sap.tc.webdynpro.repository.persistence.xml.XMLConfigurationParserWriter.startParsing(XMLConfigurationParserWriter.java:166)
... 73 more
Caused by: com.sap.engine.lib.xml.parser.ParserException: XMLParser: Bad attribute list. Expected WhiteSpace, / or >:(:main:, row:1, col:491)
at com.sap.engine.lib.xml.parser.XMLParser.scanAttList(XMLParser.java:1590)
at com.sap.engine.lib.xml.parser.XMLParser.scanElement(XMLParser.java:1710)
at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2843)
at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:229)
at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:145)
at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:160)
at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:261)
at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:280)
at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:342)
at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125)
... 74 more
Regards,
HiromitsuHi,
I found the note 990460.
Does my case apply to this?
Where can I get the "SAP-EU Netweaver 7.0 SP 9 Patch 1"?
Regards,
Hiromitsu
Maybe you are looking for
-
How make a jCheckBox editable in a table with personal TableModel?
Hi, first of all sorry about my English, ;) I made my own Table Model with this simple characteristics: - All rows isn't editables. - Backgound colors changed. - Get a Object[][] and Strin[] in his constructor. - Accept booleans type and put in the c
-
I am reloading my images into PSE 9 after a hard drive crash and although it recognizes my tags it only appears to assign the tags about to about 10% of the images resulting in a lot more work for me. I use Windows XP service pack 3 and have 3GB of R
-
Hi all, I have Payment file like 'Cheque Payment File' , 'Cash Payment File' and so on... current I am using my own program to have a Paymnet lot (Cheque Lot/Cash Lot) then posting the lot with Transaction FPB3. But now I need to schedule my coming p
-
After turning off private browsing Safari crashes immediately upon launch.
After turning off private browsing Safari crashes immediately upon launch. I tried soft-resetting, and clearing my cookies and cache. I basically launches in private browsing mode and then immediately tries to switch to regular browsing. When the scr
-
HT201342 File Sharing with multiple devices
How can we file share with multiple iPads from the Mac in the classroom? I've used instashare and it works really well, but to share with 25+ iPads would be quite time consuming. Is there a way to send to all in one go?