Smartform dynamically add pages

Hi everybody,
I have a smartform regarding a company.For each company i have several locations and for each location i have a table with some informations that need to be displayed.
My problem is that i will never know how many locations a company will have,only until runtime when i read some tables.My problem is that i have to display  the informations for a location on a different page,so that i have to dynamically add pages in the smartform depending on the number of locations,which will be always different.
Does anybody know how i can do this?
thanx

Hi,
you have to add an extra page in which the data is printed you want.
You have to print this in the MAIN window.
In the MAIN window build in a loop (by loop or TABLE).
Do this at the end of MAIN window.
Inside this loop is the first thing a COMMAND (flow logic)
In this COMMAND your call your next page.
After that print and fill your variables.
succes.
Gr., Frank

Similar Messages

  • Dynamically adding pages to a desktop

    I am trying to create a portal application that will allow me to dynamically add
    pages to my desktop. Right now I have a portlet set up that can take the name
    of the page I want and pass that to a pageflow. From there I have tried using
    classes such as PortalCustomizationManager, BookPresentationContext, BookDefinition,
    BookInstance, PageDefinition, PageInstance, etc. to add the page, but have not
    had much luck. I know that WebLogic has the built-in VisitorTools, but I can't
    use those for what I am really trying to accomplish. I also tried looking at how
    the VisitorTools work, but it just appears that BEA uses javascript to populate
    a hidden form with values, and then submit the form. What happens after that I
    have not been able to figure out and my experiments to do the same in my portal
    have all failed. The documentation on how to use all of these VisitorTools classes
    without taking the whole thing is very, very poor. Please help if you can! Thanks!
    Nathan

    more like this
    private String webAppName = "myWebApp";
    public void doit() throws Exception
    // Note you can do this from a backing file or a JSP (if from a backinf file
    use
    // "BackingContent" instead of "PresentationContext"
    // Also: you will need to redirect back to the portal or your changes won't
    be seen until the next request.
    // as you have already started rendering.
    DesktopDefinitionId desktopDefinitionId = new DesktopDefinitionId(webAppName,
    new PortalPath(portalPath), new DesktopPath(desktopPath));
    DesktopPresentationContext desktopPC = DesktopPresentationContext.getDesktopPresentationContext(request);
    // This will return you the main book
    BookPresentationContext bookPC = desktopPC.getBookPresentationContext();
    String primaryBookInstanceId = bookPC.getInstanceId();
    if (primaryBookInstanceId != null) {
    PortalCustomizationManager portalCustomizationManager = null;
    PageDefinitionManager pageDefinitionManager = null;
    // Get a reference to the EJBs we are going to need.
    InitialContext initialContext = new InitialContext();
    PortalCustomizationManagerHome portalCustomizationManagerHome = (PortalCustomizationManagerHome)
    initialContext.lookup("SRF_beta_portal.BEA_netuix.PortalCustomizationManager");
    PageDefinitionManagerHome pageDefinitionManagerHome = (PageDefinitionManagerHome)
    initialContext.lookup("SRF_beta_portal.BEA_netuix.PageDefinitionManager");
    pageDefinitionManager = pageDefinitionManagerHome.create();
    portalCustomizationManager = portalCustomizationManagerHome.create();
    // Set up the customization context
    Locale locale = desktopPC.getResolvedLocale();
    CustomizationContext customizationContext = new CustomizationContext(locale,
    request);
    customizationContext.setVisitorMode(true);
    // If you want to add an existing page from the library to a page then
    do the following
    // a) get an existing page definition
    PageDefinition existingPageDefinition = pageDefinitionManager.getPageDefinition(customizationContext,
    "<the pages definition label>", webAppName);
    // c) add the page ot the book
    portalCustomizationManager.addNavigable(customizationContext,
    desktopDefinitionId,
    BookInstanceId.createBookInstanceId(Integer.parseInt(primaryBookInstanceId)),
    existingPageDefinition.getPageDefinitionId(),
    0, // position
    0);
    // If you want to create an empty page and add it the book
    // a) find a alyout for this page
    LayoutDefinition layoutDefinition = pageDefinitionManager.getLayoutDefinitionFromFile(customizationContext,
    "/framework/markup/layout/twocolumn.layout", webAppName);
    PageDefinition pageDefinition = new PageDefinition(new LocalizationResource(locale,
    "My New Page, null"),
    MarkupDefinition.MARKUP_PAGE_ID,
    "someuniquepagelabel",
    false,
    false, // do we want
    this page to appear in the loibrary?
    webAppName,
    layoutDefinition.getLayoutDefinitionId(),
    null);
    // b) create the page
    PageDefinition fullyPopulatedPageDefinition =
    pageDefinitionManager.createPageDefinition(customizationContext,
    pageDefinition);
    // c) add the page ot the book
    portalCustomizationManager.addNavigable(customizationContext,
    desktopDefinitionId,
    BookInstanceId.createBookInstanceId(Integer.parseInt(primaryBookInstanceId)),
    fullyPopulatedPageDefinition.getPageDefinitionId(),
    0, // position
    0);
    "Nathan Redding" <[email protected]> wrote:
    >
    Thanks again, Chris.
    So here is the code I have now. I resides in a JSP within a portlet.
    is that a
    problem for some reason? All I am trying to do with this code is to add
    another
    page to my main book called START. Any hints would be most appreciated!
    DesktopDefinitionId deskID = new DesktopDefinitionId(webAppName,
    new PortalPath
    (portalPath), new DesktopPath(desktopPath));
    DesktopPresentationContext desktopPC =
    DesktopPresentationContext.getDesktopPresentationContext(request);
    BookPresentationContext bookPC = desktopPC.getBookPresentationContext();
    String primaryBookInstanceId = bookPC.getInstanceId();
    if (primaryBookInstanceId != null)
    BookInstance mainBook = PortalVisitorManager.getBookInstance
    (primaryBookInstanceId, request.getLocale(), request);
    BookDefinition mainBookDef = mainBook.getBookDefinition();
    PageInstance newPageInst = new PageInstance(null, new LayoutDefinitionId(0),
    "START");
    InitialContext initialContext = new InitialContext();
    PortalCustomizationManagerHome pcmh = (PortalCustomizationManagerHome)
    initialContext.lookup("SRF_beta_portal.BEA_netuix.PortalCustomizationManager");
    PortalCustomizationManager pcm = pcmh.create();
    try
    pcm.addNavigable(new CustomizationContext(desktopPC.getResolvedLocale(),
    request), deskID, mainBookDef.getPrimaryInstanceId(),
    newPageInst.getNavigableDefinitionId(), 0, 0);
    catch (Exception e)
    System.out.println(e.getMessage());
    Thanks,
    Nathan Redding
    P.S. Is there ever going to be a set of solid documentation for all the
    Java classes
    that Portal uses? It is quite difficult to know what you are supposed
    to do to
    get things done!
    "Chris Jolley" <[email protected]> wrote:
    portalCustomizationManagerHome =
    (PortalCustomizationManagerHome) initialContext.lookup("qaApp.BEA_netuix.PortalCustomizationManager");
    portalCustomizationManager = portalCustomizationManagerHome.create();
    "Nathan Redding" <[email protected]> wrote:
    Thanks Chris, this does lead me to further questions, however.
    I assume I need to get the PortalCustomizationManager object from aPortalCustomizationManagerHome
    object, but I need to know where I get one of these home objects. Once
    I have
    that, I am hoping that what I am trying will work. Thanks!
    Nathan Redding
    "chris jolley" <[email protected]> wrote:
    This is certainly possible
    PortalCustomizationManager.addNavigable() is the method you want.
    if you want to affect all users for the desktop
    a) you must br in the Admin or PortalSystemAdministrator and
    b) set Visitor mode to false on the customization context.
    if you only want to affect the current user
    b) setVisitorMode = true on the customization context.
    below is tha java doc for addNavigable
    * <p>Add a <code>NavigableDefinition</code> (BookDefinition or
    PageDefinition)
    to the supplied
    * Book Instance. This is the method you want to call if you want
    to add a
    page to a book for
    * a particular user or if you are an admin effect all user.</p>
    * @param desktopDefinitionId the desktop context to which thisupdate
    applies.
    * @param bookInstanceId the book instance to add the navigableto.
    * @param navigableDefinitionId the navigable defintion id fromwhich
    to create
    the instance.
    * @param position the position in the book (or menu) to insertthis
    navigable
    (starts with 0)
    * @param align position the page from the left (top) or right
    (bottom)
    * @return the NavigableView instance which was created.
    * @throws ObjectNotFoundException BookDefinitionId or the NavigableDefinition
    are bogus.
    * @throws IllegalDependencyException adding the Navigable to the
    BookInstance
    would cause a recursive dependancy
    * @throws MissingDataException missing vital data in the NavigableDefinition.
    * @throws NotEntitledException if the caller does not have therequired
    permissions
    to delete this object.
    * @see com.bea.netuix.application.manager.CustomizationContext#setVisitorMode
    public NavigableInstance addNavigable(CustomizationContext customizationContext,
    DesktopDefinitionId desktopDefinitionId,
    BookInstanceId bookInstanceId,
    NavigableDefinitionId navigableDefinitionId,
    int position,
    int align)
    throws RemoteException, ObjectNotFoundException, MissingDataException,
    NotEntitledException, IllegalDependencyException;
    "Nathan Redding" <[email protected]> wrote:
    I am trying to create a portal application that will allow me to
    dynamically
    add
    pages to my desktop. Right now I have a portlet set up that can take
    the name
    of the page I want and pass that to a pageflow. From there I havetried
    using
    classes such as PortalCustomizationManager, BookPresentationContext,
    BookDefinition,
    BookInstance, PageDefinition, PageInstance, etc. to add the page,but
    have not
    had much luck. I know that WebLogic has the built-in VisitorTools,but
    I can't
    use those for what I am really trying to accomplish. I also tried
    looking
    at how
    the VisitorTools work, but it just appears that BEA uses javascriptto
    populate
    a hidden form with values, and then submit the form. What happens
    after
    that I
    have not been able to figure out and my experiments to do the samein
    my portal
    have all failed. The documentation on how to use all of these VisitorTools
    classes
    without taking the whole thing is very, very poor. Please help if
    you
    can! Thanks!
    Nathan

  • Add pages dynamically to adobeform

    Hi,
    I need to add pages dynamically to adobeform. For example, i need that a page appears in the final PDF if one table have values, but if table is empty, all of page items should not appear in the final PDF.
    Can anyone help me ?
    Best Regards,
    João Paiva

    Please! no sarcasm, You arent giving qwwerty a chance to post his code.
    I'm sure he's got a lot to offer and just waiting for the right opportunity.
    Ok qwwerty, when you're ready....

  • Acrobat XI Pro - can't add pages :(

    I was using Acrobat 9 Pro - I could add pages easily. With XI - it hangs or crashes just before the screen "add pages before or after" - it's driving me mad - might uninstall it and go back to 9 which was quite stable. Lots of other new features/layouts I hate. Especially the small space available for tools you use regularly

    You will need to get LiveCycle Designer, which is now a separate product.
    XFA forms created with LiveCycle Designer can be either static or dynamic. Static ones are very similar to forms created in Acrobat (AcroForms) in their behavior. Dynamic forms can have auto-expnding text fields, rows added to and removed from tables, entire sections generated and removed at run time, and a number of other dynamic behavior. So which you choose really depends on what your needs are. Many static XFA forms could be created as AcroForms with no loss in functionality. A big downside to XFA forms nowadays is the lack of PDF viewers for mobile devices that support them. AcroForms have always had more support in general.
    JavaScript is used in both XFA and AcroForms, but each has it's own object models. XFA forms also support FormCalc, which isn't a full blown programming language like JavaScript, but it does have a number of useful features.The types of controls are pretty much the same, though an XFA forms support an image field and a good number of 1D barcode types with bar code fields.

  • How to synch values of fields (cbo & text) in Master Pages section in dynamically created pages?

    HI folks,
    I have a requirement for a form that has a common master page with a checkbox and text field in it.   The document is basically a table that dynamically adds rows as the user adds entries.   When the first page is full, a second page is dynamically created and the Master page format (including the checkbox & text field) applied to it. 
    When the user sets the checkbox on one page and/or adds text, all of the checkboxes on all of the dynamically created pages (in the master section) and all of the text boxes need to change to show the same values.   
    However, I can't figure out how to address the fields on the other pages.   The number of pages changes from user to user, so I can't address them with a static reference.
    Does anyone know how to keep these fields in synch?
    Thanks in advance!

    It woudl be easier to show than to explain it ...can you share the file? You can send it to [email protected] Include a description of the issue with your email please.
    Paul

  • SmartForms Dynamic Columns

    Hi, Can I in a SmartForms Report add dynamic columns?. It is this possible???
    Similarly as they grow in row I can grow in columns my report.
    Thank u.

    If you are trying to vary the number of columns, this may not be possible. You may have fixed number of columns and change the contents (and heading) of the same in a pre-determined manner.

  • Dynamically add Children Link Element

    Hi,
    I'm trying to dynamically add a children element, a link, but the action binding refuses to work ...
    I've created a custom jsf component, that does nothing at all.
    For example, one would use it like:
    <my:nothing></my:nothing>So my UI class would have the following methods:
    public void encodeBegin(FacesContext context) throws IOException {
    public void encodeEnd(FacesContext context) throws IOException {
    }The tld file is created, the tag class is working. All the component is working properly.
    Now I want to add a link as a child component, but I wat to do it programatically, so I changed the encodeBegin method of my custom ui class:
    import javax.faces.el.ValueBinding;
    import com.sun.faces.util.Util;
    import javax.faces.el.MethodBinding;
    import javax.faces.component.UICommand;
    import javax.faces.component.html.HtmlCommandLink;
    import com.sun.faces.taglib.html_basic.CommandLinkTag;
    public void encodeBegin(FacesContext context) throws IOException {
              String myLinkId = "idMyLink";
              String myLinkValue = "myLink:Value";
              String myLinkStyle = "color:green;";
              String myLinkAction = "backup";
              HtmlCommandLink myLink = new HtmlCommandLink();
              myLink.setParent(this);
              myLink.setId( myLinkId );
              if (CommandLinkTag.isValueReference( myLinkValue )) {
                   ValueBinding vb = Util.getValueBinding( myLinkValue );
                   myLink.setValueBinding("value", vb);
              } else {
                   myLink.setValue( myLinkValue );
              if (CommandLinkTag.isValueReference( myLinkStyle )) {
                   ValueBinding vb = Util.getValueBinding( myLinkStyle );
                   myLink.setValueBinding("style", vb);
              } else {
                   myLink.setStyle( myLinkStyle );
              if(myLinkAction!=null) {
                   if (CommandLinkTag.isValueReference( myLinkAction )) {
                        System.err.println("Id="+myLinkId+":TRUE:getAccao:isValueReference:"+myLinkAction);
                        MethodBinding vb = getFacesContext().getApplication().createMethodBinding(myLinkAction, null);
                        myLink.setAction(vb);
                   } else {
                        System.err.println("Id="+myLinkId+":FALSE:getAccao:isValueReference:"+myLinkAction);
                        final String outcome = cNfo.getAccao();
                        MethodBinding vb = Util.createConstantMethodBinding( myLinkAction );
                        myLink.setAction(vb);
              myLink.encodeBegin(getFacesContext());
              myLink.encodeEnd(getFacesContext());
    }This seems to work, but not quite ... the link appears as expected, the value references for value and style are correctly passed, but the action doesn't work at all.
    For example if I change to:
    String myLinkValue = "#{mybean.linkText}";And I have the following method created on my managed bean:
         public String getLinkText() {
              return "This is myLink Text!";
         }Is successfully calls and retrieves the value from the method. Same happens to the style property.
    Now for the action, if I change to:
    String myLinkAction = "#{mybean.doMyLinkAction}";And I have the following method created on my managed bean:
         public String doMyLinkAction() {
              return "backup";
         }The result is nothing ... I mean the method is not called at all. The "backup" is properly defined on my "faces-config.xml":
       <navigation-rule>
          <from-view-id>/testPage.jsp</from-view-id>
          <navigation-case>
             <from-outcome>yes</from-outcome>
             <to-view-id>/yes.jsp</to-view-id>
          </navigation-case>
          <navigation-case>
             <from-outcome>no</from-outcome>
             <to-view-id>/no.jsp</to-view-id>
          </navigation-case>
          <navigation-case>
             <from-outcome>backup</from-outcome>
             <to-view-id>/backup.jsp</to-view-id>
          </navigation-case>
       </navigation-rule>If I create the link manually on the web page:
    <h:commandLink id="myLinkManual" value="Manually Created Link" style="" action="#{mybean.doMyLinkAction}"/>It does work (the backup.jsp page is shown), so the methods are properly configured, only the action binding does not work.
    Wether I use a string "backup" or a reference "#{mybean.doMyLinkAction}" I cannot make it work.
    On the console I get the following results, for each value I test (string "backup" or reference "#{mybean.doMyLinkAction}"):
    Id=idMyLink:TRUE:getAccao:isValueReference:backup
    Id=idMyLink:FALSE:getAccao:isValueReference:#{mybean.doMyLinkAction}So the "if (CommandLinkTag.isValueReference( myLinkAction )) {" is working properly ... that just leaves me with the action method binding instructions ...
    Why don't they work?
    Any Help Appreciated ... Thanks in Advance!

    c'mon guys ... can anyone test this and help me out?
    Pleeeeeease ... I'm really needing this working out.
    Thanks

  • Dynamically adding pages

    Is it possible to create a "add page" button that will dynamically add a fillable form to a pdf?  Also, can this button keep adding pages?

    It is Adobe Reader and Adobe Acrobat.
    Reader can not use the template feature of Acrobat.

  • Smartforms: Printing Selective Pages

    My smartform have 5 pages. My aim is print selective pages (ie page 1-3).
    In the global definition -> initialization, i wrote the statement below:
      OUTPUT_OPTIONS-TDPAGESLCT = '1-3'.
    My problem is all 5 pages are still being printed out instead of page1 to page3. Please advice.

    Hi,
    With the specified way , the condition cann't work.Once check it.
    In the generated FM you have parameter OUTPUT_OPTIONS-TDPAGESLCT, which is for "Pages selected for printing".
    You have to call FM 'SSF_FUNCTION_MODULE_NAME' to get the generated FM name, then call this FM dynamically with the mentioned parameter.
    Reagards,
    Shiva Kumar

  • Dynamically add web part in sandbox solution

    I've site in office 365. I want to add site page in /SitePages on feature activation. I also want to dynamically add web part in this site page.
    How can I do this?

    Hi,
    According to your description, you might want to add a page into the “Site Pages” library and add a web part into it in the FeatureActivated event in a Sandboxed solution.
    To add a site page, you can refer to the two links below:
    http://www.c-sharpcorner.com/blogs/4526/programmatically-create-wiki-page-in-sharepoint.aspx
    http://sharepoint2010mind.blogspot.ch/2012/06/add-publishing-page-to-sharepoint-site.html
    Then add a web part to the page:
    http://blog.mastykarz.nl/inconvenient-provisioning-web-parts-wiki-pages-sandboxed-solutions/
    Best regards
    Patrick Liang
    TechNet Community Support

  • Can I dynamically display Page title over a static header image?

    Is there a way to Dynamically Display Page Title Text Over my static site Header Image? here is a link so you can see what I am talking about. http://www.bridgestoprosperity.org/See-Our-Work/afghanistan/afghanistan.htm where Afghanistan would be the text to be replaced automatically on each page.  Please note, currently, I must create individual headers, insert the page title in photoshop, etc. I am hoping to figure out a way for all this to happen dynamically perhaps by calling the text from the page title info.
    Thank you,
    Allan

    Hi, Allan,
    I realize my suggestion is off your point, and you probably have already thought of some of this, hence your question... But, rather than going the dynamic route, Why not create a Header Image without a title on it and use it as a div background image? Replace this
    <img src="/See-Our-Work/afghanistan/Images/header/afghanistan-header.jpg" name="topnavbar_r1_c1" width="779" height="114" border="0" alt="bridges to prosperity: afghanistan">
    with the styled div, for instance:
    <div id="header"><h2>Afghanistan</h2><h3>Bridges to Prosperity: USA</h3><div>
    At this point, you can use a more generic image for the background, one that does not have "Afghanistan" embedded in it, and you may style the #header thus:
    #header {
         width: 779px;
         height: 114px;
         border: 0;
         background-image: url(/See-Our-Work/Images/header/header.jpg;)/* for instance */ 
    and the header Headline styles thus:
    #header h2, #header h3 {
         color: white;
         text-align: right;
         font-family: Arial, Helvetica, sans-serif;
    Then you can place your html (<h2>, <h3> etc.) in the same div, only on the "surface".
    Using the tags <h2> and <h3> will maintain their usefulness to Search Engines; as hiding them in images does not.
    If you still wished to vary the header image, depending on the contents of the page, you can actually control all of this from the CSS file, if you add an id attribute to the <body> of each page.
    For instance, for your example page, if you did this:
    <body id="afghanistan">
    You could then do this in your CSS file:
    #header {
         width: 779px;
         height: 114px;
         border: 0;
    body#afghanistan #header {
         background-image: url(/See-Our-Work/afghanistan/Images/header/afghanistan-header.jpg);
    You could then proceed to have a different background image for each page. (Not your original intention, but now possible).
    <body id="pakistan"> would use a CSS style declaration like:
    body#pakistan #header {
         background-image: url(...pakistan-header.jpg...etc.);
    I am not aware of being able to pass content (other than background images) using CSS, so I would go into each page and put the Headline in html.
    But if you were using multiple background images in the header div (one image for afghanistan, another for pakistan, in my example), you can use the same <body id="afghanistan"> for ALL pages about Afghanistan, and thus have the continuity of the same image for all. Likewise, you could id all pages about Pakistan <body id="pakistan">.
    I hope this gives you some ideas...
    Z

  • Add page numbers to a document in Pages

    How do I add page numbers to a document in Pages on the iPhone?

    When I tap the spanner I don't see Document set up.
    I see this:

  • Smartforms - Extra Blank Page in DUPLEX mode

    Hello Friends,
    I am printing my smartforms in DUPLEX page mode. Its printing fine but i am getting an extra blank page.
    Searched the forum but no luck.
    I have defined 3 pages Page1, PAGE_INST,Page2. I need to print instructions(say) on back of each page.
    I had set page1 to duplex mode 'D' and next page to blank.
    My pages flow is in the following way:
    page1>Page INST>Page2
    Page 1 & 2 have main windows and have a command to print PAGE_INST.
    Page_INST Does not has main window.
    Page1 : next Page 2.
    Page INST : Next page is Page 2.
    Page2 : is a continuation of page 1 next window is blank(or page 2)
    Its printing fine in Duplex but always there is a blank sheet in the print out at last page.
    Can someone help me how to avoid the last blank page.
    Thanks

    HI Hari,
    How to avoid a blank page at end of the page?
    Regards,
    Sravanthi

  • How do I add page numbers to my document without the page numbers automatically changing. I do not want the page numbers the software automatically places into my document.

    How do I add page numbers to my document without the page numbers automatically changing? The title page is blank, I can type in 1 on the 1st typed page, but the #1 automatically goes into the next page and will not change.

    Click at bottom of the first page:
    Menu > Insert > Section break
    Click somewhere in the 2nd page (not the header/footer)
    Inspector > Layout > Section > Page Numbers > Start at 1 > Configuration > uncheck use previous headers and footers
    Click into the header or footer of the second page:
    Menu > Insert > Auto Page Numbers…
    If there is anything in the header or footer on the first page that you don't want just select it and delete it.
    If you really wanted to manual place page numbers on each page you will have to use a section break between each and every page. I can't imagine that would be useful.
    Peter

  • ? how to add page numbers in pages 5.2, starting with 2.  Pages '09 had an option to not show folio on page one.  Also any how to do left and right folios for a Tabloid?  Many trhanks

    ? how to add page numbers in pages 5.2, starting with page 2.  Pages '09 had an option to not show folio on page one.  Also any idea how to do left and right folios for a Tabloid?  Many thanks  . . .

    Hello jacquemac,
    Your first question:
    There might be a better way of achieving what you wish to do, but following these steps could help you out.
    You might want to blend in Thumbnails and Invisibles either with (cmd+shift+i and cmd+alt+p) or over the View section in the Menubar.
    1. go for Documents (right end of the Toolbar) -> Section
    2. place your cursor at the very top of your second page and click "Create new Section->Starting with this page" in the side bar on your right.
    (what you are actually doing next is setting the pagenumbers for each section you created. You can see your sections in the Thumbnail view.)
    3. click on your first page (the first and only page of your first section) and mark the checkbox "Hide on first page of section"
    4. click on your second page (the first page of your second section) and  "Insert page number" -> start at 1
    Your second question:
    Im not quite sure i understand what exactly you want to do here. One page, two columns, each column with another page number? As far as i know this is not possible.
    greetings jl

Maybe you are looking for