How to remove ButtonField when the user has clicked and it is in HorizontalFieldmanager...

Hello
My screen I have the list of data and at the end I buttons when I click the button, the data should remain and should be deleted. My screen I have a VerticalFieldManager and given I have place in HorizontalFieldManager and I added the button horizontalFieldmanager.even I place in HorizontalFieldmanager... to be more detailed, I see: -.

class Page extends Screen
    {
        LabelField name,namevalue,Phone,phoneNumber;
        ButtonField btn;

        Page()
        {
                          super(new VerticalFieldManager(),NO_VERTICAL_SCROLL);

                VerticalFieldManager vfm_Data = new VerticalFieldManager(Field.USE_ALL_WIDTH | VerticalFieldManager.VERTICAL_SCROLL | VerticalFieldManager.VERTICAL_SCROLLBAR);

                                     HorizontalFieldManager hfm_name = new HorizontalFieldManager();
                 name = new LabelField("Name     :     ");
                 hfm_name.add(name);

                                     namevalue = new LabelField("Jackey");
                 hfm_name(namevalue);
                           vfm_Data.add(hfm_name);          

                            HorizontalFieldManager hfm_phone = new HorizontalFieldManager();
                 Phone = new LabelField("Contact Number     :     ");
                 hfm_phone.add(name);

                                     phoneNumbere = new LabelField("123456");
                 hfm_phone(phoneNumber);
                            vfm_Data.add(hfm_phone);

               //Like above HorizontalFieldManager i have 10 more say HorizontalFieldManager with Data and value and i have added all the HorizontalField Manager to VericalFieldManager vfm_Data....and i have a button in the end :

            HorizontalFieldManager hfm_button= new HorizontalFieldManager();
            btn = new ButtonField("Accepted");
            hfm_button.add(btn);
            vfm_Data.add(hfm_button);

            //and at i add the verticalField manager.

            add(vfm_data);

My requirement is now when I click on the button accept I want to delete field button that I do a delete (hfm_button);   , But it says an error "Attempt to delete a field that does not belong to the Manager."

Can you please tell me how to delete the field button when I click on the button accept...

First your VFM is named vfm_Data, and at the end your constructor you add a (nonexistent) value to the screen named vfm_data.

Have you tried vfm_Data.delete (hfm_button)?

Tags: BlackBerry Developers

Similar Questions

  • Detect when the user has clicked on the Reset setting

    I'll put the PF_ParamFlag_SUPERVISE indicator for my slider like this:

    PF_ADD_FLOAT_SLIDERX ("MySlider", 0, 0, 256, 256, 123, PF_Precision_INTEGER, PF_ValueDisplayFlag_NONE, PF_ParamFlag_SUPERVISE, MY_SLIDER_DISK_ID);


    I get the PF_Cmd_USER_CHANGED_PARAM command when I change the value of the slider (1 case). I also get the command when I hit the "Reset settings" button on the right (case 2) in the effect controls panel.

    Is there a way I can distinguish 2 cases 1 case? I need to take additional steps to 2 cases, but PF_UserChangedParamExtra contains only the param_index.


    Thank you very much

    Hi tashi.maya,

    Unfortunately, there is no specific API that distinguishes a reset a parameter change.

  • Problems with the opening of attachments when the user has restristed privilege to run executable code from Program Files and Windows folders.

    I'm trying to prevent users from running potentially dangerous files. According to the Windows policies so I put. Users can run any application Program Files, files (x 86), windows, and folder to all users of the program office. Users have no permission to write anything in this files. When the user double clicks for example document.doc on his desk - document opens fine with MS Word. But when the user tries to open this document in attachment directly (by selecting open with MS Word, instead of the economy) - he sees an error - "this action is limited by local politics. Ask your system administrator. "(not exact text).

     So I want, users able to open attachments from Thunderbird automatically, but not able to run any application or link, except Program Files, Program Files (x86), Windows and all users' desktop folder. How can I get this result?
    

    Thanks in advance.
    Calvo is serious.

    PS Sorry for my bad English. It is not my mother tongue.

    Thanks for responding.
    I discovered what was going on.
    This strange "bug" affects multiple computers with Windows 7 Ultimate in my case.
    When you create a SRP (software restriction policies) it creates two rules by default to run programs: windows folder and the Program Files folder. I manually add "C:\Program Files (x 86)" in places without restriction. BUT Windows and Program Files folder to default rules directly, but through registry keys. And this part seems difficult. You CAN run the executable files of Program Files. You CAN run the Program Files (x 86) executables. But if Thunderbird or Firefox try to run MS Word or excel or editor for.doc or *.odt opening or another file - downloaded files running programs blocked by SRP.
    In order to fix this, simply replace the rules for indirect paths like % HKLM/software/microsoft/windows... etc % with direct, for example "C:/Windows" and "C:/Program Files /". After that, everything works fine. Attachments and downloaded files automatically opens without a problem.

  • Windows 7 ultimate has received 29 updates today, now when the user icon, click on do not see the field of password for sign on

    Windows 7 ultimate has received 29 updates today, now when the user icon, click on do not see the field of password for sign on

    Hi Richard,

    Thanks for posting your query on the Microsoft Community.

    Thank you for details on the issue and we are happy to help you.

    I suggest to refer to the following article from Microsoft regarding Solutions to problems with the Windows logon and check if it helps.

    http://Windows.Microsoft.com/en-us/Windows7/solutions-to-common-problems-with-logging-on-to-Windows

    Please let us know if you need help with Windows. We are happy to help you.

    Thank you.

  • Integration of BBM to update status when the user has not created BBM

    Hello

    We have integrated the update of the status of BBM in our application.

    When the user opens the application they are requested permission to allow the application to access the BBM.

    Then, there is an alert message which says that BBM implemented is necessary to connect to the app with options to cancel or continue.

    If a user cancels out of the aler, they can always proceed through the app, but when they get to the point where they can hit a link to update their status, that nothing is happening.

    I want to know how to do is that if somebody hits cancel rather than implementation of surveys BBM can we set a flag to hide the update status BBM feature?

    Seems a bit odd to require someone to set up BBM but let them still cancel and run the application.  Aware that this should be handled but don't know where to do

    BBM must be installed before an application can complete the BBM registration process.  If they cancelled out of this process, you will get a value of successful registration.  You must activate the features BBM of your application after a successful registration.

    We still allow the user to run the application, because they may not want to configure BBM, but continue to use the application.

  • How to trigger DA when the user clicks a button close the standard window

    Hello!

    Apex 5.0 & universal theme.

    I want to trigger some DA when the user clicks on the button indicated to my image (button close the standard window). In fact, I would like to pass a value of my hidden form IR back and refresh IR if value = 1 or don't refresh with another value.

    Is this possible?

    Thank you.

    close_form.png

    Hi Yava,

    Seems that you have chosen to add the event handler to the page parent (the one with the IR). I think it's best. This means that the code above does not apply.

    The dialogclose event and all other dialogue jQuery UI events are triggered in the dialog box to create a DA pull on the IR will not work (because the dialog box is outside the IRR while she bubbles it won't go through the SORTING). You must handle the event on the body. This works because the event propagates to the body. Set the Type to choose to be "jQuery Selector". JQuery Selector enter 'body' (without the quotes). The event you want to handle is a custom, event which means that this isn't one of those in the select list. For event, choose "Custom". Then enter Custom Event "dialogclose" (without the quotes). Now you have a DA who fires when * all * dialog closes. You may or may not need to get more selective than that. For action, you can use refresh as you do already.

    Kind regards

    -John

  • How do I know the user has clicked the exclusion one item (datagrid) to deselect the item (datagrid) in as3?

    I am new to as3 and want to make some invisible items when the user clicks on the stage outside the data grid. I know it is simple but is not able to understand the exact EVENTlistener to use. Stadium. AddEventListener (MouseEvent:CLICK...) or datagrid. AddEventListener(Event:EXIT_FRAME) aren't helping... pointers?

    if(e.Target == stage) {}

    Insert your code here

    }

  • Question about variables and actions put forward in CP7 - display button once the user has clicked on many areas of click

    Hi all

    Can't seem to understand this one. I had assumed it should be fairly easy, but not... I'm quite inexperienced with variables so, maybe someone could help?

    Basically, the case is quite simple: I want a next button to be invisible until a user has clicked on several areas of click on a slide. Each box click click should disclose additional information on a topic. When all topics have been read, I want the nest button to appear.

    Any suggestions on how I could do it with as little effort as possible? Maybe I don't even have to use variables?

    Help much appreciated!

    Rgds,

    Casper

    Here's a forum thread where I introduced myself as a combination of two decisions:

    Re: Can I use conditional and advanced actions on the same button?

    An old article in which I have explained how to combine a standard action with a conditional: combining conditional in a fast action and standard

    Slightly different, because there is a sequence (which is not the case for you) and so that a variable is required: Blog after Posterous? - ClickClick - Captivate blog

    Learn more about the possible events to trigger actions: http://blog.lilybiri.com/events-and-advanced-actions

    Lilybiri

  • Procedure for the number of working days per month when the user enters to and from everyday

    Hi all

    Can provide you a solution to this - procedure for the number of working days per month when the user enters and days.

    Suppose that the user enters November 18, 2014 start date and date as November 23, 2014.

    The output should display

    Count: 4

    November 18, 2014 Mar

    Sea 19 November 2014

    November 20, 2014 game

    Fri November 21, 2014

    It will exclude Saturday and Sunday.

    Hello

    Here is an example of removing dates Saturday and Sunday:

    with days as(
         select (trunc(sysdate, 'YEAR') + level) as col from dual
         connect by level < 365
    )
    select * from days
    where trim(to_char(col, 'DAY', 'NLS_DATE_LANGUAGE=ENGLISH')) not in ('SATURDAY', 'SUNDAY')
          and col between to_date('18.11.2014', 'DD.MM.YYYY') and to_date('30.11.2014', 'DD.MM.YYYY')
    order by col;
    

    Cheerz,

    Stako

  • (Click two boxes) Text caption of failure that appears when the user double-clicks

    Hello

    I have two boxes a slide is clicked > the first click box is a simple click and the failure text caption is enabled > the second click box is a double click action, and the legend of the failure is not enabled.

    When a user double-clicks on the second, click on the box that the legend of the failure is displayed from the first caption text.  I'm cpatibvate is picking up the second click of the double click and so incorrect display in the first legend.

    Is there a way around this problem?  ISome contribution to this issue would be greatly appreciated:

    Double click problem.JPG

    Clickboxes are set up so that if you have the legends of failure turned on, then a click outside the click box triggers the failure criteria.  So if you have two of them on the same slide, each will be considered a failure if you click on it.

    Buttons work a little differently, then you can try to use the transparent buttons instead.

    Another alternative is to use the widget event handler, which allows to implement various widgets to listen to different mouse events.  The beauty of these widgets is that you have much more control over the criteria of rupture because you can specify events of different mouse for the success and failure on each of them.

    Find out here: http://www.infosemantics.com.au/eventhandler

  • How to raise an event when the user have clicked all the buttons (in random order)?

    Greetings,

    I want to trigger an event (frame 2 goto and stop) after all my 3 user buttons were clicked in no particular order.

    I have 3 buttons on the stage, image1. (instence names: MCBlue, MCRed, MCYellow)

    How can I write my code?

    Here's what I have, but it does not at all. I'm so confused.

    I thank very you much for your time.

    [code]:

    import flash.events.Event;
    import flash.events.MouseEvent; 
    
    stop();  
    
    MCRed.addEventListener(MouseEvent.CLICK,redReady);
    MCBlue.addEventListener(MouseEvent.CLICK,blueReady);
    MCYellow.addEventListener(MouseEvent.CLICK,yellowReady);
    
    function redReady(event:MouseEvent):void
    {
              MCRed.MouseEvent.CLICK();
    }
    
    function blueReady(event:MouseEvent):void
    {
              MCBlue.MouseEvent.CLICK();
    }
    
    
    function yellowReady(event:MouseEvent):void
    {
              MCBlue.MouseEvent.CLICK();
    }
    
    
    var buttons:Array = [redReady, blueReady, yellowReady];
    var sequence:Array = [];
    var correct:int;
    
    
    addEventListener(Event.ENTER_FRAME, gotoFrame);
    
    
    function gotoFrame(e:MouseEvent):void {
              if (buttons.indexOf(e.target) == sequence[correct]){
                        gotoAndStop(2);
              }
    }
    
    

    If the buttons are movieclip symbols, then a way to solve it would be to set a property of each button to be true, when everyone gets clicked and then have a function that you call who checks this property for all buttons.  When all the true test is when you switch to the 2 structure.  Something like...

    import flash.events.Event;
    import flash.events.MouseEvent;
    
    stop();  
    
    MCRed.addEventListener(MouseEvent.CLICK,redReady);
    MCBlue.addEventListener(MouseEvent.CLICK,blueReady);
    MCYellow.addEventListener(MouseEvent.CLICK,yellowReady);
    
    MCRed.clicked = false;
    MCBlue.clicked = false;
    MCYellow.clicked = false;
    
    function redReady(event:MouseEvent):void
    {
              MCRed.clicked = true;
              gotoFrame();
    
    }
    
    function blueReady(event:MouseEvent):void
    {
              MCBlue.clicked = true;
              gotoFrame();
    }
    
    function yellowReady(event:MouseEvent):void
    {
              MCYellow.clicked = true;
              gotoFrame();
    }
    
    function gotoFrame():void {
              if(MCRed.clicked && MCBlue.clicked && MCYellow.clicked){
                        gotoAndStop(2);
              }
    }
    
  • If I have two PCs used by my family, one user profile can be applied to more than one PC, followed by the cumulative on both computers use if the user has access and time restrictions?

    I wish that the user profile settings to apply to both Windows 8 computers.  Thus, if a sign of user in a PC for 2 hours and their allotted time has been used for the day, I want to assure that they are unable to connect to the other PC without asking for more time.  The same applies to time restricted access, Web sites, etc... Is this possible without two separate profiles, one on each PC?

    Hello

    Unfortunately, it is not possible to use a single user on multiple PC profile, but you can have the same set of parental controls for different user accounts.

    Multiple user accounts can have the same family safety settings.

    For information on how to set up parental control and more information about the safe keeping of children using the parental control, you can check the links below.

    Set up parental controls

    Keep your children safer on the PC

    Hope that the information provided is useful.

  • How to remove Photos from the iPhone/iPad/iCloud and no pictures

    How to take a photo with my iPhone/iPad, allow it to synchronize with Photos on my Mac via iCoud, then delete from my iPhone/iPad/iCloud and removes any Photos on Mac? I want to save the photo on your computer and save space on small devices?

    I keep seeing articles on the iCloud market turn but it seems the photos all return on the devices once restarted. I want to iCloud on use as a conduit to get the photos to my computer, not as a large storage space. I want the Photos app on my Mac where all the photos are filled and stored and choose those which is left each device.

    Right now they are all in the pictures on the Mac, but I'm worried if I remove it from my iPhone/iPad that they will disappear from Photos on the Mac. I don't understand the new Photos app with all the missing features of iPhoto.

    Thank you!

    You can not that's not how works iCloud photo library - it is not a conduit but a total synchronization service whose entire raison d'etre is to keep libraries connected identical - all changes made on any device (addition, deletion or modification) are made on all devices. For devices with limited memory, using optimized photos

    If this isn't what you want then use another service - USB import, iTunes sync, MyPhotoStream for example each do different things and everyone can move photos from one device to another

    And Photos lack a lot of features iPhoto form - in fact much more features than iPhoto including iCloud library there like a bigger and better editing capability and better external editing capability and so on

    LN

  • How to backup data, when the desktop is wired and mobile wireless ethernet?

    ISP is at & t Uverse packaged for TV, phone and Internet.

    The laptop shows the home network when the desktop is turned off.

    The office only displays the router when the laptop is turned off.

    It defeats the purpose of a backup when the office is off,

    because that's when you need the backup at first.

    Any way around this dilemma?

    My answer to 1. Data personal such as My Documents, photos and favorite.

    2 try to back up data on the other computer?  This question gives me a clue, that's why a computer displays the network folder while the other computer if off, but not vice versa.

    I think the best solution, as I said elsewhere, is back up to an external hard drive.

    3. I don't have an online connection.

    I have now two methods that work.  So, thank you very much for your help, Stephanie Podder.

  • How to add a block of decision in a campaign when the user has downloaded a pdf file

    Hi all

    We have implemented a campaign flow and check if users open and by e-mail. Now, we want to follow if they have visited the page destination and from there if they have downloaded a pdf file.

    Is it possible to have these as decision in a stream of campaign block?

    Thank you

    Hi Alex,

    Have you managed to make it work?

    Gary

Maybe you are looking for