Function in binding expression

Hi,
I have a binding expression on a command link in adf faces as follows:
<af:commandLink text="#{fn:substring(row.TransactionNo,1,2) =='0013' ? 'Receipt Details' : ''}"
binding="#{backing_MaintainAccounts3.commandLink1}"
id="commandLink1" action="Edit">
I just can't seem to get the right syntax for the substring?
Are there any paticular tag libraries I would need in my JSF?
Thanks for any help,
Richard

Hi,
you are mixing xQuery strings with EL in JSF. I don't think this is going to work because ExpressionLanguage in JSF cannot have arguments.
Frank

Similar Messages

  • [svn:fx-trunk] 9349: * Added support for using getStyle() in Mxml data binding expressions.

    Revision: 9349
    Author:   [email protected]
    Date:     2009-08-17 11:32:37 -0700 (Mon, 17 Aug 2009)
    Log Message:
    Added support for using getStyle() in Mxml data binding expressions.
      In addition to the existing "function return watcher" data binding
      functionality, we register to listen for style related change events
      when we see a function marked with [Bindable(style="true")].
      UIComponent's and TextGraphicElement's styleChanged() will now
      dispatch events for "getStyle()" FunctionReturnWatchers to handle.
      When null or "styleName" is passed into styleChanged(), we dispatch
      an "allStylesChanged" event.
    QE notes: mxunit test to follow
    Doc notes:
    Bugs: SDK-20394
    Reviewer: Glenn, Pete F, Peter D
    Tests run: checkintests, mxunit databinding
    Is noteworthy for integration: only if you want to start using it.
    Code-level description of changes:
      modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension.java
        Modified generateWatcher() to do the AST equivalent of the
        WatcherSetupUtil.vm change.
      modules/compiler/src/java/flex2/compiler/as3/binding/FunctionReturnWatcher.java
        Removed unused isNew variable and added isStyleWatcher variable.
        Modified shouldWriteSelf() to return true if isStyleWatcher is true.
      modules/compiler/src/java/flex2/compiler/as3/binding/WatcherSetupUtil.vm
        Modified writeFunctionReturnWatcher macro to add a true arg to the
        FunctionReturnWatcher constructor call when isStyleWatcher() is
        true.
      modules/compiler/src/java/flex2/compiler/as3/binding/BindableFirstPassEvaluator.java
        Modified evaluate(Context, MetaDataNode) to skip reporting an
        error for no events when style is true.
      modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingFirstPassEvaluator.java
        Replaced insideCallExpression boolean with callExpressionStack
        Stack.  The "!insideCallExpression" checks were replaced with
        callExpressionStack.isEmpty().
        Modified addBindables() to handle [Bindable(style="true")].
        Made argumentListStack and resetSet more strongly typed.
      frameworks/projects/framework/src/mx/core/UIComponent.as
        Modified styleChanged() to dispatch a "Changed" and "allStylesChanged" from the previous
        parent and add listeners to the new parent when isStyle is true.
        Modified eventHandler to notifyListeners() when isStyle is true.
      frameworks/projects/spark/src/spark/primitives/supportClasses/TextGraphicElement.as
        Similar changes to UIComponent.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-20394
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/FunctionReturnWatcher.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/TextGraphicE lement.as
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableFirstPassEval uator.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension. java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingFirstPassE valuator.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/FunctionReturnWatcher .java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/WatcherSetupUtil.vm

  • Conditionals in bind expression

    Is it possible to put a conditional in a bind expression?
    For example:
    <cfinput type="text" name="searchParam" id="searchParam">
    <cfdiv id="searchResult" bindonload="no" bind="url:sr.cfm?search_param={searchParam@blur}"></cfdiv>
    In this example, sr.cfm will be loaded in the cfdiv EVERY TIME that focus is blurred from the input field.
    Is it possible to set it so that the cfdiv will NOT load sr.cfm IF the input field is blank??  Something like:
    bind="url:sr.cfm?search_param={searchParam<cfif searchParam neq ''>@blur</cfif>}"
    Is this possible?  Or is there something like it that will work?
    Thanks,
    ^_^

    Another site helped me figure it out.
    <cfajaxproxy bind="javascript:searchOnBlur({search_text@blur},{search_type@blur},'search_text','comp') ">
    <script type="text/javascript">
    searchOnBlur = function(a,z,b,c) {
        sf = document.app_search[b];
        cc = document.app_search[c];
        st = "";
        for(i=0;i<document.app_search.search_type.length;i++) {
            document.app_search.search_type[i].checked ? st = document.app_search.search_type[i].value : null ;
        if(cc.value != sf.value) {
            cc.value = sf.value;
            ColdFusion.navigate("search_results.cfm?search_text="+sf.value+"&search_type="+st+"",'search_results',mycallBack,myerrorHandler);
    </script>
    <cfinput type="text" name="search_text" id="search_text">
    <cfinput type="hidden" name="comp" id="comp" value="">
    search_type=radio inputs (two of them); one for name, the other for number
    ^_^

  • Faces config exception - Can't get value from value binding expression:

    the menuItem_Department shown property takes value from userRight's session bean object userDetail.
    class UserRights{
        public boolean mDept = false;
        public boolean loggedIn = false;
        public boolean admin = false;
       //accessors
    }now, the shown property picks correct value for #{userDetail.admin} but gives erros on this. any idea how to get around this exception:
    Managedbean menuItem_Department could not be created Can't get value from value binding expression: '#{userDetail.mDept}'.
    javax.faces.FacesException: Can't get value from value binding expression: '#{userDetail.mDept}'     at com.sun.faces.config.ManagedBeanFactory.evaluateValueBindingGet(ManagedBeanFactory.java:903)
         at com.sun.faces.config.ManagedBeanFactory.setPropertiesIntoBean(ManagedBeanFactory.java:547)
         at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:233)
         at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:256)
    .. stack tracepointers appreciated.
    reagrds
    Rabs

    well, i figured out the problem so thought to share with all aswell.
    all i changed was the name of the variable from mDept to dept.
    java beans has its own set of rules and naming conventions which i have not read much about but this problem had to do sumthing with that!
    just changing the name simply works fine!

  • Use field value in xml binding expression

    Hi all.
    I'm trying to access dropdownlist selected value from a binding expression.
    I have a dropdownlist called rooms which is bound to some XML data. When the selection changes I woud like to access that value in another dropdownlist called members which is also bound to some XML data.
    The expression I tried is:
    $record.room.[roomname==$form.company.mainform.rooms.rawValue].member[*]
    I'm calling this code on the rooms.changed event (alsop tried on rooms.exit event):
         members.execCalculate();
    Aparently $form.company.mainform.rooms.rawValue doesn't return the selected value of the rooms dropdownlist.
    Is there a way to get the selected event from a different form and re-calculate binding of the field?
    thanx

    Binding is not dynamic ...meaning that it is set when the form is rendered and cannot be changed on the fly.
    Paul

  • Unable to See the Technology Function in The Expression Editor- ODI 11G

    Hi,
    I am developing Interface whereas i am unable to see the Technology functions in the Expression Editor where i am trying to do some transformation .
    Secondly in the Header it is showing Default language in place of SQL(Oracle)
    any fix please..
    Thanks,
    KP

    I fixed it myself- thanks
    Below was the step i did which resolved the issue. hope this will help others
    Go to ODI Studio
    In Topology- Expand Language
    Import New Language
    import in synonym INSERT_UPDATE mode
    The Language definitions from $ODI_HOME/oracledi/xml-reference/LANG_SQL.xml
    click OK
    close ODI Studio and Open again. that fixed my issue.
    Thanks,

  • Using value binding expressions to set 'required' attribute

    I am trying to use a value binding expression to determine whether the value of various input control's is required or not according to where they are used and not having much luck. I wonder if anyone can shed some light on this...
    The following expression works: <h:inputText id="name" required="#{true}"/> whereas <c:set var="required" value="true" scope="request"/>
    <h:inputText id="name" required="#{required}"/> does not, even though the expression evaluates to true! I have tried numerous variations (requestScope.required, required == true, required ? true : false, etc.) to no avail. Interestingly, #{1 == 1} or binding to a backing bean method works, but as soon as you add a request variable it breaks.
    Am I doing something wrong, is this something that JSF doesn't allow, or just a bug in the RI? Note that I don't want to vary this flag between multiple submissions of the same form, I am just trying to reuse the same JSP include to generate form controls for required and optional data on different forms to avoid a whole lot of cutting any pasting.
    Any pointers gratefully received.
    -- Keith Wilson

    I had something like this happen, and here's what I concluded the problem was. Perhaps your problem is similar.
    In the first non-working example you show a request-scope variable being set in the JSP page, and then use that to set the "required" attribute. But consider what happens when you submit the form. There is no longer any request-scope variable set because we have a new request and we don't go through the JSP page! (Not before validation is checked, anyhow).
    So basically I concluded that the variable had to be in (say) session scope for it to work as you would like.

  • OWB10GR2 - Error when try to use 'MOD' function in an Expression

    Hi
    I'm trying to use the MOD function in an expression, e.g. mod(44,12), however, when I validate I get the error:-
    Line 2, Col 18:
    PLS-00201: identifier 'MOD' must be declared
    Line 0, Col 1:
    PL/SQL: Statement ignored
    Has anyone else come across this problem, and can anyone please suggest a solution?
    Thanks
    GB

    Not yet, thanks for the suggestion.
    If you use MOD in an expression or Constant, the expression does not validate but the mapping itself does validate, deploy and runs ok. So
    This issue has been reported as a bug therefore for the time being we can just ignore the expression validation message.

  • Oracle:how to use max() function in case expression

    how to use max() function in case expression, Please explain with any example

    Hope this helps and should be self explanatory
    with t as
    (select 1 col,100 col2 from dual union
    select 2 ,100 from dual union
    select 2 ,200 from dual union
    select 3,100  from dual union
    select 3,200  from dual  )
    select col, case when max(col2)=100 then 'with 100 range'
    when  max(col2)=200 then 'with 200 range' end  from t group by col

  • Cannot perform an aggregate function on an expression containing an aggregate or a subquery.

    I am getting "Cannot perform an aggregate function on an expression containing an aggregate or a subquery." error by executing below query, I need to calculate the percentage. Can you please help me on this by modifying the query.
    select oe2.OrdSourceID,Count(oe2.OrdSourceID) as TotalOrders,
    Percentage = Count(oe2.OrdSourceID) * 100.0 / SUM(Count(oe2.OrdSourceID))
      from OeOrders Oe 
      iNNER JOIN OeOrders2 AS oe2
           ON Oe.OrderID = oe2.OrderID
    where
    Oe.ProviderID = 'JOHN' and Oe.OrderDateTime between '10/07/2014' and '10/15/2014' and oe2.OrdSourceID is not null
      AND Oe.[Status] NOT IN ( 'CANCEL', 'CANC', 'CNC', 'UNVER', 'UNV' )
    Group by oe2.OrdSourceID
    Thanks..
    Diddi

    Hi,
    please check this general solution using CTE. If you need a specific query help then pls post your DDL+DML :-) I hope you can get the idea from this example.
    /************************************************ DDL+DML */
    -- DDL
    create table T (Num int, Name nvarchar(10))
    -- DML
    insert T values (1,'a'),(2,'a'),(3,'s'),(22,'s')
    GO
    /************************************************ Testing and solution */
    select SUM(count(*))
    from T
    GO
    --Msg 130, Level 15, State 1, Line 7
    --Cannot perform an aggregate function on an expression containing an aggregate or a subquery.
    ;with MyCTE as (select count(*) C, Name from T group by Name)
    --select * from MyCTE
    select SUM(C), Name
    from MyCTE
    group by Name
    GO
    /************************************************ Clean */
    drop table T
    GO
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Using value binding expression for to-view-id

    hi;
    is it possible to use a value binding expression in the <to-view-id> element?
    if not, is there a logical reason for this?
    thanks

    Shrek-2:
    Are we there yet?No
    Are we there yet?No
    Are we there yet?Yes
    Really?
    NO
    Seriously, the default navigation handler does not allow to use EL for the to-view-id, but you can obtain the desire behaviour with the custom handler decorator.
    This is a code snippet:
         public void handleNavigation(FacesContext fc, String actionMethod, String actionName) {
              _base.handleNavigation(fc, actionMethod, actionName);
              String viewId = fc.getViewRoot().getViewId();
            if ((viewId.indexOf("#{") != -1) &&
                    (viewId.indexOf("#{") < viewId.indexOf('}'))) {
                 String bviewId = (String)fc.getApplication().createValueBinding(viewId).getValue(fc);
                 if (bviewId != null)
                      fc.getViewRoot().setViewId(bviewId);
                 else {
                      // you can throw the exception here
         }More about HandlerDecorator:
    http://www.jsftutorials.net/jsfNavigation/jsf-login-navigation-redirect.html
    http://www.jsftutorials.net/faces-config/navigationDecorator.html
    P.S. Note: This feature might broke the separation between the different levels of application from the architectural point of view. Hard-coding the ViewIds inside the java code is not a good idea at all.
    Sergey : jsfTutorials.net

  • Using of Modulus function in Assignment Expressions

    Hello!
    While trying to use Modulus function in Assignment Expression I found out that it gives strange results in some cases.
    For example, the remainder of 1037739010891 divided by 11 is 0, but Modulus function gives 4, the remainder of 1037739010892 divided by 11 is 1, but the function gives 5 and so on.
    Does anybody knows the solution of this problem? Or may be I do something wrong?
    P.S. I use MDM 5.5 SP 5 Patch1
    Thanks, in advance

    Hi, Sanjay!
    I think the matter is that the function Modulo operates on integer values, so it somehow converts the value 1037739010891 to integer and use it for calculations.
    So, we solved the problem by using some mathematical formulas for calculations.
    Still thanks for your answer,
    Vika

  • Localized String with params - Value Binding Expression...

    Hi All:
    I see many e.g.s where a command button / or a label's value can be a localized resource string using the generic value binding expression:
    "#{bundleVarName.keyName}"
    what if the resource string has parameters? for e.g.
    button.caption = Click Me for {0}
    Can we assign a value binding expression with params for button captions etc.
    Please help - I am a newbie in JSF,,,
    regards
    -Somesh

    JSF developers have forgotten about this :)
    Use other tools for displaying such messages (f. e. JSTL) where you need to have parametrized messaged.
    But mostly, non-parameterized JSF will be enough.

  • Dynamic binding expression to get data from array

    I am retrieveing from an object to label my button as
    follows:
    quote:
    <mx:Button label = "{wordlist.word.LABEL[0][index]}"
    I now want the binding expression to be dynamic, meaning that
    LABEL has to be a variable. How would I do this?
    quote:
    <mx:Button label =
    "{wordlist.word.????[LABEL]????[0][index]}"

    "lunacafu" <[email protected]> wrote in
    message
    news:gqte13$1g4$[email protected]..
    >I am retrieveing from an object to label my button as
    follows:
    >
    >
    quote:
    <mx:Button label = "{wordlist.word.LABEL[0][index]}"
    >
    > I now want the binding expression to be dynamic, meaning
    that LABEL has to
    > be
    > a variable. How would I do this?
    >
    >
    quote:
    <mx:Button label =
    "{wordlist.word.????[LABEL]????[0][index]}"
    First, if wordlist.word.LABEL is an XMLListCollection or
    ArrayCollection,
    you need to use getItemAt instead of bracket notation. Once
    you get to that
    point, you need to cast it to whatever data type the object
    at 0 is.
    HTH;
    Amy

  • The functions in Teststand "express browser dialog"

      Teststand provides several functions in Teststand "express browser dialog" to facilitate calculations. For example, I can use the function of "SetNumElements" to get the size of certain arrary. However, compared with in CVI, it seems that that's far away from engough.For example, there's no functions like advanced analysis library. 
      I'm wondering whether Teststand has provided much more functions than what are already listed in "express browser dialog", if yes, where can I get a reference manual to find the functions that I need.
      In order to make it clearer, the meaning of ""express browser dialog" is shown in attached file.
    Thanks a lot!
    Jacky
    Attachments:
    screenshot.gif ‏16 KB

    I want to comment that Dennis is exactly right about the intent of TestStand.
    TestStand is meant to connect and augment code you write in LabVIEW, CVI, and/or Visual Studio, not to replace it. Also, what he refers to as putting functionality in a "custom step" can mean just calling a VI, DLL, server, or assembly from a TestStand step, not necessarily the similarly named but more involved process of creating a custom step type. 
    Custom step types are good for wrapping a function or VI with a user friendly configuration dialog to facilitate re-use. However, in many cases it is more than adequate to simply passing arguments to a code module you call directly.
    It is certainly true that having a large number of code module files can make it more difficult to move a sequence without forgetting to include one of its dependencies. The TestStand deployment tool is designed to help mitigate this problem by identifying dependencies and packaging them all into one directory or installer.

Maybe you are looking for

  • XI--- OpenJMS error  Object not found in lookup of XIJMSService

    Hi all, I am trying XI-->OpenJms (Server). I have included openJms.jar library in aii_af_jmsproviderlib.sda and deployed using SDM. In JMS receiver adapter I am using the following Configuration: Transport protocol: JMS Provider with JNDI . Queue con

  • Alphanumeric values in Select-Options

    Hi ABAP gurus, There is a select-options for a report like data : opt1(4) type c. select-options : g_count for opt1. g_count would take alphanumeric values like for example A123 to AB46  . Now it is required to take all the values range from A123 to

  • -24994,ERR_RTE: Runtime environment error when installing second database

    Hi, I try to install a second content server database on a node. When the system try to register the new instances, I got the following message: sapdb/programs/bin/dbmcli -R /sapdb/CHA/db inst_reg -k /sapdb/CHA/db ERR -24994,ERR_RTE: Runtime environm

  • Title file location on docs is missing! How can I find it?

    In all previous Mac OSs I can always find the correct location of a document on my computer by clicking on the title bar of the document which showed the path. Except now in Pages. Why has this been removed. I thought it was an Apple obligatory facil

  • New hard drives keep failing?

    Hi guys, A few months ago I decided to upgrade my Mac with a couple of new hard drives. I replaced the optical bay with a data doubler and placed a 1TB Toshiba HDD in it. In the primary bay I put in a 250GB Samsung 840 SSD. It seemed to work really w