Saving h:selectBooleanCheckbox   value to databse

Hi All,
I want to save "Y" if my checkbox selected on my JSP page & "N" if my check box is not selected in JSP.
How to do this with,
<h:selectBooleanCheckbox>
I am doing in JSP as,
<h:selectBooleanCheckbox value="#{managedRoleBean.isUserManager}"
in my backing bean i defined isUserManager variable as,
public class ManagedRolebean
private String isUserManager;
// corresponding getters & setters.
but still that value is not saving to Databse
Thanks in advance
Sandip

Hi,
Thanks a lot.
Now if I select checkbox "Y" is saving to databse.
If not select checkbox then "N" is selecting to DB.
but while editing record I want to show checkbox to be selected or not selected as it is while saving to DB.
Means while saving if I have checked the checkbox then while editing record that checkbox should remain in checked mode.
How to do this ?
Thanks in advance
Sandip Patil

Similar Messages

  • Saving t:inputCalendar   value to database

    Hi All,
    I am saving normal text box values in databse as,
    <h:inputText value="#{saveUserRecords.emailAddress}" />
    where saveUserRecords is my bean name in faces-config.xml
    lly,I want tosave
    <t:inputCalendar value="#{saveUserRecords.startDate}">
    into DB.
    So is this correct way to save selected calender value in databse .
    Do i need some converison here ?
    Please help me.
    Thnaks in advance
    Sandip Patil.

    Hi All,
    I am saving normal text box values in databse as,
    <h:inputText value="#{saveUserRecords.emailAddress}" />
    where saveUserRecords is my bean name in faces-config.xml
    lly,I want tosave
    <t:inputCalendar value="#{saveUserRecords.startDate}">
    into DB.
    So is this correct way to save selected calender value in databse .
    Do i need some converison here ?
    Please help me.
    Thnaks in advance
    Sandip Patil.

  • SelectBooleanCheckBox value pickup

    Hi ppl ,
    I have a small problem with rendering checkboxes.....
    Basically i do some logic ( not elaborating as i feel not too relevant ), and it boils down in the end to a value that i hold in my transient attribute.
    Now, if the value of this attribute is "Y" i want my selectBoolean checkbox to be checked else unchecked.
    I know for sure that my transient variable holds the right value i.e Y and N , as i display another column with outputText and i can clearly see the Ys and Ns displayed correctly.
    1) I tried dropping a selectBooleanCheckBox with selected State Value : Y and Unselected State Value :N
    this generated the following in by page definition:-
    <button id="MenuTreeViewObjGrantIndicatorStatus"
    IterBinding="MenuTreeViewObjIterator">
    <AttrNames>
    <Item Value="GrantIndicatorStatus"/>
    </AttrNames>
    <ValueList>
    <Item Value="Y"/>
    <Item Value="N"/>
    </ValueList>
    </button>
    And this was on the jspx
    <af:column sortable="false" headerText="Permission">
    <af:selectBooleanCheckbox value="#{bindings.MenuTreeViewObjGrantIndicatorStatus.inputValue}"
    label="#{bindings.MenuTreeViewObjGrantIndicatorStatus.label}"/>
    </af:column>
    But it doesn't seem to be performing as expected, it just remains unchecked always.
    If i check the box and do a save, i can see the values change in my outputText value column , but the checkbox remains unchecked on a page refresh....
    2) i tried using EL in the selected tag value of teh boolean checkbox , but this just turned the whole darn thing to a read only...
    any light would be greatly appreciated....
    Thanks

    http://blogs.oracle.com/Didier/Samples#3 may help
    Regards,
    Didier.

  • Saved default Parameter values not appearing in Run Time version of report

    I've created a report in Crystal 2008 and set up a number of parameters. I supplied each of them with a default value. I check it out in Crystal Reports and a nice looking window opens up that shows all my parameters with the default values. I save the report and open it within our application and upon pressing print, a plain looking box appears that lists my parameters but none of the saved values are included. Is this a problem with my version of Crystal Reports (ver. 12.2.0.290) that I can get an update for to fix; Or, is this a problem with the crviewer.dll that we are running in our application (ver 11.0.0.1282, dated March 8, 2005)?
    I'm worried about updating to the latest Crystal 2008 crviewer.dll because I've read where it is only for reports with Saved Data and that won't work for us. We need the ability to refresh the data on the reports.

    Hi Mike,
    It likely is the viewer causing the problem. 2008 now has cascading parameters and the activex viewer does not support them.
    All I can suggest is you try CR XI R2 which you can upgrade for free, you have to contact CIC to get a keycode to deploy your app, and test again.
    R2 is out of support now so no fixes available...
    http://downloads.businessobjects.com/akdlm/crystalreports/crxir2_sp4_full_bld_0-20008684.exe
    http://downloads.businessobjects.com/akdlm/crystalreports/CRYSTALREPORTS06_0-20008684.EXE
    Thanks
    Don

  • Error while saving some default value in excel file

    Hi,
    I have been trying to accomplish a very simple task. I am trying to save values used in “PARAMETERS DESCRIBING PATH” of  "Photo_Diode_N_Motors_DAQ" and want to reload the same values in “PD_Display_From_Spreadsheet”. There is a function named “Display to Motor” in “PD_Display_From_Spreadsheet” which will use four of those values namely y_intial, y_step_size, z_intial, z_step_size. Needless to say that I am not able to do successfully. Each time I am trying to run, I am getting following error:
    “Error 1 occurred.
    Possible reason(s):
    LabVIEW:  An input parameter is invalid.
    NI-488:  Command requires GPIB Controller to be Controller in Charge.”
    However, if I remove the part where I am saving those values, it works fine.
      You may like to have look at frame 1 of "Photo_Diode_N_Motors_DAQ" as well as use of “Display to Motor” in “PD_Display_From_Spreadsheet”.
    Thanks,
    Dushyant
    Attachments:
    Program.zip ‏418 KB

    Hello,
    No problem about the help, I am glad to have helping you get rid of the problem! I think I see the dialog your are referring to now.  Is it the one that asks the user to replace the file?  If so, this is because when the file already exists, the default behavior of the File Open/Create/Replace funtion (used inside the Write to Spreadsheet File.vi) is to show "advisory dialogs."  You can turn those off though, if you'd like, by wiring the boolean input within the Write to Spreadsheet File.vi.  I have attached a version of that Write to Spreadsheet File with Advisory Selection.vi called, and used it in a new version of the test VI you sent.  Together, they give the behavior of writting a file you choose (say MyFile.txt) with the front panel control, as well as a file named with _new appended to it (say MyFile_new.txt).  By exposing the underlying advosory boolean, we can supress or expose such dialogs in all instances you wish.
    Was that the dialog problem?  Try the VIs attached in the zip file!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear
    Attachments:
    slightly modified VIs.zip ‏32 KB

  • Error while saving dynamic row values of datagrid with record.

    hi friends,
    i am trying to add dynamic row in datagrid and save that value with record.i succeeded in first part while i am saving the record the error show like this.
    errro:Property fromAmount not found on com.ci.view.Task and there is no default value.
    how i resolve this error.
    any suggession welcom
    thanks in advance.
    B.venkatesan
    code:
    package:
    package com.ci.view
        [Bindable]
        public class Task
            public function Task(frmAmount:String,toAmount:String,commissionPercentage:String)
                this.frmAmount=frmAmount;
                this.toAmount=toAmount;
                this.commissionPercentage=commissionPercentage;
            public var frmAmount:String;
            public var toAmount:String;
            public var commissionPercentage:String;
    main mxml:
    [Bindable]
                private var tasks:ArrayCollection;
                private static const ADD_TASK:String= "";
                private function init():void
                    tasks = new ArrayCollection();
                    tasks.addItem(new Task("0","1000","0"));
                    tasks.addItem({frmAmount:ADD_TASK});
                private function checkEdit(e:DataGridEvent):void
                    // Do not allow editing of Add Task row except for
                    // "Click to Add" column
                    if(e.rowIndex == tasks.length - 1 && e.columnIndex != 0)
                        e.preventDefault();
                private function editEnd(e:DataGridEvent):void
                    // Adding a new task
                    if(e.rowIndex == tasks.length - 1)
                        var txtIn:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                        var txtIn1:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                        var txtIn2:TextInput =TextInput(e.currentTarget.itemEditorInstance);
                        var dt:Object = e.itemRenderer.data;
                        // Add new task
                        if((txtIn.text) != ADD_TASK)
                            var x:String=String(txtIn.text);
                            tasks.addItemAt(new Task("", "", ""), e.rowIndex);
                        // Destroy item editor
                        commPlanDetGrid.destroyItemEditor();
                        // Stop default behavior
                        e.preventDefault();

    Venktesan,
    You are trying compare String and int..! which is not possible try to case the txtIn.text to int using parseInt(txtIn.text).
    ORIGINAL:
    if(txtIn.text != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                        tasks.addItemAt(new Task(txtIn.text, 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
    EDITED:
    if(parseInt(txtIn.text) != ADD_TASK).---->error : Comparison between a value with static type String and a possibly unrelated type int
                        tasks.addItemAt(new Task(parseInt(txtIn.text), 0, ""), e.rowIndex);----> error:Implicit coercion of a value of type String to an unrelated type int.
    Thanks
    Pradeep

  • How to record value of field to perform action when saving with new value

    Hi,
    I have a multi-tabbed form (Forms 6i). I need to include code so that when a field is changed on one tab and is saved, then I need to update some fields on the other tabs.
    My first question is: How can I record a copy of the field whenever data is brought into the form (ie: through a query), and then what is the best way to update the other data:
    1) Update the database and then requery somehow
    2) Update the fields on the other tabs and then commit to the database?
    And roughly I how I do it?
    Any help appreciated
    Adam

    > if the user is inserting a new record and I try and use the DATABASE_VALUE property on that field.... what is going to happen?
    Read the on-line help for Database_value. Use :System.record_status to determine if the record is being inserted, then don't get database_value. It is not clear, but I believe on such records, it returns the current value of the item, not a null value. Regardless, it is useless.
    If you want to update fields in other blocks in your form automatically based on changes in a different block, you can start a non-repeating timer in a when-validate-item trigger on the field. When the timer expires, you can navigate to the other blocks and to various records, and update the fields in the other blocks. Then when the user commits, all changes will be applied together. The only trick to using a timer like that is that in the commit process, you also need to check to see if the timer exists, and if it does, delete the timer and do the updates to the other tables.

  • Saving modifled ARGB values in an Integer array to a jpeg file?

    Hi,
    I have searched sites and forums and it seems that the key to this is to use BufferedImage and Graphics's drawImage(). But how can I use the drawImage when I only have an array of integer values?
    I went through the docs and seems that BufferedImage class's setRGB() method may suit my purpose but the results were negative. The saved jpeg was just painted black instead of the photo.
    Does my code below make any sense or am I missing out something here? Any help will be greatly appreciated!
    //from my code, oneDPix is an int[] array containing modified ARGB values
    BufferedImage buff = new BufferedImage(imgCols,imgRows,BufferedImage.TYPE_INT_ARGB);
    Graphics2D g = buff.createGraphics();
    buff.setRGB(0,0,imgCols,imgRows,oneDPix,0,imgCols);
    try {
         String targetFile = "/Users/cover.jpg";
            ImageIO.write(buff,"jpg", new File(targetFile));
            } catch (IOException ex) {
                ex.printStackTrace();
            }

    hi, if your array has the right values, then you could use the createImage method of the class Toolkit and teh class MemoryImageSource for making the image before, something like this:
    Image ima = Toolkit.getDefaultToolkit().createImage(new MemoryImageSource(numOfColumns, numOfRows, ColorModel.getRGBdefault(), array, 0, numOfColumns));
    BufferedImage bi = new BufferedImage(numOfColumns, numOfRows, BufferedImage.TYPE_INT_RGB);
    Graphics g = bi.getGraphics();
    g.drawImage(ima, 0, 0, null);
    g.dispose();
    ImageIO.write(bi,"jpg",new File(targetFile));hope this helps

  • Restoring af:selectBooleanCheckbox value after setting visible=true

    Using JDev 11.1; I have a table that displays data from a model object, and one of the columns contains true/false values which we render in the table using an af:selectBooleanCheckbox. All works fine except that user is able to hide the table by expanding other components which sets visible=false on the bounding component for the table. If user elects to redisplay the table by reducing the other component zoom, then the table displays again but the selected check-marks/tags do not return.
    Thought initially it might've been because the query was being reissued on the table, but not so. More about the selected attribute on the af:selectBooleanCheckbox, which I have set to the default (false). So the value property is set to the table collection attribute as required to interface with the model, but I need to know what to set the selected attribute to. I can see that when the table is redisplayed, this default value of false is being sent through to the model which is discarding the values I want to retain.
    I've tried some EL in the selected property to set it to true/false based on what's in the table, but the problem with that is that it becomes essentially a read-only control. I need to find some way to disable the value assignment when making the table visible again. Any suggestions?
    Thanks,

    Andrefs,
    In ADF BC, one way we deal with this is by adding a transient Boolean attribute to the View Object with getters (translate 0/1 to false/true) and setters (vice-versa). Then, we bind the UI to the transient attribute. It's been so long since I've done EJB's, but could you take a similar approach?
    John

  • Af:selectBooleanCheckbox | value setting and auto submitting

    Hi
    Could somebody please guide me on the following issue?
    I have a table based out of a view object alone. I added the table an additional column which contains a selectBooleanCheckbox.
    I want this check box be selected depending on a value of another column when the page is loaded. Once it is loaded, I should be able to check/uncheck and get the complete row details so that I can able to process then add/remove it to the DB.
    Any help would be much appreciated.
    Regards
    Praveen

    But i am not able to set the checkBox once it is loadedIf your transitent attribute has a Groovy expression-based default value, then this attribute could not be updated anymore. I faced similar problem some time ago. Such attributes are considered "calculated" and their values are calculated always based on the specified expression. As a workaround you could define the "boolean" attribute as an SQL-derived attribute instead of transient one (by including in the SQL query an expression that corresponds to the initial value you need).
    You may have a look at this thread for some other hints:
    {thread:id=2128888}
    Dimitar

  • SelectBooleanCheckBox value

    Hi, I have af:selectBooleanCheckBox on my page it is binded to a RichSelectBooleanCheckbox property in a bean . How can I programmaticaly set checkbox
    selected property to true (checked)?

    This is my use case: value property of af:selectBooleanCheckbox is point to an expression but I can't checked or uncheked it it from the web page. Can you tell me why? http://groundside.com/blog/DuncanMills.php?title=multi_select_in_af_table&more=1&c=1&tb=1&pb=1
    This is what I would like to achieve.
    <af:table value="#{bindings.People1.collectionModel}" var="row"
    rows="#{bindings.People1.rangeSize}"
    first="#{bindings.People1.rangeStart}"
    emptyText="#{bindings.People1.viewable ? 'No rows yet.' : 'Access Denied.'}"
    fetchSize="#{bindings.People1.rangeSize}"
    selectedRowKeys="#{bindings.People1.collectionModel.selectedRow}"
    selectionListener="#{bindings.People1.collectionModel.makeCurrent}"
    rowSelection="single" partialTriggers="selectAllBtnID">
    <af:column sortProperty="PersonSelect" sortable="true"
    headerText="#{bindings.People1.hints.PersonSelect.label}"
    headerNoWrap="true">
    <af:selectBooleanCheckbox
    id="selectOneCheckBoxID"
    autoSubmit="true"
    value="row.PersonSelect == 1"/>
    </af:column>

  • Editable JComboBox -Saving itz new value in the database.

    Hi,
    I have a Combobox say Product , in which some fields (like -> tv , hand blender etc) comes from Database and i have added one more field say others ,
    in others field user can enter new product name and it shd be saved in the same database, i have used editable jcombobox but dnt no how to proceed further.
    Thanks & Regards
    Komal

    And make a provision to delete wrong entries, or you'll end up with all the typos stored separately.
    I speak from experience. I actually have such a combo in several of my VFP applications (not in Java though)
    db

  • Saving the Control Values on a Front Panel

    I am creating a VI in which I have approximately 10 front panel controls that can be changed by a user. Instead of entering the same values over an over again, I would like to provide the user the option to save a set of control values that can then be loaded the next time around via a drop-down box. Before I began I just wanted to see if anyone had done anything similar. I was stumped as to how to approach it. Any suggestions?
    Matt

    Matt,
    You can also use a datalog file. LabVIEW can write and read clusters to a file, and as long as the cluster don't change you should be fine.
    Basically your code would grab the value of each control, bundle it into a cluster and save that cluster to a file. For reading, you read your cluster from the file and get each individual value to drop it in the right control.
    I'm sure there are some shipping examples on this too.
    I hope this helps.
    Regards,
    Juan Carlos
    N.I.

  • Problems while saving the tax values in a Draft Document to AP Invoice

    Hi All
    I have an interface .net where I use a DIAPI to enter values in B1 2007 B (8.60.039) PL 15.
    I have the following cases:
    First case
    - I create a document type oPurchaseInvoices, where I set the tax values for IRPF, INSS, ISSQN (Brazil).
      When i execute the code that inserts this A/P Invoice in SAP, it works perfectly, including by setting the values of the taxes correctly.
    Second case
    - I create a document type oDrafts, and say that this draft is the type oPurchaseInvoices.
      After that I follow the same steps to launch a note entry, laying the tax values(IRPF, INSS, ISSQN) and everything else.
      When i execute the code that inserts this values in the draft, the tax values are not entered and that everything else works perfectly. 
    You can tell me whether the taxes really are not inserted when I issue a draft or I'm leaving to score some parameter.
    I am in the look of your response
    Regards
    Luis Felipe

    Hi Gordon.
    You can see below the part of the code to add the Draft Document.
    oAPInvoice = oCompany.SapCommand.GetBusinessObject(BoObjectTypes.oDrafts)
    oAPInvoice.DocObjectCode = BoObjectTypes.oPurchaseInvoices
    With oAPInvoice
        .Lines.TaxLiable = BoYesNoEnum.tYES
        .Lines.ItemCode = Itemcode
        .Lines.Quantity = Quantity
        .Lines.UnitPrice = Unitprice
        .Lines.TaxCode = Taxcode
        .Lines.WTLiable = BoYesNoEnum.tNO
        .Lines.Usage = "Consumo"
        If oDTO.IRRF > 0 Or oDTO.INSS > 0 Or oDTO.ISSQN > 0 Then
            If oDTO.WtLiable = "Y" Then .Lines.WTLiable = BoYesNoEnum.tYES
            Add tax values
            For i As Int16 = 1 To 3
                vlrImposto = 0
                addTax = False
                If IRRF > 0 And Not addIR Then
                    codImposto = CodeIRRF   (tax code)
                    vlrImposto = IRRF             (tax value)
                    addIR = True
                    addTax = True
                ElseIf INSS > 0 And Not addINSS Then
                    codImposto = "F501"  (tax code)
                    vlrImposto = INSS       (tax value)
                    addINSS = True
                    addTax = True
                ElseIf ISSQN > 0 And Not addISSQN Then
                    codImposto = CodeISSQN  (tax code)
                    vlrImposto = ISSQN            (tax value)
                    addISSQN = True
                    addTax = True
                End If
                If addTax Then
                    (If include more one tax then add line)
                    If i > 1 And vlrImposto > 0 Then .Lines.WithholdingTaxLines.Add()
                    .Lines.WithholdingTaxLines.WTCode = codImposto                     (tax code)
                    .Lines.WithholdingTaxLines.TaxableAmount = Unitprice              (base value calculation)
                    .Lines.WithholdingTaxLines.WTAmount = vlrImposto                   (tax value)
                End If
            Next
        End If
        .CardCode = Cardcode
        .CardName = Cardname
        .HandWritten = BoYesNoEnum.tNO
        .DocDueDate = DueDate
        .DocDate = DocDate
        .TaxDate = TaxDate
        .SequenceCode = -2      '-1=Manual  -2=External
        .SeriesString = "RCB"
        .SequenceModel = 37
        lRetCode = .Add()
    End With
    Regards
    Luis Felipe

  • Passing global variable values from databse to forms

    I am using forms 6i and database is oracle 9i.
    I am trying to run a form stand alone ( by pressing CTRL-R) without putting it in the application.
    since when this form is placed in the application menu it works fine as it has been passed global variables values from the database .
    now i am trying to run the form without menu and thus i want to pass the values of global variables .please let me know where should i pass these values in form .is it be WHEN-NEW-FORM-Instance trigger or in Pre-form trigger.
    i know what are the global variable values passing into the form from database.
    i can hard code any values to check if the form runs well or not.

    If you intend to do this sort of testing regularly you might want to consider creating a seperate form with a control block which allows entry of the name of the form you want to run, the names of the globals and their values, and do a CALL_FORM.

Maybe you are looking for