Dynamically Setting the Position of a Subform

Hello there
I am trying to solve an issue with the dynamic positioning of a subform not working when the form is rendered from a process.
I have a flowed XDP based form with a variable amount of content, and a “totals” subform that needs to be positioned at the bottom of the last page.  I do this with some JavaScript which works out the current Y position of the “totals” subform, and then sets the top margin of a proceeding “spacer” subform appropriately.  The code runs on the docReady eavent of the main subform, and runs correctly when the form is rendered dynamically, for example from within Designer.
We need to be able to generate the form using a LiveCycle service.   When we attempt this using the generatePDFOutput service, the code correctly calculates and sets the required margin.  However, setting the margin has no effect (the “totals” subform is not moved).  I am unclear why this does work, i.e. why there is a different effect when rendering the form from the process.
I am unable to move the code to an earlier event.  The latest event for which setting a margin actually works is formReady.  However, at this point the code to determine the current Y position of the “Totals” subform does not work.
One idea I had was to render the form twice.  On the first rendering of the form, the code could calculated the required margin.  On the 2nd rendering of the form, the margin would be set at an appropriately early event such as initialise.  However, I do not know how to pass a value calculated in JavaScript back to a process.
Any ideas would be appreciated.
Many thanks
Geoff Olding

Hi,
You can set the caret position in the JTextPane with the method(in JTextComponent) :
public void setCaretPosition(int position)For exemple :
myJTextPane pane = ...
Document doc = myJtextPane.getStyledDocument();
if(doc!=null){
  myJTextPane.setCaretPosition(doc.getLength());
}bye

