Dynamically number multi-page survey

Hi
I'm trying to create a multiple-page questionnaire with routing, so want to dynamicallly number the questions so it goes up in steps of 1 for the user no matter which route they use. I've got as far as <cfset session.qnumber=#session.qnumber#+1> but that does not work if you use the 'back' button.
Is there a good way to do this, please?
many thanks
Dave

You could store the last question number in the page in a hidden form field.
When user presses "next", the next page knows the last question number - just add 1 to it.
You don't need a session variable for this.
-Fernis - fernis.net - ColdFusion Developer For Hire

Similar Messages

  • Adobe Forms dynamic number of pages  in Webdynpro

    Hi Experts,
    My requirement is to display a paragraph in PDF format. The paragraph varies for each employee. The text are stored in a table as GUID.
    I am converting the GUID text using read_text function module. The output is of TYPE TABLE OF tline.
    Below is the code that I am using the display output in pdf.
    CALL FUNCTION lv_fmname
          EXPORTING
            /1bcdwb/docparams  = ls_fp_doc
            zcit                              = *lv_citation*
            zsignam                      = lv_signam
            pernr                           = lv_pernr
            ename                         = lv_ename
            desig                           = lv_desig
            zdate                          = lv_date
            zyears                        = lv_years
          IMPORTING
            /1bcdwb/formoutput = ls_formout
          EXCEPTIONS
            usage_error        = 1
            system_error       = 2
            internal_error     = 3
            OTHERS             = 4.
    In the above code I have converted the tline format to string and passing that as lv_citation. So in the PDF I am getting a single paragraph as output. I want to get the output with the formatting also.
    I tried to pass that tline format to the above function module and its giving some error.
    Is this possible to get the output with the formatting available in lt_tline?

    Dear Vidhya,
    that sounds very crazy.
    If i use tline_tab for the param and in the fm, the whole construction works without any problem.
    Can you explain more about the implementation in the layout (or is there an error while calling the fm with the "wrong" type??)
    Also have a look at this thread: [click me|filling a textedit ui through an internal table;
    Declare a itab of type string_table.(say lt_string)
    Loop at itab(the actual data) into wrkarea.
    concatenate all fileds of wrkarea into a string variable.(say lv_string)
    APPEND lv_string TO lt_string.
    ENDLOOP.
    Bind lt_string to a context attribute of type string_table.
    Bind the attribute to the "value" of textedit.I remember doing somthing like this
    and it  seemed to work.
    To show multiline text you'll need to be using a text edit UI element
    (with read only flag checked) not a text view UI element.

  • How do i convert a multi page pdf to a word doc w the same number of pages?

    My file started in Adobe Illustrator. It has several pages of text.  I converted to a pdf. When I tried to convert to Word with Export PDF, all the pages ended up on a single page, instead of a Word doc with the same number of pages. What do i do to get a pdf of 7 pages to convert to a 7-page Word doc?

    Word page layouts are fixed like PDFs. Just add page breaks as needed. But don't expect any kind of good result. If Word could do fancy layout, we wouldn't need Illustrator.

  • Multi page html table, by letter, then by number ... possible to handle nested queries?

    I had seen a worked example of handling html tables spread across multiple pages where there was a logical number on each page here: http://www.powerpivotblog.nl/nba-team-spending-and-their-results-with-excel-powerpivot-and-data-explorer/
    Which requires a two-step solution:
    1) to alter the query to use Number.ToText
    (page) =>let
        Source = Web.Page(Web.Contents("http://website_url/a-z/a/" & Number.ToText(page))),
        Data0 = Source{0}[Data],
        ChangedType = Table.TransformColumnTypes(Data0,{{ etc etc}})
    in
        ChangedType
    and then 2) to supply a {1..X} parameter on a separate sheet.
    let
        Source = Table.Combine(List.Transform({1..30}, Query))
    in
        Source
    In my example URL above (http://website_url/a-z/a/1), there is also a changing letter component /a-z/a/1, 2, 3, then /a-z/b/1,2,3 etc...
    Is there an equivalent way of setting an {a..z} parameter as an outer loop and combine it with the {1..30} loop, by any chance?
    Thanks for your help.
    Colum

    Here are two ways you can reduce the number of privacy prompts:
    1) Use the trick Curt mentions here about reducing the number of prompts.
    Basically, add a query that uses a formula like:
    = {Web.Contents("http://website/"), Web.Contents("http://someOthersite/")}
    Then, set the privacy level of http://website/ to Public. After saving the privacy level, you can discard the query.
    2) You can enable Fast Combine, which will disable the privacy checks. I do not recommend this approach in general, and you should only enable Fast Combine if you are certain that you can trust your data sources. Also, be extremely cautious about enabling
    Fast Combine on workbooks you did not create.
    I recommend the first approach.
    Sorry, I did not include the navigation and transformation steps in my approach above. To include those steps, it will be nicer to go with the two-step approach to prevent the last function in Websites from being too messy.
    For the first step, we can create a function which, given a letter and a page number, grabs the data from the website and performs some transformations on it. It might look something like this:
    let
        Source = (letter, pageNumber) => let
            Page = Web.Page(Web.Contents("http://website/" & letter & "/" & Number.ToText(pageNumber))),
            Data0 = Page{0}[Data],
            ChangedType = Table.TransformColumnTypes(Data0,{{"FIELD1", type text}, {"FIELD2", type text}, {"FIELD3", type text}, {"FIELD4", type text}, {"FIELD5", type text}})
        in
            ChangedType
    in
        Source
    Let's call this query GetWebsiteContents.
    For the second step we can generate all of the letter and number combinations we need, and then call GetWebsiteContents on each combination. That may look like this:
    let
         Numbers = {1..5},
         Letters = {"a", "b", "c"},
         CreatePair = (page) => List.Generate(() => 0, each _ < List.Count(Letters), each _ + 1, each {Letters{_}, page}),
         LetterNumberPairs = List.Combine(List.Generate(() => 0, each _ < List.Count(Numbers), each _ + 1, each CreatePair(Numbers{_}))),
         Websites = List.Generate(() => 0, each _ < List.Count(LetterNumberPairs), each _ + 1, each GetWebsiteContents(LetterNumberPairs{_}{0}, LetterNumberPairs{_}{1}))
     in
         Websites
    I hope this helps.
    -Alejandro (MSFT)

  • Can I create a dynamic number of inputs during runtime?

    Can I create a dynamic number of inputs during runtime?
    Oracle 11g
    Application Express 4.0.2.00.06
    Here is my problem:
    We have a table that holds metadata about files (hardcopy or softcopy files).
    We expect we may need more columns in the table at some point and don't want to modify the table or the application.
    So in order to do this I would like to create:
    A table called TBL_FILE with the columns:
    TBL_FILE_ID               NUMBER                (This will be the primary key)
    TBL_FILE_NAME          VARCHAR2(1000) (This will be the name of the file)
    A second table will be called TBL_FILE_META with the columns:
    TBL_META_ID               NUMBER               (This will be the primary key)
    TBL_FILE_ID               NUMBER                (This will be the forign key to the file table)
    TBL_META_COLUMN     VARCHAR2(30)     (This is what the column name would be if it existed in TBL_FILE)
    TBL_META_VALUE          VARCHAR2(1000) (This is the value that record and the 'would be' column)
    So a person can have as much meta data on the file with out having to add columns to the table.
    The problem is how can I allow users to add as much data as they like with out having to re develop the page.
    Other things to note is that we would like this to be on a single page.
    I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
    however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
    So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
    Any idea's how I could accomplish this? Is there a better way of doing this?
    Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
    I found this method when looking at Oracles Workflow tables.

    Welcome to the Oracle Forums !
    >
    Can I create a dynamic number of inputs during runtime?
    Oracle 11g
    Application Express 4.0.2.00.06
    Here is my problem:
    We have a table that holds metadata about files (hardcopy or softcopy files).
    We expect we may need more columns in the table at some point and don't want to modify the table or the application.
    So in order to do this I would like to create:
    A table called TBL_FILE with the columns:
    TBL_FILE_ID NUMBER (This will be the primary key)
    TBL_FILE_NAME VARCHAR2(1000) (This will be the name of the file)
    A second table will be called TBL_FILE_META with the columns:
    TBL_META_ID NUMBER (This will be the primary key)
    TBL_FILE_ID NUMBER (This will be the forign key to the file table)
    TBL_META_COLUMN VARCHAR2(30) (This is what the column name would be if it existed in TBL_FILE)
    TBL_META_VALUE VARCHAR2(1000) (This is the value that record and the 'would be' column)
    So a person can have as much meta data on the file with out having to add columns to the table.
    The problem is how can I allow users to add as much data as they like with out having to re develop the page.
    >
    Creating Page Items dynamically is not available. You will have to create excess items and hide/show , etc. But you cannot change the Item Type. All in all, too many limitations in this approach.
    >
    Other things to note is that we would like this to be on a single page.
    >
    The 100 item limit will hit you if you go with extra item on page. With Tabular Form that should not be a limitation, unless you are exceeding the 50 item limit of APEX_APPLICATION.G_Fnn items, and the 60 column limitation of Report region with "Use Generic Column Names (parse query at runtime only)" of Dynamic region.
    >
    I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
    however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
    >
    If the type if item is variable it only means you need a way to store the item type. Meta Data of the Meta Data.
    >
    So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
    >
    Yes, you can do it. Updatable report/ Tabular Form query can be constructed from the Meta Data using PL/SQL Function Returning SQL Query . It will be a bit of coding in PL/SQL where you use the Meta Data and the Meta Data of the Meta Data to piece together your SELECT with the right APEX_ITEMs. It might have a performance penalty associated with it, but will not be a serious degradation.
    >
    Any idea's how I could accomplish this? Is there a better way of doing this?
    Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
    I found this method when looking at Oracles Workflow tables.
    >
    I guess that is just a good TNF. It is the Master-Detail Design Pattern, that sound more modern ? ;)
    Regards,

  • How do I print selected pages from a multi page document

    How do I print selected pages from a multi page document?
    This question was solved.
    View Solution.

    Hi,
    It depends on the software you are using, what is it ? In general you can select a range or just a number of pages.
    Regards
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Page Spawning - Prompting For Number Of Pages

    I asked a similar question a few years back and at the time, the project went by the wayside.  Well, the project is back on track and now I'm in a jam and need to use some javascript for some easy automation.  Here's the situation.  I have a form with a hidden button that allows persons who know where the button is, to spawn the current semplate into additional pages, while renaming the approzimately 400+ form fields on each page.  As it currently stands, the user needs to click the hidden button each time to spawn a new page.  This is kind of cumbersome considering, I need to generate approximately 200 pages at a time.  Here is the current code (culled from any of a number of web pages) that works for the single click page addition:
    // Get a template object from an existing template
    var t = getTemplate("temp1");
    // Spawn the template on the page following this one, and rename the fields
    t.spawn({nPage: pageNum + 1, bRename: true, bOverlay: false});
    What I'd like to do is have the button "click" (mouse up) produce a dialog box that asks the user to input the number of pages needed to be spawned.  I'm not concerned about page numbering as I have a separate means for doing that, once all the pages have been spawned.  Clearly, I am not a javascript programmer, so, if someone is willing to help, it's going to have to be usable code that will require only minor tinkering, if any.  Any help or ideas would be greatly appreciated.  I'm using Acrobat Pro X.  There was an MVP named George Johnson who tried to help me back them, but quite honestly, Is imply didn't know how to tie it all together.  He suggested using the following code in generating the dialog box (obviously, text is not geared toward my document).  Can someone show me how to tie all of this together?
    var cResponse = app.response({
               cQuestion: "How are you today?",
                   cTitle: "Your Health Status",
                   cDefault: "Fine",
                   cLabel: "Response:"
    if (cResponse == null)
               app.alert("Thanks for trying anyway.");
    else
               app.alert("You responded, \""+cResponse+"\", to the health "
                         + "question.",3);
    Thank you in advance,
    Randy

    Greetings George!
    A while back, you assisted me with the following code (see below), which was used to spawn a multi-page document.  By the way, the code was just what the doctor ordered, thank you!  I am now faced with another issue while spawning this document.  I have one field (show_num) which I need to prevent from renaming, when the document is spawned.  All other fields, rename perfectly, as desired.  I now will be utilizing this show_num field, which was previously just a place holder and not used.  Is there a way to have the field remain the same name as the pages are spawned?  In other words, I'm looking to have the user type a "show number" on the first page and have it immediately populate in the same field on all pages (i.e. 1026-022).  This number would then populate on all pages in the "show_num" field.  Here's the code I'm using to spawn the pages:
    var resp = app.response({
        cQuestion: "How many pages to you want to add?",
        cTitle: "Enter number of pages to add",
        cDefault: "1",
        cLabel: "Pages:"
    // Get a reference to the template to spawn
    var t = getTemplate("temp1");
    // Only proceed if user enteres a value,
    // that can be converted to a number,
    // and the number is at least 1 and no more than 600
    if (resp && !isNaN(+resp) && +resp >= 1 && +resp <= 600) {
        // Round number of pages to nearest integer
        var num = Math.round(+resp);
        // Spawn the specified number of pages
    for (var i = 0; i < num; i += 1) {
        if (i === 0) {
            var oXO = t.spawn({nPage: numPages, bRename: true, bOverlay: false});
        } else {
            t.spawn({nPage: numPages, bRename: true, bOverlay: false, oXObject: oXO});
        // Delete the button
        removeField("P" + (numPages - 1) + ".temp1.spawnPage");
    } else {
        app.alert("You entered an invalid number: " + resp);

  • How to get total number of pages from .doc file without using Office interop?

    Hi,
    Kindly help me in getting the total number of pages from a .doc file not .docx file using C#. I know how to get by using Office interop but I do not want to use Office interop.
    So, without office automation in C# let me know how to get the total number of pages from a .doc file.
    Regards,
    Ashok

    Hi Ashok,
    >> I know how to get by using Office interop but I do not want to use Office interop
    Could you tell us why you don't want to use Office interop?
    As far as I know, this is the easiest way to achieve.Hmmm,this is my answer
    http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.pagenumbers.startingnumber(v=office.14).aspx
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Variations of a fixed content multi page Form

    Problem Statement:
    There are two variations of a fixed content page Form. This form runs for multi-pages say 10 pages of fixed content. One variation has an additional 4 to 5 line fixed text contents enclosed by a rectangular box object at the top of the page right below the title of the Form on the first page and there no other differences Vs the second variation.
    Approach:
    The form is created using a multiple page Section.
    Question:
    Can we avoid creation of multiple version of Sections in Documaker with use of any special Studio rules to insert the conditional rectangular box object with the 4 to 5 line contents between the Title of the form and the first paragraph based on a trigger?
    Assume that the First version and the second version of the form contents can be differentiated with a trigger or signal say "0" or "1" in the extract.
    Edited by: Nirmalgarga on 16 Dec, 2010 12:07 AM
    Edited by: Nirmalgarga on 16 Dec, 2010 3:06 AM

    Dynamic growing rectangles are supported in Documaker, review the Rule Book for the GorupBegin rule. This rule needs to be implemented at the section level.
    A box can also be place around a text area as a border. You can implement this as only one section using a variety of options, however its not clear what is making the section different in the first place. If its variable data then I'd try the border around the text area first - it is the easier option of the two.
    The grouping rules were specifically designed to support dynamic rectangles when you have overflow/repeating data versus what could be contained in a text area. There is some additional detail that would be needed to determine the optimal way of implementing this need.

  • Getting Page Count for a Multi-Page PDF file using Illustrator script?

    Does anyone know how to get the page count of a multi page PDF file?  I know you can then open each page using the PDFFileOptions (pagetoopen).  But I need to know up front how many pages there are to loop thru to open each page and process each page.
    Any Ideas?

    This script i did for photoshop:
    OK so lets do it working on WIN and MAC without any shell script.
    This solution is not the best but its working.
    I used Try catch to solve it.
    Only issue is that you should at least somehow know how many pages you expect in pdf.. this mean if you are working with books or flyers...
    Then set the maxPagesCount to that number.
    I am working with pdfs with max 20pages.. so i start open the 20 then 19 then 18 and when i am success i know the amount of pages.
    Its not the quicker way but its usable.
    var maxPagesCount = 20;
    var actPagesCount = maxPagesCount;
    var opts1 = new PDFOpenOptions();
    opts1.usePageNumber = true;
    opts1.antiAlias = true;
    opts1.bitsPerChannel = BitsPerChannelType.EIGHT;
    opts1.resolution = 10; //it will load faster the test page
    opts1.suppressWarnings = true;
    opts1.cropPage = CropToType.MEDIABOX;
    myFunction = function () {
      try { 
          app.displayDialogs = DialogModes.NO;
          var fileList = openDialog();
          for (i = 0; i < fileList.length; i++) {
            actPagesCount = maxPagesCount;
            getPagesCount(fileList[i],maxPagesCount);
            alert(actPagesCount);
      } catch (exception) { 
        alert(exception);
    getPagesCount = function (checkFile, lastPageID) {
      try {          
        for (var checkPage = lastPageID; checkPage > 0; checkPage--) {
          opts1.page = checkPage;                    
          var docRef = open(checkFile, opts1, false);                  
          docRef.close(SaveOptions.DONOTSAVECHANGES);                  
          actPagesCount = lastPageID;                  
          return;                  
          checkPage=0;                              
      } catch (exception) {
        // Look for next page        
        checkPage--;        
        getPagesCount(checkFile,checkPage);

  • Photoshop CS5 pdf size fine - Bridge Multi page pdf size not fine

    I know it must be asked a thousand times but here goes:
    PDFs saved by photoshop display the true document size (let's say 70cm width on 72ppi)
    When I try to create multi page pdfs fro bridge (thanks Adobe!), no matter how many ways I try to set it up, the image always is small in the center of a white background. Always.
    What gives?

    Hi,
    1. Why dont u try it in pdf itself?
    U can just crop the required area in pdf file using crop tool so it can be applied for all the pages at a time.
    2. If u trying to remove particular area on a pdf u can place a white box on that area using pitstop tool it can be saved as actionlist like batch processing and applied for any number of pages and files.
    Making this in pdf itself won't get u more file size. Size will be as equal as ur source file.
    Praveen

  • Getting the number of pages in a PDF [JavaScript in CS3]

    Hello All,
    I am an InDesign JavaScript newbie that will be posting questions in the near future. Before asking a lot of questions, I would like to contribute something to the group. Here is a function that will query a PDF and return the number of pages that it contains. This is useful for placing multi-page PDFs.
    Rick Quatro
    rick at frameexpert dot com
    function GetPdfPageCount(oFile)
    // Convert filename to a VBS-friendly format.
    var sFile = oFile.fsName.replace(/\\/g, "\\\\");
    var aFile = [sFile]; // An array of arguments.
    if(File.fs == "Windows"){
    var sGetPdfPageCount = "Dim AcroApp, AVDoc, PDDoc, iPages\r";
    sGetPdfPageCount += "Set AcroApp = CreateObject(\"AcroExch.App\")\r";
    sGetPdfPageCount += "Set PDDoc = CreateObject(\"AcroExch.PDDoc\")\r";
    sGetPdfPageCount += "If PDDoc.Open(arguments(0)) Then\r";
    sGetPdfPageCount += " iNumPages = PDDoc.GetNumPages()\r";
    sGetPdfPageCount += " Set oInDesign = CreateObject(\"InDesign.Application\")\r";
    sGetPdfPageCount += " oInDesign.ScriptArgs.SetValue \"ScriptArgumentA\", CStr(iNumPages)\r";
    sGetPdfPageCount += " PDDoc.Close()\r";
    sGetPdfPageCount += "End If\r";
    sGetPdfPageCount += "Set AcroApp = Nothing\r";
    sGetPdfPageCount += "Set PDDoc = Nothing\r";
    app.doScript(sGetPdfPageCount, ScriptLanguage.visualBasic,aFile);
    return Number(app.scriptArgs.getValue("ScriptArgumentA"));
    else
    return 0;

    Hi Peter,
    The solutions that open the PDF files with f.open and look for particular strings don't work for all of the PDF files I have. This one seems to work well for me so far. Thanks for the link.
    Rick

  • Maximum number of pages in D/W site?

    Hi, I'm wondering if there's a limit to the number of pages
    Dreamweaver can handle. I'm considering recommending
    Dreamweaver/Contribute to a client who has a very large number of
    pages that have so far been produced and managed by static HTML
    templates and extensive use of server-side-includes. The pages
    number into tens of thousands, with new ones being added everyday
    (it's a content-heavy site). For several reasons, they're not
    interested in converting to a fully dynamic solution
    (database-driven). But before I recommend DW/Contribute I want to
    be sure it's doable, that DW won't crash while trying to update
    pages after a template change, for example.
    Thanks in advance,
    --PV

    Oh... and something else...
    For that size, definately, positively, don't use templates.
    Use ONLY include
    files to manage the headers, footers, menus, etc. That way
    only 1 file has
    to be changed and uploaded. Not a bazillion when you change a
    template.
    "John" <[email protected]> wrote in message
    news:e3dk3k$sh5$[email protected]..
    > It is possible that it could crash with a Template or
    Library change. I
    > know on sites that I've had several thousand files it
    would. (Previous
    > versions.)
    >
    > It is unfortunate they don't want to do database-driven
    as that would be
    > the way to go.
    >
    > "iampv" <[email protected]> wrote in
    message
    > news:e3dfc4$mh7$[email protected]..
    >> Hi, I'm wondering if there's a limit to the number
    of pages Dreamweaver
    >> can
    >> handle. I'm considering recommending
    Dreamweaver/Contribute to a client
    >> who
    >> has a very large number of pages that have so far
    been produced and
    >> managed by
    >> static HTML templates and extensive use of
    server-side-includes. The
    >> pages
    >> number into tens of thousands, with new ones being
    added everyday (it's a
    >> content-heavy site). For several reasons, they're
    not interested in
    >> converting
    >> to a fully dynamic solution (database-driven). But
    before I recommend
    >> DW/Contribute I want to be sure it's doable, that DW
    won't crash while
    >> trying
    >> to update pages after a template change, for
    example.
    >> Thanks in advance,
    >> --PV
    >>
    >
    >

  • Total number of pages before generating the PDF - OMR

    Dear all,
    We are facing the following problem. We want to apply OMR (optical mark recognition) barcoding on a batch of invoices.
    Basically there are two steps in the proces:
    - Fetch the batch of invoices created during the day, let's say 1000 invoices.
    - Calculate for this batch of invoices the total number of pages per customer. 1 customer can have multiple invoices per day.
    - If the number of pages per customer > 12, remove the invoices from the total batch (1000 invoices become then 800 for example).
    - Apply OMR logic on the remaining 800.
    My question is regarding step 2. The calculation of the total number of pages per customer. Is it possible to get the total number of pages before generating the PDF? Or do we have to 'simulate' the PDF to get to this number?
    Another question I have, does anybody have experience implementing OMR using adobe forms? Any experience to share?
    Thanks for your feedback
    Simon

    Hi Philippe,
    we can only determine the page size when its already loaded with data and its published/sent by ADS.
    i.e., the no of pages increases based on the data you feed to the form which mean by the time the form/script determines the number of pages it has published dynamically data is already there. so your requirement cannot be solved in that approach.
    the next approach which I can think of is as follows.
    lets say you display the invoices data as a table in the form.
    so then lets specify the row height to .5" which mean in a form with content area size of 15" we can display 30 records.
    so in the interface or the source program count the number of records per customer if they are < (12pages X 30 records = 360) leave them as they are else remove them for the list and process the data for other customers.
    As per your other query of having OMR on the form I have no Idea, I never worked on that but if its just any other type of barcode that shouldn't have any problem.
    Hope this helps you,
    Cheers,
    Sai

  • ADF triggering dynamic number of components

    I have a three-level View object dependency Category -> Class -> Subclass and want to create a dynamic form with the following logic:
    When user chooses a Category from drop down, page is updated with a number of Class drop-down lists presenting all the Subclasses - i.e. I have a dynamic number of selectOneChoice components depending on Category selection. Category to Class dependency is implemented with Category valueChangeListener querying Classes with category Id, Class to Subclass is simple View Link / tree value binding. Subclass value binding to backing bean is done with a HashMap.
    Does ADF faces framework let me re-create actual page components with partial page rendering (or some other mechanism)?
    I should fully re-generate all selectOneChoice components inside forEach every time user changes Category.
    My page components:
    <af:selectOneChoice value="#{bbean.category}"
    label="Category"
    autoSubmit="true" immediate="true"
    id="category" valuePassThru="true"
    valueChangeListener="#{bbean.categoryChanged}">
    <f:selectItems value="#{bindings.Categories.items}"/>
    </af:selectOneChoice>
    <af:forEach var="class" items="#{bindings.Classes.children}">
    <af:selectOneChoice value="#{bbean.subclass[class.id]}"
    label="#{class.name}"
    partialTriggers="category"
    id="class" valuePassThru="true">
    <af:forEach var="subclass" items="#{class.children}">
    <af:selectItem label="#{subclass.name}" value="#{subclass.id}"/>
    </af:forEach>
    </af:selectOneChoice>
    </af:forEach>
    The above code is a development from earlier less-complex UI. For all I've tried I cannot come up with the desired effect. When I change Category it doesn't affect sub- drop downs in any way. If I activate the Category valueChangeListener, Category change will cause validation phase null property exceptions:
    2.9.2008 14:05:40 com.sun.faces.lifecycle.ProcessValidationsPhase execute
    SEVERE: Error testing property 'null' in bean of type my.project.view.managed.Search$1
    javax.faces.el.PropertyNotFoundException: Error testing property 'null' in bean of type my.project.view.managed.Search$1
    ...

    John & Frank,
    Unfortunately enclosing layout component with partialTriggers="category" doesn't help - I've tried that already (panelgroup & panelpage, that is). Thanks for impressive response time though ;)
    Edit: Sorry, yes it helps! Thanks. The problem happens to be the HashMap value binding, it breaks up things after valueChangeListener refreshes the Class VO. After removing that the surrounding panelGroup does component refresh correctly. Back to drawing board..
    Erik
    Edited by: Erik Westerinen on Sep 2, 2008 5:26 AM

Maybe you are looking for