Hidden addInstance

I have a repeating subform that is a full page. I want it initially to be hidden and only called when needed.
I have created a 2 buttons on the repeating subform
Add Form
form1.Subform1.instanceManager.addInstance(1);
xfa.form.recalculate(1);
Delete Form
form1.Subfrom1.instanceManager.removeInstance(this.parent.parent.index);
The initial instance is called from another page. This is the script for that Add Form button:
form1.Subform1.instanceManager.addInstance(1);
xfa.form.recalculate(1);
I have also tried adding this line:
form1.Subform1.presence="visible";
If I set the subform to visible with a Minimum Count of 1, the repeating subform works.
If I set the subform to visible with an Initial Count of 0, the repeating subform does not work.
If I set the subform to hidden with a Minimum Count of 1, the repeating subform does not work.
Im stumped and dont know which way to turn. Any help would be appreciated.
Thanks
Carol

Hi,
Presumably you don't need to set the subform to "hidden" if you also have a min count of 0. No instances will be created until your button is clicked (on some other page) that does form1.Subform1.instanceManager.addInstance(1);
Setting the subform visible should do the trick, if you choose to initially set it to hidden. Your script to show the subform was:
form1.Subform1.presence = "visible";
That script is only going to set the first instance of the subform to visible; it's equivalent to Subform1[0].presence = "visible"; You may need to update your script to use the index of the instance of the subform that you just added. (Still, I think in this case you don't really need to set the subform to hidden, to begin with).
Note that you only need to call recalculate() if you're targetting older versions of Acrobat; maybe earlier than 7.1?
I posted some (hopefully useful) information on this topic on a blog that i recommend you read:
http://blogs.adobe.com/lcdesigner/
See the "Script dependencies and "recalculate()" blog - which does get a little heavy as an article, but there's some good stuff in there.
If that doesn't help, please respond with more detail; I'm not sure what you mean by "does not work" in your last 3 lines; do you mean that the subform doesn't get created? or that it isn't visible?
Mike

