Dynamic change of ring elements

I am wondering if there is a method exist to update ring elements dynamicaly during the vi is running...???
Example:  I have a TCP listen VI that get IP address from
different TCP client as they are connecting to the server and I want
the user could select one of these client vs the IP address in the ring
control to execute any test with it...
Thanks in advance for advices
HaemoPhil

Hello HaemoPhil,
use the property node "strings and values" to change the appereance of your ring at runtime!
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Alignment of dynamically changing StaticText element

    Having a little trouble centering a dynamically changing StaticText element whose parent container has its alignChildren property set to 'center'. As the text of the element changes, new strings that are assigned to it are truncated to the length of the string the element initially held. If I initially place a string of blank characters that is longer in length than any anticiapted text string the element will ever hold, when the text is updated it is offeset to the left by the number of characters of the initial string that are in excess of the length of the string newly assigned to it. Any ideas or suggestions would be very much appreciated.

    Set the initial size of the StaticText with the  "characters" property, which will reserve width so it is the proper width.
    Also set "justify" to "center" so that it will always be centered within that space.
    Note that "characters" is an initial creation property only, and cannot be set after the object has been created.

  • Dynamically change the db and server in execute sql task

    Pkg 2: Moves data from B_STG (Staging DB) to B_Det_STG (Staging DB)  ---- option1
    Pkg 3: Moves data from B_STG (Staging DB) to B_Det (PC DB)   ---- option2
    This part is duplicating in both the packages
    So they want me to merge both of them into in execute sql task and dynamically change between option1 and option2 depending on a pkg level variable.
    So, I create a pkg level variable called ExecutionVariable: 'ANALYSIS' or 'LOADING'
    If 'ANALYSIS' it needs to do option1 else option2.
    So, I ma trying to create a dynamic connection string in execute sql task.
    I change the connection property in execute sql task editor dynamically my giving the expression: @[User::ExecutionVariable] == "ANALYSIS"?  @[User::STAGINGDBConnectionString] :  @[User::PCDBConnectionString]
    which evaluates to : Data Source=AW-ETL-D1;Initial Catalog=Staging;Integrated Security=SSPI;Provider=sqloledb
    But when I run the sql task, its giving me an error: 
    ERROR:
    TITLE: Microsoft Visual Studio
    Nonfatal errors occurred while saving the package:
    Error at PC_DataLoad: The connection "Data Source=AW-ETL-D1;Initial Catalog=Staging;Integrated Security=SSPI;Provider=sqloledb" is not found. This error is thrown by Connections collection when the specific connection element is not found.
    Error at PC_DataLoad: The connection "Data Source=AW-ETL-D1;Initial Catalog=Staging;Integrated Security=SSPI;Provider=sqloledb" is not found. This error is thrown by Connections collection when the specific connection element is not found.
    Can u please help me.

    Hi ,
    Don't try to make the "Execute Sql" task as dynamic.
    Try to make OLEDB connection Manager as "Dynamic".
    Steps:
    1. Create OLE DB Connection pointing to any database then set expression to connection string variables like below.
    Provider=SQLNCLI10.1;Integrated Security=SSPI;Initial Catalog=YourDBname;Data Source=YourServerName.
    2. Make Delayed Validation property to "True".
    3. Set the created dynamic OLE DB connection to your Execute SQL task.
    4. Change the connection string variable accordingly before running the "Execute SQL" task.
    Hope it will help you.
    Regards,
    Nandhu

  • 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 Change UIBBs in GAF. Is it possible ?

    Hello,
    I have a query in FPM to which I would like to draw your attention to.
    Can I dynamically change my UIBBs within a single mainstep in FPM GAF ? if so, which method can help me do this  ?
    I created a single Web dynpro Component with 5 component configurations.
    I am controlling the visibility of several UI elements within this single component through these component configurations.
    Each configuration refers to a business scenario.
    I configured this single interface view at the UIBB level with the configuration name for a main step.
    I was able add multiple uibbs at this level with different configuration names.
    Now, I do not know how to toggle between these UIBBs?. I do not  want to create multiple variants
    because all the other main steps are same for all the business scenarios.
    Thanks for your time.
    Regards,
    Kiran

    Hello Kiran,
    This is achieveable. You need to implement the IF_FPM_GAF_CONF_EXIT WD interface in your AppCC. This interface provides a method OVERRIDE_EVENT in the component controller of your AppCC. This method has an importing parameter IO_GAF which has various methods to help you change the configuration of the application at runtime and also the UIBB's on a particular mainstep.
    Regards
    Rohan

  • Merging of 2 Cells in WD ABAP ALV Header & Dynamically change the header

    Hello Experts,
    I have two main requirements with respect to WD ABAP - ALV report creation
    1) Two feilds in the  header of ALV GRID created in the WD ABAP screen must be merged as shown below(Month Column) ,
    |     January         |     February         |  
    |   Col 1 | Col2      |   Col 1 | Col2        |     
    2) The header value(Month) should dynamically change based on the current date.
    For Eg: If June 2011 is the current month , the ALV table should start from June 2011 and displayed till May 2012.
    Looking forward for your valuable inputs @ the earliest
    Regards,
    Sriram

    Hi Sriram,
    For merging..
    Pleaese go through this
    Merge of Cells in ALV table in ABAP webdynpro.
    ABAP WD: ALV merge cells
    For Header Change..
    How to set title/text for ALV table column header in WD ABAP
    Change column header in ALV to another DDIC Element type
    Change label of a column in ALV
    Cheers,
    Kris.

  • Dynamically changing the prompt on ksh

    Hi ,
    I couldn't find a better forum to post this query, that's why I put it under Installation.
    How do you make sure that the ksh prompt displays the current directory as well? I tried various combinations...even the examples say that PS1="[! $PWD]" should work, but that doesn't seem to work on ksh. Can anything be done to ensure that the prompt changes whenever I change the working directory?
    Thanks in advance,
    Amrith.

    Hi,
    I have no idea about changing the text element dynamically.
    But you can refresh the screen by the following sample coding.
    You can accomplish this with a RFC enabled Function module.
    1. Create a function module. The only functionality will be to wait for 10 secs.
    2. Create a subroutine which will set a user-command.
    3. and at user-command call the function module.
    Below is the code, I found on the web. It is quite simple..
    DATA: ZNUM LIKE SY-TABIX.
    : GET TIME.
    : WRITE: /01 'Update Number:', ZNUM, SY-UZEIT.
    : CALL FUNCTION 'Z_WAIT_30_SECS'
    : STARTING NEW TASK 'IF'
    : PERFORMING START_REFRESH ON END OF TASK.
    : AT USER-COMMAND.
    : IF SY-UCOMM = 'REFR'.
    : SY-LSIND = SY-LSIND - 1.
    : ADD 1 TO ZNUM.
    : GET TIME.
    : WRITE: /01 'Update Number:', ZNUM, SY-UZEIT.
    : CALL FUNCTION 'Z_WAIT_30_SECS'
    : STARTING NEW TASK 'IF'
    : PERFORMING START_REFRESH ON END OF TASK.
    : ENDIF.
    : */ Program Subroutines
    : FORM START_REFRESH USING TASKNAME.
    : SET USER-COMMAND 'REFR'.
    : ENDFORM. "
    : FUNCTION Z_WAIT_30_SECS.
    : ""Local interface:
    : DATA: ZTIME LIKE SY-UZEIT.
    : GET TIME.
    : ZTIME = SY-UZEIT + 30.
    : DO.
    : GET TIME.
    : IF SY-UZEIT >= ZTIME.
    : EXIT.
    : ENDIF.
    : ENDDO.
    : ENDFUNCTION.
    Hope this helps.
    Regards,
    J.Jayanthi

  • Custom cursor - dynamically change colour

    Since I failed to gain access to [Embed]ed SWF file to change
    its properies from within Flex :-(
    has anyone got any ideas how to create a custom cursor and
    dynamically change its colour.
    Let's say we have a brush or a pencil cursor and we want to
    change the colour of its tip, when a certain coloured button is
    pressed with it.
    Thank you.

    Use sym for your element.
    sym.$("button").css({'cursor':'pointer'});

  • Dynamic Change of FieldCatalog in OO ALV Secondary List

    Dear All,
    i have Scenario like when i go to secondary list on some event, the fieldcatlog for the info is generated. then again i go back and choose some other event, now the secondary fieldcatalog list should contain few extra fields which are not being displayed. i am refreshing the fieldcatalog and filling the fieldcatalog table with new fields everytime. but the system displays only the first generated fieldcatalog.
    any ideas what can be done?
    Thanks & Regards
    Rahul

    Hello Rahul
    The following sample report <b>ZUS_SDN_TWO_ALV_GRIDS_A</b> shows how to dynamically change the fieldcatalog of the second ALV list depending on which customer has been selected (by double-clicking) on the first ALV list.
    *& Report  ZUS_SDN_TWO_ALV_GRIDS_A
    *& Screen '0100' contains no elements.
    *& ok_code -> assigned to GD_OKCODE
    *& Flow logic:
    *  PROCESS BEFORE OUTPUT.
    *    MODULE STATUS_0100.
    *  PROCESS AFTER INPUT.
    *    MODULE USER_COMMAND_0100.
    REPORT  zus_sdn_two_alv_grids_a.
    " Dynamic fieldcatalog on second ALV list
    DATA:
      gd_okcode        TYPE ui_func,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_splitter      TYPE REF TO cl_gui_splitter_container,
      go_cell_top      TYPE REF TO cl_gui_container,
      go_cell_bottom   TYPE REF TO cl_gui_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid,
      go_grid2         TYPE REF TO cl_gui_alv_grid,
      gs_layout        TYPE lvc_s_layo.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1,
      gt_knvv          TYPE STANDARD TABLE OF knvv.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA:
          md_row              TYPE i.
        CLASS-METHODS:
          handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING
              e_row
              e_column
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_double_click.
    *   define local data
        DATA:
          ls_knb1      TYPE knb1.
        CHECK ( sender = go_grid1 ).
        READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
        CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
        md_row = e_row-index.
        CALL METHOD go_grid1->set_current_cell_via_id
          EXPORTING
    *        IS_ROW_ID    =
    *        IS_COLUMN_ID =
            is_row_no    = es_row_no.
    *   Triggers PAI of the dynpro with the specified ok-code
        CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
      ENDMETHOD.                    "handle_double_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = '1000'.
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Create splitter container
      CREATE OBJECT go_splitter
        EXPORTING
          parent            = go_docking
          rows              = 2
          columns           = 1
    *      NO_AUTODEF_PROGID_DYNNR =
    *      NAME              =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_error = 2
          OTHERS            = 3.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Get cell container
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = go_cell_top.
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 2
          column    = 1
        RECEIVING
          container = go_cell_bottom.
    * Create ALV grids
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_cell_top
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Set event handler
      SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1.
      CREATE OBJECT go_grid2
        EXPORTING
          i_parent          = go_cell_bottom
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Display data
      gs_layout-grid_title = 'Customers'.
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNB1'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_knb1
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      gs_layout-grid_title = 'Customers Details (Sales Areas)'.
      CALL METHOD go_grid2->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNVV'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_knvv  " empty !!!
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Link the docking container to the target dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * NOTE: dynpro does not contain any elements
      CALL SCREEN '0100'.
    * Flow logic of dynpro (does not contain any dynpro elements):
    *PROCESS BEFORE OUTPUT.
    *  MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    *  MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.  " contains push button "DETAIL"
    *  SET TITLEBAR 'xxx'.
    * Refresh display of detail ALV list
      CALL METHOD go_grid2->refresh_table_display
    *    EXPORTING
    *      IS_STABLE      =
    *      I_SOFT_REFRESH =
        EXCEPTIONS
          OTHERS         = 2.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
    *   User has pushed button "Display Details"
        WHEN 'DETAIL'.
          PERFORM entry_show_details.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  ENTRY_SHOW_DETAILS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM entry_show_details .
    * define local data
      DATA:
        ld_row      TYPE i,
        ls_knb1     TYPE knb1,
        ls_fcat     TYPE lvc_s_fcat,
        lt_fcat     TYPE lvc_t_fcat.
      CALL METHOD go_grid1->get_current_cell
        IMPORTING
          e_row = ld_row.
      READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
      CHECK ( syst-subrc = 0 ).
      SELECT        * FROM  knvv INTO TABLE gt_knvv
             WHERE  kunnr  = ls_knb1-kunnr.
      CALL METHOD go_grid2->get_frontend_fieldcatalog
        IMPORTING
          et_fieldcatalog = lt_fcat.
      " Logic of fieldcatalog modification:
      " 1st customer selected -> show 1 column only
      " 2nd customer selected -> show 2 columns only
      " 3rd customer selected -> show 3 columns
      LOOP AT lt_fcat INTO ls_fcat.
        IF ( syst-tabix <= ld_row ).
          ls_fcat-no_out = ' '.
        ELSE.
          ls_fcat-no_out = 'X'.
        ENDIF.
        MODIFY lt_fcat FROM ls_fcat.
      ENDLOOP.
      go_grid2->set_frontend_fieldcatalog( lt_fcat ).
    ENDFORM.                    " ENTRY_SHOW_DETAILS
    Regards
      Uwe

  • Dynamically changing the UI

    Hi Everybody,
    I have a view (view 1) which is being mapped with another view(view2). When I trigger my firePlug from View 1, the UI element should be a InputField with STRING as Datatype. and Similarly when I load the View2 thru wdinit(), it should dynamically change into InputField with Date...
    Regards/Guru

    Hi Kumara,
    it is not possible to change the Input field type. But if create a second field in the component controller with the type date and than copy the string with the method new date (year, mm, dd) to the this new field.
    You must transfrom the String in 3 int field. (2007-03-20)
    year = 2007; mm = 03 ; dd = 20 )
    Map this date field to the view2 an you get in this view the Date
    Component Controller
    Field 1  --> type String
    Field 2-->  type date
    View 1 --> Controller
    Field1 is mapped to the controller Field 1
    View 2 --> controller
    Field 2 is mapped to the controller field 2
    I hope this helps
    Regads
    Gunter

  • Dynamically change text field type

    Hello all
    I have a form which displays a decimal field. However when certain conditions are met, I need to change its type to Text, so the user can enter any alphanumeric character.
    How do I achieve that with Javascript code? Is it even possible?

    Actually, you can dynamically change a textfield.type. AS2.0
    You need two elements.
    txt.type = "input";
    txt.selectable = true;
    However, if you have the textfield in a btn you will need to
    delete the onRelease function before you can make the tf function correctly.
    btn.onRelease = function()
    delete this.onRelease;
    this.txt.type = "input";
    this.txt.selectable = true;

  • Using DelayQueue with dynamically changing delay times?

    Greetings all:
    First-time poster, so please be gentle. :-)
    I am implementing a cache timer task whose job is to removes idle elements from a cache after x time, and was considering a DelayQueue as potentially more efficient than iterating through the entire cache each time. Important point is that the delay time of elements in the queue will be dynamically changing while they're in the queue, until the point when they become idle, i.e., each time an element's content changes, its expiration time moves further out.
    I went looking in the DelayQueue source (and from there to PriorityQueue) as I was interested to see how it implements its sorting mechanism, and it appears to me that it may not handle this properly. Specifically, it appears that the queue is sorted when elements are added or removed but not otherwise, so that you could end up with the head of the queue being an element that has not really expired.
    Question: Has anyone used a DelayQueue for this kind of scenario, and if so, did it work as expected?
    Thanks,
    Brian

    If you want this behaviour I suggest you look at
    overriding LinkedHashMap as it has a means to
    maintain sorted from most recently accessed to last
    accessed.
    Thus to clear it all you need to do is remove the
    oldest elements.Interesting. Currently I'm using a HashMap so changing to a LinkedHashMap would require virtually no changes to existing code. It still won't quite work as-is, though, because access only gets updated on put's and remove's, whereas I would need access updated on any modification to a contained object as well. I'll think about it a bit more - thanks for the suggestion.

  • Best Practice: Dynamically changing Item-Level permissions?

    Hi all,
    Can you share your opinion on the best practice for Dynamically changing item permissions?
    For example, given this scenario:
    Item Creator can create an initial item.
    After item creator creates, the item becomes read-only for him. Other users can create, but they can only see their own entries (Created by).
    At any point in time, other users can be given Read access (or any other access) by an Administrator to a specific item.
    The item is then given edit permission to a Reviewer and Approver. Reviewers can only edit, and Approvers can only approve.
    After the item has been reviewed, the item becomes read-only to everyone.
    I read that there is only a specific number of unique permissions for a List / Library before performance issues start to set in. Given the requirements above, it looks like item-level permission is unavoidable.
    Do you have certain ideas how best to go with this?
    Thank you!

    Hi,
    According to your post, my understanding is that you wanted to change item level permission.
    There is no out of the box way to accomplish this with SharePoint.               
    You can create a custom permission level using Visual Studio to allow users to add & view items, but not edit permission.   
    Then create a group with the custom permission level. The users in this group would have the permission of create & add permission, but they could no edit the item.
    In the CodePlex, there is a custom workflow activities, but by default it only have four permission level:
    Full Control , Design ,Contribute and Read.
    You should also customize some permission levels for your scenario. 
    What’s more, when use the SharePoint 2013 designer, you should only use the 2010 platform to create the workflow using this activities,
    https://spdactivities.codeplex.com/wikipage?title=Grant%20Permission%20on%20Item
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to change the screen element of a single field in a table control

    Hi Gurus,
    I want to change the screen element of a single field (or the whole row) in a table control according to a condition.
    I have 2 columns in the table control. One is an input column and one output only. When user enters values into the input column, they need to be compared against the values in the other column, and if there is a discrepancy, the row where the discrepancy is needs to be highlighted.
    I have tried the following code which highlights the whole column ...
    CONTROLS: TC_ZVOYG_BINS TYPE TABLEVIEW USING SCREEN 0500.
    DATA: wa_tc_zvoyg_col LIKE LINE OF TC_ZVOYG_BINS-cols.
      LOOP AT G_TC_ZVOYG_BINS_ITAB
               INTO G_TC_ZVOYG_BINS_WA.
        if G_TC_ZVOYG_BINS_WA-zdelivery_bin ne G_TC_ZVOYG_BINS_WA-zactual_bin.
          loop at screen.
            IF screen-name = 'ZVOYG_BINS-ZACTUAL_BIN'.
              wa_tc_zvoyg_col-screen-intensified = 1.
              MODIFY tc_zvoyg_bins-cols FROM wa_tc_zvoyg_col TRANSPORTING
              screen-intensified WHERE screen-name = screen-name.
            endif.
          endloop.
        endif.
      endloop.
    And also the following code which makes no change ...
      LOOP AT G_TC_ZVOYG_BINS_ITAB
               INTO G_TC_ZVOYG_BINS_WA.
        if G_TC_ZVOYG_BINS_WA-zdelivery_bin ne G_TC_ZVOYG_BINS_WA-zactual_bin.
          loop at screen.
            IF screen-name = 'ZVOYG_BINS-ZACTUAL_BIN'.
              screen-intensified = '1'.
              modify screen.
            endif.
          endloop.
        endif.
      endloop.
    Thanks in advance.

    Hi,
    The modification of a screen element attribute (LOOP AT SCREEN...MODIFY SCREEN) must always be done in the PBO (for a dynpro, it will be in a PBO module, i.e. declared by MODULE ... OUTPUT)
    About the loop at the internal table, it is done automatically by the system, also during the PBO, you'll find something like LOOP [AT itab] ... WITH CONTROL ...  in the PBO part of the screen flow logic (note: you may have to complete with a supplementary READ TABLE if you don't use AT itab). So you don't need an additional loop.
    Best regards
    Sandra

  • How to dynamically change the text of a TextObject with embedded DataField?

    Hi
    I'm trying to dynamically change the text of a TextObject at runtime, by using the .NET library. My problem is that if one or more DatabaseFieldDefinition is embedded inside my text, I'm unable to change the "static text" only, by keeping the field, e.g. I have :
    Text1 => "Contact Name: {Contact.Name}"
    and I'd like to change it to anything else like:
    Text1 => "Nom du Contact: {Contact.Name}"
    Half of my TextObject is static text while second part comes from the dataset.
    (of course the translation is dynamic - it is called at run-time and the new value to be set depends on the calling application language)
    If I simply modify the Text property of my TextObject, the {Contact.Name} embedded field is not evaluated anymore by the Crystal Engine, but considered as a single text.
    Using formulas or parameters looks quite difficult, because it means having many ones just for translation needs - I cannot control the way my users will create their reports and "force them" to use complex methods just in order to put a text and a value together...
    Anyone knows how to deal with that ?

    Only way I can think of doing this:
    1) Create a formula (call it lang) and enter the string "Contact Name" in it
    2) Place the  {Contact.Name} field next to the string
    3) So now you have:
    ContactName:  {Contact.Name}
    4) Check what localization you are after. If you need "Nom du Contact", change the lang formula so it shows "Nom du Contact" using the code below:
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Public Class Form1
    Inherits System.Windows.Forms.Form
    Dim Report As New CrystalReport1()
    Dim FormulaFields As FormulaFieldDefinitions
    Dim FormulaField As FormulaFieldDefinition
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    FormulaFields = Report.DataDefinition.FormulaFields
    FormulaField = FormulaFields.Item(0)
    FormulaField.Text = "[formula text]"
    CrystalReportViewer1.ReportSource = Report
    End Sub
    I realize this may not give you consistent spacing as the translations may have strings of differnt length. Perhaps someone has other idea(s)...

