Redraw a JPanel during runtime
Hi there,
Im trying to redraw a whole JPanel during runtime.
So basically I have this panel:
public JPanel panel1 = new JPanel() {
public void paintComponent(Graphics g) {
super.paintComponent(g);
}That panel is added to my JFrame during initialisation.
I added an actionListener to a JButton that creates a whole new JPanel
Then i try to set the default (panel1) to the new generated JPanel:
public void actionPerformed(ActionEvent e) {
if(e.getSource().equals(myButton)) {
JPanel newPanel = generateNewPanel();
panel1 = newPanel;
panel1.validate();
panel1.repaint();
}After i done all that, it didn't redraw the jpanel
Please advise on what I have gotten wrong.
Thanks
Edited by: Ruski on Mar 10, 2009 1:35 PM
To be honest i recommend not using netbeans to code gui for a long term project which relies on code. NetBeans is useful - only for creating gui stubs and for throwaway gui prototypes but not in the long run, which is of my own experience. To be fair i have many years of coding gui's way back in the days when awt only started up.
i know gui in java is "crap" because of it's repeated code and tedious mechanism to generate ui windows so to do that you might as well hard code it yourself using a proper or better IDE - "ECLIPSE" or any linux based code editors are good also. This way you learn much more about guis.
Similar Messages
-
A question about how to change a button in a JPanel during runtime
I am a beginner of GUI. Now I am trying to change a specific component, a button, when the application is running. For example, I have 3 buttons in a JPanel. Each button has its onw icon. If I click one of them, it will change its icon, but the other two don't change. I don't know if there is any method for changing a specific component during runtime. If any one knows please let me know, I will appreciate that very much!!!
What you're going to have to do is loop inside the actionlistener but still have accessability to click while its looping. I don't know much about it, but I think you're going to need a thread. Try something like this... (it doesn't work yet, but I have to take off)
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
class buttonxdemo extends JFrame implements ActionListener{
Buttonx mybutton;
//set it all up, make it look pretty =]
public buttonxdemo()
mybutton = new Buttonx("default");
getContentPane().add(mybutton.thebutton);
mybutton.thebutton.addActionListener(this);
this.setDefaultCloseOperation(3);
this.setSize(200,200);
public void actionPerformed(ActionEvent ae){
if (ae.getSource() == mybutton.thebutton)
if (mybutton.keepGoing)
mybutton.keepGoing = false;
else if (!mybutton.keepGoing)
mybutton.keepGoing = true;
mybutton = new Buttonx(/*Icon,*/"My Button");
//getContentPane().remove(mybutton);
//getContentPane().add(mybutton.thebutton);
mybutton.startstop();
}//actionperformed
static void main(String args[])
new buttonxdemo().show();
} //movingicondemo
class Buttonx extends Thread{
public boolean keepGoing;
//public Icon ICx; //perhaps an array, so you can loop through?
public String strbuttonx;
public JButton thebutton; //may have to extend JFrame?
public Buttonx(/*Icon IC,*/ String strbutton){
//ICx = IC;
strbuttonx = strbutton;
thebutton = new JButton(strbuttonx);
public void startstop()
int i = 0;
while (keepGoing)
thebutton.setLabel(strbuttonx.substring(0,i));
//if an array of Icons ICx
//thebutton.setIcon(ICx);
i++;
if (i > strbuttonx.length() - 1)
i = 0;
try
Thread.sleep(1000);
catch (InterruptedException ie)
System.out.println("sleep caught: " + ie);
}//startstop()
}//buttonx
kev -
How do I create multiple objects during runtime?
I don't know how to create multiple objects during runtime, here's my problem:
I get a String as input. Then I create an object called newobject. I put the object in a hashtable with the above string as key.
Then comes the problem, in order to create a new object, I have to rerun the same class, which uses the same name (newobject) to create a 2nd object. Now my hashtable doesn't reference to my 1st object anymore...
Is there anyway I can fill up the hashtable with different objects, and make each key point to each object it was supposed to?
For those who want to see a bit of the program:
public class PlayBalloon{
public Hashtable ht = new Hashtable();
for(){
Balloon pB = newBalloon;
newBalloon=new Balloon(pB);
ht.put("Some input from user", newBalloon);
for(){
ht.get(s).draw;<= s=string, draw=own meth. in Balloon
}I think i can see the problem that you are having. You have, in effect, duplicate keys in your hashtable - ie, two strings used as keys with the same name.
The way that a hashtable works is as follows...
When you ask for a value that is mapped to a key it will go through the table and return the first occurence it finds of the key you asked for. It does this by using the equals() method of whatever object the key is (in your case it is a String).
If you cant use different Strings for your keys in your hashtable then i would consider writing an ObjectNameKey class which contains the String value that you are trying to put in the hashtable and an occurrence number/index or something to make it unique. Remember to override the equals method in your ObjectNameKey object or else the hash lookup will not work. For example
class ObjectNameKey {
private String name;
private int occurence;
public ObjectNameKey(String name, int occ) {
this.name = name;
this.occurence = occ;
public String getName() {
return name;
public String getOccur() {
return occurence;
public boolean equals(Object o) {
if (!(o instanceof ObjectNameKey)) {
return false;
ObjectNameKey onk = (ObjectNameKey)o;
if (onk.getName().equals(name) && onk.getOccur() == occurence) return true;
return false; -
How to dynamically resize JPanel at runtime??
Hello Sir:
I met a problem, I need to resize a small JPanel called panel within a main Control JPanel (with null Layout) if I click the mouse then I can Drag and Resize this small JPanel Border to the size I need at runtime, I know I can use panel.setSize() or panel.setPreferredSize() methods at design time,
But I have no idea how to do it even I search this famous fourm,
How to dynamically resize JPanel at runtime??
Can any guru throw some light or good example??
ThanksWhy are you using a null layout? Wouldn't having a layout manager help you in this situation?
-
How to determine the target system during runtime of a Generic DS?
Hi Experts, good afternoon.
I am coding a Generic Extractor using Function Module. I have to select the field TIMESTAMP on table ROOSPRMSC. To do so, I need the value of RLOGSYS that is the BW system that is calling the Extractor.
Do anybody knows how to determine via ABAP the RLOGSYS (Remote Logical System) during the runtime of the Generic DataSource Function Module?
The table ROOSPRMSC keep the TIMESTAMPs values of the last delta upload for each DataSource and for each BW target system. As I have 2 BW's loading data from the same SAP ECC system, I need to know, during runtime of my Generic DataSource, the actual system that is requesting the delta. That's the reason why I need to know the BW's logical system name that is "runnig" the delta InfoPackage.
Plese, help!!!
Thanks in advance!
Leandro VaniLeandro,
The calling program of your FM should have a local variable I_RLOGSYS which is populated with the BW server ID.
If you don't know how to access a variable in a program that is in call stack using field symbols, search SDN.
I haven't tested this, so you may have to explore a little.
Good luck. -
How to pass the Bound values to VO SQL Query during runtime?
Hi all,
I have the following sql query;
SELECT NOTIFICATION_ID
FROM xx_NOTIFICATION_V
WHERE COMPANY = NVL(:1, COMPANY)
AND INITIATOR = NVL(:2,INITIATOR)
AND PAYGROUP = NVL(:3, PAYGROUP)
AND SOURCE = NVL(:4, SOURCE)
AND SUPPLIER_NAME = NVL(:5,SUPPLIER_NAME)
AND TRX_DATE BETWEEN NVL(:6,TRX_DATE)
AND NVL(:7,TRX_DATE)
If i click GO button on search page then it pass the selected Poplists values as a Bound values to VO Sql query at runtime after this I store the search results in a Table(Which is created by using New Region Wizard).
I want to pass the Bind parameter values to VO SQL query during runtime and :1,:2,:3,:4,:5,:6,:7 values are coming from Poplists.
I search through forum I found many threads regarding Bind Values but those all are passing ID's only not String(Varchar) values.
How to pass the Character values to VO Query.
Please anyone help me on this.
Thanks in Advance.Hi All,
Below one is the recent error Stack.
Exception Details.
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT NOTIFICATION_ID
, COMPANY
, PAYGROUP
, SOURCE
, INITIATOR
, SUPPLIER_NAME
, TRX_DATE
FROM LMG_NOTIFICATION_V
WHERE COMPANY = NVL(:1,COMPANY)
AND INITIATOR = NVL(:2,INITIATOR)
AND PAYGROUP = NVL(:3,PAYGROUP)
AND SOURCE = NVL(:4,SOURCE)
AND SUPPLIER_NAME = NVL(:4,SUPPLIER_NAME)
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:544)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:366)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:328)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
at OA.jspService(OA.jsp:40)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
at OA.jspService(OA.jsp:45)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
java.sql.SQLException: ORA-01008: not all variables bound
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2548)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2933)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:650)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:578)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:627)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:515)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3289)
at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:1207)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4146)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:567)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:537)
at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:614)
at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3253)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3240)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:411)
at oracle.apps.fnd.framework.webui.OAWebBeanBaseTableHelper.queryData(OAWebBeanBaseTableHelper.java:960)
at oracle.apps.fnd.framework.webui.beans.table.OATableBean.queryData(OATableBean.java:717)
at ls.oracle.apps.fnd.wf.worklist.webui.WorklistFindCO.processRequest(WorklistFindCO.java:78)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:518)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:366)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:328)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
at OA.jspService(OA.jsp:40)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
at OA.jspService(OA.jsp:45)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
java.sql.SQLException: ORA-01008: not all variables bound
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2548)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2933)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:650)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:578)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:627)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:515)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3289)
at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:1207)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4146)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:567)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:537)
at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:614)
at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3253)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3240)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:411)
at oracle.apps.fnd.framework.webui.OAWebBeanBaseTableHelper.queryData(OAWebBeanBaseTableHelper.java:960)
at oracle.apps.fnd.framework.webui.beans.table.OATableBean.queryData(OATableBean.java:717)
at ls.oracle.apps.fnd.wf.worklist.webui.WorklistFindCO.processRequest(WorklistFindCO.java:78)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:518)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:366)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:328)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:920)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1536)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:363)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:866)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:833)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:575)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:244)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:330)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2121)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
at OA.jspService(OA.jsp:40)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
at OA.jspService(OA.jsp:45)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
Please anyone help me on this?
Thanks -
Can I create a dynamic number of inputs during runtime?
Can I create a dynamic number of inputs during runtime?
Oracle 11g
Application Express 4.0.2.00.06
Here is my problem:
We have a table that holds metadata about files (hardcopy or softcopy files).
We expect we may need more columns in the table at some point and don't want to modify the table or the application.
So in order to do this I would like to create:
A table called TBL_FILE with the columns:
TBL_FILE_ID NUMBER (This will be the primary key)
TBL_FILE_NAME VARCHAR2(1000) (This will be the name of the file)
A second table will be called TBL_FILE_META with the columns:
TBL_META_ID NUMBER (This will be the primary key)
TBL_FILE_ID NUMBER (This will be the forign key to the file table)
TBL_META_COLUMN VARCHAR2(30) (This is what the column name would be if it existed in TBL_FILE)
TBL_META_VALUE VARCHAR2(1000) (This is the value that record and the 'would be' column)
So a person can have as much meta data on the file with out having to add columns to the table.
The problem is how can I allow users to add as much data as they like with out having to re develop the page.
Other things to note is that we would like this to be on a single page.
I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
Any idea's how I could accomplish this? Is there a better way of doing this?
Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
I found this method when looking at Oracles Workflow tables.Welcome to the Oracle Forums !
>
Can I create a dynamic number of inputs during runtime?
Oracle 11g
Application Express 4.0.2.00.06
Here is my problem:
We have a table that holds metadata about files (hardcopy or softcopy files).
We expect we may need more columns in the table at some point and don't want to modify the table or the application.
So in order to do this I would like to create:
A table called TBL_FILE with the columns:
TBL_FILE_ID NUMBER (This will be the primary key)
TBL_FILE_NAME VARCHAR2(1000) (This will be the name of the file)
A second table will be called TBL_FILE_META with the columns:
TBL_META_ID NUMBER (This will be the primary key)
TBL_FILE_ID NUMBER (This will be the forign key to the file table)
TBL_META_COLUMN VARCHAR2(30) (This is what the column name would be if it existed in TBL_FILE)
TBL_META_VALUE VARCHAR2(1000) (This is the value that record and the 'would be' column)
So a person can have as much meta data on the file with out having to add columns to the table.
The problem is how can I allow users to add as much data as they like with out having to re develop the page.
>
Creating Page Items dynamically is not available. You will have to create excess items and hide/show , etc. But you cannot change the Item Type. All in all, too many limitations in this approach.
>
Other things to note is that we would like this to be on a single page.
>
The 100 item limit will hit you if you go with extra item on page. With Tabular Form that should not be a limitation, unless you are exceeding the 50 item limit of APEX_APPLICATION.G_Fnn items, and the 60 column limitation of Report region with "Use Generic Column Names (parse query at runtime only)" of Dynamic region.
>
I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
>
If the type if item is variable it only means you need a way to store the item type. Meta Data of the Meta Data.
>
So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
>
Yes, you can do it. Updatable report/ Tabular Form query can be constructed from the Meta Data using PL/SQL Function Returning SQL Query . It will be a bit of coding in PL/SQL where you use the Meta Data and the Meta Data of the Meta Data to piece together your SELECT with the right APEX_ITEMs. It might have a performance penalty associated with it, but will not be a serious degradation.
>
Any idea's how I could accomplish this? Is there a better way of doing this?
Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
I found this method when looking at Oracles Workflow tables.
>
I guess that is just a good TNF. It is the Master-Detail Design Pattern, that sound more modern ? ;)
Regards, -
How to resize JPanel at Runtime ??
Hi,
Our Project me t a problem as below, we hope to resize JPanel at Runtime , not at design time, ie, when we first click the button called "Move JPanel" , then we click the JPanel, then we can drag it around within main panel, but we hope to resize the size of this JPanel when we point to the border of this JPanel then drag its border to zoom in or zoom out this JPanel.
Please advice how to do that??
Thanks in advance.
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.util.Vector;
import javax.swing.*;
import javax.swing.border.LineBorder;
import javax.swing.event.*;
public class ResizeJPanels extends JPanel
protected JLabel label1, label2, label3, label4, labeltmp;
protected JLabel[] labels;
protected JPanel[] panels;
protected JPanel selectedJPanel;
protected JButton btn = new JButton("Move JPanel");
int cx, cy;
protected Vector order = new Vector();
public static void main(String[] args)
JFrame f = new JFrame("Test");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(new ResizeJPanels().GroupJLabels());
f.setSize(600,700);
f.setLocation(200,200);
f.setVisible(true);
private MouseListener ml = new MouseAdapter() {
public void mousePressed(MouseEvent e) {
Point p = e.getPoint();
JPanel jp = new JPanel();
jp.setLayout(null);
Component[] c = ((JPanel)e.getSource()).getComponents();
System.out.println("c.length = " + c.length);
for(int j = 0; j < c.length; j++) {
if(c[j].getBounds().contains(p)) {
if(selectedJPanel != null && selectedJPanel != (JPanel)c[j])
selectedJPanel.setBorder(BorderFactory.createEtchedBorder());
selectedJPanel = (JPanel)c[j];
selectedJPanel.setBorder(BorderFactory.createLineBorder(Color.green));
break;
add(jp);
revalidate();
public JPanel GroupJLabels ()
setLayout(null);
addLabels();
label1.setBounds( 125, 150, 125, 25);
label2.setBounds(425, 150, 125, 25);
label3.setBounds( 125, 575, 125, 25);
label4.setBounds(425, 575, 125, 25);
//add(btn);
btn.setBounds(10, 5, 205, 25);
add(btn);
determineCenterOfComponents();
ComponentMover mover = new ComponentMover();
ActionListener lst = new ActionListener() {
public void actionPerformed(ActionEvent e) {
ComponentMover mover = new ComponentMover();
addMouseListener(mover);
addMouseMotionListener(mover);
btn.addActionListener(lst);
addMouseListener(ml);
return this;
public void paintComponent(final Graphics g)
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
Point[] p;
g2.setStroke(new BasicStroke(4f));
for(int i = 0 ; i < order.size()-1; i++) {
JPanel l1 = (JPanel)order.elementAt(i);
JPanel l2 = (JPanel)order.elementAt(i+1);
p = getCenterPoints(l1, l2);
g2.setColor(Color.black);
// g2.draw(new Line2D.Double(p[0], p[1]));
private Point[] getCenterPoints(Component c1, Component c2)
Point
p1 = new Point(),
p2 = new Point();
Rectangle
r1 = c1.getBounds(),
r2 = c2.getBounds();
p1.x = r1.x + r1.width/2;
p1.y = r1.y + r1.height/2;
p2.x = r2.x + r2.width/2;
p2.y = r2.y + r2.height/2;
return new Point[] {p1, p2};
private void determineCenterOfComponents()
int
xMin = Integer.MAX_VALUE,
yMin = Integer.MAX_VALUE,
xMax = 0,
yMax = 0;
for(int i = 0; i < labels.length; i++)
Rectangle r = labels.getBounds();
if(r.x < xMin)
xMin = r.x;
if(r.y < yMin)
yMin = r.y;
if(r.x + r.width > xMax)
xMax = r.x + r.width;
if(r.y + r.height > yMax)
yMax = r.y + r.height;
cx = xMin + (xMax - xMin)/2;
cy = yMin + (yMax - yMin)/2;
private class ComponentMover extends MouseInputAdapter
Point offsetP = new Point();
boolean dragging;
public void mousePressed(MouseEvent e)
Point p = e.getPoint();
for(int i = 0; i < panels.length; i++)
Rectangle r = panels[i].getBounds();
if(r.contains(p))
selectedJPanel = panels[i];
order.addElement(panels[i]);
offsetP.x = p.x - r.x;
offsetP.y = p.y - r.y;
dragging = true;
repaint(); //added
break;
public void mouseReleased(MouseEvent e)
dragging = false;
public void mouseDragged(MouseEvent e)
if(dragging)
Rectangle r = selectedJPanel.getBounds();
r.x = e.getX() - offsetP.x;
r.y = e.getY() - offsetP.y;
selectedJPanel.setBounds(r.x, r.y, r.width, r.height);
//determineCenterOfComponents();
repaint();
private void addLabels()
label1 = new JLabel("Label 1");
label2 = new JLabel("Label 2");
label3 = new JLabel("Label 3");
label4 = new JLabel("Label 4");
labels = new JLabel[] {
label1, label2, label3, label4
JLabel jl = new JLabel("This is resizeable JPanel at Runtime");
jl.setBackground(Color.green);
jl.setOpaque(true);
jl.setFont(new Font("Helvetica", Font.BOLD, 18));
JPanel jp = new JPanel();
jp.setLayout(new BorderLayout());
panels = new JPanel[]{jp};
jp.setBorder(new LineBorder(Color.black, 3, false));
jp.setPreferredSize(new Dimension(400,200));
jp.add(jl, BorderLayout.NORTH);
for(int i = 0; i < labels.length; i++)
labels[i].setHorizontalAlignment(SwingConstants.CENTER);
labels[i].setBorder(BorderFactory.createEtchedBorder());
jp.add(labels[i], BorderLayout.CENTER);
jp.setBounds(100, 100, 400,200);
add(jp);import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.MouseInputAdapter;
public class Resizing extends JPanel {
public Resizing() {
super(null);
addPanel();
PanelControlAdapter control = new PanelControlAdapter(this);
addMouseListener(control);
addMouseMotionListener(control);
private void addPanel() {
JLabel jl = new JLabel("This is resizeable JPanel at Runtime");
jl.setBackground(Color.green);
jl.setOpaque(true);
jl.setFont(new Font("Helvetica", Font.BOLD, 18));
JPanel jp = new JPanel();
jp.setLayout(new BorderLayout());
jp.setBorder(new LineBorder(Color.black, 3, false));
jp.add(jl, BorderLayout.NORTH);
jp.setBounds(50,50,400,200);
add(jp);
public static void main(String[] args) {
JFrame f = new JFrame("Test");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(new Resizing());
f.setSize(500,400);
f.setLocation(100,100);
f.setVisible(true);
class PanelControlAdapter extends MouseInputAdapter {
Resizing host;
Component selectedComponent;
LineBorder black;
LineBorder green;
Point offset = new Point();
Point start = new Point();
boolean dragging = false;
boolean resizing = false;
public PanelControlAdapter(Resizing r) {
host = r;
black = new LineBorder(Color.black, 3, false);
green = new LineBorder(Color.green, 3, false);
public void mouseMoved(MouseEvent e) {
Point p = e.getPoint();
boolean hovering = false;
Component c = host.getComponent(0);
Rectangle r = c.getBounds();
if(r.contains(p)) {
hovering = true;
if(selectedComponent != c) {
if(selectedComponent != null) // reset
((JComponent)selectedComponent).setBorder(black);
selectedComponent = c;
((JComponent)selectedComponent).setBorder(green);
if(overBorder(p))
setCursor(p);
else if(selectedComponent.getCursor() != Cursor.getDefaultCursor())
selectedComponent.setCursor(Cursor.getDefaultCursor());
if(!hovering && selectedComponent != null) {
((JComponent)selectedComponent).setBorder(black);
selectedComponent = null;
private boolean overBorder(Point p) {
Rectangle r = selectedComponent.getBounds();
JComponent target = (JComponent)selectedComponent;
Insets insets = target.getBorder().getBorderInsets(target);
// Assume uniform border insets.
r.grow(-insets.left, -insets.top);
return !r.contains(p);
private void setCursor(Point p) {
JComponent target = (JComponent)selectedComponent;
AbstractBorder border = (AbstractBorder)target.getBorder();
Rectangle r = target.getBounds();
Rectangle ir = border.getInteriorRectangle(target, r.x, r.y, r.width, r.height);
int outcode = ir.outcode(p.x, p.y);
Cursor cursor;
switch(outcode) {
case Rectangle.OUT_TOP:
cursor = Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR);
break;
case Rectangle.OUT_TOP + Rectangle.OUT_LEFT:
cursor = Cursor.getPredefinedCursor(Cursor.NW_RESIZE_CURSOR);
break;
case Rectangle.OUT_LEFT:
cursor = Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR);
break;
case Rectangle.OUT_LEFT + Rectangle.OUT_BOTTOM:
cursor = Cursor.getPredefinedCursor(Cursor.SW_RESIZE_CURSOR);
break;
case Rectangle.OUT_BOTTOM:
cursor = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR);
break;
case Rectangle.OUT_BOTTOM + Rectangle.OUT_RIGHT:
cursor = Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR);
break;
case Rectangle.OUT_RIGHT:
cursor = Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR);
break;
case Rectangle.OUT_RIGHT + Rectangle.OUT_TOP:
cursor = Cursor.getPredefinedCursor(Cursor.NE_RESIZE_CURSOR);
break;
default:
cursor = Cursor.getDefaultCursor();
selectedComponent.setCursor(cursor);
public void mousePressed(MouseEvent e) {
Point p = e.getPoint();
if(selectedComponent != null) {
Rectangle r = selectedComponent.getBounds();
if(selectedComponent.getCursor() == Cursor.getDefaultCursor()) {
offset.x = p.x - r.x;
offset.y = p.y - r.y;
dragging = true;
} else {
start = p;
resizing = true;
public void mouseReleased(MouseEvent e) {
dragging = false;
resizing = false;
public void mouseDragged(MouseEvent e) {
Point p = e.getPoint();
if(dragging || resizing) {
Rectangle r = selectedComponent.getBounds();
if(dragging) {
r.x = p.x - offset.x;
r.y = p.y - offset.y;
selectedComponent.setLocation(r.x, r.y);
} else if(resizing) {
int type = selectedComponent.getCursor().getType();
switch(type) {
case Cursor.N_RESIZE_CURSOR:
r.height -= p.y - start.y;
r.y = p.y;
break;
case Cursor.NW_RESIZE_CURSOR:
r.width -= p.x - start.x;
r.x = p.x;
r.height -= p.y - start.y;
r.y = p.y;
break;
case Cursor.W_RESIZE_CURSOR:
r.width -= p.x - start.x;
r.x = p.x;
break;
case Cursor.SW_RESIZE_CURSOR:
r.width -= p.x - start.x;
r.x = p.x;
r.height += p.y - start.y;
break;
case Cursor.S_RESIZE_CURSOR:
r.height += p.y - start.y;
break;
case Cursor.SE_RESIZE_CURSOR:
r.width += p.x - start.x;
r.height += p.y - start.y;
break;
case Cursor.E_RESIZE_CURSOR:
r.width += p.x - start.x;
break;
case Cursor.NE_RESIZE_CURSOR:
r.width += p.x - start.x;
r.height -= p.y - start.y;
r.y = p.y;
break;
default:
System.out.println("Unexpected resize type: " + type);
selectedComponent.setBounds(r.x, r.y, r.width, r.height);
start = p;
} -
I'm very new to LabVIEW and every day I learn such a lot about LabVIEW. I did not find any example according to my problem, but I don't know how to do the following :
In the MainVI I read different strings from file in an array (In the example below I defined them as constants. The example only shows how the frontpanels should look like).
During a loop I calculate different values, which will be written in an array, too, and in every loop the array of values will be overwritten with the new calculated values. (string[i] belongs to value[i])
Now, by pushing the button 'sub' during runtime, I want to op
en the Frontpanel of a SubVI, on which you see a Ring and a numeric Indicator. Now, I want to show the strings I read in the MainVI as items in the Ring-menu. If I choose one of the items (strings) in the Ring-menu during runtime, I want to show the accordant value, which was calculated in the MainVI, in the numeric Indicator, and in every loop the new calculated value should be shown in this Indicator automatically.
So I have two questions:
1. How do I put the strings into the Ring-menu during runtime?
2. How to open a SubVI-Frontpanel during runtime, and how to pass the calculated values to it?
Every answer I accept with thanks!
Attachments:
main.vi 29 KB
sub.vi 9 KBSee the atttached vis :
1/ Pass the string array to the sub-vi, then use a property node to replace the ring node strings
2a/ From the subvi front panel window, rightclick on the icon, and select "Show connector". Define the connections
2b/Set the sub vi properties (right click on the vi icon, select "VI properties... >> Window appearance..." go to "customize...", and checkmark the "Show front panel when called" item).
3/ your main vi should run 2 separate loops in order to avoid that reading the data stops the aquisition process (if any !..), or the reverse situation.
You should read the LV manual to find out how to create a sub-vi : there are a number a basic things to learn and to memorize...
CC
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left...
Attachments:
main.vi.zip 16 KB -
No mapping during runtime!!
Hi all,
I got stucked with one problem in file-xi-idoc scenario using sap xi 2.0.
I am using sender file adapter which is picking up the file from ftp server. The file contains three fields and I am placing them in a text file as
Sriram,mumbai,in.
The file adapter is picking the file successfully and converting them into xml sending to integration engine. But during runtime these fields are not mapped to target idoc structure (DEBMAS 03) and there are no errors showing in SXMB_MONI. The idoc is going to receiving sap system with error status 51. This is the payload of xml messages observed in SXMB_MONI.
<?xml version="1.0" standalone="yes" ?>
- <resultset>
- <row>
<field0>sriram</field0>
<field1>mumbai</field1>
<field2>in</field2>
</row>
</resultset>
Here is the file adapter configuration :
file adapter java class
classname=com.sap.aii.messaging.adapter.ModuleFile2XMB
mode=FILE2XMB
mode = file2xmbwithrowconversion
Integration Engine address and document settings (example, see docu)
XMB.TargetURL=http://ht56f4:8000/sap/xi/engine/?type=entry
#XMB.SLDConfiguration = SLDaccessor7
XMB.User = xiappluser
XMB.Password = xipass
XMB.SenderBusinessSystem = PS_LEGACY
XMB.SenderInterfaceNamespace = http://ps_crm.com
XMB.SenderInterfaceName = Customer_out
#XMB.SenderBusinessSystem=ExtAdapterSender
#XMB.SenderInterfaceNamespace=http://sap.com/xi/xidemo
#XMB.SenderInterfaceName=ExtAdapterSenderIF
XMB.ContentKind=T
#XMB.ContentKind=T
#XMB.ContentType=application/xml
#XMB.ContentType=text/xml
XMB.ContentType=text/plain
XMB.QualityOfService=EO
#ftp server details
ftp.host = 10.1.45.43
ftp.port = 21
ftp.user = sapftp
ftp.password = ftp***sap123
ftp.connection = permanently
ftp.mode=Text
#file.sourceFilename = bank.txt
##File Adapter specific parameters (example, see docu)
file.sourceDir= \/pssap\/
file.sourceFilename = testing.txt
#file.processingMode=setAttribute
#file.processingMode=archive
#file.archiveDir=c:/temp_archive
file.pollInterval= 60
file.pollIntervalMsecs= 10
#file.retryInterval = 30
file.logPollInterval=YES
file.processingMode=delete
##xml conversion properties if mode FILE2XMBWITHROWCONVERSION specified (example, see docu)
#xml.fieldFixedLengths=8,9,2
xml.processFieldNames=notAvailable
xml.fieldSeparator=,
xml.enclosureConversione = YES
I am not able to test mapping in sap xi 2.0.
Any suggestions greatly helpful.Thanks,
found it.
Regards Mario -
Object Referenced Error When calling the Windows Form during Runtime
Hi,
I am getting Object reference errors when running windows form during runtime. In debugging mode in MS Visual studio 2005, I am not getting this error. I'm calling the window form from menu and called the window in a thread as suggested in one of forums . I don't see anyone in the forum mentioned this problem I have. Any help would be deeply appreciated. Below are the error and code samples.
ERROR Message
Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Project1.Loadxml.Loadxml_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Edited by: Albert Tio on Feb 16, 2011 9:55 AMHere is the code.
Option Strict Off
Option Explicit On
Friend Class GetEvents
Public WithEvents SBO_Application As SAPbouiCOM.Application
Public SboGuiApi As SAPbouiCOM.SboGuiApi
Public oForm As SAPbouiCOM.Form
Public oDBDataSource As SAPbouiCOM.DBDataSource
Public oCompany As SAPbobsCOM.Company
Public RS As SAPbobsCOM.Recordset
Public oPrev_Bank As String, oPrev_AcctType As String
Public oLoadXml As Loadxml
Public Sub SetApplication()
'Dim SboGuiApi As SAPbouiCOM.SboGuiApi
Dim sConnectionString As String
SboGuiApi = New SAPbouiCOM.SboGuiApi
' by following the steps specified above, the following
' statment should be suficient for either development or run mode
sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
' connect to a running SBO Application
SboGuiApi.Connect(sConnectionString)
' get an initialized application object
SBO_Application = SboGuiApi.GetApplication()
End Sub
Public Sub SetCompany()
Dim ret As Long
Dim MsgStr As String
Dim Cookie As String
Dim ConnStr As String
Try
oCompany = New SAPbobsCOM.Company
Cookie = oCompany.GetContextCookie
ConnStr = SBO_Application.Company.GetConnectionContext(Cookie)
'//before setting the SBO login context make sure the company is not connected
If oCompany.Connected = True Then
oCompany.Disconnect()
End If
ret = oCompany.SetSboLoginContext(ConnStr)
If Not ret = 0 Then
Exit Sub
End If
ret = oCompany.Connect
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
MsgStr = ""
If Not ret = 0 Then
oCompany.GetLastError(ret, MsgStr)
SBO_Application.MessageBox(MsgStr)
Else
End If
End Sub
Public Sub New()
MyBase.New()
' set SBO_Application with an initialized application object
SetApplication()
SetCompany()
AddMenuItems()
End Sub
Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
Dim myThread As New System.Threading.Thread(New System.Threading.ThreadStart(AddressOf LoadXmlMainThread))
Try
If (pVal.MenuUID = "MySubMenu") And (pVal.BeforeAction = False) Then
'SBO_Application.MessageBox("My sub menu item was clicked")
'// Create a form to be launched in response to a click on the
'// new sub menu item
myThread.SetApartmentState(System.Threading.ApartmentState.STA)
myThread.Start()
'Loadxml.ShowDialog()
End If
Catch ex As Exception
SBO_Application.MessageBox("1." & ex.Message)
End Try
'If (pVal.MenuUID = "MyGoToMenu") And (pVal.BeforeAction = False) Then
' SBO_Application.MessageBox("My GoTo Menu was clicked")
'End If
'If (pVal.MenuUID = "MySecondGoToMenu") And (pVal.BeforeAction = False) Then
' SBO_Application.MessageBox("My Second GoTo Menu was clicked")
'End If
End Sub
Private Sub LoadXmlMainThread()
'Dim lLoadxml As New Loadxml
Try
oLoadXml = New Loadxml
oLoadXml.WindowState = FormWindowState.Maximized
oLoadXml.ShowInTaskbar = True
oLoadXml.TopMost = True
oLoadXml.Activate()
Application.Run(oLoadXml)
Catch ex As Exception
SBO_Application.MessageBox("2." & ex.Message)
End Try
End Sub
Private Sub AddMenuItems()
'// Let's add a separator, a pop-up menu item and a string menu item
Dim oMenus As SAPbouiCOM.Menus
Dim oMenuItem As SAPbouiCOM.MenuItem
Dim i As Integer '// to be used as counter
Dim lAddAfter As Integer
Dim sXML As String
'// Get the menus collection from the application
oMenus = SBO_Application.Menus
'Save an XML file containing the menus...
'sXML = SBO_Application.Menus.GetAsXML
'Dim xmlD As System.Xml.XmlDocument
'xmlD = New System.Xml.XmlDocument
'xmlD.LoadXml(sXML)
'xmlD.Save("c:
mnu.xml")
Dim oCreationPackage As SAPbouiCOM.MenuCreationParams
oCreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
oMenuItem = SBO_Application.Menus.Item("43520") 'moudles'
Dim sPath As String
sPath = Application.StartupPath
'sPath = sPath.Remove(sPath.Length - 3, 3)
If sPath.EndsWith("\") = False Then
sPath = sPath & "\"
End If
'// find the place in wich you want to add your menu item
'// in this example I chose to add my menu item under
'// SAP Business One.
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP
oCreationPackage.UniqueID = "MyMenu01"
oCreationPackage.String = "Unbridle Menu"
oCreationPackage.Enabled = True
oCreationPackage.Image = sPath & "unbridle.bmp"
oCreationPackage.Position = 15
oMenus = oMenuItem.SubMenus
Try ' If the manu already exists this code will fail
oMenus.AddEx(oCreationPackage)
'// Get the menu collection of the newly added pop-up item
oMenuItem = SBO_Application.Menus.Item("MyMenu01")
oMenus = oMenuItem.SubMenus
'// Create s sub menu
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
oCreationPackage.UniqueID = "MySubMenu"
oCreationPackage.String = "Unbridle Monitoring"
oMenus.AddEx(oCreationPackage)
Catch er As Exception ' Menu already exists
'SBO_Application.MessageBox("Menu Already Exists")
End Try
End Sub
End Class
Public Class Loadxml
'Inherits System.Windows.Forms.Form
Public sBPpath As String
Public sGLpath As String
Public sBillpath As String
Public bRun As Boolean
Private Sub Loadxml_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.TextGL.Text = System.Configuration.ConfigurationSettings.AppSettings("GLAcctDownloadPath").ToString()
Me.TextBP.Text = System.Configuration.ConfigurationSettings.AppSettings("BPAcctUPloadPath").ToString()
Me.TextBill.Text = System.Configuration.ConfigurationSettings.AppSettings("BillUPloadPath").ToString()
Me.NotifyIcon1.Visible = False
End Sub
End Class -
How to get the field name of an internal table during runtime?
How to get the field name of an internal table during runtime?
Hi Sudhir,
Declare and Use Get Cursor Field in Your Prm to get the field Name of the Intenal Table
Example Code:
<b> DATA: v_field(60). " Insert this code.
GET CURSOR FIELD v_field. " Insert this code.</b>
<b>CHECK v_field = 'ITAB-KUNNR'. " Insert this code. (or)
Write: v_field.</b>
Regards,
Ramganesan K. -
How to create editbox in a dialog during runtime in c++
how to create editbox in a dialog during runtime in c++,so that when ever dialog is intialized different number of edit box are displayed
how to create editbox in a dialog during runtime in c++,so that when ever dialog is intialized different number of edit box are displayed
-
ABAP Mapping: No MESSAGE_OUT during runtime. test OK
Hi everybody,
I got a ABAP-Mapping.
During runtime I get noch MESSAGE_OUT (empty!)
But when I test the ABAP-Mapping, everything is fine!
Any ideas?
Regards Mario
Edited by: Mario Müller on Sep 11, 2008 9:09 AMThanks,
found it.
Regards Mario -
How to set borderColor from css during runtime
Hi,
I need to set the border color of a selected tab during runtime from css. Is it possible. Please help i am struggling with this for past two days.
regards,
Jayagopal.Just create a selected CSS style, and update the styleName of the tab when it is selected.
Maybe you are looking for
-
Music will not play in iTunes store OR library. Quicktime also not working.
I am quite nearly at my wits end trying to figure out the problem I am having: I just started up a brand spanking new Mac Pro today, and aside from other problems, am unable to play songs that I migrated over from my old Power PC G5, which was runnin
-
How to create a PDF with Only Read Property
Hello Gurus, I have a big question: How can I create an Smartform which can be exported in an Only Read PDF ? I need to do that for creating a PDF file which information can not be copied. Is that Possible? Thanks!!! rgds. Miguel Angel.
-
Hi All, Hi All, Studio Creator has generated this code <h:form binding="#{general$forgotpassword0.form1}" id="form1"> <h:inputText binding="#{general$forgotpassword0.txtLogin}" id="txtLogin" styleClass="frmObjects" /> <h:commandButton action="#{gener
-
Sliding notifications from the lock screen in iOS 7
Hi, I'm having problem sliding notifications from the lock screen on my iPhone 5S/iPad Mini. This is more to do with iOS 7 than iPhone/iPad. When I try to slide it, it takes me to the unlock screen. Please see attached screenshot for details. Hope Ap
-
Hi... I just got my Playbook last night and I love but... I wanted to read a PDF course text from my uni website. I clicked it, it asked me to save it. I saved it, nothing opened. I flick to the top browser menu, shows no downloads. I downloaded a fi