Shared components between applications
There are ways to create shared components between applications?
Example:
menu list shared between multiple applications.
Version Apex: 4.0.1
I would seriously question why you want to export pages from dev to qa or qa to prod. Why you are NOT looking at using a version control system and exporting from that to the different environments would be a good question to tackle...
Anyone who use the approach of copying pages between environments is just asking for trouble, since there WOULD and Could be the chance of NOT migrating all changes between environments that have occurred between versions..
I for one would be VERY leery of such process, and have dealt with a shop like this.. Glad I am NOT There anymore..
Thank you,
Tony Miller
Ruckersville, VA
Similar Messages
-
Sharing tables between relational models
Can I share (not copy) table between two relational models in SQL Developer Data Modeler? Something like sharing tables between application systems in Oracle Designer. I have one database schema for reusable kernel of many applications and I want to have one relational model for it. And I need to use tables from kertnel in other applications (database schemas). I need for example to make FK between application and kernel table. How can I do it?
Hi,
you can use drag&drop from browser to diagram of target model in order to do that. Table becomes read-only in target model. You can use "Synchronize remote objects" to get actual status of such "remote" table
Philip -
Sharing Functions Across Applications(containers)
Can anyone help with a final word on sharing functions between
applications?
I have read many conflicting accounts on the ability in 6i to share
objects across application systems through the use of common functions,
global process steps, referencing, or shortcuts. Best case scenario, I
would like to share functions across containers, include these functions
in multiple process models, and be able to create process flows between
functions. Is this possible? Is the bug 1787721 which doesn't allow
common functions across applications a true bug, or is this the new
functionality in 6i?
Thanks for the help.Hi Cynthia,
If I understood, you want to know what the steps you need to
follow to share a object, but before it, you need to know a
basic new characteristc at the Designer6i.
The basic characteristc that you must know is that you don't
share objects to application from other one anymore, you create
a reference to other objects in another Application from other
one that already exists. Althoug you must pay attention that you
can create references to objects between applications when they
are in the same Workarea.
It's too simple.
Put the cursor on the Application that want to create reference
from a previous existing object. Choose the option "Create
Reference". Choose the object that you want to reference (Use
the filter if you want) and than it will be work.
I hope that I had to help you.
Regards,
Marcos Vinmcius B. Xavier
E-mail : [email protected] -
Non-application specific static files not visible in shared components
Hello,
We recently upgraded to APEX 4.0.2.00.07. In the past we have uploaded a number of static files with no specific application linked to them.
Now, when I search on these files using Shared Components -> Static Files, I don't find them back.
But, if I directly query the view APEX_WORKSPACE_FILES (using the APEX schema owner), I see all the files. They have APPLICATION_ID = 0 and APPLICATION_NAME is empty.
Is this a bug? I couldn't reproduce this with newly added static files, whether I specify an application or not.
Matthias
Edited by: mhoys on Mar 1, 2011 11:40 AMOwen:
Excellent idea/perspective...I did not think of that. Each of our forms/screens has a seperate class file. Each class file has a CreateForm() routine that is called when an instance of the class is intiated behind the menu selection.
Here is a block of code In Main.vb I use to execute a menu selection:
Case "MPA"
'8/30/07 EJD - Work Order Parameters Screen
If GetFormCount(G_MPAMaint_Form_Type).ToString = "0" Then
Dim MPAForm As New MPA
BubbleEvent = False
Else
UpdateStatus("Another MPA maintenance screen is already open", SAPbouiCOM.BoStatusBarMessageType.smt_Error)
BubbleEvent = False
End If
So, I can utilize this code in the case statement where I was doing the ActivateMenu if I hear you right. Now, can you help me with how I would pass the
variables instead of making them Public Shared in the Main class? Or is it ok to expose them that way?
I Appreciate the help,
Ed -
I cannot access my iphoto application on my imac as it says I have made changes in Iphoto using a newer version. We have recently purchased a Macbook Air and this has Lion (as opposed to leopard on the iMac) and we are sharing photos between the 2. I am awaiting the upgrade discs for snow leopard and then to Lion for the iMac but is there a way to access my photos until this arrives?
Do a malware check with several malware scanning programs on the Windows computer.
Please scan with all programs because each program detects different malware.
All these programs have free versions.
Make sure that you update each program to get the latest version of their databases before doing a scan.
*Malwarebytes' Anti-Malware:<br>http://www.malwarebytes.org/mbam.php
*AdwCleaner:<br>http://www.bleepingcomputer.com/download/adwcleaner/<br>http://www.softpedia.com/get/Antivirus/Removal-Tools/AdwCleaner.shtml
*SuperAntispyware:<br>http://www.superantispyware.com/
*Microsoft Safety Scanner:<br>http://www.microsoft.com/security/scanner/en-us/default.aspx
*Windows Defender:<br>http://windows.microsoft.com/en-us/windows/using-defender
*Spybot Search & Destroy:<br>http://www.safer-networking.org/en/index.html
*Kasperky Free Security Scan:<br>http://www.kaspersky.com/security-scan
You can also do a check for a rootkit infection with TDSSKiller.
*Anti-rootkit utility TDSSKiller:<br>http://support.kaspersky.com/5350?el=88446
See also:
*"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked -
Shared Components Application Processes - (Documentation for Reset
There's a "Reset" button on the page, Application Builder > ... > Shared Components > Application Processes. But before everyone jumps in to tell me that it does a reset ... that's not my question.
My question is: <font color="green"><font size="4">Where is this button documented, please?</font><font color="black">{Thanks -- Howard (newbie)
</font>Hi,
If you like purge other users sessions this might help
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21678/aadm_mg_sessions.htm#CHDHBFBJ
But do not mix this idea to your other post about session
Want to tie initialization to login using some reasonably easy way.
Regards,
Jari
My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai -
Shared Components option missing from Applications tab's Create New
The Shared Components option is missing from the Applications tab's Create New... list. As anyone else experienced this? The installation completed without errors.
Never mind, I found the Shared Components option.
-
Can shared components be shared among different applications within APEX
Can shared components be shared among different applications within APEX ?
-Louis Rosa
Florida Center for Library Automation (FCLA)
Gainesville,FLNot entirely true.
Some like LOVs, Authorizations, Authentications can be shared amongst applications in the same workspace.
Varad -
4.2 Application- BuilderApplication- APPID - Shared Components- Themes
Hello Apex team,
The page for:
Application ->BuilderApplication -> <APPID> -> Shared Components ->Themes
seems to messed up somehow.
Regards
AndreHi andreml,
Thank you for the feedback. Do you mean page 4000:260, if so I just took a look and I can't see anything messed up. Is that the right page number? And can you send me a screenshot?
Regards,
Anthony -
Moving Pages Between Applications
When I first began using AE, I created many different applications as request came in. Now, this is getting cumbersome as each application requires the user to login and logout. I want, instead, to create a single application and to move the pages from all the various applications into this single application. This will allow the user to authenticate once and then use all the application areas.
The problem is that while one may import a page or application (according to the drop down window), there does not appear to be any way to export only a page.
Is there anyway that I can move the pages from all these individual applications into a new application without having to recode all of them? Is there no way to export pages from one application then import them into another?
-JoeWhen I first began using AE, I created many different
applications as request came in. Now, this is getting
cumbersome as each application requires the user to
login and logout. I want, instead, to create a single
application and to move the pages from all the
various applications into this single application.
This will allow the user to authenticate once and
then use all the application areas.This is not really the case. If you want users to be able to use multiple applications with a single login you simply need to set a common cookie on each of the applications that will share the same login credentials.
In AppEx, go to Shared Components>Authentication Schemes and click on the active authentication scheme. Near the bottom of the 'Edit Authentication Scheme' page there is a section for Cookie Attributes. Simply enter any name you like for the cookie and save it. Do the same for your other applications wherever you want to share logins.
The problem is that while one may import a page or
application (according to the drop down window),
there does not appear to be any way to export only a
page. You can export a single page - but the utility of doing so is limited since you can't import a single page export into an application different from which it came. Odd, I know. But that seems to be the way it is - for now.
Is there anyway that I can move the pages from all
these individual applications into a new application
without having to recode all of them? Is there no way
to export pages from one application then import them
into another?
-JoeFor what it's worth (i.e. my 2 cents) I don't really like the idea of create a single monolithic application with lots of unrelated pages in the same application. I can get too confusing too easily - unless you use a lot of discipline in grouping and naming your pages.
I like to create smaller special purpose apps that are more manageable and jump across applications wherever I need to. This is in fact how AppEx itself works. If you watch the application IDs on the address bar as you switch between the application builder, sql workshop and the administration pages you can see that they are indeed different applications - but all integrated quite nicely.
Earl -
Sharing information between tiled view and view bean
I have come across one more problem. I have a search result
page. This search result page has a static text field and a repeated group
(I simplified the page description, for explanation purpose). In the NetD
implementation they are maintaining a page level attribute (say boolean
haveSenisitiveCustomers) and setting this attribute in the
afterDataObjectExecute event. (This data object is associated with the
repeated). In end display event of static text field, they are displaying
message say " due to Registration type, not all customers meeting the
criteria are listed") if the haveSensitiveCustomers flag is set.
After Migration, the boolean flag and static Text Field movedto
SearchResultViewBean and afterDataObjectExecuteEvent has moved to
TiledViewBean. Actual processing done is more complicated than this
explanation. However, it boils down to sharing information between
tiledViewBean and its parent bean. How do we achieve this in the Migrated
Application?
One way is to add getter methods in the child tiled view bean( to
access in parent view bean, call getRepeated1 and cast to the actual type
and invoke the get methods)Probably the typical solution (I say typical because I don't yet know) will
be to do what you suggest: provide methods between views that can be used to
determine the state needed for processing like this.
However, let me alert you to something that's different than ND, and which
may cause you some trouble. In ND, all retrieving DataObjects associated
with a page executed at one time, and the afterDataObjectExcecuteEvent fired
before any display processing began. However, in JATO, tiled views are
independent objects, and any models associated with them only execute when
the tiled view is first displayed.
Therefore, if the static test field you refer to appears in the page before
the tiled view, then the tiled view will not have executed its associated
model before the static text field is rendered. You will never see the
static text field display the text you want because you won't have the
information at display time. (If the text field appears after the repeated,
then it's not problem, as the display of the tiled view will have executed
the associate model before the field displays.)
The solution is to manually reference the tiled view and its associate model
before they would normally execute. You would execute the model and set the
tiled view's setAutoRetrieveEnabled() to false to prevent it from executing
the model a second time. Perhaps the easiest thing to do would be this:
beforeStaticTextDisplay(...)
// Force the tiled view to execute the associated model
Repeated1TiledView tiledView=
(Repeated1TiledView)getChild("Repeated1");
tiledView.beginDisplay();
tiledView.setAutoRetrieveEnabled(false);
Although the beginDisplay() method will be executed twice in this case (once
deliberately, above, and later during actual display), there should be no
overhead. The beginDisplay() method doesn't do anything anyway except
execute associated auto-retrieving models and fire the
afterAllModelsExecute() event.
Mike, do you concur or have any comments?
This explanation rests on the understanding of a number of other subjects,
some of which you may not be fully familiar with. Feel free to ask further
questions about this explanation.
Todd
Todd Fast
Senior Engineer
Sun/Netscape Alliance
todd.fast@e...I have come across one more problem. I have a search result
page. This search result page has a static text field and a repeated group
(I simplified the page description, for explanation purpose). In the NetD
implementation they are maintaining a page level attribute (say boolean
haveSenisitiveCustomers) and setting this attribute in the
afterDataObjectExecute event. (This data object is associated with the
repeated). In end display event of static text field, they are displaying
message say " due to Registration type, not all customers meeting the
criteria are listed") if the haveSensitiveCustomers flag is set.
After Migration, the boolean flag and static Text Field movedto
SearchResultViewBean and afterDataObjectExecuteEvent has moved to
TiledViewBean. Actual processing done is more complicated than this
explanation. However, it boils down to sharing information between
tiledViewBean and its parent bean. How do we achieve this in the Migrated
Application?
One way is to add getter methods in the child tiled view bean( to
access in parent view bean, call getRepeated1 and cast to the actual type
and invoke the get methods)Probably the typical solution (I say typical because I don't yet know) will
be to do what you suggest: provide methods between views that can be used to
determine the state needed for processing like this.
However, let me alert you to something that's different than ND, and which
may cause you some trouble. In ND, all retrieving DataObjects associated
with a page executed at one time, and the afterDataObjectExcecuteEvent fired
before any display processing began. However, in JATO, tiled views are
independent objects, and any models associated with them only execute when
the tiled view is first displayed.
Therefore, if the static test field you refer to appears in the page before
the tiled view, then the tiled view will not have executed its associated
model before the static text field is rendered. You will never see the
static text field display the text you want because you won't have the
information at display time. (If the text field appears after the repeated,
then it's not problem, as the display of the tiled view will have executed
the associate model before the field displays.)
The solution is to manually reference the tiled view and its associate model
before they would normally execute. You would execute the model and set the
tiled view's setAutoRetrieveEnabled() to false to prevent it from executing
the model a second time. Perhaps the easiest thing to do would be this:
beforeStaticTextDisplay(...)
// Force the tiled view to execute the associated model
Repeated1TiledView tiledView=
(Repeated1TiledView)getChild("Repeated1");
tiledView.beginDisplay();
tiledView.setAutoRetrieveEnabled(false);
Although the beginDisplay() method will be executed twice in this case (once
deliberately, above, and later during actual display), there should be no
overhead. The beginDisplay() method doesn't do anything anyway except
execute associated auto-retrieving models and fire the
afterAllModelsExecute() event.
Mike, do you concur or have any comments?
This explanation rests on the understanding of a number of other subjects,
some of which you may not be fully familiar with. Feel free to ask further
questions about this explanation.
Todd
Todd Fast
Senior Engineer
Sun/Netscape Alliance
todd.fast@e... -
Images uploaded in Shared Components not displaying
We recently installed version 4.2.1 on a new dedicated server. The entire setup went through without error.
The default images found in apex (/i/apex/builder/ etc.) are all visible. But when we upload any image through Shared Components > Images do not show on screen. An entry is available in the report on the Images page but the image itself is blank. The URL of the image is shown as : "+http://hostname:port/apex/wwv_flow_file_mgr.get_file?p_security_group_id=100000&p_flow_id=100&p_fname=Sampleimage.jpg+". The image is available in the wwv_flow_file_objects$ table and can be viewed through the BLOB_CONTENT column. But it is not visible in the front end.
Is there a solution to this issue?
Thanks,
AniketAniketP wrote:
We recently installed version 4.2.1 on a new dedicated server. The entire setup went through without error.
The default images found in apex (/i/apex/builder/ etc.) are all visible. But when we upload any image through Shared Components > Images do not show on screen. An entry is available in the report on the Images page but the image itself is blank. The URL of the image is shown as : "+http://hostname:port/apex/wwv_flow_file_mgr.get_file?p_security_group_id=100000&p_flow_id=100&p_fname=Sampleimage.jpg+". The image is available in the wwv_flow_file_objects$ table and can be viewed through the BLOB_CONTENT column. But it is not visible in the front end.Is the image associated with an application (No Application Associated)? If not then consider using the #APP_IMAGES# substitution istring nstead of #WORKSPACE_IMAGES# -
How to pass/share components between different JPanels/Container
Dear Friends,
I know here a lot Java Guru, I met a problem below.
How can I pass components between different JPanels??
here, ListPanelMain.java is main,
When I click a tree node in splitPane, I can see all its children on the right splitpane, but I hope they can be seen on another Panel called "ListRightPane.java"
How to do it??
Why cannot pass??
[1]. main Program:
package swing.com.test.test;
import javax.swing.JFrame;
import java.awt.BorderLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.JTextArea;
import java.io.Serializable;
import swing.com.test.test.ListPanel;
import java.awt.GridLayout;
public class ListPanelMain implements java.io.Serializable{
private JFrame frame;
* Launch the application
* @param args
public static void main(String args[]) {
try {
ListPanelMain window = new ListPanelMain();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
* Create the application
public ListPanelMain() {
initialize();
* Initialize the contents of the frame
private void initialize() {
frame = new JFrame("FileTreePanelMain");
frame.setBounds(100, 100, 900, 675);
// FieTreePanelComm ftreecomm = new FieTreePanelComm();
ListPanel ftree = new ListPanel("C:\\");
// ListAllFile ftree = new ListAllFile("C:\\");
// FileTreePanelText fileTreePanelText = new FileTreePanelText(ftreecomm);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
final JPanel panel = new JPanel();
panel.setLayout(new GridLayout(0, 2));
frame.getContentPane().add(panel, BorderLayout.CENTER);
// final JSplitPane splitPane = new JSplitPane();
// frame.getContentPane().add(splitPane, BorderLayout.CENTER);
// splitPane.setLeftComponent(ftree);
panel.add(ftree);
final ListRightPanel listRightPanel = new ListRightPanel(ftree);
//splitPane.setRightComponent(listRightPanel);
panel.add(listRightPanel);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
frame.pack();
frame.setVisible(true);
[2]. Program 2:
package swing.com.test.test;
//File System Tree
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridLayout;
import java.io.File;
import java.util.Iterator;
import java.util.Vector;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTextArea;
import javax.swing.JTree;
import javax.swing.JPanel;
import javax.swing.event.TreeModelEvent;
import javax.swing.event.TreeModelListener;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreePath;
import java.io.Serializable;
public class ListPanel extends JPanel implements Serializable{
protected JTree fileTree;
private FileSystemModel fileSystemModel;
private JTextArea ltextArea = new JTextArea();
protected JTextArea fileDetailsTextArea = new JTextArea();
private String str = "";
public String getlTextArea() {
//textArea.getText();
return str;
public String setlTextArea(String ta) {
ltextArea.setText(ta);
str = ta;
return str;
public ListPanel(String directory) {
//super("JTree FileSystem Viewer");
setLayout(new BorderLayout());
final JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
add(panel, BorderLayout.CENTER);
fileDetailsTextArea.setEditable(false);
fileSystemModel = new FileSystemModel(new File(directory));
fileTree = new JTree(fileSystemModel);
fileTree.setEditable(true);
fileTree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent event) {
System.out.println("1. What we save is: getlTextArea() =" + getlTextArea() );
File file = (File) fileTree.getLastSelectedPathComponent();
fileDetailsTextArea.setText(getFileDetails(file));
final ListRightPanel lrp = new ListRightPanel(this);
lrp.textArea.setText(getFileDetails(file));
setlTextArea(getFileDetails(file));
System.out.println("2. What we save is: getlTextArea() =" + getlTextArea() );
final JSplitPane splitPane = new JSplitPane();
panel.add(splitPane, BorderLayout.CENTER);
final JPanel panel_1 = new JPanel();
splitPane.setLeftComponent(panel_1);
panel_1.add(new JScrollPane(fileTree));
final JPanel panel_2 = new JPanel();
splitPane.setRightComponent(panel_2);
panel_2.add(new JScrollPane(fileDetailsTextArea));
setVisible(true);
private String getFileDetails(File file) {
if (file == null)
return "";
StringBuffer buffer = new StringBuffer();
if (file.listFiles()!=null){
for (int i=0; i< file.listFiles().length; i++){
buffer.append(((file.listFiles())) + "\n");
System.out.println("List all files");
return buffer.toString();
public static void main(String args[]) {
new ListPanel("c:\\");
class FileSystemModel implements TreeModel {
private File root;
private Vector listeners = new Vector();
public FileSystemModel(File rootDirectory) {
root = rootDirectory;
public Object getRoot() {
return root;
public Object getChild(Object parent, int index) {
File directory = (File) parent;
String[] children = directory.list();
return new TreeFile(directory, children[index]);
public int getChildCount(Object parent) {
File file = (File) parent;
if (file.isDirectory()) {
String[] fileList = file.list();
if (fileList != null)
return file.list().length;
return 0;
public boolean isLeaf(Object node) {
File file = (File) node;
return file.isFile();
public int getIndexOfChild(Object parent, Object child) {
File directory = (File) parent;
File file = (File) child;
String[] children = directory.list();
for (int i = 0; i < children.length; i++) {
if (file.getName().equals(children[i])) {
return i;
return -1;
public void valueForPathChanged(TreePath path, Object value) {
File oldFile = (File) path.getLastPathComponent();
String fileParentPath = oldFile.getParent();
String newFileName = (String) value;
File targetFile = new File(fileParentPath, newFileName);
oldFile.renameTo(targetFile);
File parent = new File(fileParentPath);
int[] changedChildrenIndices = { getIndexOfChild(parent, targetFile) };
Object[] changedChildren = { targetFile };
fireTreeNodesChanged(path.getParentPath(), changedChildrenIndices, changedChildren);
private void fireTreeNodesChanged(TreePath parentPath, int[] indices, Object[] children) {
TreeModelEvent event = new TreeModelEvent(this, parentPath, indices, children);
Iterator iterator = listeners.iterator();
TreeModelListener listener = null;
while (iterator.hasNext()) {
listener = (TreeModelListener) iterator.next();
listener.treeNodesChanged(event);
public void addTreeModelListener(TreeModelListener listener) {
listeners.add(listener);
public void removeTreeModelListener(TreeModelListener listener) {
listeners.remove(listener);
private class TreeFile extends File {
public TreeFile(File parent, String child) {
super(parent, child);
public String toString() {
return getName();
[3]. Program 3:
package swing.com.test.test;
import java.awt.BorderLayout;
import java.io.File;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTree;
import javax.swing.event.TreeModelEvent;
import javax.swing.event.TreeModelListener;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreePath;
import java.io.Serializable;
public class ListRightPanel extends JPanel implements TreeSelectionListener, Serializable{
protected JTextArea textArea;
// protected ListAllFile laf;
private String str = "";
public String getlTextArea() {
//textArea.getText();
return str;
public String setlTextArea(String ta) {
str = ta;
return str;
* Create the panel
public ListRightPanel(ListPanel laff) {
super();
setLayout(new BorderLayout());
final JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
add(panel, BorderLayout.CENTER);
textArea = new JTextArea();
final String st = laff.getlTextArea();
System.out.println("####################################");
System.out.println("st=" + st);
laff.fileTree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent event) {
//laff.textArea.setText(getFileDetails(file));
textArea.setText(getlTextArea());
System.out.println("ListRightPanel Was Invoked from ListPanel!!getlTextArea() =" + getlTextArea() );
System.out.println("st=" + st);
panel.add(textArea, BorderLayout.CENTER);
public void valueChanged(TreeSelectionEvent e){};
It is runnable program, just compile and run it in Console is ok,
Regards
SunnyThnaks, code post again, see
[1]. package swing.com.test.test;
import javax.swing.JFrame;
import java.awt.BorderLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.JTextArea;
import java.io.Serializable;
import swing.com.test.test.ListPanel;
import java.awt.GridLayout;
public class ListPanelMain implements java.io.Serializable{
private JFrame frame;
* Launch the application
* @param args
public static void main(String args[]) {
try {
ListPanelMain window = new ListPanelMain();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
* Create the application
public ListPanelMain() {
initialize();
* Initialize the contents of the frame
private void initialize() {
frame = new JFrame("FileTreePanelMain");
frame.setBounds(100, 100, 900, 675);
// FieTreePanelComm ftreecomm = new FieTreePanelComm();
ListPanel ftree = new ListPanel("C:\\");
// ListAllFile ftree = new ListAllFile("C:\\");
// FileTreePanelText fileTreePanelText = new FileTreePanelText(ftreecomm);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
final JPanel panel = new JPanel();
panel.setLayout(new GridLayout(0, 2));
frame.getContentPane().add(panel, BorderLayout.CENTER);
// final JSplitPane splitPane = new JSplitPane();
// frame.getContentPane().add(splitPane, BorderLayout.CENTER);
// splitPane.setLeftComponent(ftree);
panel.add(ftree);
final ListRightPanel listRightPanel = new ListRightPanel(ftree);
//splitPane.setRightComponent(listRightPanel);
panel.add(listRightPanel);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
frame.pack();
frame.setVisible(true);
}[2] Program 2
package swing.com.test.test;
//File System Tree
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridLayout;
import java.io.File;
import java.util.Iterator;
import java.util.Vector;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTextArea;
import javax.swing.JTree;
import javax.swing.JPanel;
import javax.swing.event.TreeModelEvent;
import javax.swing.event.TreeModelListener;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreePath;
import java.io.Serializable;
public class ListPanel extends JPanel implements Serializable{
protected JTree fileTree;
private FileSystemModel fileSystemModel;
private JTextArea ltextArea = new JTextArea();
protected JTextArea fileDetailsTextArea = new JTextArea();
private String str = "";
public String getlTextArea() {
//textArea.getText();
return str;
public String setlTextArea(String ta) {
ltextArea.setText(ta);
str = ta;
return str;
public ListPanel(String directory) {
//super("JTree FileSystem Viewer");
setLayout(new BorderLayout());
final JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
add(panel, BorderLayout.CENTER);
fileDetailsTextArea.setEditable(false);
fileSystemModel = new FileSystemModel(new File(directory));
fileTree = new JTree(fileSystemModel);
fileTree.setEditable(true);
fileTree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent event) {
System.out.println("1. What we save is: getlTextArea() =" + getlTextArea() );
File file = (File) fileTree.getLastSelectedPathComponent();
fileDetailsTextArea.setText(getFileDetails(file));
final ListRightPanel lrp = new ListRightPanel(this);
lrp.textArea.setText(getFileDetails(file));
setlTextArea(getFileDetails(file));
System.out.println("2. What we save is: getlTextArea() =" + getlTextArea() );
final JSplitPane splitPane = new JSplitPane();
panel.add(splitPane, BorderLayout.CENTER);
final JPanel panel_1 = new JPanel();
splitPane.setLeftComponent(panel_1);
panel_1.add(new JScrollPane(fileTree));
final JPanel panel_2 = new JPanel();
splitPane.setRightComponent(panel_2);
panel_2.add(new JScrollPane(fileDetailsTextArea));
setVisible(true);
private String getFileDetails(File file) {
if (file == null)
return "";
StringBuffer buffer = new StringBuffer();
if (file.listFiles()!=null){
for (int i=0; i< file.listFiles().length; i++){
buffer.append(((file.listFiles())) + "\n");
System.out.println("List all files");
return buffer.toString();
public static void main(String args[]) {
new ListPanel("c:\\");
class FileSystemModel implements TreeModel {
private File root;
private Vector listeners = new Vector();
public FileSystemModel(File rootDirectory) {
root = rootDirectory;
public Object getRoot() {
return root;
public Object getChild(Object parent, int index) {
File directory = (File) parent;
String[] children = directory.list();
return new TreeFile(directory, children[index]);
public int getChildCount(Object parent) {
File file = (File) parent;
if (file.isDirectory()) {
String[] fileList = file.list();
if (fileList != null)
return file.list().length;
return 0;
public boolean isLeaf(Object node) {
File file = (File) node;
return file.isFile();
public int getIndexOfChild(Object parent, Object child) {
File directory = (File) parent;
File file = (File) child;
String[] children = directory.list();
for (int i = 0; i < children.length; i++) {
if (file.getName().equals(children[i])) {
return i;
return -1;
public void valueForPathChanged(TreePath path, Object value) {
File oldFile = (File) path.getLastPathComponent();
String fileParentPath = oldFile.getParent();
String newFileName = (String) value;
File targetFile = new File(fileParentPath, newFileName);
oldFile.renameTo(targetFile);
File parent = new File(fileParentPath);
int[] changedChildrenIndices = { getIndexOfChild(parent, targetFile) };
Object[] changedChildren = { targetFile };
fireTreeNodesChanged(path.getParentPath(), changedChildrenIndices, changedChildren);
private void fireTreeNodesChanged(TreePath parentPath, int[] indices, Object[] children) {
TreeModelEvent event = new TreeModelEvent(this, parentPath, indices, children);
Iterator iterator = listeners.iterator();
TreeModelListener listener = null;
while (iterator.hasNext()) {
listener = (TreeModelListener) iterator.next();
listener.treeNodesChanged(event);
public void addTreeModelListener(TreeModelListener listener) {
listeners.add(listener);
public void removeTreeModelListener(TreeModelListener listener) {
listeners.remove(listener);
private class TreeFile extends File {
public TreeFile(File parent, String child) {
super(parent, child);
public String toString() {
return getName();
[3] Program 3:
package swing.com.test.test;
import java.awt.BorderLayout;
import java.io.File;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTree;
import javax.swing.event.TreeModelEvent;
import javax.swing.event.TreeModelListener;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreePath;
import java.io.Serializable;
public class ListRightPanel extends JPanel implements TreeSelectionListener, Serializable{
protected JTextArea textArea;
// protected ListAllFile laf;
private String str = "";
public String getlTextArea() {
//textArea.getText();
return str;
public String setlTextArea(String ta) {
str = ta;
return str;
* Create the panel
public ListRightPanel(ListPanel laff) {
super();
setLayout(new BorderLayout());
final JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
add(panel, BorderLayout.CENTER);
textArea = new JTextArea();
final String st = laff.getlTextArea();
System.out.println("####################################");
System.out.println("st=" + st);
laff.fileTree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent event) {
//laff.textArea.setText(getFileDetails(file));
textArea.setText(getlTextArea());
System.out.println("ListRightPanel Was Invoked from ListPanel!!getlTextArea() =" + getlTextArea() );
System.out.println("st=" + st);
panel.add(textArea, BorderLayout.CENTER);
public void valueChanged(TreeSelectionEvent e){};
}You can try this one, thanks again
sunny -
How to Clear Cache for an Old Static File in Shared Components
Hello,
I am using Apex 4.1.1.00.23, HTTP Server with mod_plsql, and Oracle Database 10.2.0.5.0.
My situation is as follow:
I have a CSS static file in the shared components that is used in different applications. I recently modified the CSS file, but the changes are not reflected in my applications.
I tried clearing the cache of my browsers, deleting the file from shared components and creating a new one with the same name, and nothing is working.
Using Firebug, I can see that the file used in my pages is the old version of it. Anyone can tell me if the server is caching the file and how can I clear it?
Thank you for your help,
ErickWhat kind of document is it (e.g. is this a parsed
HTML file, or a static file)? have you adjusted your
cache settings with the nsfc.conf file? have you
enabled the nsfc report? Are the files stored on NFS
volumes?
Regardless, you can force the cache to be flushed by
enabling the nsfc report, and then accessing the URI
like so:
/nsfc?restart
See the Performance and Tuning Guide:
http://docs.sun.com/source/817-1836-10/perftune.html#w
p17232I tried to to do this. Did n't worked. /nsfc?restart is not working for me. I have IPlanet 6.1 Webserver version. Without having any backend server running, I am getting JSPs displayed from cache!! Please help me out. -
Shared Components Images Create Image does not work
I am using oracle XE on Windows XP.
Uploading an image for an application does not work.
Home>Application Builder>Application 105>Shared Components>Images>Create Image
It goes wrong when I try to upload the image:
- Iexplorer gives an error 404 after pressing the Upload button.
- Firefox just gives an empty page.
When I try to refresh the resulting page (do another post) I get the following error:
Expecting p_company or wwv_flow_company cookie to contain security group id of application owner.
Error ERR-7621 Could not determine workspace for application (:) on application accept.Hi Dietmar,
After setting the language to English (USA) [en-us] it works for +- 50 % of the uploads.
Below is my tracefile.
Dump file e:\oraclexe\app\oracle\admin\xe\bdump\xe_s001_2340.trc
Wed Nov 23 19:03:17 2005
ORACLE V10.2.0.1.0 - Beta vsnsta=1
vsnsql=14 vsnxtr=3
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta
Windows XP Version V5.1 Service Pack 2
CPU : 2 - type 586
Process Affinity : 0x00000000
Memory (Avail/Total): Ph:267M/1014M, Ph+PgF:1431M/2444M, VA:1578M/2047M
Instance name: xe
Redo thread mounted by this instance: 1
Oracle process number: 15
Windows thread id: 2340, image: ORACLE.EXE (S001)
------ cut ------
*** 2005-11-23 19:50:44.718
*** ACTION NAME:() 2005-11-23 19:50:44.718
*** MODULE NAME:() 2005-11-23 19:50:44.718
*** CLIENT ID:() 2005-11-23 19:50:44.718
*** SESSION ID:(26.18) 2005-11-23 19:50:44.718
Embedded PL/SQL Gateway: /htmldb/wwv_flow.accept HTTP-404 ORA-01846: not a valid day of the week
*** SESSION ID:(27.19) 2005-11-23 19:50:51.937
Embedded PL/SQL Gateway: /htmldb/wwv_flow.accept HTTP-404 ORA-01846: not a valid day of the week
*** 2005-11-23 19:50:59.078
*** SERVICE NAME:(SYS$USERS) 2005-11-23 19:50:59.078
*** SESSION ID:(27.21) 2005-11-23 19:50:59.078
Embedded PL/SQL Gateway: Unknown attribute 3
Embedded PL/SQL Gateway: Unknown attribute 3
Strange error... there is nothing in my form that is related to dates...
Kind regards,
Pieter
Maybe you are looking for
-
hi, can u please tell me how sy-tabix,sy-index works in a loop.what is the difference between them. thanks in advance, shekar
-
Newbie Question: Why can't I open my iMovie project in FCP?
Hello all-- I'm sure some variation of this question has been posted a bajillion times but I can't seem to find the answer. At this point I feel like a damsel in distress. Rescue me? I've been working with iMovie for about two years now and I've rece
-
i've noticed that when when i'm watching movie trailers in front row the album art for the movie trailer is blurry and has a low resolution, lower than what it's suppossed to be. how do i make the image more clear?
-
My iPad keeps crashing when I am online, looking something up on Google or using an App. Can any solve my issue?
-
Hi Everybody I'm using NW04s (7.0) sp 11 and I'm having problem using an <a href="http://sourceforge.net/projects/jexcelapi/">external jar</a> for reading and writing to excel files. (I already used this jar with a regluar WD project and now I want t