How to call action and actionListner in javascript
Hi to all
i want to call <h:commandLink> action and actionListner in javaScript
for example
<h:commandLink id="link" onclick="javascript:unction();"/>
<Script>
function()
document.getElementById("link").action="#{someBean.someActon}"
</Script>
can i do like that in jsf
waiting for ur reply
You can't change the bean action in JS. Just change/delegate the actual action in the bean action method.
Similar Messages
-
Call jsf h:commandLink action and actionListner in JavaScript
Hi to all
any one can help me..
i want to call action and actionLIstner using javascript
means....
i want to set <h:commandLink action="" and actionListner="" in javascript
but not at where <h:commandLink is defined.
plz help me...
thanx in AdvanceIf I understand you try to do following?
<h:selectOneMenu id="persontype"
value="#{bean.personType}"
styleClass="select"
disabled="#{bean.editMode}"
onchange="changeMode(1)">
<f:selectItems value="#{bean.personTypeList}" />
<script type="text/javascript">
function changeMode(mode){
var comboid;
switch(mode){
case 0:
comboid = document.getElementById("register:persontype");
break;
case 1:
comboid = document.getElementById("registerLegal:persontype");
break;
case 2:
comboid = document.getElementById("registerPhysical:persontype");
break;
window.location.href ="/register/forms.jsf?personType="+comboid.value;
</script>or like
<h:commandButton type="submit" value="FILTER" onclick="set_filter();" styleClass="submit"/>
function set_filter(){
document.getElementById("formId:filter").value = "filter";
} -
How to call jpf controller method from javascript
Can any one help me how to call pageflow controller method from JavaScript.\
Thanks.Accessing a particular pageflow method from Javascript is directly not possible unless we do some real funky coding in specifying document.myForm.action = xyz...Heres what I tried and it did not work as expected: I found another workaround that I will share with you.
1. In my jsp file when I click a button a call a JavaScript that calls the method that I want in pageflow like this: My method got invoked BUT when that method forwards the jsp, it lost the portal context. I saw my returned jsp only on the browser instead of seeing it inside the portlet on the page of a portal. I just see contents of jsp on full browser screen. I checked the url. This does make the sense. I do not see the url where I will have like test1.portal?_pageLabe=xxx&portlet details etc etc. So this bottom approach will notwork.
document.getElementById("batchForm").action = "/portlets/com/hid/iod/Batches/holdBatch"; // here if you give like test1.portal/pagelable value like complete url...it may work...but not suggested/recommended....
document.getElementById("batchForm").submit;
2. I achieved my requirement using a hidden variable inside my netui:form tag in the jsp. Say for example, I have 3 buttons and all of them should call their own action methods like create, update, delete on pageflow side. But I want these to be called through javascript say for example to do some validation. (I have diff usecase though). So I created a hidden field like ACTION_NAME. I have 3 javascript functions create(), update() etc. These javascripts are called onclick() for these buttons. In thse functions first I set unique value to this hiddent field appropriately. Then submit the form. Note that all 3 buttons now go to same common action in the JPF. The code is like this.
document.getElementById("ACTION_NAME").value = "UPDATE";
document.getElementById("batchForm").submit.
Inside the pageflow common method, I retriev this hidden field value and based on its value, I call one of the above 3 methods in pageflow. This works for me. There may be better solution.
3. Another usecase that I want to share and may be help others also. Most of the time very common usecase is, when we select a item in a drop bos or netui:select, we want to invoke the pageflow action. Say we have 2 dropdown boxes with States and Cities. Anytime States select box is changed, it should go back to server and get new list of Cities for that state. (We can get both states and cities and do all string tokenizer on jsp itself. But inreality as per business needs, we do have to go to server to get dynamic values. Here is the code snippet that I use and it works for all my select boxes onChange event.
This entire lines of code should do what we want.
<netui:anchor action="selectArticleChanged" formSubmit="true" tagId="selectPropertyAction"/>
<netui:select onChange="document.getElementById(lookupIdByTagId('selectPropertyAction',this )).onclick();" dataSource="pageFlow.selectedArticleId" >
<c:forEach items="${requestScope.ALL_ARTICLE}" var="eachArticle">
<%-- workshop:varType="com.hid.iod.forms.IoDProfileArticleRelForm" --%>
<netui:selectOption value="${eachArticle.articleIdAsString}">${eachArticle.articleItemName}</netui:selectOption>
</c:forEach>
</netui:select>
See if you can build along those above lines of code. Any other simpler approches are highly welcome.
Thanks
Ravi Jegga -
How to call a bean method from javascript event
Hi,
I could not find material on how to call a bean method from javascript, any help would be appreciated.
RalphHi,
Basically, I would like to call a method that I have written in the page java bean, or in the session bean, or application bean, or an external bean, from the javascript events (mouseover, on click, etc...) of a ui jsf component. I.e., I would like to take an action when a user clicks in a column in a datatable.
Cheers,
Ralph -
How to call procedure and package in BI
IN OBIEE how to call procedure- function and pass parameter in it.??
Thanks
Jatin.Do you mean DB function. Check this link:
http://oracle-bi.siebelunleashed.com/articles/callingdb-function-in-obiee/
For OBIEE 11g, you have additional options to make calls with Action Framework. For now, I think the above link will help.
If helpful pls mark as correct or helpful -
How to call action from my plug-in.
Hi,
I am developing a plug-in. But I didn't know how to call a action from my plug-in. Anybody can help me?
Thank's you
youth.See the listener example in the automation plug-in samples. Build and install this plug-in. Do something in Photoshop and look for the Listener.log file on c:\ or your desktop on the macintosh.
You must me an automation plug-in to "play" actions. -
How to call routine and pass data to routine in vofm
Hi Experts,
I need to update KBETR and KWERT values present in 'Conditions Tab' in Purchase Order (ME21N/ME22N).
I have created a new customer tab in which we enter amount field and percentage filed. When user enters some value in this and clicks on 'Conditions Tab', calculation has to be done and the calculated value has to be appeared across a specific condition type.as i am new to abap i dont know how to create routine and pass data to routine in vofm from customised tab in me21n .
Thank's in advanceHello Rajendra,
You can get plenty of forums in SCN related to it. Follow below steps to create VOFM routine.
Go to VOFM Transaction Code
1. On the Menu Select required Application i.e Pricing
2. Enter any Number in between 600 to 999 for Custom Developments.
3. On entering Pop Screen appears ask for Access Key(We have to remember that Every New Routine needs an Access Key)
4. Once the Access Key is received we can do modification.
5. Enter the Routine Number ,description and insert the Access Key
6. Now the ABAP Editor will open and required code can be copied from Standard SAP Routine and Custom Code Can be developed.
7. Once the coding is completed we have to Activate the Routine
8. Select the Routine and Go to Edit – Activate
9. Ensure that Active check box is ticked upon Activation of the Routine.
10. Double click on the routine will enter into ABAP Editor, we have to generate the Routine
11. Go to Program and select Generate
12.A screen pops up with the related Main Programs and select all required main programs wherever the Routine is being called.
13. Once the Routine is Generated and Activated, We need to configure the Routine in the config.
** Important SAP note: 156230.
Check the below document too.
http://www.scribd.com/doc/35056841/How-to-create-Requirement-Routines
Regards,
Thanga -
How to call subscreen and provide selection screen in subscreen
Hi experts,
please anybody suggest me how to call subscreen in module pool screen and provide selection screen in that sub screen.
please tell me how to design this subscreen in module pool screen.
adevanced
thank you
regards
vijay krishnaHi,
If you need to have select-options in module pool then follow these steps:-
To implement select-options in module pool, first design two input/output fields (textboxes) for the low and high value of the field and name it as <field_name>-low and <field_name>-high.
Create a button next the high value textbox and keep its sutaible function code.
Now, to call the pop-up on this button click, we have to call the same pop-up as in standard select-options. For this we have to use the function module COMPLEX_SELECTIONS_DIALOG.
For this FM we have to pass the table name, field name and the range for the field whose range needs to fill when using the popup screen.
To pass the table name and field name details into the FM, we have to declare as:
DATA : tab TYPE rstabfield.
This structure comprises of table name and field name.
Pass these details in program as:-
u2003
*-- clear table and field details
CLEAR tab.
*-- append for range depending on the button clicked
* either for sales order or line item
CASE sy-ucomm.
WHEN 'VBELN'.
tab-tablename = 'VBAP'.
tab-fieldname = 'VBELN'.
*--To call the popup screen for the field use code:-
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
title = text-002 u201Ctitle text
text = ' '
signed = 'X'
search_help = v_shelp u201Csearch help if required
tab_and_field = tab u201Ctable and field name details
TABLES
range = r_vbeln u201Crange for the associated field
EXCEPTIONS
no_range_tab = 1
cancelled = 2
internal_error = 3
invalid_fieldname = 4
OTHERS = 5.
Hope this helps you.
Regards,
Tarun -
HST50: Unix - How Headstart calls forms and reports uppercase/lowercase from a Menu
We are migrating a 'in production' Headstart generated application from Windows to Unix.
We had to a little time in setting the lowercase implementation names, setting the prefs to generate lowercase file.....
So good so far. When testing the application on Unix, all files are lowercase, the Forms start without a problem but the Reports won't start.... Renaming the report files to uppercase works fine.
Going through the Headstart code for calling Forms and Reports I noticed the following:
When calling Forms the qmslib50.qms$form.call procedure is invoked. In this procedure the follwoing statement is used:
l_form_name := lower(p_form_name) So only lowercase will be found....
For calling Reports from the Lauch Report Form the qms0012l.qms$report.run procedure is invoked.
This procedure calls fill_par_list where the l_module_name is set. But in this procedure no uppercase or lowercase is used......
Not consequent I think !!
Is this done for a specific reason ?
PS: Change qms0012l and it works fine.Hi,
cannot use run_report_object here cause I cannot create a report object in menu (like how we can do it in forms).
Create a generic named Report node in the forms that you reference from the RunReport object request. This way you can run Reports from a menu
Frank -
Calling actions and release compound path (CS4)
Is there any way to call an action using Illustrator script?
I can call actions in Photoshop so why is it not working for Illustrator?
Also, how to script 'release compound path' in Illustrator. Usual method not working...
Juz0Can you NOT just move the compoundPathItem's pathItems to another location before/after? Kind of like this…
#target illustrator
var docRef = app.activeDocument;
with(docRef) {
with(compoundPathItems[0]) {
var x = pathItems.length;
for (var i = x-1; i >= 0; i--) {
pathItems[i].move(compoundPathItems[0], ElementPlacement.PLACEBEFORE); -
How to call a bean method through javascript?
Hi,
i want to call a bean method using the javascript.
thansk in advance.hi
i want to call a backing bean method thought javscript on the button click.
i am inplementing addition of textbox at runtime.i wrote method and i am calling that on the button click.but the textbox is not created.
the code is bleow
public String doAction() {
tryStuff1();
return "samplejsf";
public void tryStuff1()
System.out.println("Enter the trystuff method");
FacesContext facesContext = FacesContext.getCurrentInstance();
UIViewRoot uIViewRoot = facesContext.getViewRoot();
Application application = facesContext.getApplication();
UIComponent formComp=uIViewRoot.findComponent("subbody:form1");
HtmlPanelGrid grid= new HtmlPanelGrid();
grid.setId("panelgrid2");
grid.setColumns(2);
grid.setBorder(2);
//UIComponent panelGridComp=formComp.findComponent("subbody:panelgrid1");
//UIComponent panelGroupComp=panelGridComp.findComponent("panelgroup2");
HtmlOutputText output = new HtmlOutputText();
output.setValue("dynamic jsf text2");
System.out.println("hello output text2");
output.setRendered(true);
grid.getChildren().add(output);
HtmlInputText input = new HtmlInputText();
input.setSize(40);
input.setValueBinding("value", (ValueBinding) application.createValueBinding("#{sample.text2}"));
input.setRendered(true);
grid.getChildren().add(input);
System.out.println("hello output text1");
grid.setRendered(true);
formComp.getChildren().add(grid);
System.out.println("hello output text3:");
formComp.getRendersChildren();
formComp.setRendered(true);
public boolean getRendersChildren() {
return true;
jsp code is
<h:form id="form1">
<h:panelGrid columns="2" binding="#{sample.formElements}">
</h:panelGrid>
<h:panelGrid id="panelgrid1" columns="1">
<h:panelGroup id="panelgroup1">
<h:outputText value="hardcoded jsf text1"/>
<h:inputText value="#{sample.text1}"/>
</h:panelGroup>
</h:panelGrid>
<h:commandButton id="add" action="#{sample.doAction}" value="add" type="SUBMIT"/>
</h:form>
when i click on the button its going into the method and diaplying s.o.p but the text box is not updated to the page.
why is it so.
i thought there may be a problem in calling the method directly thru button. i want to try thru javascript calling the bean method.
why is the page not updated.
can u help me out
thanks in advance
sree -
How to call a controller in a javascript
Hi,
I 've lot of doubts listing all of them down.
My requirement is
I need to create a master screen for Po and populate some data in dropdownlistbox with database table values and need to validate form and then save in database using MVC.
I was able to create a BSP and populate it using a model and do validations using javascript .
Now i need to save it in the databas.
I will be calling the same controller as i used initially
to call the BSP
1.How do i call a controller from my BSP in a javascript?
I tried by <bsp call url> but it doesnt seem to work.
2.When does the do_handle_event get triggered
Is it when i write some events and submit the form.
3.What is this Model Data Binding concept?Hi Welcome to SDN.
1. check out this link for call options
http://help.sap.com/saphelp_erp2005/helpdata/en/8f/3d473ccf20514ee10000000a114084/frameset.htm
2. check out this link on process flow
http://help.sap.com/saphelp_erp2005/helpdata/en/22/d59045f4d1174099260b71d5317908/frameset.htm
3. check out the following weblog on Model Data Binding
/people/sergio.ferrari2/blog/2006/08/28/bsp-in-depth-model-data-binding
Regards
Raja -
Not able to call action method from the javascript
I am using weblogic 10.3.2 portal.
My requirement is to call a action in controller throuhg java script when user selects a different option in a dropdown.
When try it we are not able to call it is returning null as a elementId. Below is the snippet of my code.
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
<netui:html generateIdScope="true">
<head>
<netui:base/>
</head>
<script language="JavaScript" type="text/JavaScript">
function SelectBANSubmit(id)
var scope = document.getElementById("scopeOneSpan");
alert("value====arv" + scope);
//var form = document.getElementById(lookupIdByTagId(form,scope));
//alert("value====arv" + form);
var knoVal = document.getElementById(lookupIdByTagId(id,scope));
alert("in method" + knoVal);
</script>
<netui:body>
<span id="scopeOneSpan">
<netui:form action="getBillDetails" >
<netui:select dataSource="actionForm.selection" tagId="arvind" optionsDataSource="${actionForm.resDTO.kno}" onChange="SelectBANSubmit('arvind')"/>
</netui:form>
</span>
</netui:body>
</netui:html>
Any help would be appreciated.Below is my code
JS Code
function fundemo(id)
alert("so currently we are in fundemo function ");
var scope = document.getElementById("scopeOneSpan");
alert(scope);
var check = document.getElementById(lookupIdByTagId('textbox1',scope));
alert("check id is " + check.id + " and its value is "+ check.value);
JSP Code
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
<netui:html generateIdScope="true">
<head>
<netui:base/>
</head>
<script type="text/JavaScript" src="D:/testWS/testWebProject/WebContent/WEB-INF/js/test.js"> </script>
<script language="JavaScript" type="text/JavaScript">
function SelectBANSubmit(id)
alert("In JS Method of the JSP File ");
fundemo(id);
</script>
<netui:body>
<span id="scopeOneSpan">
<netui:form action="getBillDetails">
<td >
<netui:textBox dataSource="actionForm.selection" tagId="textbox1" />
</td>
<td>
<netui:button type="button" onClick="javascript:fundemo('textbox1')" value="Test click"/>
</td>
</netui:form>
</span>
</netui:body>
</netui:html> -
How to call a codebehind function from javascript
Hi, i need some help calling a function in my .ascx.cs of a visualwebpart for SP2013 from JS.
The idea is to execute a function when a datepicker date is selected
<script type="text/javascript" src="../_layouts/15/jQuery/jquery.min.js"></script>
<script type="text/javascript" src="../_layouts/15/jQuery/bootstrap.min.js"></script>
<script type="text/javascript" src="../_layouts/15/jQuery/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript">
$(function () {
$('#datetimepicker4').datetimepicker()
.on('changeDate', function callWebMethod() {
$.ajax({
type: "POST",
url: "Visualizador.ascx/Testing",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
alert("OK");
error: function (jqXHR, textStatus, errorThrown) {
alert("Error");
</script>
The problem is that it always return the "Error" alert.
The functions name is "Testing" (in Visualizador.ascx.cs), the project name is "BuscadorCumple" and the VisualWebPart is "Visualizador"
I´ve tried with the PageMethods but i can´t add a ScriptManager because the MasterPage of the site has already one, and only one ScriptManager is allowed. So if i could set the EnablePageMethods to true it would be great (to use the PageMethods), or just
try to fix the js function from above.
THANKS IN ADVANCE
------------------------------------------------Update----------------------------------------------
Here is the method i´m using to test it, inside Visualizador.ascx.cs
[WebMethod]
public static void Testing()
Response.Write("<script>alert('HW')</script>");Methiod should be like this
[WebMethod]
public static
string GetData()
string str="hi";
return str;
Calling is like this
$.ajax({
type: "POST",
url: "PageName.aspx/MethodName(GetData)",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
// Do something. -
How to call form and pass parameter from OA Page
Hi,
I have one requirement to call a custom form from OA page by clicking the button and the same time i need to pass one parameter from this
oa page to that form.
how to do this by personalization?
i surfed lot and i got some idea, some one said "pass the value as global variable and receive the global parameter when the new form instance trigger" .
Can anyone please give about about this ?
Thanks in advance,
SANThis seems to be related to EBS and since this forum is dedicated to Fusion you might want to post the question to E-Business Suite forums and
Support forum for EBS customizations.
Jani Rautiainen
Fusion Applications Developer Relations
https://blogs.oracle.com/fadevrel/
Maybe you are looking for
-
Case statement problems in oracle forms 6i
Hello, Any one can help me that how to use case statment in Oracle forms 6i. i have read one thread and there was no proper solution so could any one please let me know to use case statement. Please also let me know which category i should search for
-
LMS 4.2.3 User Tracking not discover any hosts
I have a problem wth User Tracking. Some new attatch to network devices: WS-C2960S-48LPS-L.not show me any MAC and address IP. What should I do in this case? I tried many times Acquisition Actions for this devices, but without any positive results. F
-
Balance sheet adjustment - reset of tax distribution
Hi, When we execute the posting of balance sheet adjustment, why is it that there is reset of distribution for tax accounts? When will this take place? What triggers the reset of distribution? Thanks.
-
Tablespace/datafile droping error..
HI guys, I am getting below error when trying to drop tablespace "PROD2".. drop TABLESPACE PROD2 including contents; The following error has occurred: ORA-01122: database file 56 failed verification check ORA-01110: data file 56: '/u02/oradata/EXPRES
-
I have downloaded the trial version of Pro X. It appears to work in some areas of MS Office Pro Suite but not others; particularly in Access. Is there something I have missed that is causing it not to work across all areas? Thanks,