Maybe you are looking for

  • ORA-04031: unable to allocate 64 bytes of shared memory

    Hi All, We are performing System copy on a distributed environment with OS Windows 2003 and DB Oracle 10.2.0.4 While importing the Database (ABAP) only ,we are facing error and 5 import steps are failing  in Import ABAP phase. Error is "ORA-00604: er

  • HOW TO SPECIFY FIELD AS MANDATORY IN D3L

    hi i know that in dtd we can mention a field is mandatory or not.How can we do the same in D3L. actual requirement is a field in a text file is mandatory.If i import dtd (with filed specified as mandatory) in to istudio to define common view ,it shou

  • Adobe Premiere Pro CS6 Crashes

    I open Adobe Premiere Pro CS6. I import a .mov file. I move the .mov file into the next box and a message pops up saying "Adobe Premiere Pro CS6 has stopped working" Then Adobe Premiere Pro CS6 closes. I have brand new Samsung 5 series laptop Windows

  • Loosing internet connection after Mountain Lion update

    Hi, I'm working with a MBP 2012 model. After the update to Mountain Lion, the MBP is loosing the internet connection now and then. I've did a PRAM reset, but the issue is still present. Are there any tips oder way to solve the issue? Thank so far

  • RSDMD_DEL_BACKGROUND

    How do I delete multiple infoObjects in one step with RSDMD_DEL_BACKGROUND. As I see it we must create a variant for each infoObject. Is it possible to specify all objects for deletion in one single deletion list? e.g.. like process chain step comple