Ajax with Datatable

I have a requirement of showing the data table rows dynamically.
Please help me how it can be achieved using the Ajax technology.

Hi Balus i did try but not working for me, i am explaining here it what I am doing
I have action class ShoppingProcessor like this@Begin
     public String loadNewPage()
        do something
public String processShopDetail()
        do something
@End
public String exitShop()
}and on page request loadNewPage() is called which populates page first time then page is rendered
Now in page i have proceed button as<a4j:commandButton value="Proceed" action="#{shoppingProcessor.processShopDetail()}" reRender="shopTable" />but when i try proceed button it goes to loadNewPage() again and displays refreshed page instead i want only to get updated dataTable.
Thanks
Chhaya

Similar Messages

  • Populating a javascript array with datatable data

    I want to populate a javascript array with datatable data.
    How do I do this?
    I want the javascript array to be populated as the datatable is displayed.
    Doing this way doesn't work.
    <h:dataTable value="#{pmManager.profiles}" var="pmProfile" binding="#{pmManagerUiBean.uiTable}" ">
    <script>
    allProfilenames[index]='#{pmProfile.profileName}';
              alert("index ="+index);
              alert("...1"+allProfilenames[0]);
              alert("...2"+allProfileRes[0]);
              index++;
    </script>
    <h:dataTable>

    In Javascript do something like this:
    document.getElementById('form1:dec_param');
    where form1:dec_param is the id of the component on the page source (html)

  • AJAX with tabular form

    Hi,
    Can anyone help me ..
    I need to implement the AJAX with select list in a tabular form but I am not able do it . It is possible to do it in a normal form , but while implementing the same thing in a tabular form i am getting error (here it uses 2 dimensional arrays to identify a cell).
    The problem is I am not able to get the value from the select list .
    Can anyone help me..
    My application is "http://apex.oracle.com/pls/otn/f?p=23480:6" . The thing I need is when I select the 'Product name' corresponding 'List price need to be displayed.
    Thanks

    Hi Carl,
    Sorry for that..
    I requirement is in my application (http://apex.oracle.com/pls/otn/f?p=23480:6) , When I select the 'Product Name' from the select list the value should be populated automatically in the 'List Price' according to the product name.
    Hope the reqirement is clear ,
    My javascript is as follows
    ==============================================
    <script language="JavaScript1.1" type="text/javascript">
    var g_table;
    function va_GetCellPos(p_cell,p_what)
    for (var j=0;j<g_table.rows.length;j++) {
    var column=g_table.rows[j]
    for (var k=0;k<column.cells.length;k++)
    if (column.cells[k]==p_cell) return p_what=="row"?j:k
    function f_getfetch (p_input)
    var td=html_CascadeUpTill(p_input,'TD');
    if (!g_table) g_table=html_CascadeUpTill(p_input,'TABLE');
    var rownum=va_GetCellPos(td,"row");
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=getfetch',0);
    get.add('PRODUCT_NAME',g_table.rows[rownum].cells[va_GetCellPos(html_GetElement('PRODUCT_NAME'),"column")].getElementsByTagName('input')[0].value);
    gReturn = get.get();
    if(gReturn)
    {   g_table.rows[rownum].cells[va_GetCellPos(html_GetElement('LIST_PRICE'),"column")].innerHTML = gReturn }
    else
    {  g_table.rows[rownum].cells[va_GetCellPos(html_GetElement('LIST_PRICE'),"column")].innerHTML = 'null' }
    get = null;
    </script>
    ===============================================
    Here I am not able to get the value from the select list , its taking null (g_table.rows[rownum].cells[va_GetCellPos(html_GetElement('PRODUCT_NAME'),"column")].getElementsByTagName('input')[0].value) )
    If u need to have a look into the application ,I can give you my login details.
    with regards,
    Dilip.

  • Matrix with DataTable - GetLineData and SetLineData B1 8.8 Bug

    Hi experts,
    I have a matrix bounded to a DataTable and I succefully load the matrix with:
    DataTable dt = form.DataSources.DataTables.Item("matDT");
    dt.ExecuteQuery(sql);
    Matrix mat = form.Items.Item("mat").Specific as Matrix;
    mat.LoadFromDataSource();
    mat.AutoResizeColumns();
    Now in Event et_VALIDATE(after), i would like to change some not editable column of the matrix
    [B1Listener(BoEventTypes.et_VALIDATE, false)]
    public virtual void OnAfterValidate(ItemEvent pVal) {
              if(pVal.ItemUID!="mat")
                    return;
              Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
              Matrix mat = form.Items.Item("mat").Specific as Matrix;
              DataTable dt = form.DataSources.DataTables.Item("matDT");
              //Pont 1)
              mat.GetLineData(pVal.Row)     
              //Point 2
              //Change Values
              int minutes = dt.GetValue("U_Minutes", pVal.Row-1);
              dt.SetValue("U_Hours",pVal.Row-1, (double) minutes / 60);
              //Point 3
              mat.SetLineData(pVal.Row);
    Now I will expain the problem:
    For simplicity assume the matrix has 2 rows after load. After the user edit a column, validate event fires and:
    -) After the call of GetLineData  in Point 1) I verified that all DataTable Rows are identical (derived from the first row in the matrix)
    -) If I substitute GetLineData   in point 1) with FlushToDataSource, DataTable became corret but after the call of SetLineData in point 3) all the matrix rows are identical (derived from the first DataTable row).
    -) If I also substitute SetLineData   in point 3) with LoadFromDataSource, all works fine but i loose focus and performances
    Is it a B1 8.8 Bug?

    Yes, but sap said that my  customer is not officially approved.
    the following is the original text.
    Please note that SAP Business One Release 8.8 has only been released for
    Ramp-Up. Because of this, only approved projects for productive usage a
    re fully supported by SAP Business One Support. However feedback on prod
    uct quality or bugs reporting from all partners - even from partners who
    are not part of the Ramp-Up - is welcome and highly appreciated.
    According to the information we have, your customer is not officially ap
    proved for Ramp-Up yet. Due to the difficulty to estimate the number of
    messages that will be submitted, SAP cannot commit itself to solving all
    issues reported about projects not officially approved for Ramp-Up, nor
    guarantee any response times.
    Kind regards,
    SAP Business One Support

  • Ajax with jsf problem

    Hi
    I have small problem here. I worked struts with ajax before. currently. I m trying to work on ajax with jsf, here i m getting the problem. i created one ajaxaction class its extends httpservlets. then i created one manage bean, then i want to call the class using javascript, i dont know how to do. can any one help for me.
    Thanks

    I have never worked with the AJAX + JSF combo before, but I know that you can invoke a managed bean action using javascript and the h:commandLink and h:commandButton elements.
    <h:form id="form1">
        <h:commandLink id="link1" action="#{MyBean.action1}"><h:outputText value="link" /></h:commandLink>
        <h:commandButton id="button1" action="#{MyBean.action2}" value="button" />
    </h:form>
    <f:verbatim><script>
        function myFunction() {
            document.getElementById('form1:link1').onclick(); // this invokes the #{MyBean.action1}
            document.getElementById('form1:button1').click(); // this invokes the #{MyBean.action2}
    </script></f:verbatim>I haven't tried other ways yet. But this might give you an idea.

  • Ajax with portal 8.1 sp5

    do we know we can use ajax with portal 8.1 sp5 , If so do let me know what all i need to make ajax works with our application
    Mathew

    I am using ajax in both sp3 and sp5. I haven't followed any standard framework. I have written a servlet to handle ajax requests more like
    http://www-128.ibm.com/developerworks/library/j-ajax1/
    to do this you need not add any extra library to portal.
    hope this helps..

  • Ajax with swing and multithreading

    i want to know ,can we use ajax with swing (multithreading)

    You have asked a question that is full of buzzwords that you obviously don't understand.
    The answer to your question is not going to help much.
    What are you really trying to do?

  • Ajax with jdeveloper

    hi everyone
    i confront some difficulties when tried to use ajax. i created a JSF page and i used ajax and i used some views after that i did run the page and the browser said access denied
    i do not know why is that happened so could i find any help here ?
    thx in advance

    You can only find help by being more specific about what you tried to do. see : http://forums.oracle.com/forums/ann.jspa?annID=56
    Here is a little intro to developing Ajax with JDeveloper: http://www.oracle.com/technology/obe/obe11jdev/ps1/adf_richclient/adfrichclient.htm

  • Ajax with JSF Component

    How is it possible to embed Ajax with JSF Components. Every JSF request by default hits the Faces Servlet. Is it possible to by pass this flow for certain events?

    Wouldn't use it, that project is practically dead. It's has never been further developed/documented/supported since version 0.1 alpha in 2005.
    Ajax4jsf is still active and has excellent documentation/support.
    It might be good to know that the upcoming JSF 2.0 provides ajaxical capabilities.

  • Ajax with Peoplesoft

    Can any body worked on Ajax with peoplesoft. I just want to know how we will impliment Ajax with peoplesoft.

    Karthik T, start here: http://15daysofjquery.com/ and http://jquery.com. Then go here: http://www.google.com/search?q=peoplesoft+ajax. This will give you some background, but won't tell you how to implement Ajax in PeopleSoft. To implement Ajax with PeopleSoft, you need a good Ajax library. I suggest you download the jquery Ajax library and put it in a publicly accessible folder on your web server (...peoplesoft/applications/peoplesoft/PORTAL/scripts). Now, add the Ajax library to a PeopleSoft page. To do this, add an HTML area to a page. Double-click the HTML area to set the content to static with the following content:
    &lt;script type="text/javascript" language="javascript" src="/scripts/nameofjqueryfile.js"&gt;&lt;/script&gt;From your browser, load the page you just modified and ensure that it contains your jquery.js file. If you use Firefox with Firebug, then you will be able to click the net tab and ensure that your browser was able to find your jquery javascript file (no 404, etc).
    Before going further, you should test your Ajax installation. To do this, add an html file to your web server root named "ajaxtest.html" with the content:
    Hello World!&lt;br/&gt;
    Greetings from &lt;b&gt;Ajax!&lt;/b&gt;This file should go in a directory on your webserver like .../peoplesoft/applications/peoplesoft/PORTAL.
    From App Designer, open the page that contains your HTML area and edit that HTML area (or add another HTML area to the end of the page). Make sure the type is set to static and add the following text:
    &lt;script type="text/javascript" language="javascript"&gt;
    $(document).ready(function(){
      $("#ajaxcontent").load("/ajaxtest.html", null, function() {
        $("#ajaxcontent").fadeIn("fast");
    &lt;script&gt;
    &lt;div id="ajaxcontent" style="display: none;"&gt;
    &lt;!-- comment to keep PS from removing this empty div --&gt;
    &lt;/div&gt;Reload your customized page in your browser. If you see your HTML file's contents appear after the page loads, then you have Ajax working properly. Now the fun part... using Ajax to display PeopleSoft data. To load PeopleSoft data into a page using Ajax, point the load method at an IScript rather than a static HTML file. Go here to learn more about IScripts: http://www.google.com/search?q=peoplesoft+iscript. I have an IScript/WEBLIB tutorial on my blog as well: http://jjmpsj.blogspot.com/2008/02/what-is-iscript.html and http://jjmpsj.blogspot.com/2008/04/what-is-weblib.html. Start small by creating an IScript that contains %Response.WriteLine("Hello from an IScript"); and load that into your custom div.
    Once you have the basics of Ajax with PeopleSoft, take a look at http://extjs.com/. At this site, you will find JavaScript components that support Ajax. By combining these components with IScripts, you can create popup windows, sortable/editable tables, etc.

  • AJAX with htp (Not APEX)

    Hi,
    anybody has an idea if I can use AJAX with htp, what iam really looking for is a very simple example for that. pleaaaase
    Thanx a lot

    Hi.
    First thanks for your fast answers.
    regarding your questions :
    You're using an Ondemand process right?Hm. I copied the code from the demo app of Denes Kubicek. And the sql Statement there looks ok for me.
    And I have created this as on Demand Application Process in my App.
    Are you sure you get some values back from that process? Dont think so. I put an alert right after the point where the return should be. This alert tells me, that i get back "[object]". I don't seen any "cleartext" data here.
    - Are you using the right ITEM_VALUE in your where clause?What do mean exactly with this ? What clause ? The sql statement in the application process ? What ITEM_VALUE ?
    Have a look at the session state (developer toolbar) of the itemsSession state of the items on my page are not modified, because page is not submitted.
    Greetings
    Bernd

  • Use Ajax with OAF developed in JDeveloper 9i for Oracle Apps 11.5.10.2

    Hi,
    I am looking to use Ajax to have the same Google type functionality to be impelmented in OAF pages.
    Example : Searching of employee names, organization etc.
    JDeveloper version is 9i
    Oracle Apps - 11.5.10.2
    Please advice.
    Thanks,
    Anirban

    I dont think thats possible using OAF. OAF is not designed with AJAX in mind.

  • Need advice for dispalying multiple rows with datatable.

    Hi All,
    We have to design a conference booking search form which contains nX48 table.
    n -> indicates the conference rooms and 48 are the time slots(30 mins gap).
    While booking a conference room user enteres from time and to-time and from and to dates.
    In our search form, user searches with in the range of dates and times.
    We give a option for user to view according to date wise or room wise.
    Now main prblm is that we are capturing from and to times but how do we represent in data table.
    out of 48 columns assume only 4 slots are booked i.e 1200 hrs to 1400 hrs. so we need to display an image in that columns and up on clicking on that cell we have to produce data regarding that booking.
    In our pojo we have to and from time variables , but how can we display in datatable..should have to take a 48 column pojo.., if so how can I get the data at intersection point?
    Please do help me...
    Regards,
    Kranthi Kiran

    You could certainily create a 48 or 96 column grid. I would assume a simple "bar" image would go into that grid. You can create a method that gets called to determine if the image is rendered or not. Use a stylesheet (inline style) to set the width of the grid.
    While making a table with 48 column definitions is somewhat messy it is certainly no harder than cut and paste. The messy part is how to implement the boolean getter (DI) call to determine if a cell image is rendered as this would require 48 or 96 unique method definitions (one for each time slot). If you are will to do this then the solution is straight forward with a table.
    As for clicking on the image cell that is not an issue and easily handled.
    You have not mentioned what component suite you want to use. May I recommend that you take a look at Apache Trinidad (MyFaces project) or Oracle's ADF offering.
    If not you could do this with two tag iterators (e.g. tr:iterator) but fussing with trying to make sure you get cell alignment might be hard to do since you would not have a "master" grid in which you would be rendering your data.
    Could also write your own component ... but suspect you don't want to go there.
    You will find that they provide a robust table implementation that also supports the concept of "details", sort of a drill down capability that you can add to see additional information associated with a summary line in a table.

  • AJAX with PageMethods works in Application Pages but not with PageLayouts

    Hi All,
    I have created a class which contains public static method decorated with WebMethod and SciptMethod attributes
    Public class BasePage : Microsoft.SharePoint.Publishing.PublishingLayoutPage
            [WebMethod(EnableSession = true)]
            [ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = false)]
            public static string HelloWorld()
                return "Hello world is working!";
    Now I changed the <%Page ..> Tag of the PageLayout to inherit from the above class.
    There is a ScriptManager in the master page with EnablePageMethods = true
    I can see the Javascript methods are generated for HelloWorld(..) however the return result is "The Server Method HelloWorld failed." Error code is 500
    However the exact same code when I use with a application page (_layouts) and change the Page tag to inherit from the same base class above - it works OK.
    Both of them Page Layout and Application Page use the same master page - but one works and other does not.
    Additional Information:
    a) Am using Jquery and JqueryUI in the master page.
    b) Site use Publishing Template
    c) Variation is enabled on site
    d) Site has both Anonymous and Windows NT authentication
    The method Path for Application page shows as
    /_layouts/test.aspx/HelloWorld
    and for the page created using the Page layout is:
    /en-us/Company/Pages/Default.aspx/HelloWorld.
    Could anyone please advise what could be wrong where it does not work with Publishing Pages?
    Would please appreciate ideas / thoughts.
    Thanks,
    Mohan
    -- Mohan | My Blog

    Are you sure that you are getting HTTP 500 error ?. Usually HTTP 500 error denotes service unavailable at the server side or at the server end point. What is the exact fiddler trace you are getting ?
    If it is still HTTP 500, then one of the referenced components in the page layouts conflicts the ajax page methods call. Please let me know your findings
    Please mark the replies as answers if they help or unmark if not.

  • Best Practices of using AJAX with JSF : BluePrints or  Ajax4Jsf ?

    am a newbie to AJAX4JSF . I think it provides Rapid Application Development (RAD) just by using tags like a4j: without the need to develop complex JSF Custom Components as shown in BluePrints Catalog
    https://bpcatalog.dev.java.net/ajax/jsf-ajax/
    I understand the purpose of developing JSF Custom components as Reusable for using with AJAX. But its complex and requires lot of coding i.e. PhaseListeners and Managed Beans. There should be easy way to do this especially our project needs RAD tool like AJAX4JSF.
    Any suggestions will be highly appreciated
    Regards
    Bansi

    Bansi, you are trying to compare orange-to-apple. Blue print catalog is a historical retrospection about what people thought about AJAXifying JSF in the past. Currently, the playground has been moved to the jsf-extension project. Look for DynaFaces there.

