Spinner list to pop up with a button click
How can I open this spinner list with a click of a button, and then close it with another button?
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="Sample SpinnerList" xmlns:r="renderers.*">
<s:layout>
<s:VerticalLayout paddingTop="40" paddingBottom="5" paddingLeft="5" paddingRight="5" gap="10"
horizontalAlign="center" verticalAlign="top"/>
</s:layout>
<s:SpinnerListContainer width="200">
<s:SpinnerList width="100%">
<s:dataProvider>
<s:ArrayCollection>
<fx:String>Test1</fx:String>
<fx:String>Test2</fx:String>
<fx:String>Test3</fx:String>
<fx:String>Test4</fx:String>
<fx:String>Test5</fx:String>
</s:ArrayCollection>
</s:dataProvider>
</s:SpinnerList>
</s:SpinnerListContainer>
</s:View>
I cant get it to work it with this code:
How do I implement the code to my code so I can use the button to open spinner?
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="Sample SpinnerList" xmlns:r="renderers.*">
<s:layout>
<s:VerticalLayout paddingTop="40" paddingBottom="5" paddingLeft="5" paddingRight="5" gap="10"
horizontalAlign="center" verticalAlign="top"/>
</s:layout>
<s:SpinnerListContainer width="200">
<s:SpinnerList width="100%">
<s:dataProvider>
<s:ArrayCollection>
<fx:String>Test1</fx:String>
<fx:String>Test2</fx:String>
<fx:String>Test3</fx:String>
<fx:String>Test4</fx:String>
<fx:String>Test5</fx:String>
</s:ArrayCollection>
</s:dataProvider>
</s:SpinnerList>
</s:SpinnerListContainer>
</s:View>
Similar Messages
-
Hi, I need to show a pop up with 4 buttons. I would not like use a dynpro.
How can i do it ???
Now, I use "FUNCTION 'POPUP_GET_VALUES'", but it doesn´t let use 4 buttons.
ThanksHi,
Try using the function module POPUP_WITH_3_BUTTONS_TO_CHOOSE...It displays four buttons..you can enter the text for the three buttons and the fourth one is the cancel button..
Thanks
Naren -
Creating tables with a button click
can anyone give me a sample code for creating multiple tables in a scrollpane
with a button click.
ThanksHere is an example that returns a JTable in a JScrollPane in a JInternalFrame:
import java.awt.*;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import java.awt.GridLayout;
public class TablaJ extends JPanel{
public TablaJ(){
public TablaJ(String data[][], String columnNames[]){
super(new GridLayout(1,0));
final JTable table = new JTable(data, columnNames);
//Create the scroll pane and add the table to it.
JScrollPane scrollPane = new JScrollPane(table);
//Add the scroll pane to this panel.
add(scrollPane);
static JInternalFrame crearFrameConTabla(String data[][], String columnNames[], String tabla) {
//Create and set up the window.
JInternalFrame frame = new JInternalFrame(tabla,true,true,true,true);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
//Create and set up the content pane.
TablaJ newContentPane = new TablaJ(data, columnNames);
newContentPane.setOpaque(true); //content panes must be opaque
frame.setContentPane(newContentPane);
frame.pack();
return frame;
} -
Hi experts,
Does anyone happen to now any pop up window with one button(OK button)?
Regards,
MarcHi,
This Function Module contains only OK button.
POPUP_TO_INFORM
Hope this will help.
Regards,
Swarna Munukoti. -
Creating a pop up window on button click?
Hi
How would I create a pop up modal window when a user clicks on a print button within an interactive report. This window would then display a message with a confirm or cancel button. If they click on confirm the page prints out and if they click cancel it takes the user back to the report
Is this possible? if so how is this achieved?
Many ThanksThe confirm dialog is a native dialog in the browser. It will display a message and it has an ok and cancel button. Running it in javascript will prompt the user with the dialog, and the return value will be true or false depending on the button clicked.
You don't need any extra page whatsoever.
var r=confirm("Press a button");
if (r==true)
x="You pressed OK!";
else
x="You pressed Cancel!";
}This would prompt you with a small dialog, asking "Press a button.". Clicking Ok or Cancel will return true or false to variable r, which in this code is then tested.
You could shorten it up to
if(confirm("Do you want to print?")){
//execute print code
};Alternatively, if you are on version 4.0 or higher you can use a dynamic action for this. Set the action to fire on the click of a button, and as a true action you can choose the confirm action, which then lets you display a text. -
Having Trouble Closing a JFrame With a Button Click in Swing
I am brand new to Java so this is probably something really stupid.
On my main form I have a table displaying records from a database. When you double click a record, it pops up a second form showing the details of that record. You can then edit the data in this second form and click a "save" button which saves the data to the database. I want this button to also close that second form, however in the button click event, the second form variable is null.
Here is some code showing the basic concept:
public class SampleForm {
private JButton saveJobButton;
private JFrame frame;
private JFrame editDetailFrame;
public static void main(String[] args) {
SampleForm sample = new SampleForm();
sample.createMainFrame();
public void createMainFrame() {
frame = new JFrame();
JComponent panel = buildPanel();
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.getContentPane().add(panel);
frame.pack();
frame.setVisible(true);
public void createEditFrame() {
editDetailFrame = new JFrame();
editDetailFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
JComponent editPanel = new SampleForm().buildDetailPanel();
editDetailFrame.getContentPane().add(editPanel);
editDetailFrame.pack();
editDetailFrame.setVisible(true);
editDetailFrame.validate();
// save button
private JButton getSaveJobButton() {
if (saveJobButton == null) {
saveJobButton = new JButton();
saveJobButton.setText("Save Job");
saveJobButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
.. saves data to database.
// here is where I thought the dispose() should go but the editDetailFrame is null at this point.
editDetailFrame.dispose();
return saveJobButton;
}Any assistance would be much appreciated.That handles the NullPointer, but still doesn't close my second Frame. The editDetailFrame should not be null at this point as I am clicking a button on the editDetailFram itself so I think the problem is that I just don't have a reference to the actual object at that point and my variable is just an empty one.
-
Create three textfiles with one button click
Hello,
how is it possible to create three textfiles after a button click. I create a textfile with the following code in a page process:
owa_util.mime_header( 'application/octet', FALSE );
htp.p('Content-Disposition: attachment; filename="Client_' || to_char(sysdate,'YYYYYMMDD HH24MI') || '.LAS"');
owa_util.http_header_close;
htp.prn('test');
htmldb_application.g_unrecoverable_error := true;
For the first textfile a savedialog to save the file appears in the browser. But there is no dialog for the second and third file.
How is it possible to get the savedialog for the second and third file?
Does anyone can help?
Best regards,
HamburgerI solved it with javascript:
window.open("f?p=1:2","_blank");
window.open("f?p=1:3","_blank");
window.open("f?p=1:4","_blank");
and three onload processes on every site!
Greets -
Open LOV popup with a button click or image link click
hi , a try the solution:
11g: How to populate LOV from button click
for open pòpup of lov , but don't works :
first the others components block the submit of button
i put the inmediate propertie but lov don't still open
any ideas???Does this one help?
Invoke lov popup window via keypress -
Hi,
I need a pop up just similar to the POPUP_TO_CONFIRM,
but the required pop up should contain radio buttons to choose one option out of two.
Is any such popup is available by use of any function module.Hi,
Plz try this way.
A centered Popup allowing the choice of up to two of three possible answers is to be created (Creditor, Material, Account). The third option is to be chosen by default.
DATA: BEGIN OF SPOPLIST OCCURS 15.
INCLUDE STRUCTURE SPOPLI.
DATA: END OF SPOPLIST.
DATA: ANTWORT TYPE C.
SPOPLIST-VAROPTION = 'Creditor'(001).
APPEND SPOPLIST.
SPOPLIST-VAROPTION = 'Material'(002).
APPEND SPOPLIST.
SPOPLIST-VAROPTION = 'Account '(003).
SPOPLIST-SELFLAG = 'X'.
CALL FUNCTION 'POPUP_TO_DECIDE_LIST'
EXPORTING TITEL = 'Possible entra: Order'(a01)
TEXTLINE1 = 'By which criteria'(b01)
TEXTLINE2 = 'should orders'(b02)
TEXTLINE3 = 'be selected?'(b03)
MARK_MAX = 2
MARK_FLAG = 'X'
IMPORTING ANSWER = ANTWORT
TABLES T_SPOPLI = SPOPLIST
EXCEPTIONS TOO_MUCH_ANSWERS = 1
TOO_MUCH_MARKS = 2.
IF SY-SUBRC = 2.
WRITE: 'Too many answers chosen.'.
ENDIF.
IF ANTWORT = 'A'.
WRITE: 'Popup canceled.'.
ELSE.
WRITE: 'Options chosen:'.
LOOP AT SPOPLI WHERE SELFLAG = 'X'.
WRITE /SPOPLI-VAROPTION.
ENDLOOP.
ENDIF.
Hope this helps you.
plz reward if useful.
thanks,
dhanashri -
Help with dynamic button click inside titleWindow
Hi Everyone, Your Help is much appreciated
I am building a flex application and I want the user to click
on a button and send them to another website. Basically I am
creating a tileList that holds thumbnails (created using item
renederer) and on click a popup with the same image and button will
be created. I get errors when I click the link button. This is what
I have so far:
// This is my custom item renderer
<mx:VBox xmlns:mx="
http://www.adobe.com/2006/mxml"
horizontalAlign="center"
verticalAlign="middle">
<mx:Image source="{data.@thumbnailImage}" />
<mx:Label text="{data.@title}" />
</mx:VBox>
// My TileList
<mx:TileList id="tileList"
dataProvider="{xmlListCollection}"
itemRenderer="CustomItemRenderer"
maxColumns="4"
columnWidth="140"
rowCount="2"
rowHeight="140"
verticalScrollPolicy="off"
horizontalScrollPolicy="off"
itemClick="tileList_itemClick(event);" />
// This is my code
private function tileList_itemClick(evt:ListEvent):void {
// Set the TitleWindow
myTitleWindow = new TitleWindow();
myTitleWindow.title = evt.itemRenderer.data.@title;
myTitleWindow.width = 350;
myTitleWindow.height = 600;
myTitleWindow.showCloseButton = true;
// Set the Image
img = new Image();
img.maintainAspectRatio = true;
img.buttonMode = true;
img.useHandCursor = true;
img.source = evt.itemRenderer.data.@fullImage;
img.addEventListener(MouseEvent.CLICK , image_click);
//Set the Label
myLabel = new Label();
myLabel.text = evt.itemRenderer.data.@title;
myLabel.setStyle("fontWeight","bold");
// Here I set the Button but its not functioning
var btn:Button = new Button();
btn.label = evt.itemRenderer.data.@link;
btn.buttonMode = true;
btn.addEventListener(MouseEvent.CLICK,clickHandler);
myTitleWindow.addChild(img);
myTitleWindow.addChild(myLabel);
myTitleWindow.addChild(btn);
PopUpManager.addPopUp(myTitleWindow, this, true);
PopUpManager.centerPopUp(myTitleWindow);
// This is the Part I can't get it to work
private function clickHandler(e:MouseEvent):void{
var url:String = "
http://" + data.@link;
var myRequest:URLRequest = new URLRequest(url);
navigateToURL(myRequest,'_blank');
My xml looks like this
<gallery>
<image title="Image One"
thumbnailImage="assets/big.jpg"
fullImage="assets/small.jpg"
link="www.google.com"
description = "Search Google"/>
</gallery>What error?
Is your url being concatenated correctly? Trace it.
Tracy -
How do you clear an InputText field with a button click
I am trying to create a calculator and I want to be able to use a "Clear" button that will reset all the values entered in several InputText fields and the total which is a label. I can update and clear a label using the UpdateContext
function, but this isn't working for an InputText field. Can someone provide an example on how to clear one InputText field?Hello,
To do this you need to do the following
Add an "Input Text", select the inputText and click Express view (bottom right).
Set the default value to
textboxvalue
without any quotes
On the behaviour / OnVisible of screen you put the inputText on set for example the following
UpdateContext({textboxvalue: "Enter text here"})
You can now add several buttons on the screen that do something
UpdateContext({textboxvalue: ""})
or
UpdateContext({textboxvalue: "Enter Text here"})
Or you could chain it with another OnSelect that is going on on the screen and reset your textbox. You can then also add the value the user has entered in a collection too (see bottom example)
Navigate(Screen2, ScreenTransition!Fade);UpdateContext({textboxvalue: "Enter Text here"})
Collect(inputcollection,{userinput: InputText1!Text});Navigate(Screen2, ScreenTransition!Fade);UpdateContext({textboxvalue: "Enter Text here"})
I believe this should point you in the right direction
Regards
StonyArc -
Call another form with a button click (Oracle 10g)
I have two forms. (One called Main Form and 2nd Called Notification summary)
I want to call Main Form from notification summary. I have a unique column which is both in Main form and notification summary.
I want to pass that unique column from notification summary to main form so that specific detail open in main form.
Please suggest solution.
Edited by: 871590 on Jul 11, 2011 4:29 PMStarting with a question: why do you need an own (main) form, if you need to call that form in another context, it's fine. If you will use this functionality only once, consider a second canvas (content or stacked, whatever fits better) or a second window within your form (notification).
If its only on value you need to pass use a data parameter or a global variable; the first would be preferable to me.
If there are more values in your column you may use global record group or (preferable to me) some kind of "temporary" table. It may be a global temporary table as provided by the oracle db or you are doing this with a normal permanent table. For the latter you will have slight higher amount of programming for organisational purposes. -
Removing a confirmation pop-up after a button click
What I am trying to do is the following:
I have a confirmation popup for a table row delete triggering action 'delete_confirm'.
yes action = 'delete'
no action = 'none'
If they choose yes (delete) the action handler calls the controller method which will call a back end service which takes care of the delete.
The problem I am encountering is that the dialog box will remain on the screen until the back end method call has finished processing. I'd like to dismiss the dialog box immediately after th button push and display the standard WD hourglass + processing graphic while the back-end call processes.
I hope this is clear; if not, I will try to elaborate.Thanks for the response. You are right, I needed a second round trip to process both independently. Unfortunately, I was unable to find a graceful solution. Instead, I used the timer control and manipulated it in such a manner that it fires off an action 1 second after the window closes. It's fairly transparent to the user and they get to see what they are used to in terms of loading so I'll just have to wait until enhancement pack 1 to do this a different way I think.
-
Retriving Data from TableView with a Button Click
Hi,
I have a TableView and a Button. The requirement is that the user can select several rows in the tableview and click the button to process the selected rows. I am using the following logic in OnInputProcessing to retrive the rows selected,
DATA: TB1 TYPE REF TO CL_HTMLB_TABLEVIEW,
tlist1 TYPE REF TO OBJECT.
case event->name.
WHEN 'button'.
CALL METHOD cl_htmlb_manager=>get_data
EXPORTING
request = runtime->server->request
name = 'tableView'
id = 'tvX'
RECEIVING
data = tlist1.
TB1 = tlist1.
Then access TB1->data->prevselectedrowindextable to find out which row indexes the user has clicked in TableView.
However I get error that can't assign type ot tlist1 to TB1.
The return type of tlist1 is TYPE REF TO CL_HTMLB_TABLEVIEW so this assignment should be possible.
But I think the problem is only during runtime is the type of tlist1 knowm. ?
Also, is there a better way to retrive multiple rows from a tableview when a button is clicked ?
ThanksAnand,
<i>But I think the problem is only during runtime is the type of tlist1 knowm. ?</i>
You are correct that ? is the character you are looking for here. In your next quiet moment, spend some time reading ABAP online docs (or in fact any OO like language) on casting.
DATA: tb TYPE REF TO CL_HTMLB_TABLEVIEW,
obj TYPE REF TO OBJECT.
obj = tb.
tb ?= obj.
You need the ? to indicate to ABAP that are casting from an OBJECT to something bigger. Notice that in the other way this is not required.
(If you find the relevant link onto help.sap.com, you can append it here. I don't have it handy at the moment.)
brian
PS: I see that you are new in our small corner of SDN, and would thus recommend that you also look at <a href="/people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help">Getting Help</a>. It helps to keep the learning curve short. -
Open mutiple PDF report outputs with one button click
I need to open multiple PDF outputs depending on check boxes on the front end (Asp.net C#) app connecting to Crystal report server XI. Here is my code. I'm able to open only one PDF not multiple. If I use Response.end() at the end except first nothing is displayed. If I remove response.end() it opens Adobe and displays error msg saying file is corrupted. Please let me know if there is any other way to display multiple PDF outputs
SessionMgr sessionMgr = new SessionMgr();
EnterpriseSession enterpriseSession;
ReportAppFactory reportAppFactory;
ReportClientDocument reportClientDocument;
EnterpriseService enterpriseService;
InfoStore infoStore;
InfoObjects infoObjects;
InfoObject infoObject;
String crServerName = ConfigurationManager.AppSettings.Get("CRServerName");
String crUserID = ConfigurationManager.AppSettings.Get("CRUserID");
String crPwd = ConfigurationManager.AppSettings.Get("CRPwd");
String dbUserID = ConfigurationManager.AppSettings.Get("DBUserID");
String dbPwd = ConfigurationManager.AppSettings.Get("DBPwd");
enterpriseSession = sessionMgr.Logon(crUserID, crPwd, crServerName, "secEnterprise");
enterpriseService = enterpriseSession.GetService("InfoStore");
infoStore = new InfoStore(enterpriseService);
infoObjects = infoStore.Query("Select SI_ID From CI_INFOOBJECTS Where SI_NAME='" + reportName + "' And SI_INSTANCE=0");
infoObject = infoObjects[1];
EnterpriseService tempService = enterpriseSession.GetService("", "RASReportFactory");
reportAppFactory = (ReportAppFactory)tempService.Interface;
reportClientDocument = reportAppFactory.OpenDocument(infoObject.ID, 0);
// Pass datbase logon credentials
reportClientDocument.DatabaseController.logon(dbUserID, dbPwd);
reportClientDocument.DataDefController.ParameterFieldController.SetCurrentValues("", "ProjectID", ddlProjects.SelectedValue);
PrintOutputController rasPrintOutputController;
CrReportExportFormatEnum rasReportExportFormat = CrReportExportFormatEnum.crReportExportFormatPDF;
rasPrintOutputController = doc.PrintOutputController;
ByteArray tempByteArray = rasPrintOutputController.Export(rasReportExportFormat, 0);
Byte[] byteStreamOutput = tempByteArray.ByteArray;
Response.AddHeader("content-disposition", "attachment;filename=" + reportName + ".pdf");
Response.ContentType = "application/pdf";
Response.BinaryWrite(byteStreamOutput);
Response.end();Hello, Anu;
Business Objects will create one PDF from one report. Once the report object has been formatted as a PDF it is no longer handled by Business Objects but uses the functionality of Adobe.
If they were being saved as .pdf files, would there be a way to open more than one at a time?
Elaine
Maybe you are looking for
-
I recently bought a new IPAD2. All personal data and APPS were transferred from my older IPAD to my new one at the time of purchase. I'd like to give my older IPAD to my husband w/o removing him from my Apple acct. Apple's support does not provide
-
Why doesn't the Card show up from the CardLayout:used JPanel,JFrame
hello guys, this is a question regarding. As I did not get nice responses i am posting again today. http://forum.java.sun.com/thread.jsp?forum=57&thread=235761 Hi, I would like to re-arrange my question and put it in a simpler way. I have a frame(mai
-
Question about the programming of a legend
Hello everybody, I have a question about the programming of a waveform's legend. I already asked here in this forum about the legend programming (03) months ago. I went satisfied but I ve just noticed that this code (See Code old_legend_test.llb with
-
DIY hard drive replacement for MPB
Hello, Has anyone actually replaced the HD in their MBP? I'm interested in upping the size of my drive to 200gb. Apple won't do the upgrade. There are outfits that will do the switch but the charge is around $450. I can score the same drive from Newe
-
How can you share books with family members?
I purchased a book in iTunes and it's on my library shelf. How can I share this book with my sister?