Regarding actions in Buttons
Hi,
The action which i have attached with my button is not working .
There is no problem on the coding side .I have also attached the action to the outbound plug correctly .
Shall i have to make any changes in the custom level security settings by going into the internet options .
Please help .
Thanks .
Hi jain,
1. first navigate into the views and correctly setting into the inbound & outbound plugs.
2.then go to Action tab.create the new action and set the corresponding plugs.
3.tha action button code generated automatically.
this is the procedure for creating the action button
Regards,
P.Manivannan.
Similar Messages
-
Dynamic actions on button and dynamic column name
Hi!ynam
I want to create a dynamic action on button click in my tabular form.
I have a select list with values of my column names (P7_X_COLUMN) and a text field where users input values for update (P7_X_UVALUE).
My idea is that when they click the button, they update selected column to desired value in all rows.
However, I get the following error:
ORA-06550: line 5, column 5: PL/SQL: ORA-01747: invalid user.table.column, table.column, or column specification ORA-06550: line 4, column 1: PL/SQL: SQL Statement ignored (Go to error)
It seems to me that I have not referenced the column name correctly, I thought it was the same as referencing values. How do I do that?
This is my code:
begin
update "#OWNER#"."IZV_SLOG_DET"
set :P7_X_COLUMN=:P7_X_UVALUE;
end;
Regards,
IvanI got it to work, but the query is too big. Can anyone help me with how to get it to work?
I tried breaking it into more varchar2 strings, but i always get the same error:
Error processing row.
ORA-01461: can bind a LONG value only for insert into a LONG column
declare
l_table_name varchar2(30) := 'IZV_SLOG_DET_POM';
l_sql_stmt varchar2(32762);
begin
l_sql_stmt := 'update ' || l_table_name || ' set ' || :P7_X_COLUMN || ' =''' || :P7_X_UVALUE|| '''' ||
'where'||
'nvl(MSR_PRD_ID,1) = nvl(nvl(''' || :P7_X_MSR_PRD_ID || '''' || ',MSR_PRD_ID),1) and' ||
'nvl(SRC_STM_ID,1) = nvl(nvl(''' || :P7_X_SRC_STM_ID || '''' || ',SRC_STM_ID),1) and' ||
'nvl(OZNAKA_KOMITENTA,1) = nvl(nvl(''' || :P7_X_OZNAKA_KOMITENTA || '''' || ',OZNAKA_KOMITENTA),1) and' ||
'nvl(RSP,1) = nvl(nvl(''' || :P7_X_RSP || '''' || ',RSP),1) and' ||
'nvl(OZNAKA_RETKA,1) = nvl(nvl(''' || :P7_X_OZNAKA_RETKA || '''' || ',OZNAKA_RETKA),1) and' ||
'nvl(OZNAKA_IZVJESCA,1) = nvl(nvl(''' || :P7_X_OZNAKA_IZVJESCA || '''' || ',OZNAKA_IZVJESCA),1) and' ||
'nvl(MBR_KOMITENTA,1) = nvl(nvl(''' || :P7_X_MBR_KOMITENTA || '''' || ',MBR_KOMITENTA),1) and' ||
'nvl(KOMITENT_NEREZ,1) = nvl(nvl(''' || :P7_X_KOMITENT_NEREZ || '''' || ',KOMITENT_NEREZ),1) and' ||
'nvl(ZUPANIJA,1) = nvl(nvl(''' || :P7_X_ZUPANIJA || '''' || ',ZUPANIJA),1) and' ||
'nvl(DRZAVA,1) = nvl(nvl(''' || :P7_X_DRZAVA || '''' || ',DRZAVA),1) and' ||
'nvl(SEKTOR_NEREZIDENTA,1) = nvl(nvl(''' || :P7_X_SEKTOR_NEREZIDENTA || '''' || ',SEKTOR_NEREZIDENTA),1) and' ||
'nvl(VRSTA_POVEZANOSTI,1) = nvl(nvl(''' || :P7_X_VRSTA_POVEZANOSTI || '''' || ',VRSTA_POVEZANOSTI),1) and' ||
'nvl(INSTRUMENT,1) = nvl(nvl(''' || :P7_X_INSTRUMENT || '''' || ',INSTRUMENT),1) and' ||
'nvl(VALUTA,1) = nvl(nvl(''' || :P7_X_VALUTA || '''' || ',VALUTA),1) and' ||
'nvl(OTKAZNI_ROK,1) = nvl(nvl(''' || :P7_X_OTKAZNI_ROK || '''' || ',OTKAZNI_ROK),1) and' ||
'nvl(IZVORNO_DOSPIJECE,1) = nvl(nvl(''' || :P7_X_IZVORNO_DOSPIJECE || '''' || ',IZVORNO_DOSPIJECE),1) and' ||
'nvl(VRSTA_INDEKSACIJE,1) = nvl(nvl(''' || :P7_X_VRSTA_INDEKSACIJE || '''' || ',VRSTA_INDEKSACIJE),1) and' ||
'nvl(VALUTA_INDEKSACIJE,1) = nvl(nvl(''' || :P7_X_VALUTA_INDEKSACIJE || '''' || ',VALUTA_INDEKSACIJE),1) and' ||
'nvl(PORTFELJ,1) = nvl(nvl(''' || :P7_X_PORTFELJ || '''' || ',PORTFELJ),1) and' ||
'nvl(UTRZIVOST_KREDITA,1) = nvl(nvl(''' || :P7_X_UTRZIVOST_KREDITA || '''' || ',UTRZIVOST_KREDITA),1) and' ||
'nvl(ZNACAJKE_KAPITALA,1) = nvl(nvl(''' || :P7_X_ZNACAJKE_KAPITALA || '''' || ',ZNACAJKE_KAPITALA),1) and' ||
'nvl(RIZICNA_SKUPINA,1) = nvl(nvl(''' || :P7_X_RIZICNA_SKUPINA || '''' || ',RIZICNA_SKUPINA),1) and' ||
'nvl(UGRADJENI_DERIVAT,1) = nvl(nvl(''' || :P7_X_UGRADJENI_DERIVAT || '''' || ',UGRADJENI_DERIVAT),1) and' ||
'nvl(ODNOSNA_VARIJABLA,1) = nvl(nvl(''' || :P7_X_ODNOSNA_VARIJABLA || '''' || ',ODNOSNA_VARIJABLA),1) and' ||
'nvl(PREDZNAK,1) = nvl(nvl(''' || :P7_X_PREDZNAK || '''' || ',PREDZNAK),1) and' ||
'nvl(VRSTA_IZNOSA,1) = nvl(nvl(''' || :P7_X_VRSTA_IZNOSA || '''' || ',VRSTA_IZNOSA),1) and' ||
'nvl(KOMITENT_PBR,1) = nvl(nvl(''' || :P7_X_KOMITENT_PBR || '''' || ',KOMITENT_PBR),1) and' ||
'nvl(UDJELI_POVEZ_C,1) = nvl(nvl(''' || :P7_X_UDJELI_POVEZ_C || '''' || ',UDJELI_POVEZ_C),1) and' ||
'nvl(AR_ID,1) = nvl(nvl(''' || :P7_X_AR_ID || '''' || ',AR_ID),1) and' ||
'nvl(AU_ID,1) = nvl(nvl(''' || :P7_X_AU_ID || '''' || ',AU_ID),1) and' ||
'nvl(AR_BUSS_ID,1) = nvl(nvl(''' || :P7_X_AR_BUSS_ID || '''' || ',AR_BUSS_ID),1) and' ||
'nvl(MTI_CCY_TP_ID,1) = nvl(nvl(''' || :P7_X_MTI_CCY_TP_ID || '''' || ',MTI_CCY_TP_ID),1) and' ||
'nvl(REG_NO,1) = nvl(nvl(''' || :P7_X_REG_NO || '''' || ',REG_NO),1) and' ||
'nvl(REG_SFX,1) = nvl(nvl(''' || :P7_X_REG_SFX || '''' || ',REG_SFX),1) and' ||
'nvl(JMBG_ID_NO,1) = nvl(nvl(''' || :P7_X_JMBG_ID_NO || '''' || ',JMBG_ID_NO),1) and' ||
'nvl(IP_ID,1) = nvl(nvl(''' || :P7_X_IP_ID || '''' || ',IP_ID),1) and' ||
'nvl(TAX_ID_NO,1) = nvl(nvl(''' || :P7_X_TAX_ID_NO || '''' || ',TAX_ID_NO),1) and' ||
'nvl(INSTRUMENT_OLD,1) = nvl(nvl(''' || :P7_X_INSTRUMENT_OLD || '''' || ',INSTRUMENT_OLD),1) and' ||
'nvl(PREDZNAK_OLD,1) = nvl(nvl(''' || :P7_X_PREDZNAK_OLD || '''' || ',PREDZNAK_OLD),1) and' ||
'nvl(NAPOMENA,1) = nvl(nvl(''' || :P7_X_NAPOMENA || '''' || ',NAPOMENA),1) and' ||
'nvl(NOVI_POSAO_F,1) = nvl(nvl(''' || :P7_X_NOVI_POSAO_F || '''' || ',NOVI_POSAO_F),1) and' ||
'nvl(LISTA_SUMARNA,1) = nvl(nvl(''' || :P7_X_LISTA_SUMARNA || '''' || ',LISTA_SUMARNA),1) and' ||
'nvl(LISTA_REKAP,1) = nvl(nvl(''' || :P7_X_LISTA_REKAP || '''' || ',LISTA_REKAP),1) and' ||
'nvl(DZS_IDY_CL_ID,1) = nvl(nvl(''' || :P7_X_DZS_IDY_CL_ID || '''' || ',DZS_IDY_CL_ID),1) and' ||
'nvl(HNB_IP_CL_ID,1) = nvl(nvl(''' || :P7_X_HNB_IP_CL_ID || '''' || ',HNB_IP_CL_ID),1) and' ||
'nvl(NO_DYS_OO,1) = nvl(nvl(''' || :P7_X_NO_DYS_OO || '''' || ',NO_DYS_OO),1) and' ||
'nvl(POSTOTAK1,1) = nvl(nvl(''' || :P7_X_POSTOTAK1 || '''' || ',POSTOTAK1),1) and' ||
'nvl(POSTOTAK2,1) = nvl(nvl(''' || :P7_X_POSTOTAK2 || '''' || ',POSTOTAK2),1) and' ||
'nvl(POSTOTAK3,1) = nvl(nvl(''' || :P7_X_POSTOTAK3 || '''' || ',POSTOTAK3),1) and' ||
'nvl(BNK_ID,1) = nvl(nvl(''' || :P7_X_BNK_ID || '''' || ',BNK_ID),1) and'||
'nvl(ID,1) = nvl(nvl(''' || :P7_X_ID || '''' || ',ID),1) and' ||
'nvl(ID_RETKA,1) = nvl(nvl(''' || :P7_X_ID_RETKA || '''' || ',ID_RETKA),1) and' ||
'nvl(DATUM_STANJA,1) = nvl(nvl(''' || :P7_X_DATUM_STANJA || '''' || ',DATUM_STANJA),1) and' ||
'nvl(IZNOS,1) = nvl(nvl(''' || :P7_X_IZNOS || '''' || ',IZNOS),1) and' ||
'nvl(IZNOS_ACTUAL,1) = nvl(nvl(''' || :P7_X_IZNOS_ACTUAL || '''' || ',IZNOS_ACTUAL),1) and' ||
'nvl(ACT_AR_BAL_KN,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL_KN || '''' || ',ACT_AR_BAL_KN),1) and' ||
'nvl(ACT_AR_BAL,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL|| '''' || ',ACT_AR_BAL),1) and' ||
'nvl(IZNOS_ACTUAL_OLD,1) = nvl(nvl(''' || :P7_X_IZNOS_ACTUAL_OLD || '''' || ',IZNOS_ACTUAL_OLD),1) and' ||
'nvl(ACT_AR_BAL_KN_OLD,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL_KN_OLD || '''' || ',ACT_AR_BAL_KN_OLD),1) and' ||
'nvl(ACT_AR_BAL_OLD,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL_OLD || '''' || ',ACT_AR_BAL_OLD),1) and' ||
'nvl(EXG_RT_CRD_RSK_F,1) = nvl(nvl(''' || :P7_X_EXG_RT_CRD_RSK_F || '''' || ',EXG_RT_CRD_RSK_F),1) ';
execute immediate l_sql_stmt;
end; -
"Jump To" action on button not working
First, let me say that I have read a ton of messages on this
topic before posting this. Unfortuantely I have tried for over 5
hours to resolve this but no success. What is particularly strange
is the fact that this project file was published and working for a
few weeks but now is no longer acting correctly regarding the "jump
to slide" action for buttons.
I have built a project of about 30 slides. There are 4 quiz
questions, with scoring, that are programmed into the project. If
the user gets a passing score, their next slide is a 'success' page
and they continue on. However, if they do not pass (all 4 questions
must be correct) they are taken to a "fail" page that has 2 buttons
- 1 button is to go BACK to a previous slide where major content
is; the second button takes them BACK to the very first question
slide.
When I select the "jump to slide" choice from the "on
success" pull-down menu, the buttons do not work. When I select
another action choices, such as "open URL" or something else, they
do work. I have selected the "allow backward movement" choice from
the quiz manager which I have read in other posts saying that may
need to be selected. I have also checked my quiz scoring logic
making sure that if they are passing the quiz, they end up on a
different slide than if they fail the quiz.
I have also tried making a completely new movie with a slide
that has the "jump to slide" on a button and it does not work. I
have tried copying/pasting slides from one project file into
another but no go.
Really stuck bad and cannot afford any more time to
troubleshoot. I'd rather not have to remove the quiz and dependent
branching but may have to.
Is there an Adobe Support person I can send this project file
to for review?
Thanks in advance!!Let me fist say - "I feel your pain". I too have been going
though this for the past 6 hours with a peer and when requiring
100% pass to continue it would not go back. Here is what should
work for you that yes, Adobe has not covered well in their
documentation:
Go to Edit Question-->Edit Quiz-->Reporting--> Have
100% or more of total score to continue.
Then Quiz--->Quiz/Required--> Change from "Pass
Required - the user must pass this quiz to continue" to "Required -
the user take this quiz to continue"
And Quiz/Settings--> Allow backward movement checked
Then Options-->If Failing Grade--->Jump to slide/Slide
This should work for you. What I found out was that if you
have Pass Required instead of Required along with Allow backward
movement not together it hangs at the score results. If you have it
set for Pass Required you don't even get past the last Question
Slide.
Welcome to the world of Captivate Quirks. Let me know if this
helps - It works for us. -
WARNING: Actions on button
Hi
I do not understand why I am getting this warning below
WARNING: Actions on button or MovieClip instances are not supported in ActionScript 3.0.
All scripts on object instances will be ignored.
Can someone help?
mimiYou can still use pretty much any objects that you have ever used before, though that's not saying they haven't changed in some way. In AS3 to manage things like buttons and other interactions the primary code approach involves creating event listeners and event handler functions. Here is a description of how you would approach coding a button, though the same could apply to a movieclip....
Let's say you create a button symbol. Since it is a button, it is already a self animating object that will react to mouse interactions, but only visually at this stage. The first thing you need to do to make it useful code-wise is to assign it a unique instance name. So you drag a copy of it out to the stage from the library, and while it's still selected, you enter that unique instance name for it in the Properties panel... let's say you name it "btn1"
In AS3, to make a button work with code, you need to add an event listener and event handler function for it. You might need to add a few (for different events, like rollover, rollout, clicking it, but for now we'll just say you want to be able to click it to get a web page to open. In the timeline that holds that button, in a separate actions layer that you create, in a frame numbered the same as where that button exists, you would add the event listener:
btn1.addEventListener(MouseEvent.CLICK, btn1Click);
The name of the unique function for processing the clicking of that button is specified at the end of the event listener assignment, so now you just have to write that function out:
function btn1Click(evt:MouseEvent):void {
gotoAndPlay("site_section");
Here's some of what's involved there:
evt:MouseEvent - the event listeners throws an argument automatically which the function must be set up to receive. In this case I have given that argument a variable name of evt, though I could have chosen anything.
:void - this defines the class of the value that the function will return. In this case, the function does not return anything, so "void" is used. If it did return a value, you would see a line containing "return xyz"; in the function (where xyz is not literal, it simply represents the variable or value being returned) and the :void would be rplaced with some other class such as :String, :int, Date, etc....
In AS3, in strict mode, it is necessary to identify the types/classes of the variables being created, which is why you see :String, :MouseEvent, etc... showing up everywhere.
Now, to create another button with a unique function for it, you could just drag another copy of it from the library, give it a unique name, say btn2, copy/paste the code from btn1 and replace "btn1" with "btn2" in that copied code. -
Please help me with some action event buttons
{color:#ff6600}i am trying to figure out how to capture two values from an action event button. i have already tried it 6 times and i cant figure it out.
Its a simple calculator with numbers 1 and 2 and does a multiplication calculation.
Can you help me figure it out it will be really helpful.
{color}
import javax.swing.*;
import java.util.*;
import java.awt.event.*;
public class Calculator implements ActionListener {
JFrame frame;
JPanel contentpane;
JButton one,two;
JTextField field;
JButton mult;
JButton adds;
JButton equals;
JButton go;
public Calculator() {
frame = new JFrame ("Calculator" );
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
contentpane = new JPanel();
contentpane.setBorder(BorderFactory.createEmptyBorder(20,20,40,40));
one = new JButton( Integer.toString(1));
one.setActionCommand(Integer.toString(1));
one.addActionListener(this);
contentpane.add(one);
two = new JButton(Integer.toString(2));
two.setActionCommand(Integer.toString(2));
two.addActionListener(this);
contentpane.add(two);
field = new JTextField(10 );
contentpane.add(field);
go = new JButton("calculate");
go.setActionCommand("go");
go.addActionListener(this);
contentpane.add(go);
mult = new JButton( "*");
mult.setActionCommand("mult");
mult.addActionListener(this);
contentpane.add(mult);
adds = new JButton( "+");
adds.setActionCommand("add");
contentpane.add(adds);
frame.setContentPane(contentpane);
frame.pack();
frame.setVisible(true);
public void actionPerformed (ActionEvent event ) {
String eventn = event.getActionCommand();
String text = field.getText();
String mult ="*";
{color:#800080}if (eventn.equals("1")||eventn.equals("2") ){ \\ *{color:#ff6600}i dont know how to store two different value from an action event{color}*
text+=eventn ;
int num = Integer.parseInt(text);
field.setText(text);
{color}
{color:#800080}if (eventn.equalsIgnoreCase("mult")){
field.setText("");
{color}
{color:#800080}};
{color}
public static void runGui(){
JFrame.setDefaultLookAndFeelDecorated(true);
Calculator r = new Calculator();
public static void main (String[]args){
javax.swing.SwingUtilities.invokeLater(new Runnable(){
public void run(){
runGui();import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ListenerDemo {
private class DigitListener implements ActionListener {
private int digit;
public DigitListener(int digit) {
this.digit = digit;
public void actionPerformed(ActionEvent evt) {
JOptionPane.showMessageDialog(f, "You pressed " + digit);
private JFrame f = new JFrame();
private JButton button1 = new JButton("1");
private JButton button2 = new JButton("2");
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable(){
public void run() {
new ListenerDemo().go();
void go() {
button1.addActionListener(new DigitListener(1));
button2.addActionListener(new DigitListener(2));
JPanel cp = new JPanel();
cp.add(button1);
cp.add(button2);
f.setContentPane(cp);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.pack();
f.setLocationRelativeTo(null);
f.setVisible(true);
} -
Actions on button or MovieClip instances are not supported in ActionScript 3.0?
I have recently updated my Flash and I seriously regret it as everything seems to of changed. For instance I want to publish a movie i created in Action Script 3.0. In this movie i have buttons which have actions applied to them and everytime i go to publish the site, it brings up the error
'WARNING: Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored.'
How do I go about keeping my 3.0 elements but having buttons with actions applied to them. I am a complete beginner with Flash by the way so the answer would need to be completely straight forward.
Thanks!okay, just to simplify this even further and to break it into steps..
1: I Create a new button.
2: I give it an instance name of say 'button'
3: I place the following code in the timeline
button.addEventListener(MouseEvent.CLICK,callFunction);
function callFunction(e:Event):void{
gotoAndPlay();
Now here is where I am stuck. What do you need to add to this to navigate to another scene?
Thanks again!! -
Photoshop Action Play Button Inactive
The Actions Play Button has suddenly become inactive, i.e. regardless of which Action I now select the Play Button remains unclickable. A circle with bar appears when I hover over the Play Button.
This happened at some point while I was editing an Image in CS3 (Windows XP SP2). I had run one (of many Actions) I have successfully. When I came back to it (or any other Action) a short time later none of my actions could be invoked. I have tried several different images, I am sure I have highlighted the background layer when I try any of the Actions. I have restarted the Photoshop, and I have rebooted my computer. I have done several web searches and seen a few other posts about this problem, but so far have been unable to find a solution.
Thanks in advance,
Kenhiya!
this issue might be worth checking up on if video is playing (and you can hear it) but the audio isn't:
iTunes for Windows: Audio files do not play in iTunes 5 or 6
love, b -
UI element regarding the Extend button (Action button)
Hi,
I am new to webdynpro java.I need to create a action button called Extend button.I am ving two fields like vendor number and company code.Requirement is that if i give vendor number i need to get the company code details relevant to that vendor number as soon as i click the extend button.I dont know how to proceed. Please help me out if any one knows abt this.
Its very urgent.
Regards,
Laxmi Soujanya.Hi Laxmi,
If you are new to Webdynpro, then first go through the below link of "Web Dynpro Sample Applications and Tutorials":
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d [original link is broken]
Hope this will help you...
Thanks
Sandy -
Action on Button in a Tiled View
HI,
Does anyone have a sample code/insight/thoughts on how I could
implement the following ??
I have a button inside a tiled view. If the user clicks on one of the
buttons in the list - I need to perform a certain action - basically
delete that row from the tiled view (and do some other stuff) and re-
display the list.
Thank you
AtulHello Moises
The problem with this solution is that if you ever need to modify your maintenance view (i.e. regenerate the dynpros because you may want to add new fields) your coding is gone.
This is not the case if you are using event 19. Below you see same sample coding:
***INCLUDE LZUS_SDN_MAINTF01 . " Function Group with maintenance views
* Event 19: After Init. Global Variables, Field Symbols, etc.
* http://help.sap.com/saphelp_nw2004s/helpdata/en/91/ca9f44a9d111d1a5690000e82deaaa/content.htm
FORM exclude_gui_function.
* define local data
DATA: ls_excl TYPE vimexclfun.
ls_excl-function = 'DELE'. " taken from standard GUI-status 'ZULG'
BREAK-POINT.
AUTHORITY-CHECK OBJECT 'F_BKPF_BUK'
ID 'BUKRS' FIELD '1000'
ID 'ACTVT' FIELD '02'.
IF ( syst-subrc NE 0 ).
APPEND ls_excl TO excl_cua_funct.
ENDIF.
APPEND ls_excl TO excl_cua_funct. " Just for the purpose of demonstration
ENDFORM. "exclude_gui_function
Regards
Uwe -
Hi
I got a button with 3 types of icons. pressed,normal and disabled.
I have created an action for the button and i would like to use this action to detrmin if the button is enabled or not
(like explianed in: http://java.sun.com/docs/books/tutorial/uiswing/misc/example-1dot4/index.html#ActionDemo)
My problem is that icon is not fully dispalyed - I know the button icon should be effected by the action icon but - the action can only have one icon...
any ideas?
editModeHandler = new EditModeHandler(this, TagsLoader.getEditModeTag());
btnEditMode = new StandardButton(TagsLoader.getEditModeTag());
btnEditMode.setIcon(GeneralConstants.EditModeIcon);
btnEditMode.setDisabledIcon(GeneralConstants.EditModeDisabledIcon);
btnEditMode.setPressedIcon(GeneralConstants.EditModePressedIcon);
btnEditMode.setAction(editModeHandler );Regards,
LiatHere you go (see how the same action is added to a JMenu, a JToolbar and a regular JButton with different icons shown) :import javax.swing.*;
import javax.swing.plaf.basic.BasicButtonUI;
import java.net.URL;
import java.net.MalformedURLException;
import java.awt.event.ActionEvent;
import java.awt.*;
import java.beans.PropertyChangeListener;
public class MultiIconButtonTest {
private static final String ICON_BIG = "bigIcon";
private static final String ICON_BIG_DISABLED = "bigDisabledIcon";
private static final String ICON_BIG_PRESSED = "bigPressedIcon";
private static class MultiIconAction extends AbstractAction {
public MultiIconAction(String aName, Icon aSmallIcon, Icon aBigIcon, Icon aBigDisabledIcon, Icon aBigPressedIcon) {
super(aName, aSmallIcon);
putValue(ICON_BIG, aBigIcon);
putValue(ICON_BIG_DISABLED, aBigDisabledIcon);
putValue(ICON_BIG_PRESSED, aBigPressedIcon);
public void actionPerformed(ActionEvent e) {
System.out.println("And...... ACTION!!!");
private static class MultiIconButton extends JButton {
public MultiIconButton(Action anAction) {
super(anAction);
protected void configurePropertiesFromAction(Action a) {
Integer n = (a==null) ? null : (Integer)a.getValue(Action.MNEMONIC_KEY);
setMnemonic(n==null ? '\0' : n.intValue());
setText(a!=null ? (String)a.getValue(Action.NAME) : null);
setToolTipText(a!=null ? (String)a.getValue(Action.SHORT_DESCRIPTION) : null);
setIcon(a!=null ? (Icon)a.getValue(ICON_BIG) : null);
setDisabledIcon(a!= null ? (Icon)a.getValue(ICON_BIG_DISABLED) : null);
setPressedIcon(a!=null ? (Icon)a.getValue(ICON_BIG_PRESSED) : null);
setActionCommand(a!=null? (String)a.getValue(Action.ACTION_COMMAND_KEY) : null);
setEnabled(a!=null ? a.isEnabled() : true);
private static class MultiIconEnabledToolBar extends JToolBar {
public JButton add(Action a) {
if (!(a instanceof MultiIconAction)) {
return super.add(a);
JButton b = new MultiIconButton(a) {
protected PropertyChangeListener createActionPropertyChangeListener(Action a) {
PropertyChangeListener pcl = createActionChangeListener(this);
if (pcl == null) {
pcl = super.createActionPropertyChangeListener(a);
return pcl;
b.setText("");
b.setHorizontalTextPosition(JButton.CENTER);
b.setVerticalTextPosition(JButton.BOTTOM);
add(b);
return b;
private static Icon[] loadIcons() {
Icon[] icons = new Icon[4];
try {
icons[0] = new ImageIcon(new URL("http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/images/middle.gif"));
icons[1] = new ImageIcon(new URL("http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/images/tumble/T1.gif"));
icons[2] = new ImageIcon(new URL("http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/images/tumble/T2.gif"));
icons[3] = new ImageIcon(new URL("http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/images/tumble/T3.gif"));
} catch (MalformedURLException e) {
e.printStackTrace();
return null;
return icons;
public static void main(String[] args) {
Icon[] icons = loadIcons();
if (icons == null) System.exit(1);
final JFrame frame = new JFrame(MultiIconButton.class.getName());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
final MultiIconAction myAction = new MultiIconAction("action", icons[0], icons[1], icons[2], icons[3]);
JPanel mainPanel = new JPanel(new BorderLayout());
JToolBar toolBar = new MultiIconEnabledToolBar();
toolBar.add(myAction);
toolBar.add(new AbstractAction("simple icon action", icons[0]) {
public void actionPerformed(ActionEvent e) {
myAction.setEnabled(!myAction.isEnabled());
mainPanel.add(toolBar, BorderLayout.NORTH);
JPanel centerPanel = new JPanel(new FlowLayout());
JButton button = new MultiIconButton(myAction);
centerPanel.add(button);
mainPanel.add(centerPanel, BorderLayout.CENTER);
frame.setContentPane(mainPanel);
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu("file");
menu.add(myAction);
menuBar.add(menu);
frame.setJMenuBar(menuBar);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
frame.pack();
frame.show();
}I really think that changing the displayed icon depending on which Container the action is added to should be much simplier (at least without having to extend those containers). -
How to display smartform through transaction code on action of button
Hi All,
Please let me know how can i display smartform through tcode on button action.
For e.g. I have a F.62 tcode where the smartform is attached. Now i want a button in BSP which when clicked should call tcode F.62 and display that smartform.
Also if i cannot use "CALL TRANSACTION" can i use "SUBMIT" and call that transaction.
If not how will i able to acheive that?
Please help as it is very urgent.
Thanks,
RahulHi,
Use ITS to display the F.62 transaction is worth a try. But I am not sure whether the ITS will be able to display Smartforms...
Another option is trying to launch the Smartforms (I dont know the F.62 transaction enough to tell if it is time-consuming or not) and convert it to PDF (there is plenty of threads about this in SDN) and then, display it through BSP (either inline or for the user to download).
Best regards,
Guillaume -
11gxe , apex 4.x ,
hi all ,
i am new to apex ,
i want to create a button , then create a dynamic action to it to do an action , but when i create the button , then go to
create a dynamic action , i see the a lot of events but when i go to pick an item to create the dynamic action for , i do not see the buttons created ?
thanksHi,
I see. Your local install of Apex is version 4.0, apperantly it is not supported to create a dynamic action that is triggered by a button.
You can, with some effort, create a dynamic action on a button. You'll need to create a button with 'Button Style' set to 'HTML button' and add a custom class or id to that button under the 'Button Attributes'. For example:
http://vincentdeelen.com/images/otn/da_button_layout.png
Then create a dynamic action, choose 'jQuery selector' as selection type and then use the class or the id of the button as selector. The outcome should look something like this:
http://vincentdeelen.com/images/otn/da_da_layout.png
For more info on jQuery and selectors, study the jQuery website: http://www.jquery.com
Regards,
Vincent -
Agentry - List Tile View Single Action AND Button?
Hi experts,
we are using a List Tile View with a Single Click Action, which works fine.
But now we want to add a button (or something else you can click on) to the List Tile View with a different action.
So, if you click on this button, action A should be executed. And if you click somewhere else into the tile, action B should be started.
Is this somehow possible? Thanks!
Best regards
ChristianNot with Single Click Action. That is if you click on the tile it will call that action, anywhere on that tile. What you could do is have two buttons on the tile (for selected) they they can push. But then the users would have to select the tile, then click on a button.
-
Adding actions to buttons...
I created a slide show in flash (I'm very new to Flash). The
slideshow
works great so far. I recently added some buttons to the
slideshow (each in
their own respective layers) and the buttons are Prev, Play,
Stop, Next. I
want to add actions to each of those buttons with the action
script. I want
the Stop button to simply stop the movie whenever you press
the button, the
play button I want to simply play the slideshow if one has
pressed the stop
button (by default my slideshow starts when it loads). The
next and play
buttons are obvious what they will do. I'm wondering how I go
about adding
these actions to each button. I know how to add them to the
buttons but I
just don't know the proper Action Script code. Can anyone
help me out with
this. Can't seem to find a good tutorial on it!
Best Regards,
Chris Jumonville
iMedia Web Design
503.277.3553Nevermind, did it myself.
Best Regards,
Chris Jumonville
iMedia Web Design
503.277.3553
"Chris Jumonville" <[email protected]> wrote in
message
news:ejj8vq$jff$[email protected]..
>I created a slide show in flash (I'm very new to Flash).
The slideshow
>works great so far. I recently added some buttons to the
slideshow (each
>in their own respective layers) and the buttons are Prev,
Play, Stop, Next.
>I want to add actions to each of those buttons with the
action script. I
>want the Stop button to simply stop the movie whenever
you press the
>button, the play button I want to simply play the
slideshow if one has
>pressed the stop button (by default my slideshow starts
when it loads).
>The next and play buttons are obvious what they will do.
I'm wondering how
>I go about adding these actions to each button. I know
how to add them to
>the buttons but I just don't know the proper Action
Script code. Can anyone
>help me out with this. Can't seem to find a good tutorial
on it!
>
> --
> Best Regards,
>
> Chris Jumonville
> iMedia Web Design
> 503.277.3553
> -
I've been looking for a workaround to my problem and I haven't found any post in this forum regarding the same issue.
I want to make a button which controls the states of a multi state object, such buttons must "turn off" and "turn on" three diferents MSO, so I need one single button which sets two MSO state to OFF and has actions set to next state in the third MSO so it can switchs the states On/Off.This is my set up. There is 3 MSO, ON and OFF
There are 3 buttons with 3 actions each, the first action is set to next state so it can switch between ON and OFF states. The other 2 actions set the other two MSO state to OFF so in case any of them were set in ON it can be turned OFF by turning ON any of the others.
Seems legit, right? But it doesn't work. Please, clue me what to do.
Maybe you are looking for
-
So, I've been having a problem with music repeating when I select all of an album or artist to put on shuffle. I like to go to sleep with music playing, so I'll select something that I know should only take one or two hours to finish, but when I wake
-
I'm trying to setup an iPod shuffle connected to small speakers and have it remain charged continuously. Any way to accomplish this? I need as simple an interface and setup as possible for my blind Grandmother.
-
Data Writing Speed for Excel Sheet while taking data from PCI DAQ card
Dear All, I am taking the data form the card EX-92026 pci card and writing those datas into the Excel sheet, now i want the data at the speed of max of 10 miliseconds but while writing the data into excel sheet, it shows the diff of 15 ms b
-
Testing execution of 6i reports from a HTML portlet
How can I execute an Oracle 6i report from a portal30 HTML portlet. The HTML command looks something like this "C:/reports_6i_runtime.exe userid=user_account/password@connect_string H:/report_6i.rep" I get the message "page cannot be displayed". When
-
Sony Vegas Metadata and File tagging?
Howdy! I used to use Sony Vegas on the PC and have made the switch to FCP. Im liking all that I see but there was one feature that was great in vegas that i can't find in FCP. It was the ability to tag your clips eg "falls" "Dave" "Bride" "Somersault