Maybe you are looking for

  • HP laserJet CM1017 MFP Installation Error

    Hi I am having big problems with re-installation of HP laserJet  CM1017 MFP.  It was woring fine until I had to do an inplace repair to my computer. Everything other than HP laserJet  CM1017 MFP worked again without any problems.  I have  tried and t

  • 4s camera get hang and mobile phone also after updating to ios 8.2

    This is the worst issue I'm facing. I have restarted many times.. forcely closed camera app. but no progress. Further more we cant downgrade its version. Plz Do something Apple Staff.

  • Queue Status

    Hi , I have a file to file scenario which works fine but the moment I execute file to JDBC scenario the queue got stopped. Now file is scenario is also not working due to stopped queue. Interestingly, when I checked the details of succesully processe

  • Shadow/Dust on imac 27" lcd??

    It's hasn't been a year since i bought my 27" imac, now i have shadow/dust on my lcd (not behid glass, tech guy confirm). Luckly im still under 1 year waranty n have apple care for another 2 years, i bring it to ibox (indonesia apple premium reseller

  • Server name changed. Now upd DB. How?

    Hello, the server where the DB (9i) is living as change the name. Now if I try to connect using the Enterprise Manager Console (the db is still being listed in the tree (with the old server name in the HOST entry)) -> ORA-12545: Connect failed becaus