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)

Similar Messages

  • How to build a array with collected data

    Hi,
    I have collected data from serial port with VISA. Now I want to build a array with 100 date points. Should I connect VISA Read with Build Array directly? How to do it?
    PS: All of them are in a While Structure.
    Thank you!

    An inefficient way to create the array is to use the build array and a shift register as shown below. It's more effecient in terms of memory management to create the array and then use the replace array subset as shown in the other image. Of course, if you don't need the array inside the loop, just wire the value out of the while loop and on the exit tunnel, right click and select 'Enable Indexing'.
    Message Edited by Dennis Knutson on 07-03-2007 10:25 PM
    Message Edited by Dennis Knutson on 07-03-2007 10:26 PM
    Attachments:
    Crude Build Array.PNG ‏4 KB
    Better Build Array.PNG ‏6 KB

  • Populated the new field with historic data

    HI,
    I have a data for 2 years now I am enhancing the data source how can I populated the new field with historic data.Is it by
    1)deleting all the data in BW side and the doing an init then setting up a regular delta
    2)running a repair full request with selection condition.
    or is there any other option available? which is the best scenario to load these historic data?
    Regards,
    Ravi

    Hi,
    I think your datasource is already in production, and you want to data only from today onwards for enhanced fields, i.e. historical data is not required for enhanced fields..
    1.Fix ECC down time for 20 to 30 munities
    2. Keep all objects on Qty system in ECC and BW.
    3.Run Delta laods in BW for 2 to 3 times.So with this step you can clear SMQ1 and RSA7. Check the entries in RSA7, if it is ZERO then it is fine.
    4. Move DS from ECC Qty to ECC PROD .
    5. Replicate in BW.
    6. Move all BW objects from BW Qty to BW Prod.
    7. Delete Init load in InfoPackage level (Not in ODS/CUbe).
    8.Load Init without DataTransfer.
    9.Then Run Delta.
    10. Next day on wards deltas will come as usual.
    If you need Historical data also.
    1.Delete data in Cube.
    2.Fix Down Time and load Init then Delta.
    Check
    SAP Note 328181 - Changes to extraction structures inCustomizing Cockpit
    Thanks
    Reddy

  • How to call javascript function with dynamic data in display tag

    Hi,
    Iam new to pagination concept. Iam using display tag to display rows in jsp by strtus.
    I have a problem when calling the javascript function using ahref in attribute in display tag.
    <bean:define name="form1" property="EditDetails.List" id="ListDisplay"/>
    <display:table name="pageScope.ListDisplay" cellpadding="0" cellspacing="1" pagesize="10" partialList="false" size="listSize" requestURI="">
    <display:column property="poNo" href='javascript:searchEditDetails("./submitOrder.do? actionID=getMISLoadEdit&poNumberSel=<%=((com.po.bean.EditDetails)poListDisplay).getNo()%>&statusIdSelected=<%=((com.po.bean.EditDetails)ListDisplay).getStatusId()%>")'
    title="Number"/>                         
    <display:column property="strDate"title="Date" />
    <display:column property="orderValue"title="Order Value(INR)"/>
    <display:column property="stringRequestedDeliveryDate"title="Suggested Delivery Date"/>
    <display:column property="statusDescription" title="Status" />
    </display:table>
    The above code display the data in row format is working fine when I click the No It thow javascript error and its not redirecting to the other page.
    When I try this with ordinary struts its working fine the code is:
    <logic:iterate id="polist" name="Form1" property="EditDetails.List" indexId="i" type="com.bean.EditDetails">
    <tr>
    <td ><a href="javascript:searchEditDetails("./submitOrder.do?actionID=getMISLoadEdit&NumberSel=<%=((com.bean.EditDetails)polist).getNo()%>&statusIdSelected=<%=((com.bean.EditDetails)polist).getStatusId()%>")"><html:hidden name="polist" property="No" write="true" /></a>     </td>
    <td><html:hidden name="polist" property="strDate" write="true" /></td>
    <td><html:hidden name="polist" property="orderValue" write="true" /></td>
    <td><html:hidden name="polist" property="stringRequestedDeliveryDate" write="true" />     </td>
    <td><html:hidden name="polist" property="statusDescription" write="true" /></td>
    </tr>
    </logic:iterate>
    Please help me how to call javascript with dynamic data.
    Thanks in advance

    The ADF Mobile Container Utilities API may be used from JavaScript or Java.
    Application Container APIs - 11g Release 2 (11.1.2.4.0)

  • Populating a PDF form with XML data

    Hi folks,
    I would like to create some pdf form template, populate it with xml data and output from it a pdf file.
    Can I do such thing using LiveCycle?
    Yair

    With the recent release Adobe changed the name to Adobe Digitial Enterprise Platform (ADEP)..
    http://www.adobe.com/solutions/customer-experience/enterprise-platform.html
    ADEP server software comes with lot of services to help with many solutions for the enterprises, so it would be better to call the Adobe Sales team and discuss your needs and they will be best people to suggest what suits your company requirements.
    Thanks
    Srini

  • Assigning javascript array with jsp array

    hi,
    I have a jsp page where I have a array in jsp. I want to assign the values to an javascipt array. how can I do that?
    the reason why I want to do this is for a perticular problem I am facing in javascript. that is....
    I have a text box in my jsp page, I want the value entered in that box to be checked (whether it exists ) against a hidden string which has some value. I want that hidden string not to be shown to the user even on seeing the html source. that is why I want these values to be stored and checked against a array object of javascript.
    any suggestion is appreciated
    Thanks
    Ashutosh

    Hai asutoshdash
    if you dont mind of viewing code u can use this else dont use, its not matters weatehr user will see you code or not if the user is professiona then its a big issue normal users not think of is for this dont send valuable infos like password etc to client u may send usernames
    ok to create a java array to javascript array do this (i took example of db to array ) write this inside <script> <%codes here%> </script>
    var aUsername =new array();
    <%
    int i=0;
    while (rs.next())
    %>
    aUsername[<%= ++i%>] = "<%= rs.getString("User_Name")%>";
    <%
    %>thats it use this array where ever you want in your client side(javascript ) usage
    hope this will help you
    archi

  • Search help is populating the input field with wrong data

    Hi Guys,
    I have created a ZCITY table for which has below 2 field
    ZZCITY (Code ) (5 Char) u2013 Key field
    ZZNAME (City Name ) (40 Character)
    I have added a custom field ZZCITY & ZZNAME in CI_CATSDB. Funtional guy has configured to make ZZNAME as  VISIBLE  and ZZCITY is HIDDEN on CAT2 screen in Data Entry area.
    I created search help on table ZCITY with export parameters as  ZZCITY and ZZNAME.
    In SE11, I have mapped the export parameters with CI_CATSDB
    Now in tcode CAT2, when I press F4 on City Name field, the list is displayed with City code and City names. And when I select any city code, the ZZNAME is populated by City code instead of City name.
    I want that City Name should be populated in ZZNAME and City Code should be populated in hidden field ZZCITY.
    Please tell me how I can fix this problem.
    Thanks in advance.
    mini

    Hi
    Try selecting the Improting Check box aswell. if a screen field is hidden or display mode we can not use F4 help for that field.
    you can also take the help of DYNP_READ_VALUES to get the selected value before PAI
    Check whats happening in Debug.
    Cheers
    Ram

  • In CAT2 - The search help populating the input field with wrong data

    Hi Guys,
    I have created a ZCITY table for which has below 2 field
    ZZCITY (Code ) (5 Char) u2013 Key field
    ZZNAME (City Name ) (40 Character)
    I have added a custom field ZZCITY & ZZNAME in CI_CATSDB. Funtional guy has configured to make ZZNAME as  VISIBLE  and ZZCITY is HIDDEN on CAT2 screen in Data Entry area.
    I created search help on table ZCITY with export parameters as  ZZCITY and ZZNAME.
    In SE11, I have mapped the export parameters with CI_CATSDB
    Now in tcode CAT2, when I press F4 on City Name field, the list is displayed with City code and City names. And when I select any city code, the ZZNAME is populated by City code instead of City name.
    I want that City Name should be populated in ZZNAME and City Code should be populated in hidden field ZZCITY.
    Please tell me how I can fix this problem.
    Thanks in advance.
    mini

    Hi,
    Search helps have a one to one relationship with a screen field.  To achive what you are trying to, I would have ZZCITY and ZZNAME side by side, and i would have a drop down only only ZZCITY.  The key of the table will be ZZCITY. So when you chose the record, The city will populate in ZZCITY and you can make use of user exit EXIT_SAPLCATS_002 to populate the name automatically in the ZZNAME field.
    thanks.
    JB

  • Populating a dynamic array with objects and managing it in runtime.

    So I'm another stuck firstyear. I'll try and make my question compact. I'm using Flash CS6 and have drawn an animated character on the stage that consists of separate parts that are animated and its head is a separate class/symbol entirely because it has not only animation, but a state switch timeline as well. This said Head extends the Main that is the character MovieClip.
    I am using a dynamic array to store and .push and .splice objects of another class that would collide with this said Head.
    I also discovered the super() function that is implicitly called as the constructor of the parent in any child class that extends the parent, in this case Head extends Main. The issue is that my collidable object array is populated within the main, within the function that spawns every next collidable object with a TimerEvent. This said function then gets called twice due to the super() call.
    I have tried putting this super() call into an impossible statement in my child class, but it doesn't change a thing, and it was said that this method is unsafe so I don't even know if it should be working.
    However what confuses me the most is when I trace() the .length of my collidable object array at the end of that function. As I said earlier, the original function both spawns an object after a period of Timer(1000) and adds it to the stage as well as adds the object onto the object array, but the super() constructor only duplicates the length call and a creates a copy of the object on the stage, but it does not add the second copy of the object onto the array. The trace() output goes on like so:
    1
    1
    2
    2
    3
    3
    4
    4
    etc.
    I wonder why and I'm really stumped by this.
    Here is the code in question:
    public class Main extends MovieClip {
                        public var nicesnowflake: fallingsnow;
                        var nicesnowflakespawntimer: Timer = new Timer(1000);
                        public var nicesnowflakearray: Array = new Array();
                        public function Main() {
                                  nicesnowflakespawntimer.addEventListener(TimerEvent.TIMER, nicesnowflakespawn);
                                  nicesnowflakespawntimer.start();
                        public function nicesnowflakespawn(event:TimerEvent) : void {
                                  nicesnowflake = new fallingsnow;
                                  nicesnowflake.x = Math.random()* stage.stageWidth;
                                  nicesnowflake.y = - stage.stageHeight + 100;
                                  nicesnowflakearray.push(nicesnowflake);
                                  stage.addChild(nicesnowflake);
                                  trace(nicesnowflakearray.length);
                                  for (var i:Number = 0; i < nicesnowflakearray.length; i++){
                                            nicesnowflakearray[i].addEventListener(Event.ENTER_FRAME, snowhit);
                        public function snowhit(event:Event) : void {
                                  if (nicesnowflakearray[0].y >= 460){
                                            if (nicesnowflakearray[0].y == stage.stageHeight) {
                                            nicesnowflakearray.splice(nicesnowflakearray.indexOf(nicesnowflake), 1);
                                  //if (this.hitTestObject(nicesnowflake)){
                                            //trace("hit");
    I am also fiddling with the collision, but I believe that it would sort itself out when I deal with the array pop and depop properly. However I'm pasting it anyway in case the issue is subtly hidden somewhere I'm not looking for it. And here is the child class:
    public class Head extends Main {
                        public function Head(){
                                  if (false){
                                            super();
                                  this.stop();
    So like what happens at the moment is that the array gets populated by the first object that spawns, but there is two objects on the stage, then when the objects reach stage.460y mark the array splices() the one object away and displays an error:
    "#1010: A term is undefined and has no properties.
              at Main/snowhit()"
    then when the next object spawns, it repeats the process. Why does it trace the array.length as "1, 1, 2, 2, 3, 3, 4, 4, 5, 5, etc" until the despawn point and then goes on to display an error and then starts from 1 again, because if the array length is more than one object at the time when the first object of the array gets spliced away, shouldn't it go on as usual, since there are other objects in the array?
    Thank you very much to whomever will read this through.

    There are multiple problems:
    1. You should add eventlisteners for your objects only once, but you add eventlisteners every time your timer runs to all of your snowflakes, again and again:
                                  for (var i:Number = 0; i < nicesnowflakearray.length; i++){
                                            nicesnowflakearray[i].addEventListener(Event.ENTER_FRAME, snowhit);
    change it to
    nicesnowflake.addEventListener(Event.ENTER_FRAME, snowhit);
    I don`t see why its even necessary to employ this snowflakearray, it would be much straight forward if you simply let the snowflakes take care of themselves.
    2. Then you have to change your enterframe function accordingly
    public function snowhit(event:Event) : void {
                                  if (e.currentTarget.y >= 460){
                                            if (e.currentTarget.y == stage.stageHeight) {
                                            e.currentTarget.removeEventlistener(Event.ENTER_FRAME, snowhit);
                                            removeChild(e.currentTarget);
    3.
                                  //if (this.hitTestObject(nicesnowflake)){
                                            //trace("hit");
    since "this" is a reference to the Main class (root) it surely won`t function as you intend it to.
                                  if (false){
                                            super();
    makes no sense to use a condition that can never be true

  • Populating a PDF form with database data

    I would love to know how (if possible) to populate an Adobe PDF form with data pulled from an Access database.
    Background
    I have a registration form already created using Adobe LiveCycle which is used by people to fill in their details.  With a built-in xml schema, the user saves the form and sends them to me.  I extract the data into an xml document which I can then import in an Access database using VBA code.
    The Need
    When it comes time to re-register, much of the original data provided by the user has not changed.  Rather than ask them to fill out the form all over again, I would like to send them their original data and they can update whichever fields they need to.  With the xml schema built into the form, I would love to turn this form into a two-way avenue for both importing and exporting data.  Is this possible?
    Any assistance in this matter would be greatly appreciated.  Please let me know if I have not provided enough information.
    Brett

    You can connect the form to the DB using anODBC connection. This functionality comes as part of Acrobat but the form must be Reader Extended by the full LiveCycle Server version of Reader Extension to allow this in Reader. In your case, if your system is the only on ethat will interact with the DB then this might be a viable solution (but you woudl have to use Acrobat). This solution woudl involve create an ODBC connection in your system then configuring the form to make use of that connection.
    Does that make sense?
    Paul

  • Need help with enhanced data source in Production system

    Hello Gurus,
    1.                  I enhanced a datasource in BW and populated the field using customer exit using CMOD function. In Dev system, i dont have much data, so I deleted the whole data and did full load.
    what shud I do in Production side, so that Delta wudnt be affected??since in production, we have millions of records, we wont do full load., what is the best way to populate the field in production after transporting the datasource to production without disturbing delta's, to reflect the new field for previous years data???
    2.  can we put 0customer and 0material in the same dimension?? how its going to affect the performance?
    Thanks in advance.,
    Best Regards,
    Pavan

    Hi,
    Please see this
    1.
    see this thread
    populated the new field with historic data
    2. can we put 0customer and 0material in the same dimension?? how its going to affect the performance?
    Its better not to use them in a single dimension  because one customer and take more than one material so if you have 100 customer and 1000 materials  this combination will generate a large number of records. Its always better to keep characteristic which are having 1:N relation ship in one dimensional in you  case customer and material will have an M:N type of relationship.which will result in slow performance.
    Regards,
    Ravi

  • I want to build an array using the data that I get through the serial port

    I am reading data through the serial port, but I want to buffer these data. I have seen a function, but i think that i can use this if I am reading data from I/O intrument, so I don´t how can I fill an array, with the data that I am reading!!!
    Thank you!!!

    I'll hazard a guess that you are reading data with VISA as a string. Then you want to convert that (probably with Scan From String) into a number. Then, you want to collect those numbers into an array.
    We don't really have enough information to tell you the best way to do this. Here are some ideas.
    If you are reading all the numbers from the instrument at once (e.g., a waveform from a scope), you might consider using "Spreadsheet string to array". Most scopes return the data as ASCII with commas between the values, so you'd wire a "," to the "delimiter" input of the "Spreadsheet string to array" function.
    If, however, the instrument is returning a single point at a time, there are more questions. Do you want to do this continuously, or do you want t
    o collect only a certain number of data points, and then process them as a block?
    If the latter, then you'd just acquire each data point, convert it to a number, and then use output indexing on the for loop to create your array.
    If the former, then you may want to store the data in a queue, and read it from the queue elsewhere in your program.
    If you let us know what you want to do, we can probably provide more precise help.
    Brian

  • Javascript array / jsp Bean Collection

    How can you fill a javascript array with the values of the collection?
    <jsp:useBean id="programs" scope="request" class="java.util.Collection"/>
      How can I create this array?
    <script language="JavaScript" type="text/javascript">
    var programData =
    new Array ( new Array "${programs[1].programId}","${programs[1].programName}", "${programs[1].department}"),  
                 new Array "${programs[2].programId}","${programs[2].programName}", "${programs[2].department}"),
    </script>

    I answered myself. If anyone else would like to know how to fill a javascript array with the values of a jsp beans collection.
    function collectionToArray()
    Array[rows] = [4];  
    var cnt = 0;
    <c:forEach var="sp" items="${programs}">
      rows[cnt][0] = ${sp.programId};
      rows[cnt][1] = ${sp.programName};
      rows[cnt][2] = ${sp.department};
      rows[cnt][3] = ${sp.urlLink1};
      rows[cnt][4] = ${sp.urlLink2};
      cnt++;
    </c:forEach>  
    }

  • Strategies for populating drop downs with external data

    Hi,
    I have a couple nice forms that call various array scripts that populate drop down boxes based on a selection.  Everytime I need to update pricing, models, etc... I have to go in and manually edit the array.  I am using just designer - we do not have the server version.
    Is there a better way to do this ranther than edit the array and keep saving version?  I have seen some expamples using anXML file to the form.  This looks like a solution but I am not sure how to do it if this.
    It would be nice to have seperate database that contained my widgets external, update it and then make the connection. 
    Any help would be apprecated!

    This is a similar thread....
    http://forums.adobe.com/message/5538822#5538822
    Maybe this is a taboo subject as it something adobe wants you to buy the server version for...  I see this get asked many times but there never seems to  be a direct answer.
    In an effort to make my question more clear - If i have users out there with a form, and I want to update the form with a nightly updated file, that may contain pricing for example, how can one do this?
    So the core form stays the same, but dropdowns can be populated with external data.
    Thanks in advnace for any all help.

  • Event Handling in labview with arrays as event data

    Hey folks,
    I have a Labview Application which uses a dll to read Ethernet data. The setup is such that, when the dll has fresh data it sends out an event to the Labview Application so that the fresh data can be displayed.
    However i have only managed to get this event based mechanism to send out a single structure at a time. Hence if there are 10 fresh data values, i need to send out 10 events (each event structure contains the parameter name, parameter value, unit and time stamp). It would be more efficient to send out an array of structures in a sigle shot.
    I have tried this but Labview keeps crashing saying that an error was encountered and Labview needs to close along with an access violation message. I did a lot of online searching and found some LV code for event handling but not come accross any implementation which uses arrays as evend data. Is this supoorted? And if so is there any example vi that can be shared so that i get some knowledge about this.
    Many Thanks in adavance,
    Abel. 

    I also gave a try by using a variant as the event data type instead of the cluster which contains the array of floats. I converted the cluster into a variant and used that to create the user event reference. Followed the same logic while decoding the dats.
    But still the crash.... Here is the windbg output...
    ModLoad: 07580000 075b7000 C:\Program Files\National Instruments\LabVIEW 2012\resource\lvalarms.dll
    ModLoad: 0ca90000 0cb72000 C:\Program Files\National Instruments\LabVIEW 2012\resource\mesa.dll
    ModLoad: 0c7f0000 0c7f9000 C:\Program Files\National Instruments\LabVIEW 2012\resource\lvuste.dll
    ModLoad: 35000000 3509b000 C:\Program Files\National Instruments\Shared\TDMS\tdms.dll
    ModLoad: 0c860000 0c87c000 D:\SapphireViewer\dll\SapphireClientDll.dll
    ModLoad: 0e240000 0e2c7000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\MSVCP80.dll
    ModLoad: 0e2d0000 0e36b000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\MSVCR80.dll
    (1cb0.1a34): Access violation - code c0000005 (first chance)
    First chance exceptions are reported before any exception handling.
    This exception may be expected and handled.
    eax=0e47f8b4 ebx=051f0040 ecx=051f0040 edx=061e5764 esi=22820840 edi=07b10040
    eip=03c2050c esp=0e47f5cc ebp=0e47f810 iopl=0 nv up ei pl nz na po nc
    cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
    *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files\National Instruments\LabVIEW 2012\resource\tdcore_12_0.dll -
    tdcore_12_0!LvVariant:etContents+0xac:
    03c2050c 837e3100 cmp dword ptr [esi+31h],0 ds:0023:22820871=????????
    I cannot really tell whats going on. Looking for some pointers.
    Regards,
    Abel.

Maybe you are looking for

  • Lenovo G510 - High temps

    Hi forum, i bought this laptop one and a half months ago and i notice that the temps are getting higher than normal.  When its idle it sometimes drop to 28C which is the lowest ive seen but usuallly is about 36C. When i open Skype, facebook game etc

  • Adobe reader not working after cs5 install

    adobe reader not working after cs5 install

  • How to deactivate *Schedule Background Job for Work Items with Errors* SWU3

    Hello Guys, Can any one tell me how do I DEACTIVATE Schedule Background Job for Work Items with Errors in sap workflow SWU3. Currently it is green which I don't want. I want to stop this service. Regards NK

  • Back to My Mac and SSH

    Hi; I've recently been tinkering with BtMM, and had a question r.e. SSH. If I start a terminal session up, and go "Shell, New Remote Connection" I can connect fine to my remote machine via SSH. It works perfectly. However, if I cut-and-paste that sam

  • Mac Pro fan is very noisy after installing mavericks

    Hi everyone, on my early 2008 Mac Pro i had a problem with a noisy fan. Updated from 10.5 to 10.6.8 and the problem seemed solved. I decided to upgrade again to 10.9 (i wanted to install Logic X, which would not run on 10.6.8) and now the fan is nois