How to set 1 field in anothers converter

I have a converter on a field. I also have a field for an informational message. I either need to be able to set a FacesMessage in the backingBean method, or be able to blank out the informational message field in the converter.
Here is part of the JSP.
<h:outputText id="userMessage" value="#{allAuthUser.userMessage}" styleClass="errorMessage"/>
     <h:panelGrid columns="1" headerClass="tableHeader">
          <f:facet name="header">
               <h:outputText value="Auth User Application Orgs Table Maintenance"/>
          </f:facet>
          <f:verbatim> </f:verbatim>
          <f:subview id="filters">
               <h:panelGrid columns="9">
                    <h:outputText value="User Id:"/>
                    <h:inputText value="#{allAuthUser.userId}" size="10" maxlength="20"/>
                    <h:outputText value="App Id:"/>
                    <h:inputText id="appId" value="#{allAuthUser.appId}" size="3" maxlength="3">
                         <f:converter converterId="tblmaint.AppId"/>
                    </h:inputText>Here is part of the converter class.
public Object getAsObject(FacesContext context, UIComponent component,
              String newValue) throws ConverterException {
     if (StringUtils.isNullOrEmpty(newValue)) {
          return null;
     } else if (!ApplicationUtils.isInteger(newValue)) {
          // set userMessage = ""; - but how?
          FacesMessage message = new FacesMessage(ApplicationResources.getMessage(
                    "com.monsanto.ag_it.fieldops.error.integer"));
          message.setSeverity(FacesMessage.SEVERITY_ERROR);
          throw new ConverterException(message);
     } else {
          return new Integer(newValue);
}Here is the backingBean method:
public String refreshButton() {
     allAuthUserList = null;
     userMessage = ApplicationResources.getMessage(
               "com.monsanto.ag_it.fieldops.message.refresh");
     return "allAuthUser";
}So, how can I set an informational message in the refreshButton method,
or, how can I set the userMessage field to "" in the converter?
Thanks,
Ray

You can find the backing bean as follows:
conext.getApplication().getVariableResolver().resolveVariable(context, "allAuthUser")I don't like this solution because it hard-codes the name of the backing bean
and forces the page authors to use the name("allAuthUser").
Another solution is to use RequestMap for sharing the message between backing beans and converters.
For example, the converter put a new message as
context.getExternalContext().getRequestMap().put("userMessage", newMsg)And the backing bean get the new message from the RequestMap based on the key.
In the solution, the hard-coded key("userMessage") is only the contact between the backing bean and the converter, not with the page author.

Similar Messages

  • How to set key fields in a Database view

    Hi guru's
    iam balaji,plz guide me with how to set key fields in a view.......that field is a non key field in the base table....
    thanks in advance,
    Balaji.S

    take a look at this:
    Diagnosis
        In the view, not all of the mandatory fields were included as key
        fields. The key of the view therefore is not unique.
    System Response
        All the fields are regarded as key fields in order to guarantee that th
        key lengths are unique.
    Procedure
        For views with a large number of fields, this could have a negative
        effect on the performance for the language construction described below
        In this case, all the mandatory key fields should be included in the
        view.
    regards

  • How to set Character field's Format Mask?

    dear all,
    how to set Character field's Format Mask?
    i searched the forum and found the following, where can i use this code and how to change and set its format mask.
    SRW.SET_FORMAT_MASK('mask');
    Thanks
    Muhammad Nadeem

    Nadeem,
    If you have database 10g, look into function REGEXP_REPLACE. Otherwise you can also try this (you might already know).
    SELECT SUBSTR('CHHOCMIPO07020001', 1,2)||'-'||SUBSTR('CHHOCMIPO07020001' ,3,2)||'-'||
    SUBSTR('CHHOCMIPO07020001' , 5,2)||'-'||SUBSTR('CHHOCMIPO07020001' , 7,3)||'-'||
    SUBSTR('CHHOCMIPO07020001' , 10,2)||'-'||SUBSTR('CHHOCMIPO07020001' , 12,2)||'-'||
    SUBSTR('CHHOCMIPO07020001' , 14,4)
    FROM dual
    CH-HO-CM-IPO-07-02-0001
    If you have to use this at many places, create a function, pass the raw value, manipulate the string and return.
    FS

  • How to set the field SKB1-FDLEV as requestred-entry in G/L Master data?

    Hi All,
    Could anyone tell me how to set the field SKB1-FDLEV as requestred-entry in G/L Master data?
    Thanks
    Gandalf

    hi
    Go to OB26
    select Your criteria ( create, change or display)
    double click on it
    again double click on Bank/financial details
    there you will find the Planning level make it require entry
    save
    with regards
    ramanuja chary

  • How to set the field non-editable in the classical report..

    Hi..
              How to set the field non-editable in the classical report..

    Hi experts,
    For the component 'ICCMP_EMP_SRCH' there is a view 'BUPAEMPSEARCH' , which has 2 context nodes 'CUSTOMER' AND 'SEARCHEMPLOYEE' , i need to add the field 'NICKNAME' which is part of the 'CUSTOMER' context node on the search screen. Currrently all the fields on the screen screen are from the 'SEARCHEMPLOYEE' context node. when i did the configuration , the 'NICKNAME' field is greyed out . I have already generated the Getter ,Setter , GET_I, GET_M methods for the 'NICKNAME' field and the context node and controller class and context class are all active .
    on debugging the GET_I method, i see that rv_disabled = 'TRUE' and the current = collection_wrapper->get_current( ) is returning empty value .
    for this rv_disabled to be set false , the code below is not triggered since there is no value in current.
    IF current->is_property_readonly(
    'NICKNAME' ) = abap_false. "#EC NOTEXT
    rv_disabled = 'FALSE'.
    ENDIF.
    when i check for other search fields of context node 'SEARCHEMPLOYEE' , all the fields are set to rv_disabled = 'FALSE'.
    can anyone suggest how to approch this. iam i missing any binding between context nodes or any activations ?
    The field properties are set as Input field and the display checkbox is not checked.

  • How to set the field size in rule file.

    i have to map total 30 fields in a rule file while by default it allows only 20 fields. so how can we set the fields as per our need?

    Hi Dharmendra Ojha,
    Essbase rule file does not constrain you with only 20 fileds.
    When you click on 'create a rule file', by default it ll show you 20 fileds .But , when you open a data file ( in your case , you data file has 30 columns i.e 30 fields) in the data prep editor , you ll see all 30 fileds .
    So ,you have to do nothing to increase the filed count , rule file will automatically show all fields .
    Revert back for further clarity
    Sandeep Reddy Enti
    HCC
    http://analytiks.blogspot.com

  • How to set default field values in customer master data.

    hi,
    I want to set default values in customer master data (account group wise).
    but
    I don't know how to set it .
    please help me.
    (I don't want to change field status in account group rather than I want to set default values for field. )
    thank you.

    hi,
    this is to inform you that,
    in SAP there is no such a provision.
    but
    in LSMW there is an option of CONSTANT VALUES.
    check in SHD0 - also
    please check and confirm
    balajis\a

  • How to set User-field in Plan order

    Hi
    could you tell me please how to set a user-filed in plan order. when I run MRP planing, I can write some data in this filed.
    thanks
    henry

    Hi,
    Actually these user defind fields are used/assigned in the routing.
    Initially u have to define your own user defind profile through OPEC transaction.
    Assign this profile in the routing.
    So when ur executing Mfg activities, suppose if ur using some high materials like silver...etc.
    Then after executing the particular operation some amount of silver chips or silver scrap will generated .
    To keep chip/scrap qty operation and date which user defind is used.
    Once u have assigned this profile to routing, then it will be automatically copied in the planned order/production order.when ur confirming the order then u have to enter the all related data.
    Regards
    Vijay

  • How to set "like" field of the query in statements

    Hi,
    Im trying to set the "like" field of the statement.but it is not executing as expected.Could anybody please tell me,"how to set the like field in statements.
    Here is my code.
    PreparedStatement psum=con.prepareStatement("select count(bill_amount) from master where bill_date like ? and whos_bu=?");
    String myStr=month+"/??/"+year;
    psum.setString(1,myStr);
    psum.setString(2,employeeTray[1]);
    ResultSet rs=psum.executeQuery();

    Tnx a lot vidyut .using % is working.
    Could you plz tell me why the previous one using question mark is not
    working. using quesion mark is correct as per the query syntax.and also i tried with asterisk,it is also not working.
    ps:have some duke dollars.

  • How to set table field mantatary in data dictinary?

    how to set the table field mantatary in data dictinary?
    exampl
    null value not allowed.

    hi,
    check this.
    [https://forums.sdn.sap.com/click.jspa?searchID=19187532&messageID=2575276]

  • How to set screen field in ME_PROCESS_PO_CUST?

    Dear all,
    I need to set this field 'MEPO1317-MWSKZ' to display only by some criteria. I want to know HOW to do it in ME_PROCESS_PO_CUST
    Thanks for your kindly helpful.

    Hi Esaki,
    1) Define new field selection in configuration "Define screen layout at Document level"
    2) write code in fieldselection_item_refkeys as follow
    get item data
    if your condition
      ch_key0 = new field selection
    endif
    Hope it can help u.
    Grace

  • How to set summable field in ALV

    Dear ABAPers,
    I find report that use ALV to show the output. Using my id the field with number type is summable (using ALV sum functionality) but using other id, it can't. Does anyone know how to set this functionality? I read several posting that this one is achieveable by setting up t_field_cat-do_sum = 'X'. But with this set up, it shouldn't have difference when I run by my id and other. I suppose there is something in ALV setting that need to be configured. Please let me know if there are any idea about this issue.
    Thanks a lot.
    Regards
    Hadi

    Hi Karthik,
    We don't set user specific layout. I am afraid there is some authorization code set in the program and it determine ALV activities on different user. Are there possibility of it in ALV?
    However thanks alot for your suggestion.
    Regards
    Hadi

  • How to set country field automatically when creating new customer??

    Hi Gurus,
    when customer number is entered in account identification, if there is no matching account, a new one is created. While creating , in the screen there is an country field and I want to set this field to a fixed value of our country. How can I do this??

    Hi everybody,
    I got a simple question. Can I use BADI: BADI_CRM_BP_UIU_DEFAULTS of Enhancement Spot CRM_UIU_BP_ENHANCEMENT
    to make the country 'US' as a default value for component: ICCMP_BP_DETAIL  (NOT: BP_HEAD)?
    Component ICCMP_BP_DETAIL is Interaction Center.
    If not which Badi or way I can use to make country 'US' as default value?
    Best Regards
    Oliver
    Edited by: Oliver Schultze on Dec 9, 2010 4:33 PM

  • HCM F&P - How to set the field as Required based on drop down values

    Hi Experts,
    I have a requirement to set the Date field as mandatory when a particular value is selected in drop down list. I have already tried with MessageBox though it displays the error message but process moves further i.e. on clicking Check & Send button it throws an error message but still it moves further and i can see only Send button. Ideally it should halt there itself.
    Thanks & Regards,
    Jitesh Talreja

    Thanks for your valuable inputs
    Chintan
    I have already tried this. It only highlight the field with the red border but still allow to move further.
    Mukesh
    Yes, we can definately control this from the backend but that would be the last option i should execute. Ideally, this is something to be controlled in front end itself
    Poornima
    By setting the field attrbiute Required will set the field mandatory as a whole irrespective of drop down values or any other UI element.
    Regards,
    Jitesh Talreja

  • Tabular form - how to set a field to a constant?

    I'm using a tabular form to update a table - and this works. Then I remembered that I need to also update the field that keeps track of who made the change.
    Setting this field via the SELECT (e.g. Select 'userX' as editor from ...) for the tabular form fails due to a db concurrency error (MRU 20001) upon submission.
    Attempting to override the current value in [Column Attributes] of the field in the [Elements Attibute] setting - [value="userX"] simply adds this as the second value argument of the input element (of the html source).
    Suggestions?

    Similiar scenario - I have a flag in this table set false that a user can set true when they feel they have satisfactorily reviewed the record.
    Since it's in a tabular form it can be changed along w/ other records, but they may not feel the review is complete (so they effectively want the flag to remain false).
    I'd like to be able to read records in but set/default the value to reviewed (as a convenience) but due to the problems noted above, this doesn't seem possible.

Maybe you are looking for

  • If my wife and I share an iTunes account, will we be able to keep independent app data?

    For example, if we both install a To Do List app, will we both be able to keep our own lists? Is the data tied to the app backed up in our independent iCloud accounts and/or iTunes backups on our separate Macs?

  • Move data from one fs to another from a particular position.

    Hi all, i have a requirement where i want to move data from one field symbol to another from a particular position. I have a work area which contains string values. i have converted this string to hexadecimal value . in this hex string m lukin for a

  • Rolling back from OIM version 11g to 9.1.0.2

    Experts, OIM version upgrade from 9.1.0.2 to 11g(11.1.1.5) need to be rolled back due to some error. Just wanted to know views of experts. Following steps have been completed so far of the upgrade guide [http://docs.oracle.com/cd/E21764_01/upgrade.11

  • My iPod touch gets wi-fi signal, but doesn't work..?

    i've had my ipod touch for about a year and i use my friends wi-fi all the time at her house. she has a linksys router and cable internet. i recently got at&t internet, which is dsl. the internet modem also works as a router, with wi-fi. i can connec

  • SRM MDM 3.0 BMECAT Repository Schema

    Hello at all, I have currently run the SRM-MDM 3.0 with the standard respository delivered as archive on the install CD. I still have created some data with the data manager and it runs all very well. Now I want to import a catalog based on BMECat 1.