Special character restrictions

Hello

I have a situation, the restriction of special characters on address fields.

As I know, by partial dynamic action and below the code useful to achieve this.

Here is the piece of code to restrict the special characters...

Cadd string = pageContext.getParameter ("addressflexid");

Model p=Pattern.compile("[^a-zA-Z0-9\\\s]"); "

Matcher m = p.matcher (cadd);

If (m.Find ())

{

throw new OAException ('special characters should not allow Address', OAException.ERROR);

}

but here ' address' fields style is the "Flex" (Descriptive).

How to handle this kind of situation.

Try this. [This is based on the code and debug, you gave. [I've edited this in NotePad ++ and not in Jdev, so could get compile errors.]

public class xxAddressUpdateCO8 extends AddressUpdateCO {
  public xxAddressUpdateCO8() {
  }

  public void processRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean) {
  super.processRequest(paramOAPageContext, paramOAWebBean);

  /*  get the value from the VO Row     */
  OAApplicationModule oaAM = paramOAPageContext.getApplicationModule(paramOAWebBean);
  paramOAPageContext.writeDiagnostics(this, " Set the oaAM " +oaAM, 6);

  OAViewObject asgSumvo=(OAViewObject)oaAM.findViewObject("AddressUpdateVO");
  paramOAPageContext.writeDiagnostics(this, " Set the oaAM " +oaAM, 6);            

  OARow row = asgSumvo.first();

  String AddLine1 = (String)row.getAttribute("AddressLine1");
  paramOAPageContext.writeDiagnostics(this, " AddLine1 " +AddLine1, 6);            

  String AddLine2 = (String)row.getAttribute("AddressLine2");
  paramOAPageContext.writeDiagnostics(this, " AddLine2 " +AddLine2, 6);

  String AddLine3 = (String)row.getAttribute("AddressLine3");
  paramOAPageContext.writeDiagnostics(this, " AddLine3 " +AddLine3, 6);   

  OADescriptiveFlexBean oaDFF= (OADescriptiveFlexBean)paramOAWebBean.findIndexedChildRecursive("HrAddressFlex"); //get the DFF bean
  paramOAPageContext.writeDiagnostics(this, " oaDFF " + oaDFF, 6);

  OAMessageTextInputBean bean1=(OAMessageTextInputBean)paramOAWebBean.findIndexedChildRecursive("HrAddressFlex1");
  paramOAPageContext.writeDiagnostics(this, " bean1 " + bean1, 6);
  FireAction firePartialAction = new FirePartialAction("speccharevent1");
  paramOAPageContext.writeDiagnostics(this, " firePartialAction " + firePartialAction, 6);
  bean1.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,firePartialAction);
  paramOAPageContext.writeDiagnostics(this, " Set the oaDFF " , 6);

  OAMessageTextInputBean bean2=(OAMessageTextInputBean)paramOAWebBean.findIndexedChildRecursive("HrAddressFlex2");
  paramOAPageContext.writeDiagnostics(this, " bean2 " + bean2, 6);
  firePartialAction = new FirePartialAction("speccharevent2");
  paramOAPageContext.writeDiagnostics(this, " firePartialAction " + firePartialAction, 6);
  bean2.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,firePartialAction);
  paramOAPageContext.writeDiagnostics(this, " Set the oaDFF " , 6);

  OAMessageTextInputBean bean3=(OAMessageTextInputBean)paramOAWebBean.findIndexedChildRecursive("HrAddressFlex3");
  paramOAPageContext.writeDiagnostics(this, " bean3 " + bean3, 6);
  FireAction firePartialAction = new FirePartialAction("speccharevent3");
  paramOAPageContext.writeDiagnostics(this, " firePartialAction " + firePartialAction, 6);
  bean3.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,firePartialAction);
  paramOAPageContext.writeDiagnostics(this, " Set the oaDFF " , 6);

  }

  public void processFormRequest(OAPageContext paramOAPageContext, OAWebBean paramOAWebBean) {

  super.processFormRequest(paramOAPageContext, paramOAWebBean);
  OAApplicationModule oaAM = paramOAPageContext.getApplicationModule(paramOAWebBean);
  paramOAPageContext.writeDiagnostics(this, " Set the oaAM " +oaAM, 6);

  OAViewObject asgSumvo=(OAViewObject)oaAM.findViewObject("AddressUpdateVO");
  paramOAPageContext.writeDiagnostics(this, " Set the oaAM " +oaAM, 6);            

  OARow row = asgSumvo.getCurrentRow();

  String eventParam = paramOAPageContext.getParameter(EVENT_PARAM);
  paramOAPageContext.writeDiagnostics(this, eventParam, 6);            

  if( "speccharevent1".equals(eventParam))
  {
  String AddLine1 = (String)row.getAttribute("AddressLine1");
  paramOAPageContext.writeDiagnostics(this, " AddLine1 " +AddLine1, 6);
  }
  if( "speccharevent2".equals(eventParam))
  {
  String AddLine2 = (String)row.getAttribute("AddressLine2");
  paramOAPageContext.writeDiagnostics(this, " AddLine2 " +AddLine2, 6);
  }
  if( "speccharevent3".equals(eventParam))
  {
  String AddLine3 = (String)row.getAttribute("AddressLine3");
  paramOAPageContext.writeDiagnostics(this, " AddLine1 " +AddLine1, 6);
  }  

}

