CommandButton's Action method doesn't  work

Hi all
My English isn't very good
I use jdeveloper 11.1.1.3.0
I have SelectOneRadio with two options. When I select each option two PanelGroupLayouts' visible should change:
<af:selectOneRadio id="sor1" layout="horizontal"
binding="#{Bean1.sor_Value}"
valueChangeListener="#{Bean1.chg_sor}"
autoSubmit="true">
<af:selectItem label="1" value="1" id="si1"/>
<af:selectItem label="2" value="2" id="si2"/>
</af:selectOneRadio>
public void chg_sor(ValueChangeEvent valueChangeEvent) {       
if (sor_Value.getValue().toString().equals("1")) {
pgl_1.setVisible(true);
pgl_2.setVisible(false);
} else {
pgl_1.setVisible(false);
pgl_2.setVisible(true);
AdfFacesContext.getCurrentInstance().addPartialTarget(pgl_1);
AdfFacesContext.getCurrentInstance().addPartialTarget(pgl_2);
In each pgl I have a commandButton with a method related to theirs' action property. but When I click each button nothing happen and their related method don't run.
but when I use rendered instead of visible in method: "chg_sor" , buttons' action method work well but in this case another error occurs because I can't ppr components that are not rendered.
I don't know how solve this problem?
Habib

Thanks Frank
In each pgl I have inputText with required=True. and if required field is null and pgl become invisible(visible = false) so the button's Action method on the other pgl(visible = true) doesn't run.
why this happen?
Habib
Edited by: Habib Eslami on Feb 19, 2013 10:00 PM

Similar Messages

  • I cannot figure out how to make the text larger on an incoming email.  The finger method doesn't work and I cannot find any toolbar with which to do it.  I could find nothing in settings also.  Plese help and thank you.

    I cannot figure out how to make the text larger in a received email.  The finger method doesn't work and I can find no tool bar as I can for composing emails.  I can find nothing in settings.  Please help and thank you in advance.

    Hi there,
    Download a piece of software called TinkerTool - that might just solve your problem. I have used it myself to change the system fonts on my iMac. It is software and not an app.
    Good wishes,
    John.

  • LVOOP "call parent method" doesn't work when used in sibling VI

    It seems to me that the "call parent method" doesn't work properly according to the description given in the LabVIEW help.
    I have two basic OOP functions I am doing examples for. I can get one to work easily and the other one is impossible.
    Background
    There are 3 basic situations in which you could use the "call parent method"
    You are calling the parent VI (or method) of a child VI from within the child VI
    You are calling the parent VI (or method) of a child VI from within a sibling VI
    You are calling the parent VI (or method) of a child VI from a different class/object.
    From the LabVIEW help system for "call parent method":
    Calls the nearest ancestor implementation of a class method. You can use the Call Parent Method node only on the block diagram of a member VI that belongs to a class that inherits member VIs from an ancestor class. The child member VI must be a dynamic dispatching member VI and have the same name as the ancestor member VI
    From my reading of that it means situation 3 is not supported but 1 & 2 should be.
    Unfortunately only Situation 1 works in LabVIEW 2012.
    Here is what I want
    And this is what I actually get
    What this means is that I can perform a classic "Extend Method" where a child VI will use the parent's implementation to augment it's functions BUT I cannot perform a "Revert Method" where I call the parent method's implementation rather than the one that belongs to the object.
    If you want a picture
    Any time I try and make operation2 the VI with the "call parent method" it shows up for about 1/2 sec and then turns into operation.
    So there are only 3 possibilities I can see
    Bug
    Neither situation 2 or 3 are intended to work (see above) and the help is misleading
    I just don't know what I am doing (and I am willing to accept this if someone can explain it to me)
    The downside is that if situation 2 above doesn't work it does make the "call parent node" much less usefull AND it's usage/application just doesn't make sense. You cannot just drop the "call parent node" on a diagram, it only works if you have an existing VI and you perform a replace. If you can only perform situation 1 (see above) then you should just drop the "call parent node" and it picks up the correct VI as there is only 1 option. Basically if situation 2 is not intended to work then the way you apply "call parent method" doesn't make sense.
    Attachements:
    For the really keen I have included 2 zip files
    One is the "Revert Method labVIEW project" which is of course not working properly because it wants to "call parent method" on operation not operation2
    The other zip file is all pictures with a PIN for both "Revert Method" and "Extend Method" so you can see the subtle but important differences and pictrures of the relavant block diagrams including what NI suggested to me as the original fix for this problem but wasn't (they were suggesting I implement Extend Method).
     If you are wondering where I got the names, concepts and PIN diagrams from see:
    Elemental Design Patterns
    By: Jason McColm Smith
    Publisher: Addison-Wesley Professional
    Pub. Date: March 28, 2012
    Print ISBN-10: 0-321-71192-0
    Print ISBN-13: 978-0-321-71192-2
    Web ISBN-10: 0-321-71255-2
    Web ISBN-13: 978-0-321-71255-4
     All the best
    David
    Attachments:
    Call parent node fault.zip ‏356 KB
    Call parent node fault.zip ‏356 KB

    Hi tst,
    Thankyou for your reply. Can you have a look at my comments below on the points you make.
    1) Have to disagree on that one. The help is unfortunately not clear. The part you quote in your reply only indicates that the VI you are applying "Call Parent Node" to must be dynamic dispatch. There is nowhere in the help it actually states that the call parent node applies to the VI of the block diagram it is placed into. Basically case 2 in my example fulfills all that the help file requires of it. The dynamic dispatch VI's operation are part of a class that inherits from a given ancestor. Operation 2 for Reverted behaviour is a child VI that is dynamic dispatch and has the same name as the ancestor VI (operation2). The help is missing one important piece of information and should be corrected.
    2) True it does work this way. I was trying to build case 2 and had not yet built my ancestor DD for operation so the function dropped but wasn't associated with any VI. I was able to do this via a replace (obviously once the ancestor Vi was built) so this one is just bad operator
    3) Keep in mind this is an example not my end goal. I have a child implementation because this is a case where I am trying to do a "reverse override" if you like.
    3a) The point of the example is to override an objects method (operation2) with it's parent's method NOT it's own. The reason there is a child implementation with specific code is to prove that the parent method is called not the one that relates to the object (child's VI). If I start having to put case structures into the child VI I make the child VI have to determine which code to execute. The point of Revert method is to take this function out of the method that is doing the work. (Single Use Principal and encapsulation)
    3b) The VI I am calling is a Dynamic Dispatch VI. That means if I drop the superclass's VI onto the child's block diagram it will become the child's implementation. Basically I can't use Dynamic Dispatch in this case at all. It would have to be static. That then means I have to put in additional logic unless there is some way to force a VI to use a particular version of a DD VI (which I can't seem to find).
    Additional Background
    One of the uses for "Revert Method" is in versioning.
    I have a parent Version1 implementation of something and a child Version2. The child uses Version2 BUT if it fails the error trapping performs a call to Version1.
    LabVIEW has the possibility of handling the scenario but only if both Case 1 and Case 2 work. It would actually be more useful if all 3 cases worked.
    The advantage of the call parent method moving one up the tree means I don't have the track what my current object is and choose from a possible list, if, for example the hierarchy is maybe 5 levels deep. (so V4 calls V3 with a simple application of "call parent method" rather than doing additional plumbing with case structures that require care and feeding). Basically the sort of thing OOP is meant to help reduce. Anything that doesn't allow case 2 or 3 means you have to work around the limitation from a software design perspective.
    If at the end of the day Case 2 and case 3 don't and won't ever work then the help file entry needs to be fixed.
    All the best
    David

  • Central Autoreaction Method doesn't work for NW 7.10 in SolMan 7.01

    Hello!
    The central autoreaction method doesn't work for the satellite system
    NW 7.10. For systems with kernel releases 4.6D, 640, 700 this method
    works fine and e-mail alerts are coming.
    The configuration steps I've checked:
    1. Configured SCOT. The mail_send job executes every 5 minutes.
    2. Background dispatching job is released: SAP_CCMS_MONI_BATCH_DP (In
    central CEN/000/DDIC and satellite system SAT/000/DDIC)
    3. Central dispatching job is released: SAP_CCMS_CENSYS_DISPATCHER
    (Only in central system CEN/000/DDIC)
    4. The sapccm4x-agent registered as web service within CEN using
    Create Remote Monitoring for NW 7.10:
    Connection test to SAPCCM4X.<satellite_host>.00 was performed successfully
    5. Created a new autoreaction method by copying method
    CCMS_OnAlert_Email_V2 to the own Z_CCMS_Email_Alert_CEN:
    Function Module - SALO_EMAIL_IN_CASE_OF_ALERT_V2
    Execute Method on Any Server and Only in Central System, triggered by
    CCMS agents
    SENDER (EMAIL_USER) exists in CEN/000 , RECEPIENT - <distr list
    SAP_BASIS in CEN/000>, RECIPIENT-TYPEID - C
    6. Got MTE Classes from NW 7.10 satellite system and assigned this method
    Z_CCMS_Email_Alert_CEN to an MTE-class CCMS_ORAucPSAPSR3 for NW 7.10
    satellite system. The alert is red right now.
    7. The mail_send job doesn't send anything, in SCOT there are no
    sending orders.
    8. Autoreaction status on this alert in CEN in RZ20 - Sent to CEN.
    CEN_CHECKED.
    9. The alert status in RZ20 in CEN - ACTION_REQUIRED. If I execute it
    in manual the alert status changes to ACTIVE, but no email and no
    messages in sending orders in SCOT.
    Please help me to solve this issue.
    Thank you!

    Hi,
    Since you are using RECIPIENT-TYPEID =C i.e. General distribution list, pls ensure to have shared type of list created in SBWP.
    Also pls verify your SCOT configutaion , if apropriate address area i.e. *@abc.com
    Also one point to note that even if you trigger auto reaction method manually via RZ20 , pls check if alert is listed in SOST.
    if yes , that means there is problem in either SCOT configuration or distribution list.
    If alert is not appearing in SOST , that means you need to check auto reaction method parameters;
    Z_CCMS_OnAlert_Email_V2 , here check release section if Auto reaction execution method is checked.
    Regards,
    Rupali

  • Rendered attribute of commandButton preventing action method from executing

    When I add a rendered tag to my commandButton it'll only execute the method intermittantly. After a lot of testing, I've narrowed down the problem so I now know when it does and does not work properly.
    If rendered="true" it always works fine
    If rendered="#{issue.update}" and isUpdate() is simply "return true;" it'll always work correctly
    If rendered="#{issue.update}" and isUpdate() is simply "return this.getId() != 0;" it will not execute the action specifiied, however the page does refresh.
    It's also interesting to note that on the rendered page, the button is always shown only when it should be. So when the action fails to execute, the button is shown on the screen.
    In the case that doesn't work, I debugged through and noticed that isUpdate() is called six times for a single page refresh. By printing a stacktrace for each call, I discovered that it's called once in the ApplyRequestValues stage of the lifecycle and the other five times are from RenderResponse (I have the stacktraces, let me know if they'd be worth posting). This method is only referenced once and only on the jsf page, never in the java code... but I'll go back and try to understand why it's calling it so many times later.
    The first time isUpdate() is called, it will retrun false because the value for id has not yet been assigned, which makes sense. This causes a "false" to be returned from isUpdate() and this is what is causing the action to not be executed. If I debug through and change the return value to be true here (only the first time) the action is updated. So my question is, what's going on here? I don't understand why is isUpdate() called so many times, why is it called so early in the lifecycle, and why the call in the apply request values stage determines whether or not it executes the action?
    Now, as a workaround, I put a binding on the id, and tried to use that value. That exposed another problem with my page which requires some explanation... Here are the relevent sections of the page and backing bean...
    issue.jsp
    <h:outputText value="#{issue.init}" />
    there's a datatable here which displays all issues and has a commandLink to edit the issues (immediate="true"). It posts back to this page and passes an ID on the URL.
    <h:inputHidden id="id" value="#{issue.id}" binding="#{issue.idBinding}" />
    <h:inputText id="name" value="#{issue.name}" required="true" />
    <h:commandButton id="updateIssue" value="Update" action="#{issue.updateIssue}" rendered="#{issue.update}" />
    Issue.java
    getInit() will get the id from the FacesContext (specifically, the URL) and load the data from the database.
    On the rendered page in my web browser:
    After clicking on an edit link, the page is loaded and the name is filled in, the update button is on the screen, and everything looks good.
    When I view source, I see that the hidden input for id is set to zero. I'm still trying to figure out why this is the case since all the other parameters are set properly. I stepped through getInit() and it is, indeed setting the id property properly.
    So when I added the binding to get the value from there instead of via the local values, I found that it always got zero (presumedly because that's what is rendered in the HTML code). This means that isUpdate() still returns false on the first call, and my attempt at a workaround fails! So, just as a test, I used some "javascript on the URL" trickory to set the id field to "10". That worked just fine. So the root of the problem is that issue.id is not loading. I put code in the getId() method to always look at the binding and then faces context and put the id into this.id if it found a non-null and non-zero value. It now returns the correct value all of the time but the HTML produced still says the value is zero.
    I've spent about 4 hours on this issue and I'm to the point where I need advice from someone who is more educated on how JSF works. I know the inputHidden get the vaule for the HTML tag it produces from getId() because when I hard code that to always return 10, it works. But when I leave it to return the proper value, the debug statements say it's returning the proper value, but the HTML always says it's zero. This isn't an acceptable solution anyway because I use getId() in the datatable to display the IDs of each of the issues; I just wanted to see if it'd work and it didn't.
    Here's my latest getInit() method (which returns the value from the URL when called from the datatable, but not when called from the inputHidden.
        public int getId() {
            if(getIdBinding() != null && !getIdBinding().isLocalValueSet()) {
                if(getIdBinding().getSubmittedValue() != null) {
                    int temp = Integer.parseInt((String)getIdBinding().getSubmittedValue());
                    if(temp != 0) {
                        this.id = temp;
                        log.info("Got binding value of "+this.id);
            FacesContext ctx = FacesContext.getCurrentInstance();
            if(ctx != null) {
                Map<String, String> map = ctx.getExternalContext().getRequestParameterMap();
                    if(map != null) {
                    String given_id = map.get("id");
                    if(given_id != null) {
                        // if given an ID and no action, we load the data
                        try {
                            log.info("Got value from FacesContext of "+given_id);
                            int temp = Integer.parseInt(given_id);
                            if(temp != 0)
                                this.id = temp;
                        } catch(NumberFormatException e) {
                            // if what's passed in isn't an integer, we leave everything at default values
            return this.id;
        }Thanks in advance,
    Adam

    I'm clicking a link which will load data into a form. In the form there is a field called "id" which has a value of something other than zero. I press the update button (which is only rendered when the id is non-zero), it submits the form. When the restore view happens, the id is the default value of 0 because it has not yet applied the values from the form to the backing bean. Therefore the rendered attribute of update button (isUpdate()) will return false, and the update() method does not get queued.
    When I switch my backing bean to session level, the restore view already has the id loaded, even before the values from the form are applied, so everything works as expected. The problem was that I needed to have the correct return values before any values have been loaded into the member variables.
    As a solution to this, I made some private boolean variables called isNew and isUpdate. Both of them are true by default. This makes sure that the isNew() and isUpdate() methods (attached to the render attribute of my command buttons) return true in the restore view phase. When I read in the id from the URL or hidden input, it'll update the boolean values accordingly, which makes sure the buttons are rendered properly. This allowed me to set the backing bean back to the request scope, which make me happy. <img class="emoticon" src="images/emoticons/grin.gif" border="0" alt="" />
    Thank you Mr. De Campo. You gave me exactly what I was looking for... a better understanding of how thigns work, and (indirectly) a clean solution to my problem.

  • CommandButton with conditional-rendered doesn't work???

    Hi,
    My problem:
    I just would like to show the Submit-Button (commandButton) after I change the value of the "selectOneMenu ". So for that I set the boolean variable for the rednerer to true. After that the Submit-Button is shown. But when I click on that Submit-Button, the action is not invoked?
    But when I remove the "rendered="#{bean.rendered}" attribute from the commandButton, the action is invoke!
    What do I wrong?
    Would be great if someone could help me!
    <h:form id="choose2">
      <h:panelGrid columns="2" rowClasses="panelChooseRow" columnClasses="panelChooseCol">
        <h:outputText value="#{msgs.beanUserName}" />
        <h:panelGroup>
          <h:selectOneMenu id="userMenu" value="#{bean.userName}" onchange="submit()" required="true">  
             <f:selectItems id="userItems" binding="#{bean.userItems}" />
          </h:selectOneMenu>
          <h:message for="userMenu" errorClass="errMsg" />
        </h:panelGroup>
        <h:outputText value="" rendered="#{bean.rendered}"/>
        <h:commandButton id="send" value="#{msgs.beanSave}" action="#{bean.actionModify}" rendered="#{bean.rendered}"/>
      </h:panelGrid>
    </h:form>
    Bean-Code:
      public void setUserName( String newValue )
        _userName = newValue;
        _bRendered = true;
    public String actionModify()
        System.out.println("actionModify");
        return null;
      public boolean isRendered()
        return _bRendered;
      }

    Hi,
    well, I don't see what could be wrong in your code, but I have an example working.
    So I will just post my code and you can compare.
    Some code snipped off my JSF Site:
    <h:commandButton id="upload"  rendered="#{uploadFileBean.check}" onclick="submit()" action="#{uploadFileBean.upload}" value="#{messages.upload}" styleClass="bgTextBright" tabindex="4"/>
    <h:commandButton id="correct" rendered="#{not uploadFileBean.check}" onclick="submit()" action="#{uploadFileBean.correct}" value="#{messages.correct}" styleClass="bgTextBright" tabindex="4"/>Here the code in my uploadFileBean:
    private boolean check;
        public boolean isCheck()
            return check;
        public void setCheck(boolean b)
            this.check = b;
    public String upload()
            String retVal = Constants.UPLOAD_OK;
            return retVal;
    public String correct()
            String retVal = Constants.CORRECT_OK;
            return retVal;
        }There is only one commandButton shown (depending on my check property) and if I press it, the associated action method is called.
    Did you have a look, if you call the right method? Meaning, does the method exist in the given bean? Do you have your bean declared in the faces-config.xml?
    As I can tell you, the posted code works fine, so hope this could help you.

  • Shared memory - free_instance method doesn't work

    I am using shared memory to store data, set the data in a program and then read in an update task.  My write and read both work, but I would like to "delete" the shared memory instance after the read in the update task.  I am using the free_instance method - it works sometimes, but a very small percentage of the time.  Here is the code I am using:
    To write to shared memory:
    data: lv_inst        type shm_inst_name,
              lo_shared_area type ref to z_cl_binkill_shared_area,
              lo_root        type ref to z_cl_binkill_rmnqty.
        lv_inst = ordim_confirm-matid.
        shift lv_inst LEFT DELETING LEADING space.
        concatenate ordim_confirm-who ordim_confirm-vlpla lv_inst into lv_inst.
        try.
        Attach Shared Area
          lo_shared_area = z_cl_binkill_shared_area=>attach_for_write( lv_inst ).
        Create Root Object ( Object to be created in Memory )
          create object lo_root area handle lo_shared_area.
        Set the value for our message
          lo_root->set_data( ordim_confirm ).
        Set the root back into the Area
          lo_shared_area->set_root(  lo_root ). "<- Note the 2 spaces before go_root (didn't work without!)
        Commit and detatch
          lo_shared_area->detach_commit( ).
        catch cx_shm_attach_error.
        endtry.
    To read from shared memory and then (hopefully) delete:
    DATA: lv_inst          TYPE shm_inst_name,
            ls_ordim_confirm TYPE /scwm/s_rf_ordim_confirm,
            lv_rc            TYPE shm_rc,
            lo_shared_area   TYPE REF TO z_cl_binkill_shared_area,
            lo_root          TYPE REF TO z_cl_binkill_rmnqty.
    lv_inst = ls_ordim_c-matid.
              SHIFT lv_inst LEFT DELETING LEADING space.
              CONCATENATE ls_ordim_c-who ls_ordim_c-vlpla lv_inst INTO lv_inst.
              TRY.
                  lo_shared_area = z_cl_binkill_shared_area=>attach_for_read( lv_inst ).
                  lo_root        = lo_shared_area->root.
                  TRY.
                      ls_ordim_confirm = lo_root->get_data( ).
                    CATCH cx_root.
                      CLEAR ls_ordim_confirm.
                  ENDTRY.
                  lo_shared_area->detach( ).
                  lv_rc = lo_shared_area->free_instance( lv_inst ).
                CATCH cx_shm_attach_error.
                  CLEAR ls_ordim_confirm.
              ENDTRY.
    Any ideas why the free_instance doesn't work?
    Jeff Mathieson

    If an UICommand element inside a UIData table does not invoke the method behind the action binding, then this generally means that the row object is out of the scope while the action event is getting to be fired. Test it by putting the managed bean in session scope and see if it will solve the problem. If so, and if you want to keep the managed bean in the request scope, then change/rearrange your data loading logic so that the data is available during at least the invocation phase of the JSF lifecycle. Or split the backing bean in two beans, one for strictly request-scoped data and another for strictly session-scoped data.

  • BitmapData draw method doesn't work when the project is published as the .swf file of the web applic

    Hi,
            I am totally confused by this strange error. When I tried using the draw method of BitmapData to draw a movieclip symbol of my project, it seems to work fine locally. However, as I uploaded the published .swf file to my web server and launched it as the plugin of my web application, it failed. The source codes as follows,
    function printscreenClicked():void
         //ExternalInterface.call calls a javascript function to print message1
        var bd:BitmapData = new BitmapData(stage.width,stage.height);
        //ExternalInterface.call calls a javascript function to print message2
      bd.draw(stage);
        //ExternalInterface.call calls a javascript function to print message3
    message3 didn't show at all. Instead, the browser console shows "Uncaught Error: Error calling method on NPObject.". My understanding of this error message is that the .swf is calling something crashing, and I believe that bd.draw(stage)is the crashng method call.
    Also, here is my html embed tag:
        <embed src="/tests/videoplayer.swf" id="flash" quality="high" height="510" width="990" scale="exactfit" name="squambido" align="middle" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="margin: 0px auto;clear:both;position:relative;"/>
    Can someone help me?

    Thank you for your reply.
    I tried stageWidth and stageHeight, but it still doesn't work.
    The draw() methid is triggered when I clicked a screenshot button in my application as follows,
    ExternalInterface.addCallback("printscreenClicked", printscreenClicked);
    function printscreenClicked():void
         //ExternalInterface.call calls a javascript function to print message1
        var bd:BitmapData = new BitmapData(stage.width,stage.height);
        //ExternalInterface.call calls a javascript function to print message2
      bd.draw(stage);
        //ExternalInterface.call calls a javascript function to print message3
    Would you please give me an example of "waiting for Event.RESIZE is good, or just at least Event.ENTER_FRAME"?
    My real purpose in this application is to capture a snapshot of a streaming video. The video is contained in a movieclip object. I tried stage first since BirmapData.draw() doesn't work when drawing the movieclip on the web site. Do you have any suggestion for this situation? Also, is there any good method to find out what happened if the browser have "Uncaught Error: Error calling method on NPObject."?

  • Roll method doesn't work properly

    Hi there,
    I ran into a problem with the roll method of GregorianCalendar class. Suppose the date is April 6, 00:00:00 2002, the following code will go throught the time changes:
    GregorianCalendar cal = new GregorianCalender();
    for (int i = 0; i < 24; i++) {
    cal.roll(Calenader.HOUR_OF_DAY, 1);
    April 6 01:00:00 2002
    April 6 02:00:00 2002
    April 6 22:00:00 2002
    April 6 23:00:00 2002
    April 6 00:00:00 2002
    But if the current date is April 7, 2002 (daylight saving time change will occur at 2:00 am this day), the above code will result:
    April 7 01:00:00 2002
    April 7 02:00:00 2002
    April 7 22:00:00 2002
    April 7 23:00:00 2002
    April 6 23:00:00 2002
    April 6 00:00:00 2002
    Can anyone tell me how to fix this problem or how to avoid this problem.
    Thanks a lot.

    It doesn't work quite that way for me, my first two lines are these:
    April 6 01:00:00 PST 2002
    April 6 03:00:00 PDT 2002
    You'll notice that I printed the time zone out as well. My last three lines are these:
    Sun Apr 07 23:00:00 PDT 2002
    Sat Apr 06 23:00:00 PST 2002
    Sat Apr 06 00:00:00 PST 2002
    and I think there is an argument to be made that these are correct: applying roll() to Sun Apr 07 23:00:00 PDT 2002 should yield Sun Apr 07 00:00:00 PDT 2002; but since daylight saving time was not in effect at that moment, this is equivalent to Sat Apr 06 23:00:00 PST 2002, which is the actual result. On the other hand, here's a quote from the API documentation for Calendar:
    "Roll rule. Larger fields are unchanged after the call."
    which is an argument that they are incorrect: after the call, the hour should change but not the day. So I'd report it as a bug and see what answer you get.
    How to fix the problem? What's the purpose of what you are doing?

  • JTable's TableColumn setWidth method doesn't work with the jdk1.3

    Hi,
    I have three JTables in the same window. When a user resizes one of the JTable's columns I capture that event through a mouseReleased mouse event and then I resize the other 2 JTables columns to match the user resized JTable. This all works great under the jdk1.2 but not under jdk1.3. The method...
    TableColumn.setWidth( )
    doesn't work! Nothing happens. I've tried revalidating/repainting the resized JTable but nothing works. Has anyone else had the same kind of problem?

    According to JDK document,
    setWidth(int width)
    This method should not be used to set the widths of columns in the JTable, use setPreferredWidth instead.

  • Desktop.open() method doesn't work,

    Hi,
    I'm developing file explorer with JDK6.
    But when I try to open file with native asscociation programs with java.awt.Desktop class, I found that's not work at all.
    there is no response, exception and error. it just 'silent.'
    I checked each line of code. File is exist, Desktop support Open action.
    OS association with file is correct. I couldn't find any problem.
    so I tested tutorial code 'DesktopDemo'. it worked well Browse() but not Open(). open() method isn't work. (It also silent)
    How can I open file with native association?

    Please don't post to threads which are long dead, and don't hijack another poster's thread. When you have a question, start your own thread. Feel free to post a link to a related thread.
    Discussions may be kept on the forum. This is not a place to advertise your blog.
    I'm locking this thread now.
    db
    StijnDeWitt wrote:
    This seems to be a long-running problem related to Desktop.open in combination with Windows and some Account/Profile settings on Windows which are as of yet undetermined.
    Unfortunately the moderators of this forum have the tendency to close/lock old topics so we cannot add new information to a long running problem anymore after a while. They forgot to close this one so luckily I can still add some info here.
    I would like to invite anyone wanting to read details on and discuss this issue to do so on my blog. The comments on that post will never be closed or locked.
    java.awt.Desktop open() fails silently without exception
    (blog link removed)
    >
    You may also want to have a look at these related (but unfortunately locked) forum posts:
    [Desktop.open fails without exception, nothing happens (Locked)|http://forums.sun.com/thread.jspa?threadID=5338022]
    [Desktop.getInstance().open(file) does nothing (nothing happens) (Locked)|http://forums.sun.com/thread.jspa?threadID=5413798]

  • The Runtime.exec methods doesn't work well on Solaris ???

    I have two threads and I set the different running time.
    I use Runtime.exec to a run the command and use Process to get the process.
    It works properly in the windows2000 platform.
    However, when I transfer the platform to Solaris...and run the program...
    Two threads always at the same time....It is very wired....I always debug
    for 2 days....
    (at first I run "vmstat 1 2" command, later I change to "ls","rmdir"....etc,
    all of them don't work.....
    If I close the Runtime.exec..........Everything works well......)
    And I study the API. I found this message...
    The Runtime.exec methods may not work well for special processes on certain
    native platforms, such as native windowing processes, daemon processes,
    Win16/DOS processes on Win32, or shell scripts. The created subprocess does
    not have its own terminal or console.
    Could someone share her/his experience.....:(
    And if any other way I can run command inside java code instead of
    Runtime.exec.....???
    Please reply my mail to [email protected] I do appreciate your kindly &
    great help!!!!!!!!
    This is my code.......
    import java.io.*;
    import java.lang.*;
    import java.util.*;
    * <p>ServerThread1</p>
    * <p>??�X???��?�D???�X???, "Vmstat 1 2".</p>
    class ServerThread1 extends Thread{
    private ServerAgent Sa;
    public ServerThread1 (String Name, ServerAgent Sa){
    super(Name);
    this.Sa = Sa; file://Assign ServerAgent reference Sa
    public void run(){
    while(true){
    try{
    Thread.sleep(5000);
    catch (Exception e){
    System.out.println("ServerThread1 fails");
    System.out.println("Thread1 is running.");
    try {
    Runtime rt1 = Runtime.getRuntime();
    Process proc1 = rt1.exec("mkdir"); ------>If I close
    rt1.exec , two threads works seperately...........:(
    catch (Exception e) {
    System.out.println("Thread1 Error");
    class ServerThread2 extends Thread{
    private ServerAgent Sa;
    public ServerThread2 (String Name, ServerAgent Sa){
    super(Name);
    this.Sa = Sa;
    public void run(){
    while(true){
    try{
    Thread.sleep(15000);
    catch (Exception e){
    System.out.println("ServerThread2 fails");
    System.out.println("Thread2 is running.");
    try {
    Runtime rt2 = Runtime.getRuntime();
    Process proc2 = rt2.exec("vmstat 1 2"); ----->If I don't run
    the rt2.exe, two threads work seperately....
    catch (Exception e) {
    System.out.println("Thread2 Error");
    public class ServerAgent{
    private Vector v1 = new Vector();
    private Vector v2 = new Vector();
    private Hashtable currentData = new Hashtable();
    private static String startUpSwap = null;
    private static String startUpMem = null;
    public static void main(String[] arg) {
    ServerAgent s = new ServerAgent();
    ServerThread1 st1 = new ServerThread1("Thread1",s);
    ServerThread2 st2 = new ServerThread2("Thread2",s);
    st1.start();
    st2.start();

    If I close the Runtime.exec..........Everything works
    well......)You don't empty the output of the command, that blocks the process.
    A citation from
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Why Runtime.exec() hangs
    The JDK's Javadoc documentation provides the answer to this question:
    Because some native platforms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock.
    Try out something like this:
    String s;
    try {
       Process myProcess =
       Runtime.getRuntime().exec("ls -l"));
       DataInputStream in = new DataInputStream(
              new BufferedInputStream(myProcess.getInputStream()));
        while ((s = in.readLine()) != null) {
            out.println(s);
    catch (IOException e) {
        out.println("Error: " + e);
    }Another source of trouble under Unix is not having the correct permission for that user that executes the Java VM, which will be the permissions for the spawned subprocess. But this probably not the case, as you see something after exit.
    Regards,
    Marc

  • Automator: action suddenly doesn't work

    Hi, months ago i created a Folder Action that has always worked.
    Since yesterday it stopped working.
    Has somenone some tips?

    Environment variables are NOT global. They are inherited from a parent process as a subprocess is created by that parent.
    .profile is ONLY read by the shell (bash) when you start a Terminal session. So only the shell and any commands it runs will see those environment variables.
    Since you are not running the Automator workflow from a Terminal session, there is no way for Automator to inherit those environment variables.
    So if those environment variables are needed for your convert utility, then you need to make sure that your Run Shell Script needs to get them on its own.
    You could hard code them into your Run Shell Script, or you could source your .profile
    . /User/yourusername/.profile # notice the . which is the /bin/sh 'source' command
    Of course if your .profile has lots of other stuff that will upset the Automator Run Shell Script, then you may not want to do that. For example, if your .profile were expecting things in its environment that ONLY exist in a Terminal session that might upset your .profile when invoked in Run Shell Script.

  • EDIT method doesn't work after adding new row

    I would like to start editing after adding new row into TableView.
    I copied example from Oracle website: [Using JavaFX UI Controls - 13 Table View|http://docs.oracle.com/javafx/2/ui_controls/table-view.htm#CJAGDAHE]. Then I put additional button for adding new row and define action for the button.
        final Button addButton = new Button("Add");
        addButton.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent arg0) {
                Person p = new Person("", "", "");
                table.getItems().add(p);               
                table.getSelectionModel().select(p);
                table.edit(table.getSelectionModel().getSelectedIndex(), table.getColumns().get(2));
        });In result I can see selected new row but the table doesn't start edditing in the third column.
    I have similar method for editing existing rows and it works properly.
        final Button editButton = new Button("Edit");
        editButton.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent arg0) {
                table.edit(table.getSelectionModel().getSelectedIndex(), table.getColumns().get(2));
        });Could you help me what I do wrong?

    Try wrapping the setCaretPosition(...) method in a SwingUtilities.invokeLater(...)
    caret=outputArea.getDocument().getText(0,outputArea.getDocument().getLength()).length();Should be:
    caret = outputArea.getDocument().getLength();

  • Recording Save for Web in an Action still doesn't work properly in Photoshop CS6 13.0.1

    There is still an issue with making new actions that include saving for web. While recording the action, save for web functions as it should. But once the action is played, regardless of the original format the saved image should be, it gives it an html filename extension. This can be extremely frustating when you have an action that saves over a hundred images from a single action.
    I have seen posts in Adobe forums from many people regarding this very irritating bug, including posts from Adobe employees acknowledging the bug. This was present in the Beta, the initial release, and in this 13.0.1 update. No fix.
    http://feedback.photoshop.com/photoshop_family/topics/ps_cs6_actions_recorded_action_expor ts_html_instead_of_jpg
    The employee acknowledged this bug THREE months ago (as of this post), yet all things considered, this doesn't seem like something that would take three months to fix!
    I have spoken about this bug with a friend that is a computer programmer. Considering that the action is saving the file correctly, and it's only the name that is not saving properly indicates that this is a superficial error, and not an issue that would require rewriting the code completely. Also consider that this WAS functioning properly in CS5, and that this is a very easily reproducible bug. Adobe should have plenty of information required to correct the issue. I understand that this fix may be more or less difficult to do than what I am suggesting, but it should have been fixed by now.
    I don't understand this mentality. Please Adobe... Put CS7 down for a little while, and fix what needs to be fixed in CS6. People (myself included) have paid A LOT of money for your products, it's not unreasonable to expect them to work properly. Bugs happen, it's understandable, but it's not unrealistic to expect a fix for them when the software is as expensive as it is. Is there actually any plan to correct this issue?

    See also:  http://forums.adobe.com/message/4662367#4662367
    -Noel

Maybe you are looking for

  • How to retain zoom position of an image using Adobe Flash Builder?

    Hi,   I have created an Adobe Flash Builder Mobile App. I placed an image in the Homeview. I allow the user to zoom out or zoom in the image using GestureZoom. The problem is each time the user zooms, it does not retain the previous position. For ex.

  • Twinview & those DVI- HDMI cable

    hi folks, i have twinview going perfectly in arch and everything is dandy.  but i recently gave away the vga cable and got myself one of those DVI to HDMI cable and currently using it to connect the pc to the lcd tv that i have.  i can still get twin

  • Scheduling agreement for service procurement

    Hi All, Am trying to create Scheduling Agreement for Services to Maintain Validity period for a longer time and do service entry sheet and invoice manually. But am not able to do service entry sheet , is there any option to do SES Other Side I did fr

  • Database.pl error in Ciscoworks LMS 3.2

    Dear Friends, I am getting the following error only for database.pl when i run selftest under Common-->Services-->Admin: database.pl FAIL     Self Test Fail to query dfmEpm.DbVersion, Error: Database server not found (DBD: login failed)      Self Tes

  • Data Extraction from MS-BI to SAP-BI

    Hi All, We have a requirement for data extraction from MS-BI to SAP-BI. In MS-BI cube they have same fact table and dimension table. This fact table is linked with dimension key. I want to know how to extract the data from the MS-BI cube to SAP-BI. C