Confusing behavior of button event
Hi all,
I am learning the behavior of the mechanical action of the button. I want to implement something like this. I have two buttons START and STOP. Initially, STOP is disabled and START is enabled. Once START pressed, I disable START and enable STOP. After the START pressed, I update the string output every 6 seconds. I have timeout event triggered every 100ms and will terminate the program when STOP pressed. But I found that after START pressed, STOP will be enabled but STOP doesn't response to my mouse click. I try to set STOP as Latch or switch, doesn't work either
Quick analysis:
Use latch action for the booleans, not exotic and most often inappropriate ones such as "switch until released". Once they are latch action, their terminals belong inside their respective event case.
The first inner sequence structure has no function (delete it!) and the other two can be eliminated by using proper data dependencies.
Use a single loop and a single event structure and keep track of the program state in a state variable in a shift register (e.g. an enum). No sequences needed.
There is no need for timeout events, because nothing special happend there (first event structure). So why spin the loop?
An event structure with only a timeout event is pretty useless (second event structure).
LabVIEW Champion . Do more with less code and in less time .
Similar Messages
-
Unable to raise button Event in BlackBerry Emulator
Hi All,
I've created a WebDynpro Application which invokes a BAPI on click of a button(or Link to Action). This Application s running fine on IE.
I wanted t port this on a Blackberry device. I'm testing on a BlackBerry emulator. The first view is getting displayed properly, but I'm unable to click the Button which is displayed.
How to raise this event on the BlackBerry Emulator?
Thanks and regards
RKHi,
Thanks for looking at my post.
@Heidi: I had already gone thru the link.
@Stefanie: I am using BlackBerry Emulator for model 7520/7920. There is no wheel(I guess I didn't understand you properly). Yes I clicked on enter button.
I'm a bit confused with the Button. In manual they said that the property 'Design' is ignored for Mobile Devices and at the same time they say if the Design is emphasized then you will get a softkey. I tried with Design Standard(which is default) and also Emphasized. I dont see any Softkey. I really don't know how a softkey looks like. I guess there will be a extra icon or button on the screen. But I don't see any.
Thanks and regards
RK -
Revision: 21050
Revision: 21050
Author: [email protected]
Date: 2011-04-09 16:22:58 -0700 (Sat, 09 Apr 2011)
Log Message:
Popup: The default behavior when an Event.CLOSE is dispatched through the popup component should be preventable
https://bugs.adobe.com/jira/browse/CGM-59
Popup: The write-only behaviors property can not be used with states
https://bugs.adobe.com/jira/browse/CGM-55
Ticket Links:
http://bugs.adobe.com/jira/browse/CGM-59
http://bugs.adobe.com/jira/browse/CGM-55
Modified Paths:
cairngorm3/trunk/libraries/Popup/src/com/adobe/cairngorm/popup/PopUpBase.as
cairngorm3/trunk/libraries/Popup/test/com/adobe/cairngorm/popup/PopUpBaseTest.as
cairngorm3/trunk/libraries/PopupTest/.actionScriptProperties
Added Paths:
cairngorm3/trunk/libraries/PopupTest/html-template/
cairngorm3/trunk/libraries/PopupTest/html-template/index.template.html
cairngorm3/trunk/libraries/PopupTest/html-template/playerProductInstall.swf
cairngorm3/trunk/libraries/PopupTest/html-template/swfobject.jsHi Shweta,
as i discussed with you to update the script code
<html><script> function closeWindow( ){ top.close( ); } </script><body><form> The application was logged off successfully. <br><input type="button" value="close window" onclick="closeWindow( );" /></ form></body></html>
in sicf transaction for your component.
it will work (close the window).
dont forget to give me points
all the best...
Rgds,
Mahesh.Gattu -
Unable to capture button event in pageLayout Controller
Hi Guys,
I have the following layout
pageLayout
pageLayoutCO (controller)
----header (Region)
----------messageComponentLayout (Region)
-----------------MessageLovInpurt
-----------------MessageChoice(Item)
-----------------MessageTextInput
-----------------MessageLayout
----------HideShow (Region)
-----------------MessageLovInpurt(Item)
-----------------MessageChoice(Item)
-----------------MessageTextInput(Item)
-----------MessageComponentLayout (Region)
-----------------MessageLayout
------------------------SubmitButton(ID:SearchBtn)
------------------------SubmitButton(ID:ClearBtn, fires partial action named clear)
-----------header(Region)
I am not able to capture the event fired by the button ClearBtn in the controller of the pagelayout.....
The two methods I used as follows aren't worked:
if ("clear".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
if (pageContext.getParameter("ClearBtn") != null) {
what should i do in order to capture the button event in the pageLayout Controller
Thanks in advance
Mandy
Edited by: user8898100 on 2011-8-2 上午7:49Mandy,
Its really strange that its not able to caputure the event in CO.
Below is the way in which we handle to Submit action at CO level.
/Check whether ClearBtn is same in case too.
if(pageContext.getParameter("ClearBtn")!=null){
System.out.println("Inside the Clear Btn Action");
Regards,
Gyan -
How to Capture Button event on TrainBean navigation
Hi All
i m being required to capture a button event in train bean Navigation, i m doing customization in Iexpense Module,here in Create IExpenseReport i need to capture the events of Remove,Return etc.how is it possible any clue would be very helpful.
Thanx
Prataptry this..
if (GOTO_PARAM.equals(pageContext.getParameter(EVENT_PARAM))
"NavBar".equals(pageContext.getParameter(SOURCE_PARAM))
// This condition checks whether the event is raised from Navigation bar
// and Next or Back button in navigation bar is invoked.
int target = Integer.parseInt(pageContext.getParameter(VALUE_PARAM));
// We use the parameter "value" to tell use the number of
// the page the user wants to visit.
String targetPage;
switch(target)
case 1: targetPage = "/oracle/apps/dem/employee/webui/EmpDescPG"; break;
case 2: targetPage = "/oracle/apps/dem/employee/webui/EmpAssignPG"; break;
case 3: targetPage = "/oracle/apps/dem/employee/webui/EmpReviewPG"; break;
default: throw new OAException("ICX", "FWK_TBX_T_EMP_FLOW_ERROR");
HashMap pageParams = new HashMap(2);
pageParams.put("empStep", new Integer(target));
pageContext.setForwardURL("OA.jsp?page=" + targetPage,
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
pageParams,
true, // Retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO, // Do not display breadcrumbs
OAWebBeanConstants.IGNORE_MESSAGES);
--Prasanna -
Not able to capture button event in extended controller
Hi Gurus,
I am not able to capture the button event (of seeded controller) in extended controller.
I have written code in extended controller like below:
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean){
String str = pageContext.getParameter("event"); // copied from seeded controller for the button event //
if ("editLines".equals(str)) {
//cutom validation
super.processFormRequest(pageContext, webBean);
Please help me in resolving the issue.
Thanks,
Srinivas
///my cutom validateionHi Bm,
Thanks for your response.
I have tried the same but no luck.
Please help in getting this resolved.
Thanks,
Srinivas -
Not able to capture button event in pageLayout Controller
Hi Guys,
I have the following layout
pageLayout ------------------------ pageLayoutCO (controller)
----messageComponentLayout (Region)
----------messageComponentText (item)
----------messageComponentText (item)
----------messageComponentText (item)
----------messageLayout (Region)
----------------header(Region)
----------------------button (item) (say BTN1) (fires partial action)
I am not able to capture the event fired by the button BTN1 in the controller of the pagelayout..... but if i set a controller at the messageComponentLayout iam able to capture the event.
what should i do in order to capture the button event in the pageLayout Controller
Thanks in advance
Tom.Tom,
Two things:
1)The button ur using is of type submitbutton or button?.In this scenario it should be button.
2)The correct coding practice is using:
if("QUERY".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
instead of
String _event = pageContext.getParameter("event");
if("QUERY".equals(_event))
because you never know if Oracle in any upgrade or patch change the value of the constant EVENT_PARAM in class OAWebBeanConstants.
3)If first point is followed by you, just match the exact event name in code and in property inspector for the button.
--Mukul
--Mukul -
How to show a message in a form 'PL/SQL Button Event Handler'
We need validate the sal of an employee, and if it is bigger the value musts
not be inserted.
We trying a code like the one shown in the note 134312.1 'HOW TO PASS A
PARAMETER FROM A PORTAL FORM TO A STORED PROCEDURE' and it works in the insert event of the insert button (using 'PL/SQL Button Event Handler') and it works, but we need to show a message that says the data wasn't inserted. How can we do this?
The code we used is:
declare
v_deptno scott.emp.deptno%type;
v_empno scott.emp.empno%type;
v_sal scott.emp.sal%type;
mySal scott.emp.sal%type;
v_string varchar2(256);
blk varchar2(10):='DEFAULT';
begin
select sal into mySal from scott.emp where empno=7369;
v_deptno:=p_session.get_value_as_number(p_block_name=>blk,
p_attribute_name=>'A_DEPTNO');
v_empno:=p_session.get_value_as_number(p_block_name=>blk,
p_attribute_name=>'A_EMPNO');
v_sal:=p_session.get_value_as_number(p_block_name=>blk,
p_attribute_name=>'A_SAL');
v_string:='You just inserted empno: '||to_char(v_empno) ||'to deptno ->
'||to_char(v_deptno);
if mySal < v_sal then
doInsert;
else
-- We want to display a message here, when mySal > v_sal
end if;
end;
----------------------------------I did something similar but wasn't using a stored procedure. Couldn't you set a flag variable once you know you're not doing the insert and in the "before displaying the form" section put an IF to check if your flag was set, and if so do an HTP.Print('You are overpaid buddy!');
Then just reset your flag. -
How to get a form field valud in delete PL/SQL Button Event Handler
Hi Friend,
I have a form. when user clicks delete button. we want to remove system dodelete function
and add a delete script
Under delete-top category,
how can I get value of form EVENT_NUMBER field in form at delete PL/SQL Button Event Handler?
DELETE FROM PTEAPP.PTE_EVENTS WHERE eventnumber = EVENT_number
But when I try to save this form and get message as
1721/15 PLS-00201: identifier 'EVENT_NUMBER' must be declared
Thanks for any help!
newuserI did something similar but wasn't using a stored procedure. Couldn't you set a flag variable once you know you're not doing the insert and in the "before displaying the form" section put an IF to check if your flag was set, and if so do an HTP.Print('You are overpaid buddy!');
Then just reset your flag. -
Where did access to button events on page 0 go?
Hello.
I have a simple menu system established for my applications where a select list item and a button are created on page 0.
If I choose to "Create a button in a region position" when I establish the button (let's call it "GO_MENU", I am given the option of choosing the button event for branches on the other pages in the Conditions for the branch under "When Button Pressed". So far so good.
However, if I choose "Create a button displayed among this region's items" when I establish the button, the button does not appear in the LOV for the "When Button Pressed" condition in the branches for any of the other application pages. What's magical about this choice that suppresses the availability of the button event from the other pages?
Thanks,
ViniVini,
For your branch,
use condition type: "Request = Expression 1"
expression 1 = P0_GO_MENU
Why it doesn't show your page item button in the LOV? Because it's not a standard button anymore...
I don't have other information... someone from the ApEx dev team should be able to give more technical explanation.
Louis-Guillaume
Homepage : http://www.insum.ca
Blog : http://insum-apex.blogspot.com -
I'm working on a form that inserts data into my database. The normal Insert PL/SQL just does "doInsert". I want to add in the PL/SQL Button Event Handler a condition statement as follows:
IF :new.name_id != null THEN
doInsert;
ELSE
"do something else"
END IF;
"name_id" is one of the form items. I want to check the value in name_id before I insert it into the database. What is the correct verbage in order for this condition to work -- :new.name_id does not work.
Thanks
Susan<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Susan Miller ([email protected]):
I'm working on a form that inserts data into my database. The normal Insert PL/SQL just does "doInsert". I want to add in the PL/SQL Button Event Handler a condition statement as follows:
IF :new.name_id != null THEN
doInsert;
ELSE
"do something else"
END IF;
"name_id" is one of the form items. I want to check the value in name_id before I insert it into the database. What is the correct verbage in order for this condition to work -- :new.name_id does not work.
Thanks
Susan<HR></BLOCKQUOTE>
null -
Htp.p doesn't work from the custom button event handler ...
Hi,
I am trying to pop up an alert from the custom button event handler. I created a button and put the following code.
htp.p('<script language='JavaScript1.3">
alert ("Test Message");
</script>;
But alter doesn't show up after clicking the button.
ThanksOK i've attached them and copy/pasted the relevent parts. The parent window is the SFLB file.
-----------------------------------------here's the code in the parent window
private function editServerPool():
void
serverPoolPUW = PopUpManager.createPopUp(
this,popups.ServerPoolPopup,true);PopUpManager.centerPopUp(serverPoolPUW
as IFlexDisplayObject);
if (newServerPool.SecondarySPAlgorithm != null){
serverPoolPUW.enableSSCheckBox.selected =true;serverPoolPUW.DisplaySecondaryServerPool();
serverPoolPUW.bigResize.play();// serverPoolPUW.height = 602; //yes...i know i need to move thisserverPoolPUW.switchoverPolicyCB.selectedItem = newServerPool.SwitchOverPolicy;
serverPoolPUW.switchoverThresholdTI.text = newServerPool.SwitchOverThreshold;
----------------------here's the code in teh popup window (popups.ServerPoolPopup.mxml)
<mx:Resize id = "bigResize" heightFrom="506" heightTo="602" target="{this}" />
<mx:Resize id = "littleResize" heightFrom="602" heightTo="506" target="{this}"/>
public function DisplaySecondaryServerPool():void{
//make the screen large if the secondary server checkbox is selected; otherwise small.
if (enableSSCheckBox.selected){
//display secondary server pool tab, expand the screen
//note that we cannot attach a data provider to the data grid until the grid creation is
//completed. This is done in an event handler.secondaryPanel.enabled =
true; switchoverPolicyCB.visible =
true;switchoverThresholdTI.visible =
true;thresholdFI.visible =
true;policyFI.visible =
true;bigResize.play();
else
<mx:CheckBox label="Enable a Secondary Server Pool" width="264" fontWeight="bold" click="DisplaySecondaryServerPool()" id="
enableSSCheckBox" fontSize="12" x="83" y="40"/> -
Execute procedure in pl/sql button event handler
i have a demo application which consists of text boxes
eg : when i enter department no in first text box and click proc
it should display dname and loc in the below text boxes.
my proc is working fine in sql*plus but its showing errors in pl/sql button event handler.
any ideas
my proc is create or replace procedure proc1 (no number)
as
DNAME1 dept.dname%type;
LOC1 dept.loc%type;
begin
select DNAME,LOC into DNAME1,LOC1 from scott.dept where deptno = no;
DBMS_OUTPUT.PUT_LINE (DNAME1);
DBMS_OUTPUT.PUT_LINE (LOC1);
Exception When No_Data_Found then
dbms_output.put_line('Entred name is not found');
When Others then
Null;
End;
/Hi,
you have to use
htp.p('<SCRIPT LANGUAGE="Javascript1.1">
document.all("FORMNAME.DEFAULT.ATTRIBUTENAME.01").value="'||DNAME1||'";
document.all("FORMNAME.DEFAULT.ATTRIBUTENAME.01").value="'||LOC1||'";
</SCRIPT>
instead of
DBMS_OUTPUT.PUT_LINE (DNAME1);
DBMS_OUTPUT.PUT_LINE (LOC1);
where formname is your form name and attribute name is the field name on the page. -
Handling button events for dialog boxes of a used component
Hello,
After I call a dialog box/window for the view of the used component, how can I handle the button events of the window that I called?
I create the window using the method CREATE_WINDOW_FOR_CMP_USAGE of the interface IF_WD_WINDOW_MANAGER. This method returns window reference of type IF_WD_WINDOW.
Thanks & Regards,
ReenaIt's very easy.
Have a look to the document: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9e242bf5-0901-0010-c99c-83c180163c73
You will find the SUBSCRIBE_TO_BUTTON_EVENT on page 6.
Sergio -
Hi all,
i am using a 'When-Validate-item' trigger in this i am doing a validation,
when user try to enter amount greater than the given amount(This is needed validation)
and also i am regenerating new lines(Creating new records when button pressed)
when i am regenerating i should not validate.
How to handle button event
Thnx
RajHi...
The WHEN-VALIDATE-ITEM Trigger fires once you updated a field. Be sure you raise
form_trigger_failure when amount is invalid. So, the cursor stays in field amount. You cant
leave this field until the amount is not valid.
Maybe you are looking for
-
http://portal.adp.com/ -> Pay & Taxes -> Pay Statements There's a list of pay statements with links (blue text) from each pay date. If I click one, all these links turn to purple text, and I get taken to a page that it supposed to have a pay statemen
-
Everytime I click on the menu to login to my school portal, it opens the drop down menu but it never loads the actual tab I'm clicking on. I don't know if that's because of settings or what it is but I've tried everything possible. I also noticed the
-
How do I update my flash player
as i try to veiw videos online it sys my flaw player is out of date and to update it and when I do it says error? Can someone help me? thanks
-
Itunes won't recognise Ipod touch 5G
So this is for my friend who has a 5G, but her Itunes won't recognise the ipod touch 5G, but windows can recognise it, Itunes says to reset the Ipod touch, and she has done this before, and now again it won't recognise it, so she has to reset it, and
-
Shift report error in transaction SHR1
Hi Experts, In transaction SHR1(CREATE SHIFT REPORT) , when i enter the work center, system throws the below error" Not possible to create shift report for work center VMC" Reasons: work center doesn't exist in system. 2) no shift report has been ent