SAP Table Control with button event - button

I have inserted button to table control, I am calling one more screen on the click of this button.
I need the line number of table control when I press this button.

Try this method;
https://archive.sap.com/discussions/thread/1581196
GET CURSOR LINE li_line.
This should return the line that triggered the push event.

Related

Oracle Forms - Identify which button was pressed

I have an Oracle form, which when starts has the following activated field.
1. 2 text Item + 2 push button working as LOV button
2. One Button (cancel)
Now for simplicity lets call the text time as text_1 , text_2
Now user has an option to enter any value in text_1 and either press TAB to move to next text item or use mouse pointer to move the cursor to text_2 item OR can press cancel button.
I want to know if the user has pressed TAB or used mouse to press cancel button. Please let me know in case the question is not clear to you.
if user presses tab key, forms generate KEY-NEXT-ITEM trigger. You can type your code there and manage this event. If users presses a button, forms generates WHEN-BUTTON-PRESSED.
Is this right answer to your question? If not, provide a use case, how will programm work from user point of view.
if user presses tab key, forms generate KEY-NEXT-ITEM trigger and post-text-item trigger. Again if user move the cursor using mouse then it only generate post-text-item trigger. If any text item has to fire two trigger then key-next-item fires first.
You can also get triggered item using :SYSTEM.TRIGGER_ITEM.
Thanks
Shamim Ahmed.

Retrieve button name in Oracle Forms Builder after right click

I'm using Oracle Forms Builder. I have a button which has a pop-up menu attached to it. I need to retrieve the name of that button into a text_item after the user right clicks on it and selects one of the pop-up option.
Use :SYSTEM.TRIGGER_ITEM.
........
If you need the name of the button clicked inside a trigger like when-button-pressed, then you can use the system parameter :system.trigger_item this will give you the item that fired the trigger. So if you use that in the when-button-pressed trigger you will get the item that pressed the button.
If you start another application instead of just a popup or so and you need the item in that application then you can set a global or create a parameterlist with the itemname and then you can refer to that in the application you just started.

How to fire a particular click event of button when entering data in text box

I have added three text box with three Buttons, I want that when enter first text box, event fire of first button as well as when enter on second text box, event fire of second button as on..
But facing the problem that this all in user control, and when enter in first text box, event fire of first button, and when enter second or third text box also event fired of first button.
I have added java script and Jquery function on key-press event of textbox(key == 13) But these functions not making check in user control.
You can user jquery change method or focusin
$('#firsttxtbox').change(function() {
alert('First textbox's text changed');
});

Flex focusOut event on TextInput and pop-up does not remove focus?

I have a flex app with several fields and one text field with a focusOut event:
<mx:FormItem label="Last" x="226" y="1">
<s:TextInput id="lastNameClientTextInput" text="#{_currentEditClient.lastName}" change="textFieldChangeCapitalize(event)" focusOut="lastNameClientTextInput_focusOutHandler(event)"/>
</mx:FormItem>
As expected, when I tab or click out of the field after typing a value it executes my "lastNameClientTextInput_focusOutHandler" method which simply pops-up a new window:
protected function lastNameClientTextInput_focusOutHandler(event:FocusEvent):void
{
clientSearchPopUp = new ClientListWindow();
PopUpManager.addPopUp(clientSearchPopUp, this, true);
PopUpManager.centerPopUp(clientSearchPopUp);
}
That window will do a "PopUpManager.removePopUp(this);" when the user clicks the close button.
However, the problem is when the window closes, the focus is back on the lastNameClientTextInput! I am unable to click or tab out of the field!
When I tab out I do initially see the ibeam cursor move from the last name field to the next field in tab order (address) and then my window pops-up. When I close the window it moves BACK to the last name field and highlights the value.
It is as if I need to do something to validate the focusOut event?
You might want to try using valueCommit rather than focusOut. You could also listen for the popup being removed and set focus manually.
HTH;
Amy
Late I know, but Flex may be referring to the FocusManager.lastFocus property to resume focus from the last time the component was active. When triggering the pop up, try calling:
(focusManager as FocusManager).mx_internal::lastFocus = null;

jQuery dialog serving multiple button's click event handller

I have a scenario where...
1.) Have created a div with a dropdown list and ok, cancel button
2.) On document ready - registering div created on step 1 into a jQuery dialog
3.) on a javascript button click - I am opening this dialog box.
4.) Now, the problem is - the jQuery dialogbox which I have created, needs to be used by other button clicks as well on same page. Now, my div's (which is a dialog at runtime using jQuery) ok button click is already engaged with a javascript function (button1 click) and I can not associate other button's click events with it - thus stuck up here and have no clues or hit to resolve this.
Anyone have faced this issue in asp.net, jquery earlier? Can someone provide a guidance?
Why you cant associate another event?
buttons will have different id. Is it?
$('#button1').click(function() {
alert('Handler for button 1 .click() called.');
});
$('#button2').click(function() {
alert('Handler for button 2 .click() called.');
});
Is this not possible in your case.?
Options:
1) disassociate the click handler when the function opens the div, then later in the function of opening the div associate a click handler to the button.
2) create multiple buttons toggle them all hidden, associate the click handler to each button you want. When the div is opened do a check to see which button to toggle to visible.
3) create no buttons but have a function create the button on the fly. When the div is opened, create the button for that div by calling the function and passing in a code telling it which button to open and what to associate to the click handler (this can be stored in an array and all that is passed in is the key).
Depending on the application, I have used all of these methods. The last one can have a twist that allows it to call an ajax server based application to get the button text and functionality (stored in a database), this saves you from having to load an array with button data, and also allows for easier expansion of the application.

Resources