Adding dynamic components

i have a frame cannot be resized. i have used box layout as the top level layout and on that i have used five panels with components having gridbag layout. Out of five panel one panel has set visible false, which is suppsed to get visible on the trigger of a Button.
Problem : When i m clicking the button i m setting the visibility of the panel as true... but the panel is not showing on the screen(ideally should automatically get adjusted in the screen). i have done validate(). the problem which i could fig out was that its not getting adjusted in the given size as the resizable option of the frame is set to false. Now if i increase the size of the window dynamically i m able to see the component but i m get a flicking effect in the frame. Please ... suggest me some solution that enable me to add a panel in a frame that has a rezibale switched off.
or some way by which i can setsize the frame , add the component without a flickering effect.

example code:
import java.awt.event.*;
import java.awt.*;
import java.util.Vector;
public class AvoidFlicker extends Panel
implements MouseMotionListener, MouseListener
   Vector lines = new Vector();
   int x, y;
   public AvoidFlicker()
      addMouseMotionListener (this);
      addMouseListener(this);
   public void mouseClicked  (MouseEvent e) { }
   public void mouseEntered  (MouseEvent e) { }
   public void mouseExited   (MouseEvent e) { }
   public void mouseMoved    (MouseEvent e) { }
   public void mouseReleased (MouseEvent e) { }
   public void mousePressed  (MouseEvent e)
      x = e.getX();
      y = e.getY();
   public void mouseDragged (MouseEvent e)
      lines.addElement (new Rectangle (x, y, e.getX(), e.getY()));
      x = e.getX();
      y = e.getY();
      repaint();
   protected void paintBackground (Graphics g)
      Dimension size = getSize();
      for (int y = 0; y < size.height; y += 2)
         int blue = 255 - (y % 256);
         Color color = new Color (255, 255, blue);
         g.setColor (color);
         g.fillRect (0, y, size.width, 2);
   public void paintForeground (Graphics g)
      g.setColor (Color.black);
      int numberOfPoints = lines.size();
      for (int i = 0; i < numberOfPoints; i++)
         Rectangle p = (Rectangle) lines.elementAt (i);
         g.drawLine (p.x, p.y, p.width, p.height);
   public void paint (Graphics g)
      paintBackground (g);
      paintForeground (g);
   public void update (Graphics g)
      // override to not clear the background first
      // paint (g);
      paintForeground (g);
   public static void main (String[] args)
      AvoidFlicker panel = new AvoidFlicker();
      Frame f = new Frame ("Avoiding Flicker");
      f.add ("Center", panel);
      f.setSize (300, 300);
      f.show();
}

