Dynamic sizing of buttons

I am working on a flex application where I want the button
sizes to appear based on the size of the browser window and the
resolution of the screen so I don't want to hard code the width of
the buttons.
<mx:Button id="submitButton" label="SQL"
styleName="navButtonSkin"
width="80" textAlign="center"/>
<mx:Button id="submitButton1" label="SQL1"
styleName="navButtonSkin"
width="80" textAlign="center"/>
But when I change it to:-
<mx:Button id="submitButton" label="SQL"
styleName="navButtonSkin"
width="20%" textAlign="center"/>
<mx:Button id="submitButton1" label="SQL1"
styleName="navButtonSkin"
width="820%" textAlign="center"/>
It doesnt seem to work.
Now if I change it to
<mx:Button id="submitButton" label="SQL"
width="{getButtonWidth()}" textAlign="center"/>
and have a function:-
private function getButtonWidth():int{
var w:int = 15/100*summaryPanel.width;
return w;
where summaryPanel is a container holding the buttons, thats
failing as well since in this case the summaryPanel.width always
turns out to be zero at the time when the button sizes are
calculated. What else can I do and how can I work around it?

Try doing the calcualations in-line. getButtonWidth() is a
function, and thus hard to bind to.
<mx:Button id="submitButton" label="SQL"
width="{15/100*summaryPanel.width}" textAlign="center"/>
Since summaryPanel.width is reference directly in the
binding, the compiler will automatically adjust the button's width
for you whenever summaryPanel's width changes.

Similar Messages

  • Dynamic actions on button and dynamic column name

    Hi!ynam
    I want to create a dynamic action on button click in my tabular form.
    I have a select list with values of my column names (P7_X_COLUMN) and a text field where users input values for update (P7_X_UVALUE).
    My idea is that when they click the button, they update selected column to desired value in all rows.
    However, I get the following error:
    ORA-06550: line 5, column 5: PL/SQL: ORA-01747: invalid user.table.column, table.column, or column specification ORA-06550: line 4, column 1: PL/SQL: SQL Statement ignored (Go to error)
    It seems to me that I have not referenced the column name correctly, I thought it was the same as referencing values. How do I do that?
    This is my code:
    begin
    update "#OWNER#"."IZV_SLOG_DET"
    set :P7_X_COLUMN=:P7_X_UVALUE;
    end;
    Regards,
    Ivan

    I got it to work, but the query is too big. Can anyone help me with how to get it to work?
    I tried breaking it into more varchar2 strings, but i always get the same error:
    Error processing row.
    ORA-01461: can bind a LONG value only for insert into a LONG column
    declare  
    l_table_name varchar2(30) := 'IZV_SLOG_DET_POM'; 
    l_sql_stmt varchar2(32762);
    begin
    l_sql_stmt := 'update ' || l_table_name || ' set ' || :P7_X_COLUMN || ' =''' || :P7_X_UVALUE|| '''' ||
    'where'||
    'nvl(MSR_PRD_ID,1) = nvl(nvl(''' || :P7_X_MSR_PRD_ID || '''' || ',MSR_PRD_ID),1) and' ||
    'nvl(SRC_STM_ID,1) = nvl(nvl(''' || :P7_X_SRC_STM_ID || '''' || ',SRC_STM_ID),1) and' ||
    'nvl(OZNAKA_KOMITENTA,1) = nvl(nvl(''' || :P7_X_OZNAKA_KOMITENTA || '''' || ',OZNAKA_KOMITENTA),1) and' ||
    'nvl(RSP,1) = nvl(nvl(''' || :P7_X_RSP || '''' || ',RSP),1) and' ||
    'nvl(OZNAKA_RETKA,1) = nvl(nvl(''' || :P7_X_OZNAKA_RETKA || '''' || ',OZNAKA_RETKA),1) and' ||
    'nvl(OZNAKA_IZVJESCA,1) = nvl(nvl(''' || :P7_X_OZNAKA_IZVJESCA || '''' || ',OZNAKA_IZVJESCA),1) and' ||
    'nvl(MBR_KOMITENTA,1) = nvl(nvl(''' || :P7_X_MBR_KOMITENTA || '''' || ',MBR_KOMITENTA),1) and' ||
    'nvl(KOMITENT_NEREZ,1) = nvl(nvl(''' || :P7_X_KOMITENT_NEREZ || '''' || ',KOMITENT_NEREZ),1) and' ||
    'nvl(ZUPANIJA,1) = nvl(nvl(''' || :P7_X_ZUPANIJA || '''' || ',ZUPANIJA),1) and' ||
    'nvl(DRZAVA,1) = nvl(nvl(''' || :P7_X_DRZAVA || '''' || ',DRZAVA),1) and' ||
    'nvl(SEKTOR_NEREZIDENTA,1) = nvl(nvl(''' || :P7_X_SEKTOR_NEREZIDENTA || '''' || ',SEKTOR_NEREZIDENTA),1) and' ||
    'nvl(VRSTA_POVEZANOSTI,1) = nvl(nvl(''' || :P7_X_VRSTA_POVEZANOSTI || '''' || ',VRSTA_POVEZANOSTI),1) and' ||
    'nvl(INSTRUMENT,1) = nvl(nvl(''' || :P7_X_INSTRUMENT || '''' || ',INSTRUMENT),1) and' ||
    'nvl(VALUTA,1) = nvl(nvl(''' || :P7_X_VALUTA || '''' || ',VALUTA),1) and' ||
    'nvl(OTKAZNI_ROK,1) = nvl(nvl(''' || :P7_X_OTKAZNI_ROK || '''' || ',OTKAZNI_ROK),1) and' ||
    'nvl(IZVORNO_DOSPIJECE,1) = nvl(nvl(''' || :P7_X_IZVORNO_DOSPIJECE || '''' || ',IZVORNO_DOSPIJECE),1) and' ||
    'nvl(VRSTA_INDEKSACIJE,1) = nvl(nvl(''' || :P7_X_VRSTA_INDEKSACIJE || '''' || ',VRSTA_INDEKSACIJE),1) and' ||
    'nvl(VALUTA_INDEKSACIJE,1) = nvl(nvl(''' || :P7_X_VALUTA_INDEKSACIJE || '''' || ',VALUTA_INDEKSACIJE),1) and' ||
    'nvl(PORTFELJ,1) = nvl(nvl(''' || :P7_X_PORTFELJ || '''' || ',PORTFELJ),1) and' ||
    'nvl(UTRZIVOST_KREDITA,1) = nvl(nvl(''' || :P7_X_UTRZIVOST_KREDITA || '''' || ',UTRZIVOST_KREDITA),1) and' ||
    'nvl(ZNACAJKE_KAPITALA,1) = nvl(nvl(''' || :P7_X_ZNACAJKE_KAPITALA || '''' || ',ZNACAJKE_KAPITALA),1) and' ||
    'nvl(RIZICNA_SKUPINA,1) = nvl(nvl(''' || :P7_X_RIZICNA_SKUPINA || '''' || ',RIZICNA_SKUPINA),1) and' ||
    'nvl(UGRADJENI_DERIVAT,1) = nvl(nvl(''' || :P7_X_UGRADJENI_DERIVAT || '''' || ',UGRADJENI_DERIVAT),1) and' ||
    'nvl(ODNOSNA_VARIJABLA,1) = nvl(nvl(''' || :P7_X_ODNOSNA_VARIJABLA || '''' || ',ODNOSNA_VARIJABLA),1) and' ||
    'nvl(PREDZNAK,1) = nvl(nvl(''' || :P7_X_PREDZNAK || '''' || ',PREDZNAK),1) and' ||
    'nvl(VRSTA_IZNOSA,1) = nvl(nvl(''' || :P7_X_VRSTA_IZNOSA || '''' || ',VRSTA_IZNOSA),1) and' ||
    'nvl(KOMITENT_PBR,1) = nvl(nvl(''' || :P7_X_KOMITENT_PBR || '''' || ',KOMITENT_PBR),1) and' ||
    'nvl(UDJELI_POVEZ_C,1) = nvl(nvl(''' || :P7_X_UDJELI_POVEZ_C || '''' || ',UDJELI_POVEZ_C),1) and' ||
    'nvl(AR_ID,1) = nvl(nvl(''' || :P7_X_AR_ID || '''' || ',AR_ID),1) and' ||
    'nvl(AU_ID,1) = nvl(nvl(''' || :P7_X_AU_ID || '''' || ',AU_ID),1) and' ||
    'nvl(AR_BUSS_ID,1) = nvl(nvl(''' || :P7_X_AR_BUSS_ID || '''' || ',AR_BUSS_ID),1) and' ||
    'nvl(MTI_CCY_TP_ID,1) = nvl(nvl(''' || :P7_X_MTI_CCY_TP_ID || '''' || ',MTI_CCY_TP_ID),1) and' ||
    'nvl(REG_NO,1) = nvl(nvl(''' || :P7_X_REG_NO || '''' || ',REG_NO),1) and' ||
    'nvl(REG_SFX,1) = nvl(nvl(''' || :P7_X_REG_SFX || '''' || ',REG_SFX),1) and' ||
    'nvl(JMBG_ID_NO,1) = nvl(nvl(''' || :P7_X_JMBG_ID_NO || '''' || ',JMBG_ID_NO),1) and' ||
    'nvl(IP_ID,1) = nvl(nvl(''' || :P7_X_IP_ID || '''' || ',IP_ID),1) and' ||
    'nvl(TAX_ID_NO,1) = nvl(nvl(''' || :P7_X_TAX_ID_NO || '''' || ',TAX_ID_NO),1) and' ||
    'nvl(INSTRUMENT_OLD,1) = nvl(nvl(''' || :P7_X_INSTRUMENT_OLD || '''' || ',INSTRUMENT_OLD),1) and' ||
    'nvl(PREDZNAK_OLD,1) = nvl(nvl(''' || :P7_X_PREDZNAK_OLD || '''' || ',PREDZNAK_OLD),1) and' ||
    'nvl(NAPOMENA,1) = nvl(nvl(''' || :P7_X_NAPOMENA || '''' || ',NAPOMENA),1) and' ||
    'nvl(NOVI_POSAO_F,1) = nvl(nvl(''' || :P7_X_NOVI_POSAO_F || '''' || ',NOVI_POSAO_F),1) and' ||
    'nvl(LISTA_SUMARNA,1) = nvl(nvl(''' || :P7_X_LISTA_SUMARNA || '''' || ',LISTA_SUMARNA),1) and' ||
    'nvl(LISTA_REKAP,1) = nvl(nvl(''' || :P7_X_LISTA_REKAP || '''' || ',LISTA_REKAP),1) and' ||
    'nvl(DZS_IDY_CL_ID,1) = nvl(nvl(''' || :P7_X_DZS_IDY_CL_ID || '''' || ',DZS_IDY_CL_ID),1) and' ||
    'nvl(HNB_IP_CL_ID,1) = nvl(nvl(''' || :P7_X_HNB_IP_CL_ID || '''' || ',HNB_IP_CL_ID),1) and' ||
    'nvl(NO_DYS_OO,1) = nvl(nvl(''' || :P7_X_NO_DYS_OO || '''' || ',NO_DYS_OO),1) and' ||
    'nvl(POSTOTAK1,1) = nvl(nvl(''' || :P7_X_POSTOTAK1 || '''' || ',POSTOTAK1),1) and' ||
    'nvl(POSTOTAK2,1) = nvl(nvl(''' || :P7_X_POSTOTAK2 || '''' || ',POSTOTAK2),1) and' ||
    'nvl(POSTOTAK3,1) = nvl(nvl(''' || :P7_X_POSTOTAK3 || '''' || ',POSTOTAK3),1) and' ||
    'nvl(BNK_ID,1) = nvl(nvl(''' || :P7_X_BNK_ID || '''' || ',BNK_ID),1) and'||
    'nvl(ID,1) = nvl(nvl(''' || :P7_X_ID || '''' || ',ID),1) and' ||
    'nvl(ID_RETKA,1) = nvl(nvl(''' || :P7_X_ID_RETKA || '''' || ',ID_RETKA),1) and' ||
    'nvl(DATUM_STANJA,1) = nvl(nvl(''' || :P7_X_DATUM_STANJA || '''' || ',DATUM_STANJA),1) and' ||
    'nvl(IZNOS,1) = nvl(nvl(''' || :P7_X_IZNOS || '''' || ',IZNOS),1) and' ||
    'nvl(IZNOS_ACTUAL,1) = nvl(nvl(''' || :P7_X_IZNOS_ACTUAL || '''' || ',IZNOS_ACTUAL),1) and' ||
    'nvl(ACT_AR_BAL_KN,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL_KN || '''' || ',ACT_AR_BAL_KN),1) and' ||
    'nvl(ACT_AR_BAL,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL|| '''' || ',ACT_AR_BAL),1) and' ||
    'nvl(IZNOS_ACTUAL_OLD,1) = nvl(nvl(''' || :P7_X_IZNOS_ACTUAL_OLD || '''' || ',IZNOS_ACTUAL_OLD),1) and' ||
    'nvl(ACT_AR_BAL_KN_OLD,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL_KN_OLD || '''' || ',ACT_AR_BAL_KN_OLD),1) and' ||
    'nvl(ACT_AR_BAL_OLD,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL_OLD || '''' || ',ACT_AR_BAL_OLD),1) and' ||
    'nvl(EXG_RT_CRD_RSK_F,1) = nvl(nvl(''' || :P7_X_EXG_RT_CRD_RSK_F || '''' || ',EXG_RT_CRD_RSK_F),1) ';
    execute immediate l_sql_stmt; 
    end;

  • Dynamic sizing of a component to fit the content

    Hi All,
    How can I make my component so that it will be dynamically sized to fit the content height?  I would like to create a component that will have a variable height.  It has a serious of user input controls.  Depending on the answers given, more input from the user may be necessary--specifically, they will have to provide an explanation in a textbox.
    So, my thinking is that I don't want to display the textbox unless they answer "yes" to any questions that require additional explanation.  If they do, then I want display the TextArea control along with instructions to enter an additional explanation here.
    However, when I do that, it will cause my component's height to grow.  I don't want to reserve space for that textbox in the component's dimensions--I would prefer it simply grow (pushing anything below it further down) if and when the textbox appears.
    How would I go about doing this?
      -Josh

    I think the standard JSF solution would be not to do the create/delete of inputs on the client side, but to do it on the server side.
    If that is not your cup of tea, I think that the standard components will not be sufficient. So you are looking at either not binding the inputs to a component and just getting the values via the request parameters or creating a custom component capable of dealing with this.

  • Creating a Function logic for dynamically created XML buttons

    Hi!
    It's me...... again! Now I've dynamically created some buttons using XML. They're spread around the stage and I've modified a tooltip script to give each button a tooltip on Mouse_Over. But to se the logic and make it work using AS3 is hard (for me). I want a function that accept to parameters: Tooltip text and  Object to tooltip.
    In my code I get this error msg when initiating the function on dynamically created buttons:
    1118: Implicit coercion of a value with static type flash.display:Sprite to a possibly unrelated type flash.display:MovieClip.
    I beleive there are more than one thing here needing a fix.
    Can someone have a look and give me a pointer?
    Thanks
    function contentTooltip(ttt:String, ttclip:MovieClip):void {
        ttclip.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
        function mouseOverHandler(e:MouseEvent):void {
            ttip.descr.text=ttt;
            ttip.x=stage.mouseX;
            ttip.y=stage.mouseY-15;
            ttclip.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
            ttclip.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
            ttip.visible = true;
        function mouseOutHandler(e:MouseEvent):void {
            ttip.visible = false;
            ttclip.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
            ttclip.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
        function mouseMoveHandler(e:MouseEvent):void {
            ttip.x=stage.mouseX;
            ttip.y=stage.mouseY-15;
    contentTooltip("Scale button",scale_btn);
    contentTooltip("Hide button",hide_btn);

    I totally agree with what Ned says and suggests. Nevertheless, I would like to support your thinking process.
    From the way you wrote the tooltip functionality it is apparent to me that you conceptualize as a programmer. Again, as Ned said, nested functions are evil. BUT, in a way, what classes accomplish is encapsulation/nesting of properties and functions under the same umbrella. It actually feels that what timeline does in general is nesting named functions within a single function we have no access to.
    How you wrote the code is actually a blueprint for a class that could handle the functionality. You, perhaps, are very ready to start coding with classes - not on the timeline.
    With that said, for the sake of theory, here is how your functionality can be rewritten on timeline:
    scale_btn.toolTip = "Scale button";
    test_btn.toolTip = "Test button";
    hide_btn.toolTip = "Hide button";
    scale_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    test_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    hide_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    var overTarget:MovieClip;
    function mouseOverHandler(e:MouseEvent):void {
         overTarget = e.currentTarget;
         ttip.descr.text = overTarget.toolTip;
         ttip.x = stage.mouseX;
         ttip.y = stage.mouseY - 15;
         overTarget.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
         overTarget.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
         setChildIndex(ttip, numChildren - 1);
         ttip.visible = true;
    function mouseOutHandler(e:MouseEvent):void {
         ttip.visible = false;
         overTarget.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
         overTarget.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); 
    function mouseMoveHandler(e:MouseEvent):void {
         TweenMax.to(ttip, .5, { x:stage.mouseX, ease:Quart.easeOut } );
         TweenMax.to(ttip, .5, { y:stage.mouseY - ttclip.height / 2, ease:Quart.easeOut } );
         //ttip.x=stage.mouseX;
         //ttip.y=stage.mouseY-ttclip.height/2;

  • Creating dynamic sized arrays and filling them automatically on speedy 33

    hi all,
    I am trying to create dynamic sized arrays on Speedy-33. Specifically, depending on the user input, I want to be able to create
    arrays with 128 or 256 elements and fill them automatically. However,
    array constant element is fixed for Speedy 33; thus I have to manually set the
    size of the array with the mouse and enter the values in to the array by
    myself. I want to make this tedious process automatic. Would this be possible? thanks so much for comments!
    ~casiopea

    Casiopea,
    There is a really great article on using arrays with LabVIEW DSC which can be found here:
    How Can I Be Successful With Arrays In the LabVIEW DSP Module?
    One of the biggest things that should be noted about DSP is that there is no dynamic memory allocation.  Your array size must be fixed, and thus, your array needs to be initialized by using a constant. 
    An easy way to initialize an array constant that has many elements that are all the same is to simply create a numeric constant that has the value that you want.  Then, create a new blank array constant and drag the numeric into it.  In the index input for the array constant, type in the index of the last element that you want to be initialized.  Then type in the value in the element that is displayed and all of the elements before it will be initialized to the default value of the numeric constant that you dropped into the array constant.  I hope this helps.  I would really recommend reading through that article, as it has a lot of great information about using arrays with DSC.
    Brian Coalson
    Software Engineer
    National Instruments

  • Dynamic Creation of Buttons and Actions HELP

    Hi there,
    I have got a problem (or maybe even two) with the dynamic Creation of buttons. The code below creates the buttons.
    My main problem is, that the parameter created for the button's action isn't propagated to the assigned event handler. I get a null, though the name of the parameter in the event handler and the name of the parameter added to the action are the same.
    Could it also be that I'm always using the same action? I.e. does wdThis.wdGetAddElementAction() always return the same action instance? If yes, how can I create individual actions for each button?
    Any help is appreciated!
    Cheers,
    Heiko
    "    for(int i=rootContainer.getChildren().length; i<wdContext.nodeFeature().size();i++)
                   IPrivateVCT_Feature.IFeatureElement featureElement = wdContext.nodeFeature().getFeatureElementAt(i);
                   IWDTray featureTray = (IWDTray) view.createElement(IWDTray.class, featureElement.getName());
                   IWDCaption header = (IWDCaption) view.createElement(IWDCaption.class, featureElement.getName()+"_Header");
                   header.setText(featureElement.getName());
                   featureTray.setHeader(header);
                   featureTray.setExpanded(false);
                   rootContainer.addChild(featureTray);
                   IWDButton button = (IWDButton) view.createElement(IWDButton.class, featureElement.getName()+"_Button_AddElement");
                   IWDAction actionAddElement = wdThis.wdGetAddElementAction();
                   actionAddElement.getActionParameters().addParameter("featureIndex", new Integer(i).toString());
                   button.setOnAction(actionAddElement);
                   button.setText("Add Element");
                   featureTray.addChild(button);

    Hi Heiko,
    You have done everything correctly....except for 1 line
    in the code...
    Replace the following line in your code:
    actionAddElement.getActionParameters().addParameter("featureIndex", new Integer(i).toString());
    Replace the above line with this code:
    button.mappingOfOnAction().addParameter("featureIndex",i);
    Actually in your code, you are not associating the parameter with the button...
    Note that addParameter(...) comes with two signatures: addParameter(String param, String value) and addParameter(String param, int value). You can use any of them based on yuor need.
    Hope it helps,
    Thanks and Regards,
    Vishnu Prasad Hegde

  • How to call a dynamic URL on 'button press' event, in MVC-based BSP

    Hi,
    My requirement is as below:
    On selecting a row in table view, and pressing a button, I need to open a browser.
    The Browser URL depends on the row selected.
    The key field from table view, is added at the end of the URL string.
    Shortly, I can say that, I am getting a value on row selection & want to pass it to button event.
    In Views Section, there are 2 tags- (1)table view & (2)button.
    Right now, I have put the code for getting the key field, in DO_HANDLE_DATA method.
    In Button's OnClientClick method, I have called the Javascript to open the browser.
    If I now write the code to concatenate the key field value to form the dynamic URL in 'OnClick' method,
    it will be called only after the browser is opened.
    (as OnClick event is executed only after OnClientClick event is executed)
    Could anyone please tell me what event (and in which tag) can be used to solve this.
    Is there any event which is triggered, as soon as the row is selected, &  before the button press event is triggered ?
    Would really appreciate responses made to this query.
    Thanks,
    Nisha Vengal.

    Hi Nisha,
    The crux of your issue here is that you want to call the event triggered with onClick before calling the event triggered on onClientClick. This can be achieved by the following code in the function called on the onClientClick.
    function fn_button()
               htmlbSL(this,2,'b_row_selection:onInputProcessing()');
               window.open("new_page",target="BLANK");
    Here, fn_button is the javascript function called on button click, and b_row_selection is the event triggered on the onClick event of row selection.
    Try this out and let us know if it works for you.
    Regards,
    Saurabh

  • Dynamic action on button click

    Hi:
    I need some help.
    I am trying to create a dynamic action on the click of a specific button.
    I have set the Event to 'click" and the Selection Type to "DOM Object", but I do not know how to reference the button. I am using a standard template button and #BUTTON_ATTRIBUTES# is not included in the template - I am not sure how to include it in order to be able to specify an id for the button.
    Can someone give me some guidance on the steps I msut take to implement a dynamic action on the click of a button.
    Thanks.
    Bruce

    Bruce,
    edit your button template and add #BUTTON_ATTRIBUTES# to the button-tag of your button
    e.g.
    <button value="#LABEL#" onclick="#LINK#" class="button-gray" type="button" #BUTTON_ATTRIBUTES#>
    <span>#LABEL#</span>
    </button>
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • CRM5.2 UI-Call a dynamic URL on button click

    Hi all, 
               My requirement is to call a dynamic url on the click of a button in the overview page. I have added a custom button in  the method  IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS , and the related code in do_handle_event.I have created a custom method for the button event. I have enhanced a custom controller and created an attribute.In the custom method created for the button event, I have written the code for retrieving the parameters to be passed to the url.
    In the layout of the view associated with the display view , I have written the following code for calling the URL in a new window.
    <%
    DATA: lr_cuco_EMA TYPE REF TO ZL_BP_CONT_BPCONT_IMPL,
          lv_url TYPE string,
          lv_url1 type string,
          lv_count type i.
      lr_cuco_EMA ?= controller->get_custom_controller( 'ZBP_CONT/BPCONT' ).
      check lr_cuco_EMA is bound.
      if lr_cuco_EMA->gv_VALUE is not initial.
      if lr_cuco_EMA->gv_COUNT IS NOT INITIAL.
      clear lr_cuco_EMA->gv_COUNT.
      endif.
      LV_URL = lr_cuco_EMA->gv_VALUE.
      Concatenate 'http:/' LV_URL  into LV_URL1.
      Concatenate '"http:/' LV_URL '"' into LV_URL.
        lv_count = lr_cuco_EMA->gv_COUNT mod '2'.
        if lv_count Ne 0.
      lv_url = lv_url1.
    endif.
      %>
         <scrpt language="Javascript">
            window.open(<%= lv_url%>).focus();
          </script>
       <%
             lr_cuco_EMA->gv_COUNT = lr_cuco_EMA->gv_COUNT + 1.
             clear lr_cuco_EMA->gv_value.
             clear lv_count.
             clear lv_url.
             clear lv_url1.
             ENDIF.
    %>
    But here my URl is getting called alternate times.If I do not write the code  by using the variable GV_COUNT the url is getting called only the first time of the button click  and to call the URL again you need to navigate back to the search page and again back to the overview page and click on the button.
    Can anyone help me regarding this? I want the URL to be called in a new page on every button click.
    Thanks in Advance,
    Chandana

    Hi Nisha,
    The crux of your issue here is that you want to call the event triggered with onClick before calling the event triggered on onClientClick. This can be achieved by the following code in the function called on the onClientClick.
    function fn_button()
               htmlbSL(this,2,'b_row_selection:onInputProcessing()');
               window.open("new_page",target="BLANK");
    Here, fn_button is the javascript function called on button click, and b_row_selection is the event triggered on the onClick event of row selection.
    Try this out and let us know if it works for you.
    Regards,
    Saurabh

  • Dynamic text in buttons : instance name goes "instanceX"

    Hi,
    Another weird one (for me at least !)
    I've added a dynamic text to a button and named it, say,
    myTxt.
    If I put this button on stage as a movieclip I can target
    text as
    :_level0.btn1.myTxt
    If I put the button on stage as the button it really is,
    debugger tells
    me text instance is now : _level0.btn1.instance1
    Why ?
    Thanks in advance.
    PJ

    because buttons aren't movieclips and don't have timelines.
    so you can't reference items on, what appears to be a button
    timeline, with normal dot notation.
    the only real mystery is why flash allows you to apply an
    instance name to an object on that button's pseudo timeline.

  • Assign values dynamically to radio button

    I am creating an online test. I will need to display answer choices from the table. I created radio buttons for these answer choices and I could put the labels dynamically by using      
    Set_Radio_Button_Property('block_name.radio_group_name', 'radio_button1',LABEL,cursor_name.field_name);
    Now I have problem to set radio button values dynamically. Should I use when_radio_changed event?
    Any help would be appreciated.

    I really appreciate your help.
    My intention is to display the test on the screen.
    That means I need to display all questions and answer
    choices for each one dynamically. Based on the answer
    choice type (radio button or checkbox or drop down
    etc) I will need to assign the values to them and
    display on the screen. So far I could display
    questions and answer choices on the screen and set
    the label property for each radio button.
    Do you know what is the syntax to assign value to
    each radio button? First I will need to store user's
    answers in a table. For that I need to know what
    answer they selected. I wasn't sure how to do that.
    ThanksAs I said, the values cannot be assigned dynamically. Thus you will store the answers in code (perhaps in an array?) and your radio buttons will be 1,2,3,4 etc.
    In WHEN-RADIO-CHANGED you can retrieve the value from the array using the radio button value. Then store that value.
    e.g. Your screen shows
    What is the sound of one hand clapping?
    o Blue
    o Yes
    o 12
    These labels will be set dynamically, but the values for the radio buttons will be 1,2,3. If they pick "Yes", your radio button will be 2. You then get the value you really want from answer_array(2), where you put it when you retrieved the question details. Then you insert that into your users_answers table.

  • Dynamic sizing of Column Width

    Is there a way that the table columns can be dynamically adjusted widthwise in an RTF template ? I do not want my $Total to wrap around.

    Try doing the calcualations in-line. getButtonWidth() is a
    function, and thus hard to bind to.
    <mx:Button id="submitButton" label="SQL"
    width="{15/100*summaryPanel.width}" textAlign="center"/>
    Since summaryPanel.width is reference directly in the
    binding, the compiler will automatically adjust the button's width
    for you whenever summaryPanel's width changes.

  • Dynamic  text to button

    i am loading the contents to a dynamic textbox using the xml
    . I want the each line in the textbox to be acting as buttons ( or
    even movieclip) so the i can give the onRelease event for each..
    Does anyone knows how to do it ?

    Ok, here is the code.
    /*below loads the document home.txt into the dynamic text box
    content_txt when the movie starts*/
    var home_req:URLRequest = new URLRequest("home.txt");
    var home_ldr:URLLoader = new URLLoader(home_req);
    home_ldr.addEventListener(Event.COMPLETE, onComplete);
    function onComplete(event:Event):void
    content_txt.text = event.target.data;
    /*below starts the default email app when the contact button
    is clicked*/
    var contact_req:URLRequest = new
    URLRequest("mailto:[email protected]");
    function contact(event:MouseEvent):void
    navigateToURL(contact_req, "_blank");
    contact_btn.addEventListener(MouseEvent.CLICK, contact);
    /*The below doesn't work*/
    function goHome(event:MouseEvent):void
    var home_req:URLRequest = new URLRequest("home.txt");
    var home_ldr:URLLoader = new URLLoader(home_req);
    content_txt.text = event.target.data;
    home.addEventListener(MouseEvent.CLICK, goHome);
    Thanks in advance

  • Dynamic stylename for button

    Hi. I'm using a button in an itemrenderer (bound with xml).
    I'm looking to set the stylename of the button dynamically using a
    field in the XML.
    I can easily do this with the label e.g.
    label="{data.data.@prop}" but when I try
    styleName="{data.data.@cls}" it doesn't work. I've also tried
    creating an initialize event in the hope of setting this property
    in code. But I'm not sure how to access the data item from the
    code.
    Please help! :)

    styleName is a style, so use setStyle() in code.
    I think you will need to override set data(). You can use
    setStyle in that function, but it is inefficient, especailly with
    setStyle. Better practice is to store the value in set data(), call
    invalidateProperties(), then set the ui in commitProperties().
    Tracy

  • Designer 8.2.1 - dynamic form - add button -

    Cannot get dynamic form to add additional lines as needed.
    Created simple dynamic form with "Add Item Button" designed to add an item line. Item line only has one text field. Used the "instanceManager.addInstance(1);" javascript line for the button.
    Form Properties have the following items:
    Preview type: interactive form
    Preview adobe xml form as: Dynamic xml form
    The Hierarchy pallette shows:
    form1
    (Master Pages)
    page1
    (untitled Content Area)
    rootSubForm
    Button1
    detail (subform)
    TextField1
    Referenced Objects
    rootSubForm Object Items:
    Subform:
    Content: Flowed
    Flow Direction: Top to Bottom
    Allow Page Breaks within Content
    Presence: Visible
    Pagination:
    Place: Following Previous
    After: Continue Filling Parent
    Binding:
    Default Binding: Normal
    Button1
    JavaScript language:
    form1.rootSubForm.Button1::click - (JavaScript, client)
    _detail.addInstance(1);
    detail:
    Subform:
    Content: Positioned
    Allow Page Breaks within Content - Checked
    Presence: Visible
    Pagination:
    Place: Following Previous
    After: Continue Filling Parent
    TextField1:
    Field:
    Type Text Field
    Allow Page Breaks within Content - Checked
    Field Format: Plain Text Only
    Binding:
    Default Binding - Normal
    It simply doesn't work. When I click the Button, it does not add an additional line.
    There was some trouble with the initial installation of Acrobat 9 Pro Extended, requiring assistance from technical support. I don't know if I am having continuing installation/operations problems or if it is programmer error.
    I have been told by Adobe Technical Support that they "don't"/"won't" support javascript issues, so I am left on my own to determine the issue. Any help would be appreciated.

    I should also mention that I can call up the sample forms provided by the program and those samples work, but as I try to create a form from the beginning, it does not work.

Maybe you are looking for

  • [SOLVED] Changed an option in /etc/updatedb.conf

    Hello all, I started using locate to search my files. However, it never showed files in my /home directory which is, obviously, the directory I search most. Running updatedb --debug-pruning I found out that it didn't add /home to the database because

  • Information on : MMS in EU

    If you can not send MMS +(Even when you have activated the mms in the settings of your iPhone)+ the problem lies with your mobile carrier in EU. Until T-Mobile, Orange, A1 and co have done their work, you may help your self here: For iPhone users in

  • Sorting Albums

    When sorting albums by a particular artist in a playlist, I would sort them by date and then by rating(stars). This was the only way I could have the albums listed in the order they were released, especially when there are more than one in any partic

  • Best (or best for me) email client

    I've just started using my new MacBook Pro with OS 10.4, graduating from a PB G4. And I'm looking for guidance on the best email client to use with it. I abandoned Mail ages ago, because it didn't handle HTML - has that changed?* I abandoned Entourag

  • MBP Reina Kernal Panics

    My laptop keeps crashing. Most of the time over night or at some point wile lid is closed not being used. here is one of the reports Interval Since Last Panic Report:  1306537 sec Panics Since Last Report:          9 Anonymous UUID: D4588A0D-7B9C-D68