Problem with action listener

hello
the problem in my code is that i defined
actionlistener for a button but it does not
do what it should do . it throws an error in the console
and i think my code is 100% correct what is the problem
please help me this is the codewith
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
class Library extends JFrame implements ActionListener     {
     private JMenuBar jmb      = new JMenuBar();
     private JMenu books      = new JMenu("Books",true);
     private JMenu members      = new JMenu("Members",true);
     private JMenu loans      = new JMenu("Loans",true);
     private JMenuItem addNb = new JMenuItem("Add New Book");
     private JMenuItem listB = new JMenuItem("List All Books");
     private JMenuItem listAb = new JMenuItem("List Available Books");
     private JMenuItem listBb = new JMenuItem("List Borrowed Books");
     private JMenuItem addNm = new JMenuItem("Add New Member");
     private JMenuItem removeM = new JMenuItem("Remove a Member");
     private JMenuItem listAm = new JMenuItem("List All Members");
     private JMenuItem loanB = new JMenuItem("Loan A Book");
     private JMenuItem returnB = new JMenuItem("Return A Book");
     private JTextField bNumber = new JTextField(14);
     private JTextField bAuthor = new JTextField(14);
     private JTextField bTitle = new JTextField(14);
     private JTextField mId = new JTextField(14);
     private JTextField mName = new JTextField(14);
     private JTextField idB = new JTextField(14);
     private JTextField nBToB = new JTextField(14);
     private JTextField nBTor = new JTextField(14);
     private JTextArea dispaly = new JTextArea();
     private JButton oKb1 = new JButton("OK");
     private JButton okb2 = new JButton("OK");
     private JButton cloaseb = new JButton("Close");
     private JButton oKm1 = new JButton("OK");
     private JButton oKm2 = new JButton("OK");
     private JButton cancelM = new JButton("Cancel");
     private JButton oKm3 = new JButton("OK");
     private JButton oKm4 = new JButton("OK");
     private JButton cancelM2 = new JButton("Cancel");
     private JButton oKl = new JButton("OK");
     private JButton oKr = new JButton("OK");
     private JButton yes = new JButton("Yes");
     private JButton no = new JButton("No");     
     private JLabel bN = new JLabel("Book Number");
     private JLabel bA = new JLabel("Book Author");
     private JLabel bT = new JLabel("Book Title");
     private JLabel iN          = new JLabel("ID Number");
     private JLabel mN          = new JLabel("Member's Name");
     private JLabel     iNb          = new JLabel("ID number of the borrower");
     private JLabel nBb          = new JLabel("Number of the books to borrow");
     private JLabel nBr          = new JLabel("Number of the books to return");
     private JLabel mIdl     = new JLabel("ID number of the stuednt");
     private JPanel tempoIPanel= new JPanel(new FlowLayout());
     Container cp;
     JFrame mainFrame;
     JInternalFrame tempoI;
Library()     {
     //LibraryClass lClass = new LibraryClass();/*
     mainFrame = new JFrame();
     mainFrame.setJMenuBar(jmb);
     mainFrame.setSize(800,550);
     mainFrame.getContentPane().setLayout(new FlowLayout());
     jmb.add(books);
     jmb.add(members);
     jmb.add(loans);
     books.add(addNb);
     addNb.addActionListener(this);
     books.add(listB);
     listB.addActionListener(this);
     books.add(listAb);
     listAb.addActionListener(this);
     books.add(listBb);
     listBb.addActionListener(this);
     members.add(addNm);
     addNm.addActionListener(this);
     members.add(removeM);
     removeM.addActionListener(this);
     members.add(listAm);
     listAm.addActionListener(this);
     loans.add(loanB);
     loanB.addActionListener(this);
     loans.add(returnB);
     returnB.addActionListener(this);
     //actions listeners
     oKb1.addActionListener(this);
     mainFrame.setVisible(true);
public void actionPerformed(ActionEvent ae)     {
     if(ae.getSource() == addNb)     {
          tempoI = new JInternalFrame("Add new Book",true,true);
          mainFrame.getContentPane().add(tempoI);
          tempoI.getContentPane().setLayout(new FlowLayout());
          tempoI.getContentPane().add(bN);
          tempoI.getContentPane().add(bNumber);
          tempoI.getContentPane().add(bA);
          tempoI.getContentPane().add(bAuthor);
          tempoI.getContentPane().add(bT);
          tempoI.getContentPane().add(bTitle);
          tempoI.getContentPane().add(oKb1);//add action listener here
          tempoI.setVisible(true);
     if(ae.getSource() == listB)     {
          //LibraryClass.listBooks();
     if(ae.getSource() == listAb){}
     if(ae.getSource() == listBb){}
     if(ae.getSource() == addNm)     {
          tempoI = new JInternalFrame("Add new Member",true,true);
          mainFrame.getContentPane().add(tempoI);
          tempoI.getContentPane().setLayout(new FlowLayout());
          tempoI.getContentPane().add(iN);
          tempoI.getContentPane().add(mId);
          tempoI.getContentPane().add(mN);
          tempoI.getContentPane().add(mName);
          tempoI.getContentPane().add(oKm1);//add action listener
          tempoI.getContentPane().setSize(300,400);
          tempoI.setVisible(true);
     if(ae.getSource() == removeM)     {
          tempoI = new JInternalFrame("Rmove member",true,true);
          mainFrame.getContentPane().add(tempoI);
          tempoI.getContentPane().setLayout(new FlowLayout());
          tempoI.getContentPane().add(mIdl);
          tempoI.getContentPane().add(mId);
          tempoI.getContentPane().add(oKm2);//add action listener
          //LibraryClass.removeM(Double.parseDouble(mId.getText()));
          tempoI.getContentPane().setSize(300,400);
          tempoI.setVisible(true);
     if(ae.getSource() == listAm)     {
          //LibraryClass.listMembers();
     if(ae.getSource() == loanB)     {
          tempoI = new JInternalFrame("Loan book",true,true);
          mainFrame.getContentPane().add(tempoI);
          tempoI.getContentPane().setLayout(new FlowLayout());
          tempoI.getContentPane().add(iNb);
          tempoI.getContentPane().add(idB);
          tempoI.getContentPane().add(nBb);
          tempoI.getContentPane().add(nBToB);
          tempoI.getContentPane().add(oKl);
          //LibraryClass.borrowBook(Book bk,Member m);
          tempoI.getContentPane().setSize(300,400);
          tempoI.setVisible(true);
     if(ae.getSource() == returnB)     {
          tempoI = new JInternalFrame("Return Book",true,true);
          mainFrame.getContentPane().add(tempoI);
          tempoI.getContentPane().setLayout(new FlowLayout());
          tempoI.getContentPane().add(iNb);
          tempoI.getContentPane().add(idB);
          tempoI.getContentPane().add(nBr);
          tempoI.getContentPane().add(nBTor);
          tempoI.getContentPane().add(oKr);
          tempoI.getContentPane().setSize(400,300);
          tempoI.setVisible(true);
          //Book.addBook(bNumber.getText(),bAuthor.getText(),bTitle.getText());
class ClubLibrarySystem     {
     public static void main(String[] args)     {
     new Library();
}

hello
the problem in my code is that i defined
actionlistener for a button but it does not
do what it should do . it throws an error in the
consoleWhat error?
and i think my code is 100% correct what is theWell, but it isn't.
Have you tried using a debugger?
problem
please help me this is the codewith
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
class Library extends JFrame implements
ActionListener     {
     private JMenuBar jmb      = new JMenuBar();
     private JMenu books      = new JMenu("Books",true);
private JMenu members      = new
JMenu("Members",true);
private JMenu loans      = new
JMenu("Loans",true);
private JMenuItem addNb = new JMenuItem("Add New
Book");
private JMenuItem listB = new JMenuItem("List All
Books");
private JMenuItem listAb = new JMenuItem("List
Available Books");
private JMenuItem listBb = new JMenuItem("List
Borrowed Books");
private JMenuItem addNm = new JMenuItem("Add New
Member");
private JMenuItem removeM = new JMenuItem("Remove a
Member");
private JMenuItem listAm = new JMenuItem("List All
Members");
private JMenuItem loanB = new JMenuItem("Loan A
Book");
private JMenuItem returnB = new JMenuItem("Return A
Book");
     private JTextField bNumber = new JTextField(14);
     private JTextField bAuthor = new JTextField(14);
     private JTextField bTitle = new JTextField(14);
     private JTextField mId = new JTextField(14);
     private JTextField mName = new JTextField(14);
     private JTextField idB = new JTextField(14);
     private JTextField nBToB = new JTextField(14);
     private JTextField nBTor = new JTextField(14);
     private JTextArea dispaly = new JTextArea();
     private JButton oKb1 = new JButton("OK");
     private JButton okb2 = new JButton("OK");
     private JButton cloaseb = new JButton("Close");
     private JButton oKm1 = new JButton("OK");
     private JButton oKm2 = new JButton("OK");
     private JButton cancelM = new JButton("Cancel");
     private JButton oKm3 = new JButton("OK");
     private JButton oKm4 = new JButton("OK");
     private JButton cancelM2 = new JButton("Cancel");
     private JButton oKl = new JButton("OK");
     private JButton oKr = new JButton("OK");
     private JButton yes = new JButton("Yes");
     private JButton no = new JButton("No");     
private JLabel bN = new JLabel("Book
Number");
private JLabel bA = new JLabel("Book
Author");
private JLabel bT = new JLabel("Book
Title");
     private JLabel iN          = new JLabel("ID Number");
private JLabel mN          = new JLabel("Member's
Name");
private JLabel     iNb          = new JLabel("ID number of the
borrower");
private JLabel nBb          = new JLabel("Number of the
books to borrow");
private JLabel nBr          = new JLabel("Number of the
books to return");
private JLabel mIdl     = new JLabel("ID number of
the stuednt");
private JPanel tempoIPanel= new JPanel(new
FlowLayout());
     Container cp;
     JFrame mainFrame;
     JInternalFrame tempoI;
Library()     {
     //LibraryClass lClass = new LibraryClass();/*
     mainFrame = new JFrame();
     mainFrame.setJMenuBar(jmb);
     mainFrame.setSize(800,550);
mainFrame.getContentPane().setLayout(new
FlowLayout());
     jmb.add(books);
     jmb.add(members);
     jmb.add(loans);
     books.add(addNb);
     addNb.addActionListener(this);
     books.add(listB);
     listB.addActionListener(this);
     books.add(listAb);
     listAb.addActionListener(this);
     books.add(listBb);
     listBb.addActionListener(this);
     members.add(addNm);
     addNm.addActionListener(this);
     members.add(removeM);
     removeM.addActionListener(this);
     members.add(listAm);
     listAm.addActionListener(this);
     loans.add(loanB);
     loanB.addActionListener(this);
     loans.add(returnB);
     returnB.addActionListener(this);
     //actions listeners
     oKb1.addActionListener(this);
     mainFrame.setVisible(true);
public void actionPerformed(ActionEvent ae)     {
     if(ae.getSource() == addNb)     {
tempoI = new JInternalFrame("Add new
w Book",true,true);
          mainFrame.getContentPane().add(tempoI);
tempoI.getContentPane().setLayout(new
w FlowLayout());
          tempoI.getContentPane().add(bN);
          tempoI.getContentPane().add(bNumber);
          tempoI.getContentPane().add(bA);
          tempoI.getContentPane().add(bAuthor);
          tempoI.getContentPane().add(bT);
          tempoI.getContentPane().add(bTitle);
tempoI.getContentPane().add(oKb1);//add action
n listener here
          tempoI.setVisible(true);
     if(ae.getSource() == listB)     {
          //LibraryClass.listBooks();
     if(ae.getSource() == listAb){}
     if(ae.getSource() == listBb){}
     if(ae.getSource() == addNm)     {
tempoI = new JInternalFrame("Add new
w Member",true,true);
          mainFrame.getContentPane().add(tempoI);
tempoI.getContentPane().setLayout(new
w FlowLayout());
          tempoI.getContentPane().add(iN);
          tempoI.getContentPane().add(mId);
          tempoI.getContentPane().add(mN);
          tempoI.getContentPane().add(mName);
tempoI.getContentPane().add(oKm1);//add action
n listener
          tempoI.getContentPane().setSize(300,400);
          tempoI.setVisible(true);
     if(ae.getSource() == removeM)     {
tempoI = new JInternalFrame("Rmove
e member",true,true);
          mainFrame.getContentPane().add(tempoI);
tempoI.getContentPane().setLayout(new
w FlowLayout());
          tempoI.getContentPane().add(mIdl);
          tempoI.getContentPane().add(mId);
tempoI.getContentPane().add(oKm2);//add action
n listener
          //LibraryClass.removeM(Double.parseDouble(mId.getText
          tempoI.getContentPane().setSize(300,400);
          tempoI.setVisible(true);
     if(ae.getSource() == listAm)     {
          //LibraryClass.listMembers();
     if(ae.getSource() == loanB)     {
          tempoI = new JInternalFrame("Loan book",true,true);
          mainFrame.getContentPane().add(tempoI);
tempoI.getContentPane().setLayout(new
w FlowLayout());
          tempoI.getContentPane().add(iNb);
          tempoI.getContentPane().add(idB);
          tempoI.getContentPane().add(nBb);
          tempoI.getContentPane().add(nBToB);
          tempoI.getContentPane().add(oKl);
          //LibraryClass.borrowBook(Book bk,Member m);
          tempoI.getContentPane().setSize(300,400);
          tempoI.setVisible(true);
     if(ae.getSource() == returnB)     {
tempoI = new JInternalFrame("Return
n Book",true,true);
          mainFrame.getContentPane().add(tempoI);
tempoI.getContentPane().setLayout(new
w FlowLayout());
          tempoI.getContentPane().add(iNb);
          tempoI.getContentPane().add(idB);
          tempoI.getContentPane().add(nBr);
          tempoI.getContentPane().add(nBTor);
          tempoI.getContentPane().add(oKr);
          tempoI.getContentPane().setSize(400,300);
          tempoI.setVisible(true);
          //Book.addBook(bNumber.getText(),bAuthor.getText(),bT
tle.getText());
class ClubLibrarySystem     {
     public static void main(String[] args)     {
     new Library();

Similar Messages

  • JDeveloper problem with actions

    Hello
    I'm working on my first struts application and I have any problem with actions(I think).
    When I run the application, I don't see any data from DB on my page but when I click any of these 4 buttons, then the data load from DB.....Can anybody help me....I want to see my data when the page loads for the first time, not after the button click. Thanks a lot.
    (The buttons shows the rows of the table....first,previous,next,last)
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <html:form action="/zuctzaz.do" >
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <input type="hidden" name="<c:out value='${bindings.statetokenid}'/>" value="<c:out value='${bindings.statetoken}'/>" >
    <tr>
    <td>
    <table>
    <tr>
    <td>
    <table>
    <tr>
    <td><input type="submit" name="event_First" value="First" STYLE="width:35px" <c:out value="${bindings.First.enabledString}" /> ></td>
    <td><input type="submit" name="event_Previous" value="Prev" STYLE="width:35px" <c:out value="${bindings.Previous.enabledString}" /> ></td>
    <td><input type="submit" name="event_Next" value="Next" STYLE="width:35px" <c:out value="${bindings.Next.enabledString}" /> ></td>
    <td><input type="submit" name="event_Last" value="Last" STYLE="width:35px" <c:out value="${bindings.Last.enabledString}" /> ></td>
    </tr>
    </table>
    </td>
    <td>
    <table>
    <tr>
    <td colspan="3"><strong>Z�&#269;tovac� z�znam</strong></td>
    </tr>
    <tr>
    <td>Date</td>
    <td><input type="text" name="textfield1" value="<c:out value="${bindings['datZuct']}"/>"></td>
    <td><c:out value="${bindings['cisPdo']}"/> AND <c:out value="${bindings['zucZazn']}"/></td>
    </tr>
    <tr>
    <td>Place</td>
    <td colspan="2">Brusel</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </html:form>

    Hy Again!
    I forgot to say one more thing that could be relevant:
    If i add any action from the struts-config.xml in the provider for the <defaultAction> of the portlet it works correctly.
    So the actions work correctly, the problem is that when sending back to the oracle portal the request with the new action, there is no response.
    Pls help!
    Thanx, and best regards!
    Ado

  • Custom button with action listener - will not invoke action listener

    Hi
    For whatever reason, I cannot find a concise example of a simple custom component that can invoke an action listener. The tutorials I've read so far either ignore this fundamental topic or only make the slightest make reference to it.
    The best I have come up with - in terms of a simple prototype is below... but, the action listener is never invoked.... Can someone tell me what I am missing (full code below). Hopefully, what is missing or incorrect will be obvious to you JSF experts out there.
    Thanks for any help!!
    -f
    tld
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
      <tlib-version>0.01</tlib-version>
      <jsp-version>1.2</jsp-version>
      <short-name>jsfcustomcomponent</short-name>
      <uri>http://jsfcustomcomponent/</uri>
      <description><![CDATA[jsf custom component tags]]>  </description>
      <tag>
        <name>specialBtnTag</name>
        <tag-class>jsfcustomcomponent.SpecialBtnTag</tag-class>
        <attribute>
          <name>value</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description><![CDATA[button value]]></description>
        </attribute>
        <attribute>
          <name>actionListener</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description><![CDATA[action listener]]> </description>
        </attribute>
      </tag>
    </taglib>
    SpecialBtnComponent
    package jsfcustomcomponent;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import javax.faces.el.*;
    import javax.faces.event.*;
    public class SpecialBtnComponent
        extends UIComponentBase implements ActionSource
        public static final String COMPONENT_TYPE = "SpecialBtnComponent";
        public static final String RENDERER_TYPE = "SpecialBtnRenderer";
        public String getFamily()
            return COMPONENT_TYPE;
        public SpecialBtnComponent()
            super();
            setRendererType(SpecialBtnComponent.RENDERER_TYPE);
        private String value;
        public void setValue(String value, FacesContext facesContext)
            this.value = value;
        public String getValue()
            if (null != value)
                return value;
            ValueBinding _vb = getValueBinding("value");
            if (_vb != null)
                return (String) _vb.getValue(getFacesContext());
            else
                return null;
        private MethodBinding action = null;
        public MethodBinding getAction()
            return action;
        public void setAction(MethodBinding methodBinding)
            this.action = action;
        private MethodBinding actionListener = null;
        public MethodBinding getActionListener()
            return (this.actionListener);
        public void setActionListener(MethodBinding methodBinding)
            this.actionListener = actionListener;
        public boolean isImmediate()
            return false;
        public void setImmediate(boolean _boolean)
            //this.immediate = immediate;
        public void addActionListener(ActionListener actionListener)
            addFacesListener(actionListener);
        public ActionListener[] getActionListeners()
            return (ActionListener[]) getFacesListeners(ActionListener.class);
        public void removeActionListener(ActionListener actionListener)
            removeFacesListener(actionListener);
        public Object saveState(FacesContext context)
            Object values[] = new Object[5];
            values[0] = super.saveState(context);
            values[1] = value;
            values[2] = saveAttachedState(context, action);
            values[3] = saveAttachedState(context, actionListener);
            return ( (Object) (values));
        public void restoreState(FacesContext context, Object state)
            Object values[] = (Object[]) state;
            super.restoreState(context, values[0]);
            value = (String) values[1];
            action = (MethodBinding) restoreAttachedState(context, values[2]);
            actionListener = (MethodBinding) restoreAttachedState(context, values[3]);
        public void broadcast(FacesEvent event) throws AbortProcessingException
            super.broadcast(event);
            if (event instanceof ActionEvent)
                FacesContext context = getFacesContext();
                MethodBinding mb = getActionListener();
                if (mb != null)
                    mb.invoke(context, new Object[]
                              {event});
                ActionListener listener = context.getApplication().getActionListener();
                if (listener != null)
                    listener.processAction( (ActionEvent) event);
        public void queueEvent(FacesEvent e)
            if (e instanceof ActionEvent)
                if (isImmediate())
                    e.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
                else
                    e.setPhaseId(PhaseId.INVOKE_APPLICATION);
            super.queueEvent(e);
    SpecialBtnRenderer
    package jsfcustomcomponent;
    import java.util.*;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import javax.faces.event.*;
    import javax.faces.render.*;
    public class SpecialBtnRenderer
        extends Renderer
        String value;
        public SpecialBtnRenderer()
        public void decode(FacesContext context, UIComponent component)
            Map requestMap = context.getExternalContext().getRequestParameterMap();
            String clientId = component.getClientId(context);
            SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
            String value = (String) requestMap.get(clientId);
            if (null != value)
                specialBtnComponent.setValue(value, context);
            ActionEvent actionEvent = new ActionEvent(specialBtnComponent);
            specialBtnComponent.queueEvent(actionEvent);
        public void encodeEnd(FacesContext context, UIComponent component) throws java.io.IOException
            SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
            ResponseWriter writer = context.getResponseWriter();
            String clientId = component.getClientId(context);
            value = (String) component.getAttributes().get("value");
            if (value == null)
                value = "defaultValue";
            buildSpecialBtn(writer, value, clientId, specialBtnComponent);
        private void buildSpecialBtn(ResponseWriter writer, String value, String clientId, SpecialBtnComponent component) throws java.io.IOException
            writer.startElement("table", component);
            writer.startElement("tbody", component);
            writer.startElement("tr", component);
            writer.startElement("td", component);
            value = String.valueOf(value);
            writer.startElement("input", component);
            writer.writeAttribute("type", "submit", null);
            writer.writeAttribute("name", clientId, "clientId");
            writer.writeAttribute("value", value, null);
            writer.endElement("input");
            writer.endElement("td");
            writer.endElement("tr");
            writer.endElement("tbody");
            writer.endElement("table");
    SpecialBtnTag
    package jsfcustomcomponent;
    import javax.faces.component.*;
    import javax.faces.el.*;
    import javax.faces.webapp.*;
    import com.sun.faces.util.*;
    public class SpecialBtnTag
        extends UIComponentTag
        public String value = null;
        public String actionListener = null;
        public String getComponentType()
            return SpecialBtnComponent.COMPONENT_TYPE;
        public String getRendererType()
            return SpecialBtnComponent.RENDERER_TYPE;
        protected void setProperties(UIComponent component)
            super.setProperties(component);
            if (! (component instanceof SpecialBtnComponent))
                throw new IllegalStateException("Component " + component.toString() +
                                                " not expected type.  Expected: jsfcustomcomponent.SpecialBtnComponent.  Perhaps you�re missing a tag?");
            SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
            if (value != null)
                if (isValueReference(value))
                    ValueBinding vb = Util.getValueBinding(value);
                    specialBtnComponent.setValueBinding("value", vb);
                else
                    throw new IllegalStateException("The value for �value� must be a ValueBinding.");
            if (actionListener != null)
                if (isValueReference(actionListener))
                    ValueBinding vb = Util.getValueBinding(actionListener);
                    specialBtnComponent.setValueBinding("actionListener", vb);
                else
                    throw new IllegalStateException("The value for �actionListener� must be a ValueBinding.");
        public void release()
            super.release();
            value = null;
            actionListener = null;
        public void setValue(String value)
            this.value = value;
        public String getValue()
            return this.value;
        public void setActionListener(String actionListener)
            this.actionListener = actionListener;
        public String getActionListener()
            return this.actionListener;
    jsp1.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@taglib uri="http://jsfcustomcomponent/" prefix="j"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    <link rel="stylesheet" type="text/css" href="./stylesheet.css" title="Style">
    </head>
    <body>
    <f:view>
      <h:form id="form01">
        <h:outputText value="test special button with action listener"/>
        <j:specialBtnTag value="#{specialBtnBacking.specialBtnValue}" actionListener="#{specialBtnBacking.specialBtnActionListener}"/>
        <h:messages/>
        <h:outputText value="#{specialBtnBacking.outcome}"/>
      </h:form>
    </f:view>
    </body>
    </html>
    SpecialBtnBacking
    package specialbtn;
    import javax.faces.context.*;
    import javax.faces.event.*;
    public class SpecialBtnBacking
        private FacesContext context;
        public SpecialBtnBacking()
            this.setSpecialBtnValue("Special Button with action listener");
        private String specialBtnValue;
        public String getSpecialBtnValue()
            return this.specialBtnValue;
        public void setSpecialBtnValue(String specialBtnValue)
            this.specialBtnValue = specialBtnValue;
        private String outcome="actionlistener NOT invoked: click specialBtn above to test";
        public String getOutcome()
            return outcome;
        public void setOutcome(String outcome)
            this.outcome = outcome;
        public void specialBtnActionListener(ActionEvent evt)
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            this.outcome="***action listener invoked!!!***";
    faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
      <managed-bean>
        <managed-bean-name>specialBtnBacking</managed-bean-name>
        <managed-bean-class>specialbtn.SpecialBtnBacking</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>
      <component>
        <component-type>SpecialBtnComponent</component-type>
        <component-class>jsfcustomcomponent.SpecialBtnComponent</component-class>
        <component-extension>
          <renderer-type>SpecialBtnRenderer</renderer-type>
        </component-extension>
      </component>
      <render-kit>
        <renderer>
          <component-family>SpecialBtnComponent</component-family>
          <renderer-type>SpecialBtnRenderer</renderer-type>
          <renderer-class>jsfcustomcomponent.SpecialBtnRenderer</renderer-class>
        </renderer>
      </render-kit>
    </faces-config>
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
      <display-name>pagerWEB</display-name>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
      </servlet-mapping>
      <jsp-config>
        <taglib>
          <taglib-uri>http://jsfcustomcomponent/</taglib-uri>
          <taglib-location>/WEB-INF/jsfcustomcomponent.tld</taglib-location>
        </taglib>
      </jsp-config>
      <servlet>
        <description>Added by JBuilder to compile JSPs with debug info</description>
        <servlet-name>debugjsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
          <param-name>classdebuginfo</param-name>
          <param-value>true</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>debugjsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
      </servlet-mapping>
    </web-app>

    got it working....
    The changes were:
    in "SpecialBtnRenderer"...
    --new--
                        mb.invoke(context, new Object[1]);
    --old--
                        mb.invoke(context, new Object[0]);
    in "SpecialBtnTag"...
    --new--
    import javax.faces.event.ActionEvent;
    --new--
                    MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(specialBtnListener, new Class[]{ActionEvent.class});
    --old--
                    MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(specialBtnListener, null);
    -Below is the entire application, again -- for those (like myself) who need concrete examples...
    I hope this helps someone else! --f
    jsp1.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@taglib uri="http://jsfcustomcomponent/" prefix="j"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    <link rel="stylesheet" type="text/css" href="./stylesheet.css" title="Style">
    </head>
    <body>
    <f:view>
        <h:messages/>
      <h:form id="form01">
        <h:outputText value="test special button with action listener"/>
        <j:specialBtnTag value="#{specialBtnBacking.specialBtnValue}" specialBtnListener="#{specialBtnBacking.specialBtnActionListener}"/>
        <h:outputText value="#{specialBtnBacking.outcome}"/>
      </h:form>
    </f:view>
    </body>
    </html>
    SpecialBtnBacking
    package specialbtn;
    import javax.faces.context.*;
    import javax.faces.event.*;
    public class SpecialBtnBacking
        private FacesContext context;
        public SpecialBtnBacking()
            this.setSpecialBtnValue("Special Button with action listener");
        private String specialBtnValue;
        public String getSpecialBtnValue()
            return this.specialBtnValue;
        public void setSpecialBtnValue(String specialBtnValue)
            this.specialBtnValue = specialBtnValue;
        private String outcome = "actionlistener NOT invoked: click specialBtn above to test";
        public String getOutcome()
            return outcome;
        public void setOutcome(String outcome)
            this.outcome = outcome;
        public void specialBtnActionListener(ActionEvent evt)
            System.out.println("\n\n");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n");
            this.outcome = "***action listener invoked!!!***";
    jsfcustomcomponent.tld
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
      <tlib-version>0.01</tlib-version>
      <jsp-version>1.2</jsp-version>
      <short-name>jsfcustomcomponent</short-name>
      <uri>http://jsfcustomcomponent/</uri>
      <description><![CDATA[jsf custom component tags]]>  </description>
      <tag>
        <name>specialBtnTag</name>
        <tag-class>jsfcustomcomponent.SpecialBtnTag</tag-class>
        <attribute>
          <name>value</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description><![CDATA[button value]]></description>
        </attribute>
        <attribute>
          <name>specialBtnListener</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description><![CDATA[action listener]]> </description>
        </attribute>
      </tag>
    </taglib>
    faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
      <managed-bean>
        <managed-bean-name>specialBtnBacking</managed-bean-name>
        <managed-bean-class>specialbtn.SpecialBtnBacking</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>
      <component>
        <component-type>SpecialBtnComponent</component-type>
        <component-class>jsfcustomcomponent.SpecialBtnComponent</component-class>
        <component-extension>
          <renderer-type>SpecialBtnRenderer</renderer-type>
        </component-extension>
      </component>
      <render-kit>
        <renderer>
          <component-family>SpecialBtnComponent</component-family>
          <renderer-type>SpecialBtnRenderer</renderer-type>
          <renderer-class>jsfcustomcomponent.SpecialBtnRenderer</renderer-class>
        </renderer>
      </render-kit>
    </faces-config>
    SpecialBtnComponent.java
    package jsfcustomcomponent;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import javax.faces.el.*;
    import javax.faces.event.*;
    public class SpecialBtnComponent
        extends UIComponentBase implements ActionSource
        public static final String COMPONENT_TYPE = "SpecialBtnComponent";
        public static final String RENDERER_TYPE = "SpecialBtnRenderer";
        public String getFamily()
            return COMPONENT_TYPE;
        public SpecialBtnComponent()
            super();
            setRendererType(SpecialBtnComponent.RENDERER_TYPE);
        private String value;
        public void setValue(String value, FacesContext facesContext)
            this.value = value;
        public String getValue()
            if (null != this.value)
                return this.value;
            ValueBinding _vb = getValueBinding("value");
            if (_vb != null)
                return (String) _vb.getValue(getFacesContext());
            else
                return null;
        private MethodBinding specialBtnListener = null;
        public MethodBinding getActionListener()
            return (this.specialBtnListener);
        public void setActionListener(MethodBinding actionListener)
            this.specialBtnListener = actionListener;
        public Object saveState(FacesContext context)
            Object values[] = new Object[3];
            values[0] = super.saveState(context);
            values[1] = saveAttachedState(context, this.specialBtnListener);
            values[2] = this.value;
            return (values);
        public void restoreState(FacesContext context, Object state)
            Object values[] = (Object[]) state;
            super.restoreState(context, values[0]);
            this.specialBtnListener = (MethodBinding) restoreAttachedState(context, values[1]);
            this.value = (String) restoreAttachedState(context, values[2]);
        public void broadcast(FacesEvent event) throws AbortProcessingException
            super.broadcast(event);
            if (event instanceof ActionEvent)
                FacesContext context = getFacesContext();
                MethodBinding mb = this.getActionListener();
                if (mb != null)
                    try
                        mb.invoke(context, new Object[]
                                  {event});
                    catch (EvaluationException ex)
                        System.out.println("SpecialBtnComponent/broadcast(FacesEvent event)...EvaluationException encountered - ex.getMessage()=" + ex.getMessage());
                        ex.printStackTrace();
                ActionListener actionListener = context.getApplication().getActionListener();
                if (actionListener != null)
                    actionListener.processAction( (ActionEvent) event);
        public void queueEvent(FacesEvent e)
            if (e instanceof ActionEvent)
                e.setPhaseId(PhaseId.INVOKE_APPLICATION);
            super.queueEvent(e);
        public MethodBinding getAction()
            return null;
        public void setAction(MethodBinding methodBinding)
        public boolean isImmediate()
            return false;
        public void setImmediate(boolean _boolean)
        public void addActionListener(ActionListener actionListener)
            addFacesListener(actionListener);
        public ActionListener[] getActionListeners()
            return (ActionListener[]) getFacesListeners(ActionListener.class);
        public void removeActionListener(ActionListener actionListener)
            removeFacesListener(actionListener);
    SpecialBtnTag.java
    package jsfcustomcomponent;
    import javax.faces.component.*;
    import javax.faces.el.*;
    import javax.faces.webapp.*;
    import com.sun.faces.util.*;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    public class SpecialBtnTag
        extends UIComponentTag
        public String value = null;
        public String specialBtnListener = null;
        private SpecialBtnComponent specialBtnComponent;
        public SpecialBtnTag()
            super();
        public String getComponentType()
            return SpecialBtnComponent.COMPONENT_TYPE;
        public String getRendererType()
            return SpecialBtnComponent.RENDERER_TYPE;
        protected void setProperties(UIComponent component)
            super.setProperties(component);
            if (! (component instanceof SpecialBtnComponent))
                throw new IllegalStateException("Component " + component.toString() +
                                                " not expected type.  Expected: jsfcustomcomponent.SpecialBtnComponent.  Perhaps you�re missing a tag?");
            specialBtnComponent = (SpecialBtnComponent) component;
            if (value != null)
                if (isValueReference(value))
                    ValueBinding vb = Util.getValueBinding(value);
                    specialBtnComponent.setValueBinding("value", vb);
                else
                    throw new IllegalStateException("The value for �value� must be a ValueBinding.");
            if (specialBtnListener != null)
                if (isValueReference(specialBtnListener))
                    MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(specialBtnListener, new Class[]{ActionEvent.class});
                    ( (SpecialBtnComponent) component).setActionListener(mb);
                else
                    MethodBinding mb = Util.createConstantMethodBinding(specialBtnListener);
                    ( (SpecialBtnComponent) component).setActionListener(mb);
        public void release()
            super.release();
            value = null;
            specialBtnListener = null;
        public void setValue(String value)
            this.value = value;
        public String getValue()
            return this.value;
        public void setSpecialBtnListener(String specialBtnListener)
            this.specialBtnListener = specialBtnListener;
        public String getSpecialBtnListener()
            return this.specialBtnListener;
    SpecialBtnRenderer
    package jsfcustomcomponent;
    import java.util.*;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import javax.faces.event.*;
    import javax.faces.render.*;
    import javax.faces.el.MethodBinding;
    import javax.faces.el.*;
    public class SpecialBtnRenderer
        extends Renderer
        String value;
        public SpecialBtnRenderer()
            super();
        public void decode(FacesContext context, UIComponent component)
            try
                Map requestMap = context.getExternalContext().getRequestParameterMap();
                String clientId = component.getClientId(context);
                SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
                String value = (String) requestMap.get(clientId);
                if (null != value)
                    specialBtnComponent.setValue(value, context);
                    MethodBinding mb = specialBtnComponent.getActionListener();
                    if (mb != null)
                        System.out.println("SpecialBtnRenderer/decode...mb.getExpressionString()=" + mb.getExpressionString());
                        //mb.invoke(context, new Object[0]);
                        mb.invoke(context, new Object[1]);
                    ActionEvent actionEvent = new ActionEvent(specialBtnComponent);
                    specialBtnComponent.queueEvent(actionEvent);
            catch (EvaluationException ex)
                ex.printStackTrace();
        public void encodeEnd(FacesContext context, UIComponent component) throws java.io.IOException
            SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
            ResponseWriter writer = context.getResponseWriter();
            String clientId = component.getClientId(context);
            value = (String) component.getAttributes().get("value");
            if (value == null)
                value = "defaultValue";
            buildSpecialBtn(writer, value, clientId, specialBtnComponent);
        private void buildSpecialBtn(ResponseWriter writer, String value, String clientId, SpecialBtnComponent component) throws java.io.IOException
            writer.startElement("table", component);
            writer.startElement("tbody", component);
            writer.startElement("tr", component);
            writer.startElement("td", component);
            value = String.valueOf(value);
            writer.startElement("input", component);
            writer.writeAttribute("type", "submit", null);
            writer.writeAttribute("name", clientId, "clientId");
            writer.writeAttribute("value", value, null);
            writer.endElement("input");
            writer.endElement("td");
            writer.endElement("tr");
            writer.endElement("tbody");
            writer.endElement("table");
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
      <display-name>pagerWEB</display-name>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
      </servlet-mapping>
      <jsp-config>
        <taglib>
          <taglib-uri>http://jsfcustomcomponent/</taglib-uri>
          <taglib-location>/WEB-INF/jsfcustomcomponent.tld</taglib-location>
        </taglib>
      </jsp-config>
    </web-app>

  • Problem with: Action Required: Your AOL Username login must transition to Apple ID

    In the early days of the iTunes store, it was possible to log in and make purchases with an AOL screen name. This has since been discontinued. In March 2015, Apple sent out a message to legacy iTunes account holders who have not yet converted their iTunes accounts from an AOL screen name to an Apple ID.
    However, the conversion program seem to be completely mismanaged and full of glitches and problems. If Apple does nothing about this, the company will face costly class action lawsuits by disgruntled consumers who purchased music but will in the future be prevented from playing it.
    I tried to follow the directions, but I am not able to log into the iTunes account under the AOL screen name. I tried to initiate a password recovery through the recovery email, but the recovery message with the re-sent link never arrives.
    I contacted Apple support several times. During very lengthy (several hours long) conversations, we were able to locate the account. However, I was told that Apple cannot reset the password and give me access to the account - I should contact AOL. My appeals that this would be illogical because AOL does not have the power to change passwords on an iTunes store account were ignored, and it was clear that each Apple employees I spoke with just wanted to push the problem on someone else.
    So I contacted AOL and was told that they have nothing to do with this. Nevertheless, we reset the password for the AOL screen name. As I predicted, this made no difference for the iTunes account: I still cannot log in.
    Today I contacted Apple again, and after we we made certain that I we identified the correct iTunes account, the Apple employee manually initiated a recovery e-mail sent to me. However, the confirmation message I received refers to resetting the existing Apple ID (not the iTunes store account we are trying to turn into an Apple ID).
    Clearly, there is a glitch in the system. It somehow intermingles and confuses information from the Apple ID and the AOL Screen Name / iTunes store ID and thinks that we are trying to reset the Apple ID.
    Apple's response was ridiculous: Talk to AOL. (I already have done that and established that changing the AOL SN password does not allow me to gain access to the iTunes account).
    This is my 4th call to Apple. Each lasted several hours (including hold time). Now I've been on hold for about 3 hours while I'm waiting to talk to a higher tier tech support person.
    Does anyone have similar problems with this conversion? Any solutions?

    You need to sign in with just the user name. not with the @aol.com at the end.
    Example: If your AOL username is AOLUSERNAME & your AOL email is [email protected], you must log in with only AOLUSERNAME & your AOL email password & it will prompt you to change it. You can’t use your @aol email, it must be something else.

  • Problem with action links

    I have a relatively simple DVD project with 10 movie sequences each placed on a separate timeline. DVD has just one menu with a Button: "Watch whole movie" which basically sequences all 10 clips and then back to the menu.
    Then I also have 10 Sequence-Buttons on the menu that should only show the respective sequence and then back to the menu.
    1. I set up the action sequence for "Watch the whole movie" m1-m2-m3-m4-m5-m6-m7-m8-m9-m10-menu. No problem with that.
    2. When I then start working on the first sequence button "SCENE 1" the problem starts. What I want is just Scene1-back to the menu. I tried it without and with end action override but then I disturbed the m1-m2-m3-m4-m5-m6-m7-m8-m9-m10-menu sequence.
    I really couldn't figure out this simple task. Maybe somebody can give me a hint. 

    1. I set up the action sequence for "Watch the whole movie" m1-m2-m3-m4-m5-m6-m7-m8-m9-m10-menu. No problem with that.
    Actually, that is the problem. Instead of making the end action of each timeline the next timeline, create a Playlist and sequence the timelines in there. Your play all button links to the playlist. End action of the playlist is Return to last menu.
    Without end actions that go to the next movie, your Scene buttons will work fine. (The end action on each timeline will be "Return to Last Menu."

  • Problems with dbms_aq.listen

    I am having problem trying to listen to a set of queues.
    I have tried it with Single Consumer queues and it works fine.
    But with Multi Consumer queues dbms_aq.listen does not detect a new message enqueued and just waits until the time out then returns with the normal "No message" exception.
    Can any one tell me what I am doing wrong?
    Thanks
    Rick Laird
    code
    CREATE OR REPLACE TYPE message_type AS OBJECT (xml_message CLOB);
    exec dbms_aqadm.create_queue_table('testqueue_qtable','message_type',Null,Null,true);
    exec dbms_aqadm.create_queue('testqueue', 'testqueue_qtable');
    exec dbms_aqadm.start_queue('testqueue');
    exec dbms_aqadm.add_subscriber('testqueue',sys.aq$_agent('testqueue_subscriber',NULL,NULL));
    exec DBMS_AQADM.SCHEDULE_PROPAGATION('testqueue');
    CREATE OR REPLACE PROCEDURE MONITOR_STATUS_QUEUE(time IN NUMBER)
    IS
    pragma autonomous_transaction;
    agent_w_message sys.aq$_agent;
    agent_list dbms_aq.aq$_agent_list_t;
    wait_time INTEGER := 10;
    no_message EXCEPTION;
    pragma EXCEPTION_INIT(no_message, -25254);
    new_status VARCHAR2(30);
    monitor BOOLEAN := TRUE;
    begin_time number;
    end_time number;
    v_dequeue_options dbms_aq.dequeue_options_t;
    v_message_properties dbms_aq.message_properties_t;
    v_message_type message_type;
    v_dequeue_msg_id RAW(40);
    v_xml_message CLOB;
    v_message_text varchar2(2000);
    v_amount number;
    BEGIN
    begin_time := dbms_utility.get_time;
    WHILE (monitor)
    LOOP
    BEGIN
    -- agent_list(1) := sys.aq$_agent('testqueue_agent', 'testqueue', NULL);
    agent_list(1) := sys.aq$_agent('agent1', 'testqueue', NULL);
    /* wait for order status messages */
    dbms_aq.listen(agent_list, 0, agent_w_message);
    dbms_output.put_line('Agent' || agent_w_message.name || ' Address '|| agent_w_message.address);
    /* dequeue the message from the queue */
    v_dequeue_options.consumer_name := 'testqueue_subscriber';
    v_dequeue_options.wait := 0.5;
    -- v_dequeue_options.wait := dbms_aq.NO_WAIT;
    dbms_aq.dequeue('testqueue',v_dequeue_options, v_message_properties,
    v_message_type,v_dequeue_msg_id);
    v_amount := dbms_lob.getlength(v_message_type.xml_message);
    dbms_lob.read(v_message_type.xml_message,v_amount,1,v_message_text);
    dbms_output.put_line('New Message :'||v_message_text);
    /* exit if we have been working long enough */
    end_time := dbms_utility.get_time;
    IF (end_time - begin_time > time) THEN
    EXIT;
    END IF;
    EXCEPTION
    WHEN no_message THEN
    dbms_output.put_line('No messages so far');
    end_time := dbms_utility.get_time;
    --exit if we have done enough work
    IF (end_time - begin_time > time) THEN
    EXIT;
    END IF;
    END;
    END LOOP;
    commit;
    END;
    create or replace procedure enqueue is
    v_enqueue_options dbms_aq.enqueue_options_t;
    v_messages_properties dbms_aq.message_properties_t;
    v_message_type message_type;
    v_message_locator CLOB;
    v_enqueue_msg_id RAW(40);
    v_select_sql varchar2(2000);
    v_xml_message varchar2(2000);
    v_temp_clob CLOB;
    begin
    v_xml_message := '<TESTING><TEST>'||to_char(sysdate,'HH:MI:SS')||'</TEST></TESTING>';
    dbms_lob.createtemporary(v_temp_clob,true);
    dbms_lob.write(v_temp_clob,length(v_xml_message),1,v_xml_message);
    v_message_type := message_type(empty_clob());
    dbms_aq.enqueue(
    queue_name => 'testqueue',
    enqueue_options => v_enqueue_options,
    message_properties => v_messages_properties,
    payload => v_message_type,
    msgid => v_enqueue_msg_id);
    v_select_sql := ' select t.user_data.xml_message from testqueue_qtable t where t.msgid = :MSG_ID';
    execute immediate v_select_sql INTO v_message_locator using v_enqueue_msg_id;
    dbms_lob.copy( dest_lob => v_message_locator,
    src_lob => v_temp_clob,
    amount => dbms_lob.getlength(v_temp_clob));
    COMMIT;
    end enqueue;

    Hi,
    Your subscriber is called testqueue_subscriber. You must use the same consumer name in the agent list for dbms_aq.listen
    Change
    agent_list(1) := sys.aq$_agent('agent1', 'testqueue', NULL);
    to
    agent_list(1) := sys.aq$_agent('testqueue_subscriber', 'testqueue', NULL);

  • Problem with action script to button

    Hello all.
    I'm having a problem with my adobe flash CS3 action script. My button cant link to the other URL. I tried to put an action script but i fail. anyone can help me? here the attachment for my flash document.

    HELLO,
                  just check       navigateToURL()

  • Problem with ACTION (move, rotate, etc) in iBookAuthor with a Keynote file

    Hi everyone,
    I'm doing nice keynote animations with ACTION like rotate an image, move an image, etc. That makes great animation on my Mac screen.
    But when i put that animation (keynote file) in iBookAuthor as a widget, the actions are not showing correctly on the iPad. I can't see them anymore.
    Do you know why?
    Tx
    Steeve

    It would seem that the Keynote widget can only handle the following animations (looks like what you are trying is not included). See http://support.apple.com/kb/HT5067
    Transitions and builds
    These transitions and builds work with the Keynote widget:
    Transitions
    Magic Move
    Cube
    Dissolve
    Drop
    Flip
    Flop
    Iris
    Motion Dissolve
    Move In
    Page Flip
    Pivot
    Push
    Reveal
    Scale
    Twirl
    Twist
    Wipe
    Builds
    Appear or Disappear
    Cube
    Dissolve
    Drop
    Move In or Move Out
    Pivot
    Scale
    Twirl
    Unsupported builds and transitions will be replaced with Dissolve.

  • Problem with action script 3 make input text box and button....

    Hi every one I am trying to make a family book using "Air for Android" with a simple search engin in the book
    air for android only work with AS3,
    the search function is to type a person's name and hit submit then go to a specific frame.
    have a problem making below code to work in AS3 and hopefully one of you guys can lead me in the right direction to fix the issue.
    Currently, I have an input text box and a button. When you type specific words into the input box and then hit the button it sends you to a specific frame.
    (it work find in AS2 but not in AS3,)
    Here is my current code that is placed on the main timeline, first frame:
    stop();
    onEnterFrame = function () {
        submit.onRelease = function() {
            switch (yourname.text) {
            case "name1" :
                gotoAndStop(2);
                break;
            case "name2" :
                gotoAndStop(3);
                break;
    My button that checks if the phrase is correct is called "submit" and my input box has an instance of "yourname".
    My phrases that will be accepted in the input box are "name1" and "name2" which bring me to two different frames.
    Basically, I'm having a problem with making this to work with AS3.

    you should use the default option in the switch statement
    that way yourname contains something not in one of the case statements it will go to the default bit and execute teh code there
    function onSubmit(e:MouseEvent):void
                                  switch (yourname.text)
                                            case "name1":
                                                      gotoAndStop(2);
                                                      break;
                                            case "name2":
                                                      gotoAndStop(3);
                                                      break;
                                            default:
                                                      goToAndStop(you frame you want);
                                            break;

  • Speed issue with Action Listener

    I have a JCombobox that has an action listener that waits for an action to be performed.
    When I update the Combobox list by using removeAllItems() and then loop additem on an array to rebuild it, It take 14 seconds to rebuild the list.
    When I remove my action listener, it does it instantly. I tried setEnable(false) on my combobox to disable the action listener temporarily while I update the combobox, but it doesn't appear to work.
    Looking for a way to disable my listener temporarily to increase performance when I update it.
    Thanks in advance.

    Nevermind. got it.

  • Problem with oracle listener linux/390

    Hi everybody,
    I've installed oracle 9i developer release on linux/390.
    The database seems ok, but when i try to connect from other
    machines i get:
    Ora-03113: End of file on communication channel
    The failure occurs after the connection is established.
    I've read in some oracle faqs, this cause may be a database
    server error.
    I've checked all configuration files, but found nothing.
    Can someone help me?
    Best regards,
    Chris

    Hello,
    I have problem with installing Oracle in Linux/390 (7.0 version).
    Could you tell me what is your version (7.2 ?) and when did you
    find it ? (URLs)
    Thanks a lot

  • Problem with SQL Listener Name

    I installed SQL 2012 with Always on. It has 3 nodes.
    Here is the detail information about the server:-
    Server Name
    Failover Mode
    SQL Listener Name
    Node 1
    Automatic
    ABCD
    Node 2
    Automatic
    ABCD
    Node 3
    Manual
    ABCD
    It seems application is having problem to connect the DB server with listener name; but application can connect the DB server with server name (i.e. Node 1/2/3). Do you know what would be the reason?
    I also noticed when I tried to connect DB server through SSMS (by using SQL Listener name) it is taking too much time. I have to increase “connection time-out” to 60 sec otherwise it is throwing timeout error. But if I use server
    name then it is not throwing timeout error. I am not sure why it is taking more time to connect DB by using SQL Listener name.  Any Idea? 

    Hi XYZ001,
    As other post, please help to post more details for analysis.
    Do you configure AlwaysOn Availability Group in a multi-subnet environment? If that is the case, please check the following things.
    1. Make sure that you add the MultiSubnetFailover parameter and set it to true in the Additional Connection Parameters tab when connecting to DB server through SSMS by using Listener name. If you forget to pass in the MultiSubnetFailover parameter, it will
    allow for a successful but delayed connection even if you increase “connection time-out”. For more details, please review this
    blog.
    2. When the application is unable to connect the DB server with listener name, the issue could occur when your application either uses a legacy data provider that does not support the new MultiSubnetFailover parameter, or is not configured to use this parameter.
    Please use the following resolutions as applicable to your case, for more details, please review this
    article.
    •To resolve this situation when the data providers support the MultiSubNetFailover parameter, add the MultiSubNetFailover parameter to your connection string, and set it to true.
    •To resolve this situation when your legacy clients cannot use the MultiSubnetFailover property, you can change the listener’s RegisterAllProvidersIP value to 0.
    3. If you have an active Transport Driver Interface (TDI) filter driver that is installed on the client application workstation, you may also get timeout error. For more details, please review this
    KB article.
    There is also a similar thread for your reference.
    http://stackoverflow.com/questions/23416492/connection-timeouts-when-using-multisubnetfailover-true
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Problem with 'action' attriubte when using 'rendered'

    I have something really strange;
    I have a JSF page used to insert a record and when inserting is successful, I set a REQUEST scope parameter called 'saved' with a value of 'true' as following:
    FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("saved",true);Now, in the JSF page I already have a <h:commandButton ...> on the SAME previous JSF page used to collect the data :
    <h:commandButton rendered="#{requestScope.saved}" action="#{insertionBean.displayNew}" value="Create another"/>As it is shown, the rendering of this button is conditional ONLY after complete inserting. Until now every thing is OK, and the button rendered only as expected, but what is not expected is that when I click on the button the page only reloads and the method in the action attribute is never fired.
    Does the attribute rendered have something to do with RestoreView at the server side? Becasue when I DELETE it, the button fires the method, the problem is only when I use it in this scope.
    How I can accomplish this goal?!
    Thanks for helpful people

    The value of the rendered attribue is re-evaluated during apply request values phase. So you need to transfer it to the next request using h:inputHidden or, better, t:saveState (so that it also survives validations).

  • Problem with Action/Batch

    OK, PS CS4 extended v. 11.0.1 on a Win XP sp3 OS
    I recorded a simple action set
    Open | Set File Info of current document | Save | Close
    I then performed an Automated Batch run to duplicate this on a series of more than 100 photo images in a folder.  In the Batch dialogue box, I clearly identified a new folder - located in the same directory as the original - as the Destination Folder for the images.  However, when the batch process was complete, the newly created folder was EMPTY and all of the photo images in the Source Folder had been rewritten!
    Now, since this was as simple as entering file information, no harm was done to the image files.  However, I have had other times when I run a batch action to resize the images from their raw size to, for instance, 6" X 4" @ 300 dpi for printing.  When these save to the original source folder it IS a problem because my native files are overwritten.
    Did I do something wrong in the action?  Did I set something incorrectly in the batch process?
    If I do this correctly, there should be a screenshot of my action steps and my batch settings here.
    Please help me!  I use this feature A LOT because I am responsible for cataloging all of the photos taken at our airport.
    Thank you!
    Susan

    ZB:  Please don't apologize!  I am grateful for the assistance, I was just confused by the "save" vs. "save as" information and wanted to be certain that I understood what you were saying.  I figure if I'm going to ask someone to share their knowledge/time with me, the least I can do is understand it well enough to put it to use and possibly pass it along to someone else at a later date!  I certainly don't want to have to keep asking the same questions each time I try to do a task.  Oy ve...that would be annoying!
    Thank you very much for your help.  I don't have another project right now to try this with, but I'm certain I will soon enough.  We have a $138 million dollar construction project we are photographing almost daily.
    Again, my heartfelt thanks! 

  • Problem with action events........ :(

    hi all,
    there is a strange problem which me and my colleagues are facing now-a-days......
    For some odd and unknown reason, the links on the page suddenly stops woking... it goes like this....
    we write events (buttons or action links) .... we test them and they are working fine...... than we write some other piece of code and than run the program and links work no more... The program never goes in the action event for the component...... and surprisingly it also dont show an error.... It just keeps on refreshing itself again and again....... (this thing is also verified by using debugger that actions events just stop being called....) it happens for random situations ...... Once i thought that maybe its has to do something with beforeRenderResponse() method... but it happens even in beans without beforeRenderResponse() method.....
    Can anyone tell me whats going on around here???? we are extremely confused here with dead lines approaching fast........
    regards

    I've had this same problem....links were working fine yesterday. I added more functionality which didn't even affect the links, and now they're not working. Unfortunately, I don't have a solution either.
    Has anybody been able to access the logging in the facescontext or application to see what the lifecycle is doing before it stops???

Maybe you are looking for

  • Error during Step14 of Portal installation

    Hi, When I run Oracle 9iAS Portal 3.0 Configuration Assistant, I get the following error: STEP 14 : Installing seed data for all layers INSTALL_ACTION: installSeedData() : ..\..\bin\sqlplus portal32/ portal32@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROT

  • Another problem with PDF printing

    Hi all. I try new pdf printing in Apex 3.0 with printing engine Apache FOP and BI Publisher. Both engines seems work well. I configured Apex engine to use Standard Support for pdf. Next I imported example application http://www.oracle.com/technology/

  • My shared folder is not showing on the left side of my itunes.

    I recently got a media server connected to my wireless router and was able to configure it to be used in itunes.  My problem is that my Itunes in my mac book pro does not show the shared folders on the left side no matter what I do.  In my wife's ima

  • HT6030 New messages still do not work after installing this update.

    Opening a new message, opens the new message window, however, it will not select a recipient and the window stops responding.

  • Recovery partition isnt working

    hello everyone i have a toshiba satellite l505d-s5983 laptop. i have been having problems with this laptop for the past 2 weeks and it hasnt stopped. i was able to reset my laptop and i even got rid of the error message i used to have before the wind