Similar Messages

  • AddInstance with hidden form

    I have a form (FormHidden) that is a hidden form when the pdf loads. I have a checkbox that can be checked to make the form visible. The code on this checkbox is:
    if (this.rawValue == "1"){
    xfa.form.form1.MainPage.FormHidden.presence = "visible";
    } else {
    xfa.form.form1.MainPage.FormHidden.presence = "hidden";
    Once this checkbox is checked the FormHidden appears with the various text entries. I then have another button called Add Source that is supposed to add another instance of the FormHidden form. The code for this button is:
    xfa.resolveNode("form1.MainPage.FormHidden").instanceManager.addInstance(1);
    xfa.form.recalculate(1);
    The problem I am having is that when I push the button if I have the form hidden initially it will not add another instance of the FormHidden. The Add Source button works fine if I make the form visible to begin with. It is something to do with having it hidden at first that makes it so it will not generate another instance. Any help would be wonderful. Thanks in advance!

    The issue is that when the subform is hidden it is not part of the layout and as such is not an addressable object. When you call the instanceManager there is no object there. To alleviate this we added a syntax of _subformName that will address objects that are not part of the layout. So try this syntax instead.
    form1.MainPage._FormHidden.addInstance(1);
    Note that you do not need the xfa.resolveNode syntax in these expressions.

  • How do you make columns invisible/visible or hidden with checkbox?

    Hi , i'm trying to make a column in a table either visible or invisible when i click a checkbox or button.
    i have a single row table with mutiple columns of text objects within, i have set the "repeat data for each row item" to min 4, so i have four diplayed on page.
    i have set the checkbox with the following script but it only makes the first row of "Received" visible when i click on the checkbox. and not the other
    3 "Received" textobjects.
    example:
    form1.purchaseOrder.ProductHeader.Receivedchkbox::click - (JavaScript, client)
    if (this.rawValue == "1") {       
        form1.purchaseOrder.Productdetails.detail.received.presence = "visible";
        form1.purchaseOrder.Productdetails.detailHeader.StaticReceived.presence = "visible";
    else
        form1.purchaseOrder.Productdetails.detail.received.presence = "invisible";
        form1.purchaseOrder.Productdetails.detailHeader.StaticReceived.presence = "invisible"
    So what i'm trying to acheive is for the form to make the "Received" textobject "invisible or hidden" at default.
    Then when the form filler clicks the checkbox it become visible and vice versa.
    So How do i apply a script like this to hide all 4 "Received" instances and  also the new ones i add by addinstance script?
    I have attached the form, if someone could give me some help in working it out?
    Thanks!!!

    Hi,
    It does help to see the form!
    Basically you need to loop through all of the instances of the detail row and change the presence of the received object individually.
    First the script would calculate the number of rows:
    var vRows = Productdetails._detail.count;
    The use of _ before the repeating detail is shorthand for instanceManager.
    Then the if statement would change slightly, with the insertion of a for statement which works through all four rows.
    if (Receivedchkbox.rawValue == true) {     
         form1.purchaseOrder.Productdetails.detailHeader.StaticReceived.presence = "visible";
         for(var i=0; i<vRows; i++) {
              xfa.resolveNode("form1.purchaseOrder.Productdetails.detail[" + i + "]").receivedSubform.presence = "visible";
    else ...
    Form attached.
    Good luck,
    Niall

  • PDF Performance: add/removeInstance v.s. hidden/visible presence

    Hi All,
    We have a smart pdf form with multiple pages, but it only show 1 page at a time, like a wizard or form guide.
    And so far we have 2 approaches:
    1) From http://www.adobe.com/devnet/livecycle/articles/lc_designer_controller.pdf , i see that the instanceManagers are stored in an array and it try to add/removeInstance whenever user click on the link.
    E.g when initialize:
    im[currentPageNum].addInstance();
    where im[currentPageNum] is an instanceManager.
    When navigate to new page:
    im[currentPageNum].removeInstance(0);
    im[pageNum].addInstance();
    2) We store all the page in the array and use the presence attribute instead.
    E.g.
    im[0].presence="visible";
    im[1].presence="hidden";
    im[9].presence="hidden";
    Is there any difference in form performance between 2 approaches?
    Thank you,
    Regards,
    Anh

    In the long run ...no there is no overall difference in performance. But there is a difference as to when you
    will "pay" for the performance.
    In option 1 when the form initializes you are only creating objects that exist on the pages that are being shown. When you change the page the new objects are being created and used. So each time you turn a page you are paying for the creation of the new objects.
    In option 2 you are creating all objects for all pages right away. If your form is big enough you may see that option 2 will take longer to start than option 1. Also if any redrawing or relayout occurs in the form option 2 will take longer because there is more to do.
    So I woudl suggest option 1 for better performance....this will only be an issue for large forms.
    Hope that helps
    Paul

  • HT203167 A movie I purchased in the iTunes store is missing. It isn't hidden and doesn't show up in search. I've followed support steps.  Where is it and how do I find it?  I believe I originally purchased the film on my 1st Gen AppleTV.

    A movie I purchased in the iTunes store is missing. It isn't hidden and doesn't show up in search. I've followed support steps.  Where is it and how do I find it?  I believe I originally purchased the film on my 1st Gen AppleTV...other movies show up. Help.

    It was Love Actually. It's been in my library a few years but is now missing. It's odd...it isn't even in the iTunes Store anymore. I think there is a rights issue because a message appeared in the store saying it wasn't available at this time in the U. S. store. Still, if I bought it years ago it should be in my library or I should get a refund....

  • Retriving only hidden parameters from request.getParameter

    Hi,
    I want to retrive only the hidden parameters from previous JSP page into current JSP page. The problem here is that my hidden parameters in privious page are dynamically generated (parameter names are decided based on values retrived from the database) and I cannot retrive them using "request.getParameter(<parametername>)"
    Can I find the parameter type (i.e. text box, text area, checkbox, radio or hidden) from the request.getParameter() or request.getParameterNames() methods? or is there any other way to find it.
    Thanks in advance for any help

    You can use the getParameterNames() or getParameterMap() methods from javax.servlet.ServletRequest to get all the parameters in the request. Even if they're dynamically generated, and you don't know the names in advance, these methods will ferret them out.
    getParameterMap() returns name String, values String [] pairs, so you'll have to work with String arrays to get the input out. It's got to be that way to accomodate checkboxes and other HTML form elements that can send more than one value for a given name.
    I prefer getParameterMap, because I don't like using Enumerations as much. - MOD

  • How can I re-show hidden iCloud playback items?

    My family shares an iTunes account accross three computers. Recently I learned the hard way that when you hide an item from iCloud playback in the new iTunes 11 it gets hidden from the other computers and the "Purchased" link in the store. I accidentally hid all of the holiday songs from iCloud playback but now that by Dad needs to reorganize the library to include holiday music, he couldn't find any of the music on the "Purchased link" which is how I found out that it works like that. Is there a way that I can re-show these songs, they still show up as purchased if you go to the main search and find that particular song? i need to put those songs back into the "Purchaced" link, and be able to play them from iCloud again.

    I believe I had the same problem as you.  To view items that are hidden from icloud.  You need to:
    1. In itunes go to "iTunes Store"
    2. Select your iTunesID, should be upper left.
    3. In drop down menu select "Account"
    4. Under "iTunes in the Cloud", select "View Hidden Purchases" (should more towards the right portion, part way down the screen).
    5. From there you should be able to see anything that you hide or deleted from the normal purchase menu.
    Hope that helps.

  • How do I find and free the hidden files on external drive?

    I cannot see , or free, space on my external drive.
    It is a Seagate Freeagent 500 GB disk. I am using 100GB for photos and music. Only 38 MB are reported free. How can I reclaim the rest of the space?
    I had used in the past as Time machine backup. To create space I moved to trash the file Backups.backupd (as I now have another disk for Time Machine). I can't see this file in the Trash, and I can't see the space in Finder. How do I find / free the space?
    The disk format is MAC OS Extended journaled. Disk utility reports no errors. I have run verify and fix, and also erase free space, with no result.
    Thank you for your help.

    Erase free space only wipes clean the 38 MBs that are already free. Click here to see hidden files.
    However, I'd just make a copy of the 100 GBs in use, and then complely wipe the disk.
    Don't try to delete the Backups.backupd folder by Finder. It's not a good idea to mix Finder and TM.

  • The case of the mysterious hidden content - second hand iMac

    Dear people with more knowledge than me... (i.e. dear everyone...)
    I have recently purchased a second hand intel iMac (late 2006 model) to replace my trusty (but noisy) Powermac G4 Mirror Door Drive. It was purchased 'wiped' with a fresh install of Lion.
    I used Carbon Copy Cloner to create a backup of my old hard drive (or at least the 60GB partition of it that I was using - I had Tiger installed on it) and then used the Migration Assistant to re-create an image of Zion in the wide expanses of the new promised land (250GB capacity).
    All seemed to go well (but time consuming - it took several days to port everything to/from my USB external hard-drive). A few days later, when I checked About this mac I was shocked to discover that I only had 5GB of storage remaining.
    I did a little poking about and realised I had left a couple of user profiles hanging around during my pre-Migration Assistant faffing. These duplicated much of what I had later migrated over more comprehensively, so I deleted these additional user profiles and this freed up a further 58GB or so.
    My system information now tells me that I have
    249.2 GB Capacity
    63.69 GB Available
    185.5 GB Used
    The used component consists of:
    Audio 137.47 GB
    Movies 7.03 GB
    Photos 9.74 GB
    Apps 3.34 GB
    Backups 0
    Other 27.94 GB
    However, when I go through all my available files and folders using the Finder, the grand total of space that I have used comes to around 88GB:
    My home folder (the only user profile I didn't delete) 42.98 GB
    Desktop 4.09 GB (I know, I know, clean your room...)
    Applications 2.31 GB
    Documents 2.8 MB (yes MB)
    Movies 0
    Music 38.59 GB
    Photos 385 KB (yes KB)
    Total ± 80GB
    Leaving aside for a moment the fact that the disk partition I Migrated over was only 60GB in total (?!), where on earth are the other 97.5 GB of files, and how can I see/delete them to free up drive space I thought I had...?
    ...I imagine that the audio, movies etc., that are unaccounted for actually belong(ed) to the previous owner of the iMac. What I don't know how to do is see/access/delete them to free up disk space. There are no additional users other than my own account that I can see. That's not to say they are not there.
    What can I do?
    Thank you in anticipation of any help or advice.
    v

    verdelay wrote:
    the (hidden) folder _CCC Archives takes up a whopping 107 GB, much of which consists of multiple copies of the same audio files (due to poor file management and copies of copies, I think..). I'm now looking for a utility that will be able to locate and list duplicate files so I can verify that the _CCC Archives folder files are replicated elsewhere.
    I use CCC, but not the "archive" feature (since my main backups are made with Time Machine). 
    According to it's Help, that folder contains the backup copies of files that had been changed on the "source" drive. 
    But this large folder is on your internal HD, right?  Here's what I think happened:
    When you made the original CCC clone from your old Mac, you selected the option to "archive" the copies of things that had been changed.  For some period of time, it did that.
    Later, when you used Migration Assistant, it copied all those old files from the clone (via the Other files and folders on <HD name> option) back on to your new internal HD.
    So yes, the files there should be prior versions of things on your system.
    There are various options to have CCC manage those files.  You can assign a certain size to it, and it will delete the oldest files when necessary to make room for new ones;  or "prune" files after a specified number of days, etc.
    Click Help in the CCC menubar, then CCC help, then review the Backup and archiving settings section:

  • MY system folder, including hidden folders are littered with duplicate folders and files with the suffix (from old Mac) How do I remove them

    I have a Macbook Pro running Leopard 10.5.8. I had a problem with my my operating system (my fault, I moved a file I shoudnt have) couldnt boot up but was able to boot up from a backup. I managed to repair my original system except now all the system folders, including hidden folders are littered with duplicate folders and files with the suffix (from old Mac).  For the most part the dupes are an exact copy, but not always.  I want to remove them to free up space and cant imagine duplicate folders in the /system/library are not hindering my computer. But I dont know where to start and am afraid of doing irreparable damage. Any ideas

    pacull,
    Use iCal>View>Show Notifications to choose what to do with the notification.

  • Something was hidden in a download and now these double green underlined hyperlinks show up everywhere, and pop ups too whenever I click on ANYTHING. I can't figure out how to find it and get rid of it.

    Something was hidden in a download and now these double green underlined hyperlinks show up everywhere, and pop ups too whenever I click on ANYTHING. I can't figure out how to find it and get rid of it.

    You installed the "DownLite" trojan, perhaps under a different name. Remove it as follows.
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.vsearch.agent.plist
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "VSearch" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    /Library/LaunchDaemons/Jack.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/VSearch
    /Library/PrivilegedHelperTools/Jack
    /System/Library/Frameworks/VSearch.framework
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    This trojan is distributed on illegal websites that traffic in pirated movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect much worse to happen in the future.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the DownLite developer has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. This failure of oversight is inexcusable and has compromised the value of Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • How to assign java script variable to a hidden parameter in JSP?

    Hi All,
    I want to assign the variable in the Jscript to a hidden parameter in JSP page.
    <select name="sortingOption" class="sortingOptions" onchange="changeSortOption(this)">
    <c:forEach var="sortingOption" items="${sortingOptionList}">
    <c:set var="sortingOptionValue" value="${sortingOption}" target="java.lang.String"/>
    <c:choose>
    <c:when test="${sortingOptionValue == sortingOptionValueFromRequest}">
    <option value="${sortingOptionValue}" selected="selected">${sortingOptionValue}</option>
    <input type="hidden" name="srchType" value="none"/>
    </c:when>
    <c:otherwise>
    <option value="${sortingOptionValue}">${sortingOptionValue}</option>
    </c:otherwise>
    </c:choose>
    </c:forEach>
    </select>
    In changeSortOption script,they capture the value selected by the user and then they submit the form.I want to assign that value to a hidden parameter in JSP,can someone tell me how to do that?
    I dont have the Jscript code with me right now to post here.

    To the point: just by accessing/manipulating the HTML DOM using JS. Learn JS and HTML DOM. There are basic tutorials at w3schools.com. Besides, your code syntax is still invalid. The input hidden elemend doesn't belong in a select element. Learn HTML. There's a basic tutorial at w3schools.com as well.
    For future HTML/JS problems please consult the appropriate forums. This has not much to do with JSP. There are ones at webdeveloper.com.

  • Pivot Table - Calculate Variance - Hidden Fields?

    I need some help adding a target value field inside a pivot table in excel.
    Here is what my current pivot table looks like.
    Regions                  1 year - Actual              1 year - Target??               
    Difference
                       (April 2013 to MArch 2014)                                          
     (Target - Actual)?     
    Region1                $6,355,696.75
    Region2                $6,775,309.87
    Region3                $2,230,424.76
    Regions expand into managers which in turn expand to consultants.
    What I want to do is add a column for target values of the 3 different regions and then create another calculated field that will show the difference between the target and actual values.
    Can this be done without writing any stored procedures in SQL? I want to do this in excel itself.
    The target values are not calculated so can we store them in hidden fields or something in the pivot or excel?

    1. Click anywhere in Pivot and go to Options tab > Formulas > Calculated Field.
    2. Create a calculated field called Target (whatever name your choose). If your target is say 7000000, put this value in Formula field. You may put it with or without =
    3. Now after this, you can once again create a new Calculated Field. Let's say this is Variance. If you variance is Target - Actual, put this as =Target-Actual in Calculated Field.
    4. Your pivot will have whatever you wanted.

  • Apex_application.g_f01 picking up value of hidden column

    i have a report with a apex_item.checkbox using the id 1 and a hidden column. for some reason my pl/sql code that loops through apex_application.g_f01 picks up the value of the hidden column as well. why is this? is this a known bug?
    i managed to get my code working by using id 2.

    report code
    select ename,
    apex_item.checkbox(1,ename,null) sel,
    'RED' COLOUR
    from emp
    order by ename
    process
    FOR I in 1..APEX_APPLICATION.G_F01.COUNT LOOP
    //i insert into a test table to view results
    END LOOP;
    the above works fine until i change the COLOUR column from a standard column to a hidden column. Then for some reason the apex_application.g_f01 then includes the values of all ticked boxes plus all the values in the COLOUR column.

  • How to pass hidden field values on a click of a table row

    hi all,
    href = "bookAndNonBook.do"
    I am very new to struts. I have created a table using displaytable tag which displays results in a tabular format. In addtion, i have a hidden field (prodType), the table rows are getting highlighted when i get my mouse on a particular row.
    Following is the code from the results.jsp file
    <body
    onload="addRowHandlers('row', 'rowMouseOver')"
    bgcolor="#FFFFFF" text="#000000" leftmargin="100" topmargin="50"
    marginwidth="" marginheight="" rightmargin="30">
    <html:form action="/bookAndNonBook" method="post">
    <display:table name="sessionScope.productSearchList" id="row"
    sort="list" export="true" defaultsort="1" defaultorder="ascending"
    pagesize="15" decorator="org.displaytag.decorator.TotalTableDecorator"
    class="dataTable">
    <display:column property="prodType" title="ProdType" class="prodType"
    headerClass="prodType" media="html" />
    <display:column title="Title" property="titleName" sortable="true"
    class="title" headerClass="title" />
    </display:table>
    </html:form>
    </BODY>
    I am calling a funtion addRowHandlers which passes the table id (which is row) and the rowMouseover for highlighting the rows on mouse over.
    the code for function addRowHandlers is
    function addRowHandlers(tableId, rowClassName) {
    var previousClass = null;
    var table = document.getElementById(tableId);
    var rows = table.getElementsByTagName("tr");
    for (i = 1; i < rows.length; i++) {
    rows.onmouseover = function () {
    previousClass = this.className;
    this.className = this.className + " " + rowClassName ;
    this.style.cursor="hand";
    rows.onmouseout = function () {
    this.className = previousClass;
    this.style.cursor='';
    rows.onclick = function (){
    var cell = this.getElementsByTagName("td")[0];
    var ProdType = cell.innerHTML;
    alert("value of prodType = " + ProdType);
    when i run the above code and click on a particular row it returns me the value in the hidden field i.e. prodType for that particular row
    Now where i am having problem is i want that on the basis of prodType my jsp file should call different actions for different prodType as returned....somwhat a function like this
    function submitProduct(prodType) {
    if(prodType == "BK")
    resultsForm.action = "/bookProduct.do";
    else if(prodType == "NB")
    resultsForm.action = "/nonbookProduct.do";
    but i am unable to figure out that how do i this..
    Any help will be really appreciated
    Thanks
    Sam

    can you please suggest some good struts forums where i can post my question
    thanks in advance
    Sam

Maybe you are looking for

  • How to create a multiple PDF-form outputs into one PDF?

    Hi, I`d like to create a PDF document with a few pages in it, build from different PDF-forms using many form-function calls. Where each PDF-form can use its own interface. I`ve made a simple programme, but as the result I have a few separated documen

  • I whant to transfer images,ringtones,videos etc with bluetooth?

    I whant to know is there a whay that i can transfer files with my iphone 3g bluetooth and recived files from other phones. Please if any one knows how please answer this question. Apple if you could make the iphone a complete phone it will be great t

  • Database Settings for order By Clause

    Hi, In oracle if we do a "order by" in SQL statement for field values whose values are empty, then they would be listed at the last if we dont specify any NVL() for it. Is there any other option by which the funcionality of Order by clause with Empty

  • FM for getting teh file name with path

    Hi guys, Is there an fm getting the file name with path given the physical path and file name? Thanks!

  • Dynamic Sql giving error

    Hi, I am creating a BIP report and it is giving an issue on generating Data XML in OTM application. The Report XML is simple query and taking input parameter for shipment_gid, the parameter is handled in SET_LEXICAL_PARAMETER to add where clause and