See you soon

AJ

Tags: Oracle Applications

Similar Questions

  • Change order number/special character artists

    I would like to know if there is a way to change the order of all the artists that begin with a number or a special character order. Currently, they are all sitting at the bottom of the list of the artist on the ipod (and iTunes) but I would like to have all displays at the top of this list.

    This is the sort order...  I think you would need to change the names of the artists so that they start with something that gets sorted at the top of the list in alphanumeric order.  For example, replace 10,000 Maniacs a_10, 000 Maniacs.

  • Type a special character quickly

    Hello everyone,

    I want to type this ← special character that is an alternative to the arrow to the left.

    Is there a way to have a shortcut keyboard or another way to quickly type in what I want?

    Thank you.

    I think that there is a text replacement for default <-. You can create an if it is not on your Mac.

    If this is not suitable, you will have to use some third-party hot key programs or create a Service of Automator, which types the character (using a run AppleScript action). I can probably show you how the automator service, if necessary.

  • Invisible ESSId with a special character - Satellite M40

    Hello

    I have a Satellite M40 with a card atheros AR5005g wireless.
    I have a wireless network with WPA2-PSK encryption. The ssid looks like this: g4s8j6b-extraordinary character-o7v35s7gt3q1c6b8
    With the latest version of the driver, it is impossible to see one ssid to connect to this network.
    I tried a USB of Atlantis wireless adapter and it can find the wirelessnetwork (I can not connect because the USB adapter is not supported WPA2-PSK)

    For me it is the problem of driving. How can I solve this problem? This 'special character' is not recognizing drivers isn't? is it possible to convert the ssid in the HEX code and insert the ssid in hexadecimal and hexadecimal key in a data to force the connection? (manual connection like Linux)

    your faithfully

    Oh this forum does not support the character... it looks like this: http://en.wikipedia.org/wiki/%C3%9F
    (Unicode U + 00DF)

    That the SSID is very long. Have you tried to use a shorter SSID?

  • possible bug in match pattern string of dot and a special character

    Hi friend recently and I find something in game chain model that it looks like bug, I want to know labveiw expert opinion on it
    the possible bug is
    have you ever tried to match (.) dot for use in regular expression? this icon could not find the point inside the string? 
    I also think what happens if we try to find a character within a string that is a piece of special character
    for example how you can use this icon to find \b inside the string as (hatef\blabview)?

    [.] to find the period

    \\B to find the backslash b

  • special character

    Hello

    in the groovy code,.

    I want to write

    FTRInstructionResult where (name = 'a' name')

    But ' nme contains an apostrophe. Foglight doesn't. How to tell foglight is a special character? And not the end of the expression.

    Thank you.

    The ITI is not Foglight who dislikes your characters

    It's groovy or java string syntax. If you wish to escape the Apostrophe with a backslash as follows

    ' a\ 'name '.

    Stefan

  • display a special character of JSON result

    Hi all

    first of all, thanks to you all for your time and response to all the different thread, it was very useful for me to start my development.

    This is my first post, I will try to be clear:

    in my method of retrieving Http to json String using this:

    ...

    httpConnection = (HttpConnection) Connector.open (url + "; (= wifi interface", Connector.READ_WRITE, true);

    ...

    inputStream = (InputStream) httpConnection.openInputStream ();

    ..

    resultString = new String (IOUtilities.streamToBytes (inputStream));

    ...

    the resultString contains characters like 'ï' or ' A ' that are supposed to be french character 'i' or 'e '.

    How can I do to print the insterad of charcacter of french law of this special character?

    Thank you for all

    Sorry for my post, I just found the solution here:

    http://supportforums.BlackBerry.com/T5/Java-development/could-not-print-French-characters-from-a-JSO...

    in this way:

    Dim str As String = String (IOUtilities.streamToBytes(input,2) new, 'utf-8');

  • Find a special character AUTO_PAGE_NUMBER

    I try to find the master text block, contains characters special corrent page number, when I run this code:

    var doc = app.activeDocument;
    var masters = doc.masterSpreads.everyItem().textFrames;
    for(i=0;i<masters.length;i++){
         $.writeln(masters[i].contents[0])
    }
    

    [I get the brand don't understand, like this:]

    And copy the following code returns error "special character is not defined.

    var doc = app.activeDocument;
    var masters = doc.masterSpreads.everyItem().textFrames;
    for(i=0;i<masters.length;i++){
        if(masters[i].contents[0] == specialCharacters.AUTO_PAGE_NUMBER){
            alert("OK")
        }
    }
    
    

    How can I do?

    I thank in advance

    To deal with items found on master pages, use something like this:

    app.findGrepPreferences = null;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findGrepPreferences.findWhat = '~N';
    found = app.documents[0].findGrep();
    for (i = 0; i < found.length; i++) {
      if (found[i].parentTextFrames[0].parent instanceof MasterSpread) {
        // Do something
      }
    }
    

    > I should find variable overall and GREP ~ N find variable local result.

    Do not understand that. Can you explain?

  • A special character validation using regular expressions in ADF

    Hi guys,.

    I want to put the validation of a special as character (,.') ((en) &, -) using regular expressions.

    I asked the posting as [a-zA-Z0-9'(.),--/ &] but it does not work properly.

    Special characters should be like:

    Comma,

    Hyfan-

    Dot.

    Open and close braces (and).

    Ampercent &

    Apastrophy '

    Space ""

    Please help if anyone has idea.

    And I also tried to put under expression as...

    [a-zA-Z] + (\\s* [0-9] * [a-zA-Z] *-* & * \\(*\\) *, *'*. *) * [a-zA-Z0-9] + but we need the validation if we put special characters between the charater as "ab," chain "& (bc).

    his does not work if I put a special character at the beginning and the end of the string in the ADF

    Thanks Timo...

    its working fine...

  • How to know the special character?

    I use the Release 10.2.0.1.0 Oracle version. I have a special character, but I suspect it as any other language caharacter.
    His appearance in my "quick editor/Sql TOAD Editor" as "has? but when I'm selecting from the table to aid under application, her gives "no rows returned.

    Select the tab1 id where id like 'a % ';

    Please let me know, how can I be able to see the exact character or what Publisher will allow me to see the character?
    I think the sql GUI developer might be able to show the same, but I don't have Developer sql with me.

    930254 wrote:
    I use the Release 10.2.0.1.0 Oracle version. I have a special character, but I suspect it as any other language caharacter.
    His appearance in my "quick editor/Sql TOAD Editor" as "has? but when I'm selecting from the table to aid under application, her gives "no rows returned.

    Select the tab1 id where id like 'a % ';

    Please let me know, how can I be able to see the exact character or what Publisher will allow me to see the character?
    I think the sql GUI developer might be able to show the same, but I don't have Developer sql with me.

    Select ASCIISTR (id) in tab1 where id like 'a % ';

  • Display records with a special character to the end user

    Hello

    What follows with the exception of special characters such as the comma, colon (:), space, preview, brackets [], parenthesis(), key entry, quote (') single, the double quotes (""), full stop (.), slash (/) forward, backward slash (\), + (plus), % (percentage),?) (questionmark), # (pound sign)

    -> if anyone is available in the record, I want it back and also show the special character. for example, retrieval must be id 21, 22: 16
    -> also I want a list of special characters like message in the sql
    for example, 16 ID, (¶, §) must be displayed in the output



    WITH abc AS
    (

    11 SELECT ID, ' he is suffereing
    jaundice"summary FROM DUAL
    UNION ALL
    Order 12, "we can go to the bus stop. OF THE DOUBLE
    UNION ALL
    SELECT 22, 'a mΦnsoon is provided affect≈the region during the next φ a few days' OF the DOUBLE
    UNION ALL
    SELECT 16, "Film¶city looks like go§d." DOUBLE
    UNION ALL
    SELECT 21, "The International @l ¥ mpic Committee moved the bike could Calm fears scratching the Olympic Games." OF THE DOUBLE
    UNION ALL
    SELECT 17, ' John F Kenny was a "young president" America "OF the DOUBLE
    UNION ALL
    18 SELECT, ' the Department of elections, identified (10) polling stations for voters to go to
    thei\r January 26 vote for the by-election of Punggol East Single Member constituency ' FROM DUAL
    UNION ALL
    SELECT 19, "the pilot of the helicopter that + crashed in Central London were thousands of"
    hours of experience of aviation including flight % for films such as die another day and save #Private #Ryan?' THE DOUBLE)
    Select id, summary, 'show special char' in splch
    ABC
    ;

    OUTPUT
    SUMMARY of the splch ID

    Film¶City 16 looks like go§d. ¶§
    21 the International @l ¥ mpic Committee moved the bike could Calm fears scratching the Olympic Games. @¥ O
    22 a mΦnsoon is planned for the region during the next φ affect≈the days Φ≈φ

    Hello

    Here's one way:

    WITH     got_special_characters     AS
    (
         SELECT  id
         ,     summary
         ,     REGEXP_REPLACE ( summary
                          , '[][[:alnum:],: ()''"./\+%?#'  ||
                                CHR (10)                ||
                         '-]'
                          )     AS special_characters
         FROM    abc
    )
    SELECT       id
    ,       summary
    ,       special_characters
    FROM       got_special_characters
    WHERE       special_characters     IS NOT NULL
    ORDER BY  id
    ;
    {code}
    Inside square brackets, the characers ']' and '-' have special meanings, unless you use them in places where the special meaning can't apply.  That means the ']' must be the first character inside the square brackets (Oracle assumes you're not ending the set right after you begin it) and the '-' must be the very last character inside the square brackets.
    Depending on what newline is on your system, you may want to use CHR (13) in addition to, or instead of, CHR (10).
    
    it would be more efficient to use the TRANSLATE fucntion, rather than REGEXP_REPLACE, to produce special_characters.  You'd have to list all 80 or so of the non-special characters, but you'd only have to do it once.
    {code}
    WITH     got_special_characters     AS
    (
         SELECT  id
         ,     summary
         ,     TRANSLATE ( summary
                     , '=0123456789ABCEDFGHIJKLMNOPQRSTUVWXYZabcedfghijklmnopqrstuvwxyz,: -[]()''"./\+%?#'
                           || CHR (10)
                     , '='
                     )     AS special_characters
         FROM    abc
    )
    SELECT       id
    ,       summary
    ,       special_characters
    FROM       got_special_characters
    WHERE       special_characters     IS NOT NULL
    ORDER BY  id
    ;
    

    Published by: Frank Kulash on 16 January 2013 12:35
    TRANSLATE the code added.

  • Invoice number with a special character

    Hi team,

    We have a requirement to compare the invoice number of the child database data.

    We save the master invoice number in the variable to access the data of the child.

    Our number is the invoice number is to have either a special character '-' because of which equal to the function does not work.

    Pourrait a guide on this issue.

    Here is the code
    ? xdoxslt:set_variable($_XDOCTX,_'v1',_ssInvoiceNumber)? >

    <? If: (xdoxslt:get_variable($_XDOCTX,'v1') = ssInvoiceNumber)? > View the data <? end if? >

    Even if the data are not same the run loop if and its unwanted display of data.

    The invoice number as (1-100678, 1-100677, 1-100679).

    See you soon,.
    Andy

    want to remove numbers HYPHEN before compare it?

    use

    
    

    to remove the HYPHEN

    
    
  • Failed to create database link when the password has a special character

    I am trying to execute the following statement in sqlplus

    create alpha link database to connect to scott identified by tiger! using "db_alpha".

    Note that the password of the account has an exclamation mark inside. the command fails. I tried to put the password in quotation marks (') and double quotes (""). Working the double quotes, but then the link does not work properly.

    We are required to have a special character in our passwords... so, how can I get this special character in the password for the database link?

    Thanks in advance,
    Darren

    Darren2 wrote:

    #2 attempt:

    SQL > create database link BLAH connect to user2 identified by 'tiger!' using 'BLAH ';

    Created database link

    SQL > salt {color: black} {color} ect {color: black} {color} * en {color: black} {color} om my{color:black}{color}_{color:black}{color}table{color:black}{color}@BLAH;
    Salt {color: black} {color} ect * en {color: black} {color} om my{color:black}{color}_ta{color:black}{color}ble{color:black}{color}@BLAH
    *
    ERROR on line 1:
    ORA-02085: link on the database of BLAH. AAA. BB. CCC. DDD connects to
    DEVDB. AAA. BB. CCC DDD.

    For me, that makes no sense. If the link does not work... How did get the "invalid username/password" in the #1 attempt?

    Learn about the GLOBAL_NAMES initialization parameter. Default GLOBAL_NAMES = TRUE, which means the database link is required to have the same name as the database in which it connects. Database name DEVDB link or define GLOBAL_NAMES = FALSE:

    SQL> create user Darren2
      2  identified by "tiger!"
      3  default tablespace users
      4  quota unlimited on users
      5  /
    
    User created.
    
    SQL> grant create session to Darren2
      2  /
    
    Grant succeeded.
    
    SQL> create table Darren2.tbl as select 'Darren2' name from dual
      2  /
    
    Table created.
    
    SQL> create database link sol10@Darren2
      2  connect to Darren2
      3  identified by "tiger!"
      4  using 'sol10'
      5  /
    
    Database link created.
    
    SQL> create database link sol11@Darren2
      2  connect to Darren2
      3  identified by "tiger!"
      4  using 'sol10'
      5  /
    
    Database link created.
    
    SQL> select  *
      2    from  tbl@sol10@Darren2
      3  /
    
    NAME
    -------
    Darren2
    
    SQL> select  *
      2    from  tbl@sol11@Darren2
      3  /
      from  tbl@sol11@Darren2
                *
    ERROR at line 2:
    ORA-02085: database link SOL11.REGRESS.RDBMS.DEV.US.ORACLE.COM@DARREN2 connects
    to SOL10.REGRESS.RDBMS.DEV.US.ORACLE.COM
    
    SQL> select value from v$parameter where name = 'global_names'
      2  /
    
    VALUE
    --------------------------------------------------------------------------------
    TRUE
    
    SQL> select * from global_name
      2  /
    
    GLOBAL_NAME
    --------------------------------------------------------------------------------
    SOL10.REGRESS.RDBMS.DEV.US.ORACLE.COM
    
    SQL> alter session set global_names=false
      2  /
    
    Session altered.
    
    SQL> select  *
      2    from  tbl@sol10@Darren2
      3  /
    
    NAME
    -------
    Darren2
    
    SQL> select  *
      2    from  tbl@sol11@Darren2
      3  /
    
    NAME
    -------
    Darren2
    
    SQL> 
    

    I don't have two databases, so in my sol10 database I create two database links sol10@Darren2 and sol11@Darren2 both pointing to itself (back to sol10 database). That's why I use qualifiers link db. The two links you connect as a Darren2 user with password Tiger!. The global database name is sol10 and initialization of setting global_names = true. As you can see what global_name (sol10) corresponds to the name of the link in sol10@Darren2 db (again, the link name is sol10 and Darren2 is qualifying link) select vai db link works OK. But the sol11@Darren2 link fails because the name sol11 link does not match the name db global sol10. However, as soon as I change global_names false, sol11@Darren2 works fine. It will be useful.

    SY.

    Published by: Solomon Yakobson on January 1st, 2009 08:41

  • delete the special character in the data

    Please guide me when the user enters data across before as letter size, then he insert a special character also include to store.
    Then when I have generations who, in xls sheet, then this special character are act as entered the key. see examples of data like this

    example of data *. * like that

    I would like to know how to cut this special character in the documents.

    Vincent HB

    You could try to build something with the OWA_PATTERN package:

    DECLARE
      v_text VARCHAR2(255) := 'my data  like this';
    BEGIN
      v_text := REPLACE(v_text, ' ', '_');
    
      OWA_PATTERN.CHANGE(v_text
                        ,'\W'
                        ,''
                        ,'g');
    
      v_text := REPLACE(v_text, '_', ' ');
    
      DBMS_OUTPUT.put_line(v_text);
    END;
    /
    my data  like this
    

    C.

  • Replacement of a special character for word files and convert docx to doc

    Hello!

    I'm developing a tool for our team. Withouth as much detail that I have to watch a lot of special characters in a Word file (docx, but I should also convert doc, but later on this topic) than these special characters with others to change.

    For example, word replaces... with a character, but other software we can't handle this character. So now I have an excel spreadsheet that has special characters in one column and those I want to replace them by in the next. One who is now a constant loop is the replacement of the... with... (with a space between the two points)

    The small tool worked very well on a test document where I just dropped in all the characters I want replaced. I tried with the doc type should be used on and it starts an infinite loop of spamming characters. I will attach a picture of the sniplet of code and an image of what it does in the document now.

    Can someone help me with this? I tried increment the range after that I found something but it does not change the problem. I can't join the VI unfortunately.

    I also convert the docx files doc files (I think that the 2007 version?) If anyone can help with this? So far, I have tried to do a macro in word and use an activex magic to copy the macro, but I hit hard walls everywhere...

    Thanks in advance!

    (And sorry, I'm new to the Forum)


Maybe you are looking for