Similar Messages

  • How to set the position in SAP Script

    Hi Professionals,
    Can anyone tell me that How can I set the position of an bitmap Image (after inserting) in SAP Script ?
    by default position is in Left, I need to align it in center or somewhere else.
    Anybody knows, kindly reply!
    Thanks
    Devinder

    Hi,
    But Can we assign a window under another window. Because I want to insert a bmp picture on particular position.
    example:- there is a digital signature and wanted to insert upon a name.
    So, there is a text (which is customer name) and digital signature (in bmp picture format) upon it.
    Thanks
    Devinder

  • How to dynamically set the name of the generated PDF file sent by email

    Hello,
    I am using Reports 10g and I managed to send PDF reports by email, specifying the recipient, subject, format etc, using the reports servlet URL.
    But there is one thing that I cannot find a way to do: I want to dynamically set the name of the attached file. It defaults to the name of the RDF file (eg monthly_sales.pdf). I would like it to be something more meaningful (eg monthly_sales_072010.pdf, where 072010 is the month and year passed by parameters).
    Is it possible to do it?
    Thanks
    Luis

    Use System.load(...) instead of System.loadLibrary(...).

  • XSL-FO Report Query / Named Layout - Dynamically set the output filename

    Does anyone know if it is possible to dynamically set the name of the PDF file which is created via FOP?
    Thanks
    Paul

    John
    Thanks for the quick reply, apologies, I should have been more explicit.
    I am calling apache FOP via a report query and a named column layout using xsl-fo to format the PDF report.
    The call is done via a javascript function which determines which report to print and then submits the approproate REQUEST. The request is picked up by conditional branches and calls the PRINT_REPORT
    The PRINT_REPORT names the PDF file as same as the report query name.
    BTW the long term goal is to store the resultant output as a blob back in the database but I can put that off to phase II of the project as I'm not sure that this is possible. Would be nice though!
    Thanks
    Paul

  • I need to set the position of components on a page that contains a MenuBar,

    I need to set the position of components on a page that contains a MenuBar, but MenuBar does not provide a getPreferred size method.
    How can I get the MenuBar's size in AWT?
    Thanks.

    A menubar is not a general component that is added to a frame like any another. It is the specific responsibility of the setMenuBar/setJMenuBar methods to deal with this.

  • How do you dynamically set the flat file name

    Within my process flow I call a mapping. Within this mapping I have a flat file operator (which creates and writes to a .csv file). All working great.
    From this process flow I want to be able to pass a parameter to the mapping (which I can do), and use the value of this parameter as the file name of the .csv file. But I can’t seem to be able to dynamically set the ‘Default physical file name’ to this parameter value within the mapping.
    Does anyone have any ideas?
    Thanks
    Ansel

    Hi Ansel
    Check out the blog entry here;
    http://blogs.oracle.com/warehousebuilder/newsItems/viewFullItem$154
    You can use an expression.
    Cheers
    David

  • Dynamically set the upper limit of a numerical control

    I want to dynamically setting the upper limit of a numerical control. The maximal value that is allowed to input is calculated by the code, so that if the value input by the user exceeds the upperlimit,  a warning comes out and the input value is automaticaly reset to zero.
    I wired the calculated upper-limit to the property node of the numerical control using ''Data Range > Maximum" property, but it does not work as I expected.
    Anyone has suggestion on this? Thanks a lot.

    Can you attach your code?
    Dejun wrote:
    ... but it does not work as I expected.
    I cannot read your mind. What do you expect? What to you see instead?
    Overall, you are in a catch22 scenario if I understand you right. If you set the max of the control to coerce to a certain value and you enter a larger value, it will be coerced to the upper limit and the code does not see the original out-of-range value and you cannot successfully test it with a comparison operation. Maybe you can set it to "ignore" instead of "coerce" or not even set an upper limit. Simply use "in range and coerce" and reset the value under the desired conditions (e.g. via  a local variable) before handing it to the rest of the code. You could even wrap this into an xcontrol.
    LabVIEW Champion . Do more with less code and in less time .

  • How do you set the position of JScrollBars?

    Can anyone tell me how to set the positions of the JScrollBars in a JScrollPane so that it will show the area I want?
    please,
    Tommy

    Sorry i should of add the area I am talking about is a JPanel.

  • Dynamically set the size of the VIEW

    Hello,
    I am looking to set the size of my VIEW which is called in following way:
    IF iv_show_in_pop_up EQ abap_true.
        wd_this->raise_simulation_pop_up( ).
    I want to set of the size of the VIEW if it a pop-up.
    ENDIF.
    How can i get access to the view and set the size. Please Help.
    Regards,
    Piyush

    Hi Piyush,
    Check what Anzy has to say in [here|https://forums.sdn.sap.com/click.jspa?searchID=18635339&messageID=3289078]:
    "You have to go to specific view , which will be embedded in the pop up window.In the view go to ROOTUIELEMENTCONTAINER and set the width and height.This way you can restrict the size of the pop up window."
    This is [another approach|https://forums.sdn.sap.com/click.jspa?searchID=18635339&messageID=5836334] suggested by Abhimanyu Lagishetty for dynamically setting the size of your window:
    "Pass the URL like this to the create_external_window
    javascript:window.moveTo(0,0);window.resizeTo(screen.width,screen.height);window.location.href="http://google.co.in";
    Instead of http://google.co.in write your URL it will maximize the window"
    Regards,
    Uday

  • Dynamically setting the number of collumns...

    Hi,
    I have a report that I need to build. In the requirements I need to dynamically set the number of columns based on the parameters given. I have some ideas on how to do this by building the layout to include all the columns. Then show or hide them based on the parameters passed. I was just wondering if anyone has tried to do something like this? If so, were you successful, and what were some of the major stumbling blocks you ran into. Or if you know of any links to documentation that would help would be great.
    On a side note, would doing something like this be handled better if done in Discoverer? I have not used Discoverer before, so I'm not sure myself.
    Thanks,
    Tom

    Hi Tom,
    You will find useful information in these notes on Metalink:
    261313.1: How to hide columns dynamically without blank spaces ?
    1074438.6: How to dynamically set labels based upon globals
    28533.1: How to create a dynamic report using lexical parameters for column names
    And a comprehensive guide to using lexicals (you will have to use lexicals for column names)
    115072.1: Complete Resource Reference for using Lexical Parameters in Oracle Reports
    Navneet.

  • Dynamically setting the color of the title in a Panel

    Hello, I know I can set the color & font of the title in a Panel using the titleStyleName in a stylesheet.  How can I dynamically change the color though?  I have a component:
             <mx:Panel id="myPanel"borderColor="{this.color1}" />
    where this.color1 is a value that changes dynamically, and thus changes the border color.  How do I do this for the color of the text in the title?

    Hi,
    Try this
    var css:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".myPanelTitle");
    css.setStyle("color",0x00FF00);

  • Can I dynamically control the position of objects on a printed page?

    Forum:
    Oracle Developer Reports Builder (10g)
    I have a need to control the position of printing on a peel off label in my report. I currently am forced to represent a complex object three times , i.e. LEFT, RIGHT and CENTER, printing whichever is configured in the PRINTER_INFO table of my schema. I am printing to over 200 printers and they all print the location differently.
    Also, since printing through the DESTYPE=PRINTER ,vs printing from a displayed PDF have different results, I would have to refresent these three objects yet again, sligh lower and to the right to support label printing from a PDF.
    I have seen where Word Macro can dynamically position this same object by using xy coordinates.
    Does anyone know how to do something like this in Oracle Reports.
    Thx in advance,
    Gary
    [email protected]

    Dora,
    Yes, that is exactly what I am doing. As I mentioned, the label object has many elements and they all sit on top of each other when doing the layout. This by itself is messy to work with.
    This has been workable so far with regard to generating output to the several hundred printers of different models and firmware.
    The output is rarely if ever centered in both x & y axis. We have only been able to use in production by relaxing the rules so that the text only need be within the boundaries of the label.
    I also found that to support printing from the PDF view that the text positioning is well out of the label boundaries. I would be forced to create an additional three complex objects in the 'Y' axis. Needless to say this is quite messy.
    I do appreciate your input, but your recommendation does not meet the requirements of my project.
    I don't believe that Oracle Reports can do this task. I am thinking that BI Publisher can, and am doing "due diligence" before recommending a new reporting platform.
    Thx again.
    Gary

  • Dynamically set the sequence of an Item

    Hi,
    I have three record types and am trying to dynamically set where it appears on the form.
    The 3 record types are MEETING REGISTER, MARKET PROBLEM AND BROADCAST CHANGE.
    If the user creates a record with a type of MEETING REGISTER then I want a field called 'duration' to have a sequence of 57, if it is either of the other 2 types then I want it to appear further down the form with a sequence of 241.
    I have tried creating a dummy text item called 'P2_DURATION_SEQ' at the top of the form with a default function of:
    declare
    v_dur_seq NUMBER;
    BEGIN
    IF :P2_RECORD_TYPE IN ('MEETING REGISTER')
    THEN v_dur_seq := 57;
    ELSE v_dur_seq := 241;
    END IF;
    RETURN v_dur_seq;
    END;
    and tried putting &P2_DURATION_SEQ. in the sequence field of the duration field properties with no success.
    Any advice would be great.
    Thanks
    Chris

    Hello Chris,
    If you have just the one field, or just a couple, that needs to dynamically change sequence (I wouldn't suggest the following if you have many because it could become quite a maintenance headache), you can try this:
    1) Define three "duration" fields, say P1_DURATION_MR, P1_DURATION_MP and P1_DURATION_BC. Define their sequence to display wherever each needs to be, respectively.
    2) Map all three to the same database column.
    3) Make each conditional on the record type being "MEETING REGISTER", "MARKET PROBLEM" or "BROADCAST CHANGE" respectively.
    Then, if the record type is "MEETING REGISTER", P1_DURATION will render where it needs to and the other two will not render, etc.
    Hope this helps,
    John

  • Can I set the position of the new mail window?

    Each time I compose a new message, the new message window seems to appear at a different place, usually obscuring the main window. I would like to have it always appear to the side of the main window. Can I set this, perhaps in the property list?

    Perhaps something is corrupt that is causing bad behavior for some users and so my comments are unhelpful, but here's some more data to add to this discussion: My Mail.app behaves as George Coghill described above, subsequent message windows open where the previous window was open.
    For example- Close all Mail.app windows so that only the main "Message Viewer" window is open (basically, don't have any emails that you're in the middle of drafting open).  Open a new message, adjust the position as you wish, then close it.  When you open another new message, does it have the same position as the one you just adjusted?  It should.
    However, for me, sometimes it would be off by a few pixels as Thomas A Reed described above.  I realized that this was because I had another compose window open in the background.  So as you troubleshoot, make sure no other compose windows are open, to remove one complication and help isolate the issue.
    Side note: in cases where the original window's height fully extended across the display, the new window would be shifted over to the right only, but not down at all as some apps do (like Mac Word, annoyingly).  Another note: if you maximize the original window, subsequent windows also open maximized and unshifted.
    A corollary to the paragraph immediately above is that if you open say 3 new windows, the second one will be shifted and the third one will be even more shifted.  Let's say you send all 3, and now open a new window, it has the position of the 3rd window.  Annoying.  Yes, it would be nice if it always opened new windows in the exact same position, but Apple likely won't do this since people will get confused and think they lost the window if it doesn't do the shifting.  I guess the take-away is draft one message at a time or maximize your composition windows, otherwise it's going to move :/
    A band-aid solution: When a window isn't positioned how you like it, a quick/simple way to reposition it is with apps like Moom (my favorite), Cinch, Divvy, SizeUp, etc.  While I'm at it I should mention RightZoom, which makes the green zoom button behave like the Windows maximize button, and Cordless Dog Stay, which is great if you connect/disconnect your laptop to a screen causing the window positions to always get disturbed between displays.

  • Is there a property to set the position of a table-scrollbar to the begining?

    Hello,
    i have a VI which displays a table and the table gets data from time to time.
    Are there any properties that i can use to set the scrollbar at the right side to the beginning of the table?
    The scrollbar stays always at the last position.
    Thx for your help.

    The property is "Index values"
    Message Edité par chilly charly le 11-08-2007 04:03 PM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Example_BD.png ‏1 KB