Similar Messages

  • JSF:adding dynamic components on update.

    Well I am using a same form for two purposes. One if for creating a new service and one for editing it. In this I have a button on clicking it I get two new input text boxes.
    <h:panelGrid binding="#{provisioning.localPanelGrid}" />
              <h:panelGrid columns="2" columnClasses="localhost_list_heading">
                   <h:commandButton value="Add LocalHost" type="submit"
                        action="#{provisioning.addNewLocalHost}" />
                   <h:commandButton value="Delete LocalHost" type="submit"
                        action="#{provisioning.deleteLocalHost}" />
              </h:panelGrid>In which on clicking Add LocalHost I perfom the function addNewLocalHost which adds two input boxes.
    public static int localid = 0;
    public String addNewLocalHost() {
              log.debug("In addNewLocalHost");
              try{          
                   /*------------------ Creating Local Host Name Input Text Component --------------------*/
                   log.debug("creating local host name Input Text");
                   log.debug("Local Host Input Box no is " + localid);
                   //Setting the value of host name to empty string
                   localhostName.setValue("");
                   //Setting id of the HtmlInputText.
                   localhostName.setId("localhost" + Integer.toString(localid));
                   log.debug("Input Text for host name created");
                   String val="#{provisioning.localhostname[" + Integer.toString(localid) + "]" + "}";
                   //Creating value binding for HtmlInput Text for localhost name.
                   ValueBinding value= app.createValueBinding(val);
                   //Setting value binding.
                   localhostName.setValueBinding("value",value);
                   /*------------------ Creating Local Host Port Input Text Component --------------------*/
                   log.debug("creating local host port Input Text");
                   //Setting the value of host port to empty string
                   localportNumber.setValue("");
                   //Settig id for port number
                   localportNumber.setId("localport" + Integer.toString(localid));
                   String portValue="#{provisioning.localport[" + Integer.toString(localid) + "]" + "}";
                   log.debug("Input Text for port created");
                   ValueBinding portvalue= app.createValueBinding(portValue);
                   log.debug(portvalue);
                   //setting value binding for port number.
                   localportNumber.setValueBinding("value",portvalue);
                   //Setting Converter Message.
                   log.debug("Setting Converter Message.");
                   localportNumber.setConverterMessage("Please Enter a numerical value.");
                   /*------------------------- Getting Local Panel Grid --------------------------*/
                   log.debug("Getting existing Local Host Name Grid");
                   localPanelGrid = getLocalPanelGrid();
                   /*------------ Add components to the Local Panel Grid --------------------------*/
                   log.debug("Grid:" + localPanelGrid);
                   localPanelGrid.setColumns(2);
                   localPanelGrid.getChildren().add(localhostName);
                   localPanelGrid.getChildren().add(localportNumber);
                   log.debug("Children Size of Local Panel Grid is " + localPanelGrid.getChildren().size());
                   log.debug("Children added");     
                   //incrementing the value of localid.
                   localid++;
                   log.debug("added new Local Host Component successfully");
                   return "success";
              catch(Exception e){
                   log.error("addNewComponent " + e.getMessage(),e);
                   return "failure";
         }Now I am facing the problem in case of update where I have the same form and after getting the values from database I want to add initially the no. of input boxes according to the size of data retrived. What should I do?
    I tried using a inputHidden field to do the same. I mentioned a input Hidden field in jsf page just above the panelGrid
    <h:inputHidden value="#{provisioning.createInputTextBoxes}" />and in its getter I included
    public String getCreateInputTextBoxes() {
              log.debug("Checking if update or not for host list input text boxes to be created");
              if(isModify()){
                   log.debug("Creating pages for input boxes");
                   for(int i=0;i<localHostListSize;i++){ //localHostListSize is the size retrived from database.
                        addNewLocalHost();
              return createInputTextBoxes;
         }Now the problem is that the function is getting called the same number of times as the localHostListSize but I am seeing only one inputbox and I am seeing no data in it whereas I have explicitly set the value of localhostname[] to the data retrieved and I am getting the data in logs (except for the last one).
    Logs for my page execution were :
    11:57:20,161 DEBUG ProvisioningManagedBean:85 - Checking if update or not for host list input text boxes to be created
    11:57:20,161 DEBUG ProvisioningManagedBean:87 - Creating pages for input boxes
    11:57:20,161 DEBUG ProvisioningDynamicComponents:84 - In addNewLocalHost
    11:57:20,161 DEBUG ProvisioningDynamicComponents:88 - creating local host name Input Text
    11:57:20,161 DEBUG ProvisioningDynamicComponents:89 - Local Host Input Box no is 0
    11:57:20,161 DEBUG ProvisioningDynamicComponents:94 - Input Text for host name created
    11:57:20,177 DEBUG ProvisioningDynamicComponents:104 - creating local host port Input Text
    11:57:20,177 DEBUG ProvisioningDynamicComponents:110 - Input Text for port created
    11:57:20,177 DEBUG ProvisioningDynamicComponents:112 - [email protected]cb98
    11:57:20,177 DEBUG ProvisioningDynamicComponents:116 - Setting Converter Message.
    11:57:20,177 DEBUG ProvisioningDynamicComponents:121 - Getting existing Local Host Name Grid
    11:57:20,177 DEBUG ProvisioningDynamicComponents:47 - Getting local panel grid
    11:57:20,177 DEBUG ProvisioningDynamicComponents:125 - Grid:javax.faces.component.html.HtmlPanelGrid@14c8822
    11:57:20,177 DEBUG ProvisioningDynamicComponents:129 - Children Size of Local Panel Grid is 2
    11:57:20,177 DEBUG ProvisioningDynamicComponents:130 - Children added
    11:57:20,177 DEBUG ProvisioningDynamicComponents:134 - added new Local Host Component successfully
    11:57:20,177 DEBUG ProvisioningDynamicComponents:84 - In addNewLocalHost
    11:57:20,177 DEBUG ProvisioningDynamicComponents:88 - creating local host name Input Text
    11:57:20,177 DEBUG ProvisioningDynamicComponents:89 - Local Host Input Box no is 1
    11:57:20,177 DEBUG ProvisioningDynamicComponents:94 - Input Text for host name created
    11:57:20,177 DEBUG ProvisioningDynamicComponents:104 - creating local host port Input Text
    11:57:20,177 DEBUG ProvisioningDynamicComponents:110 - Input Text for port created
    11:57:20,177 DEBUG ProvisioningDynamicComponents:112 - [email protected]cf59
    11:57:20,192 DEBUG ProvisioningDynamicComponents:116 - Setting Converter Message.
    11:57:20,192 DEBUG ProvisioningDynamicComponents:121 - Getting existing Local Host Name Grid
    11:57:20,192 DEBUG ProvisioningDynamicComponents:47 - Getting local panel grid
    11:57:20,192 DEBUG ProvisioningDynamicComponents:125 - Grid:javax.faces.component.html.HtmlPanelGrid@14c8822
    11:57:20,192 DEBUG ProvisioningDynamicComponents:129 - Children Size of Local Panel Grid is 2and the data was back as in the logs
    12:31:00,817 DEBUG ProvisioningManagedBean:890 - Local Host List
    12:31:00,817 DEBUG ProvisioningManagedBean:894 - Host = h6
    12:31:00,817 DEBUG ProvisioningManagedBean:895 - Port = 6
    12:31:00,817 DEBUG ProvisioningManagedBean:894 - Host = 123.12.0.15
    12:31:00,817 DEBUG ProvisioningManagedBean:895 - Port = 123
    12:31:00,817 DEBUG ProvisioningManagedBean:894 - Host =
    12:31:00,817 DEBUG ProvisioningManagedBean:895 - Port = 0What should i try?

    Why don't you make use of a h:dataTable? Just adding a new SomeObject to a List<SomeObject> would be enough then.

  • How can we split the image when its added dynamically ?

    Hi Experts,
    I have an image where i'm calling a DAL in Entry tab Data section under section level properties.As you know that will execute during Entry process.In that DAL i'm Adding an image based on the user choice during entry.
    When image added that should be accomedate the spaces availale in the form.First half of the section can accomedate in the first page and secound half will go to next page.
    I have used CANSPLITIMAGE rule,but that is not get executed during entry process.
    Can someone help me How to split the image during entry process when its added dynamically ?
    Thanks,
    RAMAN C.

    Aside from what you might think of as the origin placement, Gendata rules are not run during Entry operations. As such, you are not able to do what you describe in versions before 12.2. Starting in 12.2, you still can't execute Gendata rules, however there is a newly supported feature when DAL adds a section that will look for the existence of the CanSplitImage rule and assigns an internal attribute that will allow the section to split during entry. This isn't the same as running the rule, but the net effect should be acceptable. (At some point in the future, perhaps this internal attribute will become something you can just set when adding the section on the form and you won't have to specify the CanSplitImage rule at all - for Batch or Entry. That would be great.) In the meantime, if you are not using 12.2, your only option is to break your section up into smaller section components and add them separately. That should help minimize unused space on the page when something doesn't fit.

  • In outlook 2013 Add-In, Adding dynamic menu to splitButton idMso="DialMenu" is working and the same code is not working in outlook 2010 Add-In.

    In outlook 2013 Add-In, Adding dynamic menu to <splitButton idMso="DialMenu"> is working and the same code is not working in outlook
    2010 Add-In. please let me know, if i am missing something. Below is the xml and screen shot
    <contextMenu idMso="ContextMenuFlaggedContactItem">
     <splitButton idMso="DialMenu">
              <menu>
                <dynamicMenu id="CallContactwithFreedomvoice
    " label="CallContactwithFreedomvoice" 
                            getContent="OnGetContenttest"                           insertAfterMso="Call"/> 
            </menu>       </splitButton>    </contextMenu> 

    Hi Narasimha prasad2,
    Based on the description, the context menu for the flagged contact doen't work in Outlook. I am tring to rerpoduce this issue however failed.
    I suggest that you check the state of the add-in first to see wether the add-in was loaded successfully.
    Regards & Fei
    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.

  • How to hide columns that are getting added dynamically to UI Element 'Table

    In SRM 7.0 while displaying a RFx, click on "responses and awards" button.
    In the response comparision tab once the user selects response number and clicks on "compare all responses".
    Item details table is displayed with fields item number,internal number,item description,........,Price etc.
    Requirement is  to hide the price column from the table.
    The UI element type is 'Table'.
    But the catch is there is no column price visible at layout design level.
    This field is getting added dynamically at run time.
    When i right click and see the 'more field help' at the front end i get the field id as 'GRP_1_COL_3_TXTV'.
    lo_table ?= view->get_element( id = 'ITEMS_TABLE' ).
    lo_column = lo_table->get_column( id = 'GRP_1_COL_3_TXTV').
    ASSERT lo_column IS NOT INITIAL.
    lo_column->set_visible( EXPORTING value = '01' ).
    I had written the above code in the pre-exit of WDDOMODIFYVIEW.
    But i am getting dump as assertion failed.it says no column by name 'GRP_1_COL_3_TXTV'.
    Please help me inhow to hide fields or buttons getting generated dynmically.
    Regards,
    Venkat Raghavan.

    Hi Anitha,
    What i understood from your question is,you want to control the table from your inputs.I have a one question for you what do you want to show defaultly i.e when you run the application what you want to show,either no table or table with some values.
    Any how i am giving solution in this way.
    If both inputs are given proper table output is displayed
    Write your below logic in the WDDOMODIFYVIEW )
    Here i am assuming that you already have a table element in the view.
    Get the values entered in the input fields and compare those 2 values ,if the condition is satisfied then bind the values which you want to show in the table to the context node.
    but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs
    You are telling that you know the empty column.If so get the view element reference and use the REMOVE_COLUMN to remove the column.
    data:lr_table type ref to cl_wd_table,
           lr_column type ref to L_WD_TABLE_COLUMN.
    lr_table ?= view->get_element( 'TABLE1' ).
    CALL METHOD LR_TABLE->REMOVE_COLUMN
        EXPORTING
          ID          = 'TABLE1_color'
         INDEX      =
        RECEIVING
          THE_COLUMN = lr_column.
    i want to hide some empty rows also at runtime based on inputs.
    Removing the rows is very simple.if you know the key fields data of internal table from your input fields then do in this way.
    delete itab from wa where key1= "12" and key2="abd".
    Now bind the internal table to context node.
    LO_ND_hcm->BIND_TABLE(
          NEW_ITEMS            = it_final
          SET_INITIAL_ELEMENTS = ABAP_TRUE ).

  • Adding dynamic attributes to static context node

    Hi All,
    I have defined a context node LINES with several attributes. This is done staticly during developmenttime.
    During run-time node LINES is extended with several attributes dynamicly. See below:
    10     HEADER_GUID               ->
    11     DETAIL_GUID               ->
    12     EXTERNAL_ID               ->
    13     OBJECT_TYPE               ->
    14     IN_OUT_PLAN               ->
    15     TRAFFIC_LIGHT_1               ->
    16     TRAFFIC_LIGHT_2               ->
    17     TRAFFIC_LIGHT_3               ->
    18     TRAFFIC_LIGHT_4               ->
    19     _LOCATION          \TYPE=STRING     ->
    20     _ZZTOPGROUPING     \TYPE=STRING     ->
    21     _STATUS          \TYPE=STRING     ->
    22     _100000200          \TYPE=STRING     ->
    19..22 are added dynamicly.
    I have an internal table that matches de new context. This <fs_tb_tree_new> I want to bind like:
    *&- bind table
      lr_node->bind_table( new_items =  <fs_tb_tree_new>
                           set_initial_elements = abap_true ).
    In <fs_tb_tree_new> the dynamicly added attrbutes contains values e.g. (the static attributes also have values via <fs_tb_tree_new>):
                         _LOCATION   _ZZTOPGROUPING  _STATUS              _100000200                   
    5     Africa     0002     Reporting Entity     0.000
    6     Russia, CIS     0003     Identify                          0.000
    An ALV presents the values of the attribute. But.... only the values of the static part are presented, not the dynamic attributes added during runtime.
    Please advise what I forget or do wrong .
    Thanks in advance.
    John

    I solved the issue:
    If you use a combination of static attributes added with dynanic attributes (during runtime) for dynamic ALV, I advise to create a new node and bind the values to this new created node:
    Cheers, John
    wd_this->extend_context( EXPORTING im_struc_descr =  lr_cl_abap_structdescr
                               IMPORTING ex_node = lr_node_alv ).
    Method:
    *&- Create new dynamic context LINES_DYN
    Node for alv-table
      lr_node_info = wd_context->get_node_info( ).
      CALL METHOD lr_node_info->add_new_child_node
        EXPORTING
          name                  = 'LINES_NEW'
          static_element_rtti   = im_struc_descr
          is_static             = abap_true
          is_multiple           = abap_true
          is_multiple_selection = abap_false
        RECEIVING
          child_node_info       = lr_subnode_info.
    lr_node = lr_subnode_info->get_parent( ).
      lr_node = wd_context->get_child_node( 'LINES_NEW' ).
      ex_node = lr_node.
    *&- bind table for alv
      lr_node_alv->bind_table( new_items =  <fs_tb_tree_new>
                               set_initial_elements = abap_true ).

  • AdvancedDataGrid headerrenderer children added dynamically do not display

    The AdvancedDataGrid in Flex 3.x does not correctly render children of a custom headerrenderer when the children are added dynamically. This works correctly with the DataGrid.
    An AdvancedDataGrid has a custom headerrenderer with one field to display the column header text.
    A show button below the grid adds a text input field in the header below the column text in the header.
    When the show button is selected, the AdvancedDataGrid header sizes correctly to leave space for the field but does not display the field.
    If I drag the column, the text input field displays as I am dragging. See the 3 images below.
    I have included the 3 source files. What is the correct way to dynamically add children to an AdvancedDataGrid header?
    Thanks.
    1. AdvancedDataGrid with only the column header text:
    2. After Show is selected, the header is sized for the text field below:
    3. Only dragging the column header temporarily shows the text field:
    1. TestGrid.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="onInit(event)" width="100%" height="100%">
    <mx:Script>
    <![CDATA[
         protected function onInit(event:Event):void {
              var cols:Array = grid.columns;
              var colWidth:int = grid.width;
              var col:AdvancedHeaderColumn = new AdvancedHeaderColumn();
              col.wordWrap = true;
              col.show = false;
              var headerRenderer:ClassFactory = new ClassFactory(AdvancedHeaderLabel);
              // Add any custom properties
              headerRenderer.properties = {text: "Column1 header that wraps", dataGridColumn: col};
              col.headerRenderer = headerRenderer;
              col.headerWordWrap = true;
              cols.push(col);
              grid.columns = cols;
              grid.measuredWidth = colWidth;
         protected function showText(event:Event):void {
              var cols:Array = grid.columns;
              for each (var col:AdvancedHeaderColumn in grid.columns) {
                   col.show = show.selected;
              grid.columns = cols;
    ]]>
    </mx:Script>
         <mx:AdvancedDataGrid id="grid" height="100%" width="100%" variableRowHeight="true" editable="true" lockedColumnCount="1"/>
         <mx:Button label="Show" id="show" click="showText(event)" selected="false" toggle="true"/>
    </mx:Application>
    2. AdvancedHeaderLabel.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" verticalScrollPolicy="off">
    <mx:Script>
    <![CDATA[
         import mx.controls.TextInput;
         import mx.core.UITextField;
         // properties
         public var text:String;
         public var dataGridColumn:AdvancedHeaderColumn;
         // Column header
         public var textField:UITextField;
         // Optional text input field
         public var textInput:TextInput;
         override protected function createChildren():void {
              super.createChildren();
              // Always add the header text
              textField = new UITextField();
              textField.text = text;
              textField.multiline = true;
              textField.wordWrap = true;
              textField.percentWidth = 100;
              addChildAt(textField, 0);
         override protected function commitProperties():void {
              super.commitProperties();
              // Add the text input field?
              if (dataGridColumn && dataGridColumn.show && !textInput) {
                   textInput = new TextInput();
                   box.addChild(textInput);
         override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
              super.updateDisplayList(unscaledWidth, unscaledHeight);
              // Position and size the textInput field
              if (dataGridColumn.show && textInput) {
                   textInput.y = textField.getExplicitOrMeasuredHeight();
                   textInput.setActualSize(unscaledWidth, textInput.getExplicitOrMeasuredHeight());
         override protected function measure():void {
              super.measure();
              measuredWidth = textField.getExplicitOrMeasuredWidth();
              measuredHeight = textField.getExplicitOrMeasuredHeight();
              // Make room for the text input field
              if (textInput) {
                   measuredHeight += textInput.getExplicitOrMeasuredHeight();
    ]]>
    </mx:Script>
         <mx:VBox height="100%" width="100%" id="box" verticalAlign="bottom"/>
    </mx:VBox>
    3. AdvancedHeaderColumn.as
    package {
         import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
         public class AdvancedHeaderColumn extends AdvancedDataGridColumn {
              public var show:Boolean = false;
              public function AdvancedHeaderColumn(columnName:String=null) {
                   super(columnName);

    Thanks Hackintosh.
    It prints as it views, as a corrupt jpeg. I also dug into console and it confirmed there was an error about a corrupt jpg. The most interesting thing is if I open the bad pdf in Photoshop the whole image is there with no signs of corruption. This leads me to believe it's something with how OSx and/or Safari are rendering the jpgs. Another curious sidenote, Safari on Windows works fine but if you save the pdf, move it to a mac and open it, you get the corrupted jpg again.
    I think I'm going to try and stop swimming upstream now. At the end of the day I don't care if the images are pngs, tiffs, or eps. I'm going to try feeding a few different formats and see if that doesn't fix the problem.

  • Adding dynamic images to your website using Dreamweaver

    Hi
    I've been working on a website which has been in use by public for some months now.
    I recently wanted to add a simple product catelogue.   I can do this just by creating my database connection and using the recordsets.
    However I wanted to add an image thumbnail to each product record.
    I found the above topic in the Adobe Help 'Adding dynamic images to your website using Dreamweaver'
    What I really would like to know is what exactly is put in the image_location field of the table, how is this field populated and then how to view the picture.
    I have tried, as per instructions, but the picture is not showing.
    I use php as I dont know coldfusion, but I'm sure the process must be pretty similar.
    If anyone can shed some light then that would be really appreciated.
    Many thanks liz

    komrad78 wrote:
    > I'd like to know how do you add background music to a
    website using
    > dreamweaver CS3?
    > I'm using dreamweaver CS3 to create a website for my
    church (they
    > already have a domain) and I'm trying to figure out how
    to add
    > background music.
    >
    > Also, is there a way for me to add a music player or
    something to the
    > page that starts playing when they enter the site and
    let's you pick
    > different songs from it?
    >
    > And lastly, if I just embed a song or whatever it is as
    the
    > background music, can I make it loop or play a different
    song
    > afterwards?
    As most anyone else will say, so I will say; *please don't
    start it
    automatically!*
    Playing music on a site is fine, but making it play
    automatically when you
    go to the site will alienate lots of people; especially those
    having a quick
    web surf at work or who have other music on whilst they're
    working.
    But back to your question; have a look at the XSPF music
    player
    http://musicplayer.sourceforge.net/).
    It comes in different visual versions
    (can modify it with a bit of Flash knowledge), allows you to
    select
    different songs or just leave it looping, or you can just
    loop one song. And
    yes, you can make it start automatically.
    See
    http://www.blastoffmusic.org
    for an example of a christian site where it
    is used (on the inside pages)
    HTH,
    Pete.
    Peter Connolly
    http://www.kpdirection.com
    Utah

  • Dynamic Components 1.2 not available in JSF 2.0 ?

    Hi,
    I would like to use Dynamic:form from "Dynamic Components 1.2" in 11g R2 (11.1.2.3.0) on a JSF. It seems that it is not possible to add a dynamic:form on a JSF. It does not appear when I drag and drop a data control. However, it appears when I drag and drop on a JSPX on the same project.
    Does it exist another way to have a dynamic:form on a JSF ? Is it going to be add ?
    All the tutorials I read always use JSPX, even in 11g R2, like this one:
    http://technology.amis.nl/2011/06/07/adf-11g-r2-adf-business-components-ui-categories-and-dynamic-forms-and-some-new-ide-features/
    Thanks,
    Alain

    The dynamic components are not part of the JSF2.0 part in 11.1.2.x.0. At the moment they only work for jspx files. If you use jspx files in 11.1.2.x.0 you can use the dynamic components.
    Timo

  • Row action event on data table does not occur when rows added dynamically

    Row action event on data table does not occur (only refreshes the page) when the rows in the data table are added dynamically at run time using button click and java bean.
    please tell me a way to catch the row click event when adding rows dynamically to data table. i m using RAD 6.0 to develop Faces jsp pages.
    thanks
    amit

    i got the answer

  • Dynamic adding of components (doesn't work when programmatically)

    Hi, I don't understand, why this doesn't work. I'll explain it on this example:
    import java.util.concurrent.ScheduledThreadPoolExecutor;
    import java.util.concurrent.TimeUnit;
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    public class NewFXMain extends Application {
        Group root;
        public static void main(String[] args) {
            Application.launch(NewFXMain.class, args);
        @Override
        public void start(Stage primaryStage) {
            primaryStage.setTitle("Hello World");
            root = new Group();
            Scene scene = new Scene(root, 300, 250, Color.LIGHTGREEN);
            Button btn = new Button();
            btn.setLayoutX(100);
            btn.setLayoutY(80);
            btn.setText("Add button now");
            btn.setOnAction(new EventHandler<ActionEvent>() {
                public void handle(ActionEvent event) {
                    addButton();
            root.getChildren().add(btn);  
            primaryStage.setScene(scene);
            primaryStage.setVisible(true);
            System.err.println("Number of buttons before: "+root.getChildren().size());
            ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1);
            executor.schedule(new MyTask(), 5, TimeUnit.SECONDS);
        private void addButton() {
            System.err.println("Button adding");
            root.getChildren().add(new Button("YEAH"));
            System.err.println("Number of buttons after: "+root.getChildren().size());
        class MyTask implements Runnable {
            public void run() {
                addButton();
    }There are two ways how a new button can be added. Either by clicking on existing button or programmatically by the program itself after 5 seconds.
    If you add it by button, there is no problem. The error print is:
    Number of buttons before: 1
    Button adding
    Number of buttons after: 2
    But if you just wait, then the error print is:
    Number of buttons before: 1
    Button adding
    and no button is added. In fact, the error printing after the adding isn't performed either.
    I'd like to ask if there is some solution for this because I'd love to do some changes by schedulers. Thx
    Edited by: 876949 on 14.8.2011 9:09
    Edited by: 876949 on 14.8.2011 9:11

    No, these are not error messages, they are just for purpose of example. Here it doesn't matter whether err or out... (yes, 'out' would be better ;)
    But thanx, it's working. By the way, I am creating scheduler for task lists. They are supposed to be printed dynamically in specific time (or periodically). For example: at 5 o'clock I need to print 5 items of some list and every 3 hours I need to print 3 items of another list etc. - so it's quite dynamic with regard to component adding (No, I don't want to use some sort of ListView, I want interactive printing: one item on screen at a moment). I'll try to work your solution into my code.
    Edit: So either it's not possible to use this for the purpose of my app or it will be really cumbersome. Maybe it would be easier to draw some rectangles with mouse listeners...
    Edit: So I finally got around it. In the end, I won't use dynamic adding as intended. It's working and that's important.
    Edited by: 876949 on 14.8.2011 12:48
    Edited by: 876949 on 15.8.2011 5:21

  • Adding dynamic panels

    My application needs to dynamically decide how many components will be present in the panel depending on the clauses. For each clause, I have designed a seperate panel,(its design is fixed) . But the number of clause panels to be included in the main panel is dynamic. How do I add the panels to the main panel for display?
    I was successful in adding a single panel to the main panel. For this I had to define the layout of the panel again and set its horizontal and vertical group. But how do I add a list of components. If I add a for loop within the layout.setHorizontalGroup() or layout.setVerticalGroup(), it does not work. Also panel.addLayoutComponent() did not work. Can anyone please tell me how will I add the components dynamically.

    Its still not working.
    In my application I have some user defined panels. The component I need to add to the main panel is a user defined panel.
    The code is as follows, where panelBetween is a user-defined panel in the package com.HelperTool
    com.HelperTools.panelBetween between1 = new com.HelperTools.panelBetween();
                between1.jCheckBoxBetweenCondition.setText("Where userid between");
                jPanelMain.add(between1);
                jPanelMain.revalidate();
                jPanelMain.repaint();

  • Adding Dynamic remarks to the report by user

    Any idea's of adding text to queries? Our customer is using Crystal Reports based on Baan DWH. On of the functions is adding textblocks to the report and put in remarks / comments.
    This will be <u>replaced</u> by BW. Is it possible to add (dynamic) <b>textblocks</b> to the BW reporting which can be filled in by the <b>end-user</b>? Any advice will be great!

    Yes it is.
    In BW, this can be achieved by using document management. The option will be available to the user via context menu in the report (goto-->documents - text/pdf/img etc). In your case user can choose to create/change/display a 'text' document, which will be attached to the report.
    cheers,

  • Adding dynamic filter expressions

    I am working on a ESB flow and I wanted to write a filter expression that can dynamically fetch database values and accordingly route the flow.
    Since it didnt work, I thought of assigning this to a xsl variable and compare this variable value in the next Routing Service node Filter Expression.
    So I tried as follows: filterVar" variable holds the value of what I am looking for.
    <xsl:template match="/">
    <inp1:CommitmentRequest>
    <xsl:variable name="filterVar" select='orcl:lookup-table("accounts","dest",/imp1:AccountsRequest/imp1:Code/imp1:SITEID,"acc_code","DSname")' />
    and in the next Routing Service I have an expression written as:
    $filterVar = 'ACC1'
    Is it the correct way of doing? By approaching this variable assignment, I will be adding a Routing Service un necessarily. Still, if this is the way it is going to work and if there is no straight forward way, I will have to use this approach.
    Please note that "/imp1:AccountsRequest/imp1:Code/imp1:SITEID" is the correct tree structure as I can assign this value directly in XSL mapping to a new field of target XML. I didnt want to assign this way as I dont want to create a new variable in XML as it will never be used as data in successive stages.
    Thanks,

    Thanks Dave.
    Certainly the namespace issue was there. But, even with that issue fixed, message is not passing the filter stage.
    I mapped this expression to a target element of target xml and it assigned a value of 'ACC1' to it.
    orcl:lookup-table("accounts","dest",/inp1:AccountsRequest/inp1:Code/inp1:SITEID,"acc_code","DSname")
    The strange thing I noticed id that in none of the cases as montioned below, the message doesnt pass the filter stage.
    $filterVar = 'ACC1'
    $filterVar != 'ACC1'
    Any idea why?
    Instead of using variable assignment method, do you have any other idea that lets me retrieve database values on the fly and make decisions?
    I tried lookup-table() in filter expression directly, that didnt work either. Ideally, I wanted this approach to work.
    I have also tried data enrichment as suggested by Allan Galsgow. Didnt have any luck either.
    Thanks,
    Note: The varaible assignment is done as follows in the xsl mapping:
    <xsl:variable name="filterVar" select='orcl:lookup-table("accounts","dest",/inp1:AccountsRequest/inp1:Code/inp1:SITEID,"acc_code","DSname")' />
    Message was edited by:
    user582595
    Message was edited by:
    user582595

  • Does the Tech Comm Suite work differently/better then adding separate components?

    I use CS4 everyday which includes Illustrator,  Photoshop extended, InDesign, Dreamwearver and Flash. I now have a need to convert FrameMaker files into HTML and to create Help files using RoboHelp and Captivate. Do I need to get the Tech Comm Suite 2 or can I just add the RoboHelp and Captivate components and upgrade my FrameMaker to version 9? What works better and what is more cost efffective?

    Thanks Jeff for the information about importing not linking outside of the suite. I do want to link to the FrameMaker source file.
    I will have to check with Sales at Abode to see about the intregration with or upgrade price available for adding Tech Comm suite.

Maybe you are looking for

  • Active directory domain services stopped after removing routing and remote access role

    Hello everyone;; I am in deep trouble.. I did install routing and remote access and then  lost connection to the server remotely. Then I connected a monitor to the server and removed the role... then it asked me to restart the server . After logging

  • I can't get back to my home screen? Is the home button broke?

    I can't get back to my home screen? Is the home button broke?

  • String Data-Loss over Sockets

    I have some code that sends strings through a socket to a C++ program on another machine. The test strings I have been using are three characters long (i.e. 6 bytes). The buffer size I have put on the socket is 72 bytes, so I should have no problem w

  • How to GREP unique string only?

    Hi, I have a huge import log file and it's too hard to review the full log file to verify all reported errors are ignorable. So I am looking for a way to list the distinct errors. I had some manual analysis and workarounds to find out the errors howe

  • Problem with PDF export format

    Using Mavericks and the latest version of Numbers, I have a problem when exporting a spreadsheet as a PDF.  The spreadsheet is very simple and everything in it is formatted with a border around each cell (more like a 10 line/10 column table with bord