How to rewrite href value with outputLink

I want to dynamically include the context in the href of a link generated by outputLink, like with Struts html:link. How do I do this with JSF????

This works:
<h:outputLink value="#{facesContext.externalContext.requestContextPath}/page.faces">
<h:outputText value="page"/>
</h:outputLink>
but is ugly...

Similar Messages

  • How to replace key value with character

    Hi Experts
    Can any one tell me, how to replace key value with character, whether it is possible are not. My present report is displaying below format.
    country--city-area-flatnocountry--City-Flatno
    Customer--USACOst1111---UK--HD20--
    C100--11---11--
    C200--11---1--
    For the above example format i am able to display. But now i want to replace 1 with character value for example. For C100
    country is USA at presnt 1 but it should replace with USA.
    You find required format below.
    country--city-area-flatnocountry--City-Flatno
    Customer--USACOst1111---UK--HD20--
    C100--USACOst1111--
    C200--UK--HD20--
    thanks .
    Regards,
    Vishal.

    Hi Markus,
    Thanks for reply,
    Actually i dont have attribute for the customer, the data is maintained in ods, in the form, customer name one info-object and customer value one more info-object this value got text. This value stored in the ods as below
    costomer number  customer value
    C100--USA
    -C100CO
    C100--11-
    C200----
    UK
    C200----
    20
    Please let me know any clarification you need.
    Thanks and Regards,
    Vishal.

  • How to compare single value with multiple values

    In my query I have something like this:
    A.SOR_CD=B.SOR_CODE where A and B are 2 different tables. This condition is in the where clause. The column in table A has single values but some values in table B have multiple comma separated values (822, 869, 811, ..).  I want to match this single
    value on the left side with each of the comma separated values. Please let me know how will I be able to do it. The number of comma separated values on the right side may vary.

    Hi MadRad123,
    According to your description, you want to compare single value with multiple values in your query. Right?
    In this scenario, the table B has comma separated values, however those comma separated values are concatenated into a string. So we can use charindex() function to return the index of the table A value. And use this index as condition in
    your where clause. See the sample below:
    CREATE TABLE #temp1(
    ID nvarchar(50),
    Name nvarchar(50))
    INSERT INTO #temp1 VALUES
    ('1','A'),
    ('2','A'),
    ('3','A'),
    ('4','A'),
    ('5','A')
    CREATE TABLE #temp2(
    ID nvarchar(50),
    Name nvarchar(50))
    INSERT INTO #temp2 VALUES
    ('1','a,A'),
    ('2','A,B'),
    ('3','c'),
    ('4','A,C'),
    ('5','d')
    select * from #temp1 a inner join #temp2 b on a.ID=b.ID
    where CHARINDEX(a.Name,b.Name)>0
    The result looks like below:
    Reference:
    CHARINDEX (Transact-SQL)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to display positive value with a trailing plus sign

    I want to display positive value with a trailing plus sign and negative value with a trailing minus sign. How can I do it? Is there any character in custom format for this? I don't want to convert number to text and use case statement because I need two decimal places and thousands separator.

    Okay, try this...
    You will need to do a "UNION ALL" of three queries, one for positive values, one for zero values, and one for negative values.
    In the "negative values" query, do the following:
    1) Add a filter on the measure for values "less than 0"
    (This will ensure all values are negative.)
    2) In the Data Format tab, select "Custom" and type in #,##0.00-
    (This will add the trailing negative sign.)
    3) In the Edit Formula tab, add the absolute value function, ABS(insert measure here)
    (This will take get rid of the default leading negative sign.)
    For the "positive values" query, modify the above as follows:
    1) Change the filter to "greater than 0"
    2) In the Data format, change the custom format to #,##0.00+
    Step 3 is not needed since all values are positive.
    For the "zero values" query, just add a filter "equal to zero."

  • Multidimensional NSArray: How to find min value with valueForKeyPath ?

    Hi,
    I've setup a multidimensional NSArray with columns and rows. The data is read from a file and are float values.
    I can easily access the data like this:
    NSLog(@"Row[0][0] %f", [[[rows objectAtIndex:0] objectAtIndex:0] doubleValue] );
    NSLog(@"Row[0][1] %f", [[[rows objectAtIndex:1] objectAtIndex:0] doubleValue] );
    NSLog(@"Row[0][2] %f", [[[rows objectAtIndex:2] objectAtIndex:0] doubleValue] );
    etc.
    However I don't know how to get the min/max values for a column in a 2 dimensional NSArray.
    With a simple NSArray it's easy to retrieve the min/max value:
    NSArray *array = [NSArray arrayWithObjects:[NSNumber numberWithInt:16], [NSNumber numberWithInt:4], [NSNumber numberWithInt:128], nil);
    NSLog(“Min value : %@", [array valueForKeyPath:@"@min.intValue"]);
    Now, does someone know how to retrieve min/max values with valueForKeyPath: ?
    Any help is greatly appreciated.
    Cheers,
    Gilles

    #import <Foundation/Foundation.h>
    int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    NSMutableArray * array = [[NSMutableArray alloc]init];
    NSMutableArray * another = [[NSMutableArray alloc]init];
    NSNumber * num1 = [NSNumber numberWithFloat:1.1];
    NSNumber * num2 = [NSNumber numberWithFloat:1.2];
    NSNumber * num3 = [NSNumber numberWithFloat:1.3];
    [another addObject:num1];
    [another addObject:num2];
    [another addObject:num3];
    [array addObject:another];
    NSLog(@"%@",[[array objectAtIndex:0] valueForKeyPath:@"@min.floatValue"]);
    [another release];
    [array release];
    [pool drain];
    return 0;
    Maybe I'm not 100% clear on the question your asking, but doesn't the above code get the min(or max if you wanted) value for the second array

  • How to set textfield-values with a process

    Hi.
    I have a form in which the user can fill in some textfields. To ease the usability, there should be a button to set the textfields to predefined values.
    I tried to set the values by implementing the following process:
    BEGIN
    :P2120_VALUE := 100;
    END;
    How can this be realised? What should the "process-point" value of the process be?
    Thanks very much in advance for your help.
    Stephan

    One way to do this would be to set each of the items' Source Used attributes to "Only, ..." and create the process like the one you showed as an after-submit (when button pressed) process then have a branch that goes back to the same page when the button is pressed.
    You should then see the form fields populated with the values established by the process after the branch happens.
    Sometimes with this kind of page logic you have to take care that no after-submit computations, validations, processes, and branches fire when this special button is used, unless you want them to.
    Scott

  • How to change a value with reference if inside of a tabControl?

    Hello,
    i have a Vi with a tabcontrol and two pages. On each page is a string-control (string1 and string2).
    Now i have second vi that gets the file-reference of the first vi and is called inside of the first vi.
    This reference do i want to use to change the value of the string-control.
    But i dont have access to "pages" when using the reference.
    Attached the two vis.
    Thanks for the help
    Attachments:
    main.vi ‏7 KB
    ref.vi ‏11 KB

    Easiest way that I know is to right click on the control itself and select "Create->Reference".
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • How to store Multiple values with restriction in Oracle 9i

    Hi,
    I am using oracle 9i R2 and i would like to know that how can i store multiple values and restrict some of values into oracle table?
    ex.
    I need to create table or inserting into existing table like below:
    ID will be Primary/Unique key and each ID has multiple dept but each ID to have only 1 “X” dept, only 1 “Y” dept and only 1 “Z” dept… but, can have multiple “W” dept
    What will be the best option to create/store data like this?
    Like Table level Constraint (Unique or Check), Triggers or pl/sql?
    ID     DEPT
    1     X
    1     Y
    1     Z
    1     W
    2     X
    2     Y
    2     Z
    2     W
    2     W
    2     W

    Hi,
    Other solution:
    Function:
    CREATE OR REPLACE FUNCTION my_unique_function(p_dep IN VARCHAR2) RETURN VARCHAR2
       DETERMINISTIC AS
    BEGIN
       IF (p_dep = 'X' OR p_dep = 'Y' OR p_dep = 'Z') THEN
          RETURN p_dep;
       ELSE
          RETURN NULL;
       END IF;
    END;
    /Test:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> create table emp(id number, dept varchar2(30));
    Table created
    SQL>
    Function created
    SQL> CREATE unique index ix_emp on emp(my_unique_function(dept));
    Index created
    SQL> insert into emp(id,dept) values (1, 'X');
    1 row inserted
    SQL> insert into emp(id,dept) values (2, 'X');
    insert into emp(id,dept) values (2, 'X')
    ORA-00001: unique constraint (HR.IX_EMP) violated
    SQL> insert into emp(id,dept) values (3, 'Y');
    1 row inserted
    SQL> insert into emp(id,dept) values (4, 'Y');
    insert into emp(id,dept) values (4, 'Y')
    ORA-00001: unique constraint (HR.IX_EMP) violated
    SQL> insert into emp(id,dept) values (5, 'Z');
    1 row inserted
    SQL> insert into emp(id,dept) values (6, 'Z');
    insert into emp(id,dept) values (6, 'Z')
    ORA-00001: unique constraint (HR.IX_EMP) violated
    SQL> insert into emp(id,dept) values (7, 'W');
    1 row inserted
    SQL> insert into emp(id,dept) values (8, 'W');
    1 row inserted
    SQL> Regards,

  • How to set default values with parameter ID EVO

    Hi I need to set price adoption as ''do not copy'' in purchasing default values for buyer(OMFI) and need to assign this default value to the user using the EVO parameter.
    I can not see the parameter ID in dropdown list in maintain user screen.
    Can any one help me in this regard?
    Thank you,

    Just addition to Charlie's suggestion, make sure that you put the same value as used while creating parameter ID. if EVO key is created with Z1 and you put z1 then it wont work, you must put the same value Z1.
    Regards
    Arif Mansuri

  • How can i insert values with single quote (')

    How can i insert a values like ABC's ?
    Edited by: LuKKa on Oct 6, 2010 12:48 PM

    LuKKa wrote:
    I want to insert like this :-
    INSERT INTO myTab values ('This is belong's to ABC's ');
    Then how can i do ?In a old style you can do this
    insert into mytab valeus('This is belong''s to ABC''s');

  • Key probelm w. Generic EnumMap -- How to replace a value with unknown key?

    Hi, i have a problem that i want to replace an value of an key/value pair, but I dont have the approiate key for that, to avoid passing the key throug all methods, I just implemented
    a method in the delegate class.
    public K getFirstAssociatedKey(BilanzObjekt bo){
               Set<K> keys = this.container.keySet();
               for(K key: keys){
                   V value = this.container.get(key);
                   if (bo == value){                    
                        return key;
               return null;
         }It works, but I can't use the retrieved key for a put-statement, cause the satic type comparision seems to fail. Even the key is retrieved from the original, the compilier is unable to validate that the key is in the approiate Enum, so it refuses the operation.
    In my special case I can avoid this by returning the value to the calling mehod inside the delegate, but that can't be the solution for all cases. Even If i would pass the key-vaue through all methods, the universial declaraction of ? extends Enum<?> would raise the same problem, that the compiler can't verify if the given key ist part of the Enum of the current EnumMap.
    Cause i still not an expert dfor generics, I might have overseen an solution.
    So is there any way to retrieve valid keys for the put-method at runtime without declaring a specilized subtype? Using rawtypes would supress compiler-errors, but that isn't the way what Generics intends. I allready have some lager Enums and some subsuets with EnumSet. But this solution isn't absolutly clean, cause you have to use the EnumSet to Iterate over the map and can't use keySet() anymore (Without special preparations for the values not contained in the EnumSet). Also I don't want to limit the code to only one type of Enum. So I my looking for another solution.
    Is there hoepfully any easy and gernerally solution to that problem?
    Thanks a lot in advance.
    Greetings Michael

    Hi, I redesigned my programm a little bit by returning the Objeckt which should be replaced to the delegate, but this causes the problem that I know that it is the exact type, cause the previous value had the same type before, but I can't replace it as long I don't except a fixed type for the value-parameter of the EnumMap.
    The workaround which worked with keys via Map.Entry, cause I didn't replaced them, don't work here.
    I found a solution which works for me (after the redisign mentioned above), even it is quite dirty., cause it moves the error detection form compiletime to runtime. But to gain more flexibilty, i prefer this. The else clause is just to find some programming faults as early as possible. I was quite suprised that the cast to V is legal, but the put -method will throw a ClassCastEcxception if it is not. So its a trade off betwenn flexibility and early error detection. I'm sure that should not used widely, but is a soluion or workaround for my problem.
    /* dirty cast */
    V new_v = (V) old.getReplacingValue();
                        if ( new_v != null){
                                  /* If the both instance are of the same base class, this operation is safe,
                                   * Cause if the previous value was ok, then the new value must be also OK!
                                   * This should be the default case.*/
                             if(new_v.getClass().getName().equals( old.getClass().getName()) ){                         
                                         this.container.put(key,  new_v);                         
                               }else{
                             /* Otherwise a class-cast exception is most likely,
                              * but should normally not reached, if replacing methods are always returning the most specialized type and are overwritten in all subtypes.  */
                                 try{
                                  this.container.put(key,  eBoNew);
                                  }catch(ClassCastException cce){
                                  cce.printStackTrace();
                   }Greetings Michael

  • How can create registry value with GPO OR script

    Hi Friends
    I have around 45 registry entries in .REG file.. in HKLM and KHCU path as give below as example
    How can i create these registry entries through logon file with GPO or script..
    Windows Registry Editor Version 5.00
    [HKEY_CURRENT_USER\Software\DT Research]
    [HKEY_CURRENT_USER\Software\DT Research\BtnManagement]
    @=""
    [HKEY_CURRENT_USER\Software\DT Research\BtnManagement\BtnFunc1]
    [HKEY_CURRENT_USER\Software\DT Research\BtnManagement\BtnFunc1\Button0]
    "strDescription"="Brightness"
    "iFunction"=dword:80010005
    "strAppPath"="DtrBrightness.exe"
    "strAppParameter"=""
    "vkcode"=dword:00000001
    "repeat"=dword:00000000
    [HKEY_CURRENT_USER\Software\DT Research\BtnManagement\BtnFunc1\Button1]
    "strDescription"="Brightness"
    "iFunction"=dword:80010005
    "strAppPath"="DtrBrightness.exe"
    "strAppParameter"=""
    "vkcode"=dword:00000002
    "repeat"=dword:00000000

    there are two ways you can achieve this.
    if you are using server 2008 or higher and if your clients are windows xp with latest updates and IE or higher you can use group policy preferences. You would need to configure the settings from your reg key using group policy editor under the preferences
    section. We can provide more detailed instructions for this if you need. 
    alternativley, a simpler option, but maybe less manageable, is to split your reg file into two sections - one for the user and one for the machine. This is required since i am assuming your users are not local admins on their computers - if they are then
    you don't need to split it. 
    once split you would need to create two batch file scripts which from memory you would use reg /s path_to_reg_file.reg 
    you need one computer startup script which applies the settings to the HKLM keys - as you need admin rights to do this, the script in the computer startup will run under the computer account which is privileged.
    you can then create the same batch file but point to your user settings reg file and put this as a user login script. 
    if you need further step by step please let us know. 
    Regards,
    Denis Cooper
    MCITP EA - MCT
    Help keep the forums tidy, if this has helped please mark it as an answer
    My Blog
    LinkedIn:

  • How to show string value with spaces in seperate columns

    Hi all, I'm using Oracle 10g.
    create table
    create table sample_test (
      Name    VARCHAR2(20 BYTE))insert table
    insert into sample_test values ('JOAN   SCT')
         insert into sample_test values ('MELIA FILCK')
          insert into sample_test values ('SSAN LIER-LILEY')
           insert into sample_test values ('C.M. DANY WES')
               insert into sample_test values ('A L SCOTT')select * from sample_test;
    Name
    JOAN   SCT
    MELIA FILCK
    SSAN LIER-LILEY
    C.M. DANY WES
    A L SCOTTi would like the output as follows
    NAME1        NAME2      NAME3
    JOAN          SCT              
    MELIA        FILCK              
    SSAN       LIER-LILEY
    C.M.          DANY       WES
    A             L          SCOTTwhen ever there is a space in the name the value next to that should be shown in an other column. please note the first name joan sct has two spaces. but it needs to be treated as single space.
    also is it possible to get something like this
    NAME1        NAME2    
    JOAN          SCT              
    MELIA        FILCK              
    SSAN       LIER-LILEY
    C.M.DANY       WES
    A L          SCOTTthe value before first space on the right should be in name2 everything else in name1 field.
    Thanks in advance.

    Hi,
    Since you have Oracle 10, you can use regular expressions:
    For the 3-column output:
    SELECT        REGEXP_SUBSTR (name, '[^ ]+', 1, 1)     AS name1
    ,        REGEXP_SUBSTR (name, '[^ ]+', 1, 2)     AS name2
    ,        REGEXP_SUBSTR (name, '[^ ]+', 1, 3)     AS name3
    FROM        sample_test;     [^xyz]     means "any character except x, y or z".
    +     means "1 or more of the preceding"
    The 4th argument to REGEXP_SUBSTR tells which occurrence of the pattern we want.
    For the 2-column output:
    SELECT        REGEXP_REPLACE (name, ' *[^ ]+$')     AS before_last_space
    ,        REGEXP_SUBSTR  (name,   '[^ ]+$')     AS after_last_space
    FROM        sample_test;$     here means "the end of the string".
    In Oracle 10, you often have to use REGEXP_REPLACE to get substrings.
    Thanks for posting the CREATE TABLE and INSERT statements; that's very helpful!
    Edited by: Frank Kulash on Sep 7, 2011 3:21 PM

  • How to display workitems values with Hyperlink in Oracle BPM workspace

    Hi,
    In Oracle BPM workspace , is there any way to display hyperlinks for work items i,e., I want to give a hyperlink to the values displayed in the default columns under the work items. So that if user clicks any hyperlink , a new information window will be displayed.
    Thanks
    Bharath.

    Hi,
    If you create a derived table and pull the objects i guess it should work. Other wise this error will throw up.
    There are some ideas to resolve this here, but not sure it will work - Error trying to modify SQL in Data Provider
    Arun

  • How to group the values with this partition over clause ?

    Hi,
    I have a nice request :
    select  c.libelle "Activité", sum(b.duree) "Durée"
    from    fiche a, activite_faite b,
            activites c, agent d
    where   a.date_activite
    BETWEEN TO_DATE('20/09/2009', 'DD/MM/YYYY') AND TO_DATE('26/10/2009', 'DD/MM/YYYY')
    AND     a.agent_id = 104
    AND     a.fiche_id = b.fiche_id
    AND     b.activites_id = c.activites_id
    AND     a.agent_id = d.agent_id
    group   by c.libelle
    order   by sum(b.duree)It gives me this nice result :
    ACTIVITE  DUREE
         Tonte            27I want to get a percentage, i use ratio_to_report
    select  a.fiche_id, c.libelle "Activité", ratio_to_report(duree) over (partition by c.activites_id) * 100 "Durée"
    from    fiche a, activite_faite b,
            activites c, agent d
    where   a.date_activite
    BETWEEN TO_DATE('20/09/2009', 'DD/MM/YYYY') AND TO_DATE('26/10/2009', 'DD/MM/YYYY')
    AND     a.agent_id = 104
    AND     a.fiche_id = b.fiche_id
    AND     b.activites_id = c.activites_id
    AND     a.agent_id = d.agent_idIt gives me this less nice result :
    Tonte 7,40740740740740740740740740740740740741
    Tonte 33,33333333333333333333333333333333333333
    Tonte 33,33333333333333333333333333333333333333
    Tonte 25,92592592592592592592592592592592592593I would like to get this result :
    Tonte 100I tried "grouping" values in the partition over clause but without success.
    Any help appreciated from the slq-masters :
    Regards,
    Christian

    Christian from France wrote:
    I would like to get this result :
    Tonte 100
    Hi,
    Why not this
    select  c.libelle "Activité", 100 "Durée"
    from    fiche a, activite_faite b,
            activites c, agent d
    where   a.date_activite
    BETWEEN TO_DATE('20/09/2009', 'DD/MM/YYYY') AND TO_DATE('26/10/2009', 'DD/MM/YYYY')
    AND     a.agent_id = 104
    AND     a.fiche_id = b.fiche_id
    AND     b.activites_id = c.activites_id
    AND     a.agent_id = d.agent_id
    group   by c.libelle
    order   by sum(b.duree)Because it would always be 100 (if you are taking as percentage) be what ever the count of duree be.
    Or did I miss something in understanding the requirement.
    Regards
    Anurag

Maybe you are looking for

  • OIM error while starting Oracle Application server 10133

    getting an error and when i start OracleAppServer10133 and whn http://localhost:7777/xlWebApp was hit on browser its giving the system error and the log is ERROR,08 Dec 2009 15:32:53,776,[XELLERATE.ACCOUNTMANAGEMENT],Class/Method: tcUtilityFactory/ge

  • Nokia offers FREE plug-ins for some devices not supported by iSync 2.4

    Nokia is now offering free plug-ins for otherwise unsupported Nokia mobile handsets in Mac OS X 10.4.9 and iSync 2.4 configurations. All support both Bluetooth and USB synchronization, and work only with Mac OS X 10.4.9 and iSync 2.4, bundled with it

  • Idoc Structure From Flat FIle

    Hi, I have two queries. 1.I need to import idoc structure from excel file not from sap, is it possible ? 2 what are the detalied steps to implement following SAP note for getting processed file name at runtime. Thanks & Regards Tuhin Symptom You want

  • Web Sharing broke

    I've been using Web Sharing with php enabled to work on my webpage. Lately my macbook lost power and when I booted it back up the server seems to have stopped working. I've tried restarting, turning off web sharing and turning it back on. typing "sud

  • SQL Developer Locking up/Unable to Cancel long Running tasks

    I have had the same problem with a number of versions of SQL Developer (and version 3.2.09). It occurs when trying to cancel a long-running PL-SQL Function or procedure that has been started by 'Run' in SQL Developer. Select Terminate in Run Manager