Maybe you are looking for

  • Please help - AbstractTableModel, result set and JTable

    Pls help me on this: I derive a new class, myTable that extends the AbstractTableModel, one of the member method is like this: public void setValueAt( Object data, int row, int col ){ try{ resultSet.absolute( row + 1 ); resultSet.updateDouble( col +

  • McAfee is not working with OS x 10.10.1 - do I need it

    OS X Yosemite Version 10.10.1 I have an iMac (27 inch, Mid 2011) Processor 2.7 GHz Intel Core i5 Memory 4GB 1333 MHz DDR3 Start up Disk Macintosh HD Graphics AMD Radeon HD 6770M 512MB This is my 1st posting for help, so please excuse me if I am not f

  • Mouse won't zoom

    My Apple Wireless Mighty Mouse will not zoom and yes, the "zoom using scroll ball" box is checked in preferences. I had reset the scroll ball to open iTunes which it does but using a command key plus pressing the scroll ball does nothing but open iTu

  • Dbconsole  not starting up

    Hi everybody, I have installed Oracle 10g on Solaris 10. Database Version:Release 10.2.0.1.0 - 64bit Production OS:Solaris 10 When i am trying to start dbconsole in order to start enterprise Manager it showing the following output ................ ba

  • Sap UOM conversion tables

    hi i want the german table which stores the UOM in german and in english? can someone help?