What tag to use to print STRING value from Backing Bean

Hi;
I would like to achieve the objective as below:
Displaying 4 buttons (pagination) in my jsf page:
1) Go First
2) Go Previous
3) Go Forward
4) Go Last
<h:commandButton image="images\first(on).gif" type="submit" action="#{alertSetBean.goFirst}"/>
<h:commandButton image="images\previous(on).gif" type="submit" action="#{alertSetBean.goPrevious}"/>
<h:commandButton image="images\forward(on).gif" type="submit" action="#{alertSetBean.goForward}"/>
<h:commandButton image="images\last(on).gif" type="submit" action="#{alertSetBean.goLast}"/>In order to make sense for user, when the page is displaying first set element records, the icon should be disabled for
-Go First
-Go Previous
and same goes to last set element records, icon to disable for
-Go Forward
-Go Last
To disable, i will substitute
<h:commandButton image="images\forward(on).gif" type="submit" action="#{alertSetBean.goForward}"/>
with
<h:graphicImage value="images\previous(off).gif" />
It looks very messy in jsf page. Therefore, I would like to call a method in Backing Bean, where it will do check pagination by returning the long string as following:
<h:commandButton image="images\first(on).gif" type="submit" action="#{alertSetBean.goFirst}"/>
<h:commandButton image="images\previous(on).gif" type="submit" action="#{alertSetBean.goPrevious}"/>
<h:commandButton image="images\forward(on).gif" type="submit" action="#{alertSetBean.goForward}"/>
<h:commandButton image="images\last(on).gif" type="submit" action="#{alertSetBean.goLast}"/>Unfortunately, i'm using
<h:outputLabel
<h:outputText
The JSF page DOES NOT render the code, and it print the string instead. Please, I need advise.
Thanks;
Yoke Yew

Hi Balu;
Before i received your great response, i was in the midst debugging
Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
with my following JSTL code
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<tr>
       <td align="right">            
            </f:verbatim>
            <h:outputLabel value="#{alertSetBean.totalCnt}" styleClass="lbl"></h:outputLabel>
            <h:outputLabel value="  Total  " styleClass="lbl"></h:outputLabel>
          <c:if test="${alertSetBean.pagination == 1}">
               <h:graphicImage value="images\first(off).gif"/>
            <h:graphicImage value="images\previous(off).gif" />
            <h:commandButton image="images\forward(on).gif" type="submit" action="#{alertSetBean.goForward}"/>
            <h:commandButton image="images\last(on).gif" type="submit" action="#{alertSetBean.goLast}"/>
          </c:if>          
          <c:if test="${alertSetBean.pagination == 2}">
               <h:commandButton image="images\first(on).gif" type="submit" action="#{alertSetBean.goFirst}"/>
            <h:commandButton image="images\previous(on).gif" type="submit" action="#{alertSetBean.goPrevious}"/>
            <h:commandButton image="images\forward(on).gif" type="submit" action="#{alertSetBean.goForward}"/>
            <h:commandButton image="images\last(on).gif" type="submit" action="#{alertSetBean.goLast}"/>
          </c:if>
            <c:if test="${alertSetBean.pagination == 3}">
                 <h:commandButton image="images\first(on).gif" type="submit" action="#{alertSetBean.goFirst}"/>
            <h:commandButton image="images\previous(on).gif" type="submit" action="#{alertSetBean.goPrevious}"/>
            <h:graphicImage value="images\forward(off).gif"/>
            <h:graphicImage value="images\last(off).gif" />
            </c:if>
            <f:verbatim>
       </td>
  </tr>I hope somebody can point where is my mistake, and i will refer to your previous solution suggested. Thanks in advance.

Similar Messages

  • What app to use to print out photos from an iphone4

    I have an iphone4 and would like to print out about 40 photos on it.  I've looked though all the app listings and have no idea how to choose one and get it to work. If I knew more about operating systems etc I obviously would not be asking this question but I'm a senior citizen and don't use my phone much.

    All you need it a printer that supports Wi-Fi printing, Apple calls that "AirPrint", check this article:
    About AirPrint
    If your printer is supported, just print your photos from your iPhone like you would from your computer.
    If your printer is not supported, there are apps for your computer that simulate such an Wi-Fi printer and you can connect to those virtual printers and print via your computer.

  • Value from backing bean in javascript confirm in 10.1.3

    Hallo,
    Please help
    I have 2 problems:
    Page with 1 record, where 8 items are updatable.
    In entity I 've a method where I set a value in bean. (BotId1 is one of these 8 updatebale items)
    What I expect: when I change a value in BotId1 the value of botId in ValiderenBotBean will be also changed
    public void setBotId1(Number value) {
    setAttributeInternal(BOTID1, value);
    EL.set("#{ValiderenBotBean.botId}",BotId.toString());
    My bean (session scope):
    package viewcontroller.pagedefs.produceren.backing;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    public class ValiderenBotBean
    private static Log log = LogFactory.getLog(ValiderenBotBean.class);
    private String botId;
    public ValiderenBotBean() {
    // accessors
    public void setBotId(String botId) {
    log.debug("setBotId : " + botId);
    this.botId = botId;
    public String getBotId() {
    log.debug("getBotId : " + this.botId);
    return this.botId;
    Op my generaten page I have the button:
    <af:commandButton actionListener="#{bindings.Commit.execute}"
    action="Commit" onclick="if (validateForm('dataForm')){return(confirm(#{ValiderenBotBean.botId} + 'la')}"
    rendered="#{(((jhsUserRoles['JDMR_PRD03']) or (jhsUserRoles['JDMR_PRD03'])) or (jhsUserRoles['JDMR_PRD03'])) or (jhsUserRoles['JDMR_PRD03'])}" textAndAccessKey="#{nls['SAVE_BUTTON_LABEL_KOPPELENPRODUCTIEGEGEVENS']}"
    id="KoppelenProductiegegevensSaveButton">
    <af:resetActionListener/>
    </af:commandButton>
    I get the following error:
    Foutdetails webpagina
    Gebruikersagent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1; AskTB5.6)
    Tijdstempel: Thu, 17 Feb 2011 13:54:46 UTC
    Bericht: Syntaxisfout
    Regel: 3744
    Teken: 1
    Code: 0
    URI: http://172.16.6.108:8988/demeter/adf/jsLibs/Common10_1_3_2_0.js
    The code from Common:
    3732 function _callChained(
    3733 a0,
    3734 a1,
    3735 a2
    3736 )
    3737 {
    3738 if(a0&&(a0.length>0))
    3739 {
    3740 if(a2==(void 0))
    3741 {
    3742 a2=a1.window.event;
    3743 }
    3744 var a3=new Function("event",a0);
    3745 a1._tempFunc=a3;
    3746 var a4=a1._tempFunc(a2);
    3747 a1._tempFunc=(void 0);
    3748 return!(a4==false);
    3749 }
    3750 else
    3751 {
    3752 return true;
    3753 }
    3754 }
    Problem nr.1:
    When I call the button I do not see any logging that indicate that the value is set in backing bean
    Workaround: I made item on my page depending on item where I put my code.
    Result: I have to press 2 times on my button to execute the button code. First time to make the validation and the second time the button code itself.
    Not nice. The validation is also slow.
    But ok:
    Problem 2:
    I still get the same error, I see logging of execution of my validation.
    There is also the difference between loggings is 2 cases:
    If I use
    onclick="if (validateForm('dataForm')){return((#{ValiderenBotBean.botId} + 'la')}"
    what I really want instead of
    onclick="if (validateForm('dataForm')){return'la')}"
    I get:
    17-feb 14:28:40 DEBUG (ValiderenBotBean) -getBotId : -1
    17-feb 14:28:40 DEBUG (ValiderenBotBean) -getBotId : -1
    It means that value is obtained correctly.
    But still the same error.
    If I put for test purpose
    the following code into my bean:
    public String getBotId() {
    log.debug("getBotId : " + this.botId);
    botId = "23";
    return this.botId;
    I do not get any error.
    Any ideas?
    Please help

    Thanks, Amit,
    I will try it tomorrow.
    Some remarkes:
    1. I need javascript for confirmation
    2. I really do not PPR. It takes so long. The user use the scanner to put the value into input items in order speed up the process. And now PPR...
    3. My transient attribute will depend on 8 items. Even more waiting process.
    What I really want is to execute my db function only 1 time "onclick" or "oncommit" and according to outcome of db-function ask user for confirmation of commit.
    I tried already to implement dialog from ADF with launchDialog function.
    But ReturnListener did not function while I launch the Dialog manually.
    Anna

  • How to assign and display an attribute value from backing bean?

    Hello all,
    I am using Jdev 11g. I have a form page which has two inputText attributes The first one implements a valueChangeListener feature. When the user enters a value in the first field, a backing bean function will be invoked through the valueChangeListener . In this backing bean function, based on the value in the first field, I want to assign the value to the second field and display it on the page. Can somebody help me how to achieve this?
    Thanks,
    John

    Hi John,
    Here is small example.
    Create two string variables in your backing bean and generate accessors for them.
        private String text;
        private String text1;
        public void setText(String text) {
            this.text = text;
        public String getText() {
            return text;
        public void setText1(String text1) {
            this.text1 = text1;
        public String getText1() {
            return text1;
        }Bind this variables to the value property of the input texts you have. Add the valuechangedlistener for the first input text (and also set autosubmit to true for that item). Also, add the id of the first input text as partial triggers for the second input text. Like,
            <af:inputText label="Label 1"
                          binding="#{backingBeanScope.backing_untitled1.it1}"
                          id="it1"
                          valueChangeListener="#{backingBeanScope.backing_untitled1.textValueChanged}" autoSubmit="true"
                          value="#{backingBeanScope.backing_untitled1.text}"/>
            <af:inputText label="Label 2"
                          binding="#{backingBeanScope.backing_untitled1.it2}"
                          id="it2"
                          value="#{backingBeanScope.backing_untitled1.text1}"
                          partialTriggers="it1"/>Finally, put the logic on your value changed listener. Like,
        public void textValueChanged(ValueChangeEvent vce){
            this.setText1("Hi " + vce.getNewValue());
        }Now, when you run the page and enter your name in the first input text, the second input text will display Hi <your_name>
    HTH.
    -Arun

  • How to get value in backing bean from application module

    Hi all.. I'm new in jdeveloper and adf..
    I need to use value from backing bean and use that value in application module.
    But I don't know how to get it.
    Do you a have any solution?

    suppose you have myMethod(String argumentName1,String argumentName2) in your Application Module
    then to access a method binding from a managed bean, use the following code,
      BindingContext bctx = BindingContext.getCurrent();
      BindingContainer bindings = bctx.getCurrentBindingsEntry();
      OperationBinding operationBinding =
           bindings.getOperationBinding("name_of_method_binding");
      //Here you can pass the parameters value to the AM method
      operationBinding.getParamsMap().put("argumentName1",value1);
      operationBinding.getParamsMap().put("argumentName2",value2);
      //invoke method
      operationBinding.execute();
      if (!operationBinding.getErrors().isEmpty()) {
         //check errors
         List errors = operationBinding.getErrors();
      //optional
      Object methodReturnValue = operationBinding.getResult();

  • What is the use of setting null values to Objects?

    What is the use of setting null values to Objects?
    regards,
    namanc

    It's more of a safety trap within java to handle the "programmers are still humans" exception.
    String myname;
    // print what???? Forgot to initialize the name!
    System.out.println(myname);Java will complain about myname not being initialized. It won't when you do this:
    String myname = null;
    // allright, your name is null
    System.out.println(myname);In the second case you are showing to java that you know what you are doing.

  • What is the use of passing String[] args in main() method?

    what is the use of passing String[] args in main() method?
    Is there any specific use for this ?

    actually my sir asked me the same question & I gave
    the same reply as given by you........but he further
    asked what is the use of this also??
    ie accepting cmd line args at runtime??is there any
    specific purpose ??Apart from the one you just mentioned? No

  • How to get string value from xml in JSF??

    In JSF How to get string value from xml, .ini and properties file. I want to get string value from xml or text to JSF

    Just use the appropriate API's for that. There are enough API's out which can read/parse/write XML, ini and properties files. E.g. JAXP or DOM4J for xml files, INI4J for ini files and Sun's own java.util.Properties for propertiesfiles.
    JSF supports properties files as message bundle and resource bundle so that you can use them for error messages and/or localization.

  • How to retrieve query string value from the URL in my portlet

    Hi,
    When user clicks on "Advance Search", i am redirecting to page in the community. At the same i am adding some more values to the query string (to the URL).
    My URL will look like this.
    http://ctp-mc0149/portal/server.pt?space=CommunityPage&parentname=CommunityPage&parentid=0&in_hi_userid=200&cached=true&control=SetCommunity&PageID=202&CommunityID=200&searchType=2
    Now in one of my portlet in that page, i want to retrieve the query string values from the URL.
    Please help me regarding this.
    Thanks in advance.
    Thanks,
    sreekanth.

    Hi,
    Look at the following threads,
    For programmatically getting the iview properties,
    Programmatically getting iView Properties
    Also,
    Get Properties of IView Programmatically
    Permanent change of iView property programmatically
    Hope these threads help u.
    Regards
    Srinivasan T

  • Get string value from enumerated value on AE user interface

    Hello.
    I'm trying to get the string value from a enumerated value on a layer's property.
    When I get the value via script, I have  1D value. However, I need the string value.
    In this example, the value I would get is 1. Is there any way I can get "Horizontal and Vertical".
    I'm looking for a generic way (any property value defined this way), not for this case only.
    Thanks for the help.
    cheers.

    You get the selected value via the value property of the component.
    Timo

  • How to send a String value  from Servlet to  Action class in Struts .

    when iam trying to send string value from Servlet to Struts Action class through Http Session, iam getting null value, iam really in big confusion, help me.

    please elaborate clearly or put you code of both action and servlet here
    Are both of them in same web application

  • How can I set the value to a session bean from backing bean

    Hi Experts,
    How can I set the value to a session bean from backing bean where I have created getter and setter
    methods for that variable.
    Basically I am using ADFUtils class where I am able to get the value from session bean
    using following expression
    String claimType =
    (String)ADFUtil.invokeEL("#{ClaimValueObj.getClaimType}");
    Thanks
    Gayaz

    Gayaz,
    Wrong Post !!
    Post in JDeveloper and ADF
    Thanks
    --Anil                                                                                                                                                                                                                               

  • How to refresh the input text value in backing bean

    hi all
    i want to know
    how to refresh the input text value in backing bean?
    i have tried this code ,but it doesnt work
    public void click(ActionEvent actionEvent) {
    tempConId.setValue("111111111111111");
    AdfFacesContext.getCurrentInstance().addPartialTarget(tempConId);
    sb know?
    Edited by: Joe Zou on 2012-4-6 下午9:11

    The code looks good.
    Here is a sample based on your use-case:
    InputTextSample.jspx:
    <af:form id="f1">
            <af:panelFormLayout id="pfl1">
              <f:facet name="footer">
                <af:commandButton text="Ok" id="cb1" partialSubmit="true"
                                  actionListener="#{InputTextSampleBean.onClick}"/>
              </f:facet>
              <af:inputText label="InputText" id="it1"
                            binding="#{InputTextSampleBean.myInputText}"/>
            </af:panelFormLayout>
          </af:form>
    InputTextSampleBean.java:
    import javax.faces.event.ActionEvent;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    import oracle.adf.view.rich.context.AdfFacesContext;
    public class InputTextSampleBean {
        private RichInputText myInputText;
        public InputTextSampleBean() {
        public void setMyInputText(RichInputText myInputText) {
            this.myInputText = myInputText;
        public RichInputText getMyInputText() {
            return myInputText;
        public void onClick(ActionEvent actionEvent) {
            this.myInputText.setValue("1234");
            AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
            adfFacesContext.addPartialTarget(this.myInputText);
    }

  • Can we Return values from Java Bean to Form

    Hi All,
    I have a Bean area defined on a Form. The Bean Area consists of a Text field which gets populated by path of a file selected using Browse button.
    Can I return this path as a parameter from the Java Bean to the form? Is there any function for this?
    Regards,
    Prathima.

    If you designed your bean to offer the ability to exact info/data from it, then yes you can get a value from the bean into the form (pl/sql) - using Get_Custom_Property
    Refer to the following which is a good example of how to build a bean. Specifically look at page 12 where is shows how to use Get_Custom_Property.
    This is NOT an Oracle supported or provided document or web site, but it is a very good example.
    http://forms.pjc.bean.over-blog.com/ext/http://sheikyerbouti.developpez.com/forms-pjc-bean/first-bean/first_bean.pdf

  • How to get readonly text field value in backing bean?

    Below is my code in JSF.
    <h:inputText id="prodLine" value="#{fbackingBean.value}" required="true" styleClass="readOnlyField" readonly="true"/>
    This is a readonly field, and the value will been pass in by a pop up window. after the value had been passed in, i try to store the data which i had selected, but the value in readonly field (which show in above) return a null value.
    May i noe how can i get the readonly field value in backing bean? thanks!

    Why not keep track of the value in the backing bean? If it's a read only value set from a backing bean it should be simple to retrieve from a backing bean.
    I'm new to JSF, but one thing that I have figured out is to try to put everything in the backing beans possible and to do as little as possible within the JFS web page components.

Maybe you are looking for

  • Inventry account error

    hi experts,                 i got an error while posting Goods Receipt PO. in company initialization window i checked use purchase account posting system and i assign inventry account in all neccesary places. but i get this error while creating goods

  • After Schedule , Blank Report

    Hello Everybody , I add a variable to report , After scheduling the report , content,datas of the report are empty.But If I remove variable , after schedule , the report datas and contents are normal appearing.In both cases the report save to my comp

  • Latest Javadocs on oracle.ldap not up to date

    I'm having a problem with the ldapclnt9.jar that comes with JDeveloper 9.0.5.1 The javadoc posted here: http://download-east.oracle.com/docs/cd/B10464_02/manage.904/b10423/index.html are not up to date (even though it shows 10g(904)). The oracle.ldap

  • SAP Crystal Dashboard Design 2008 - where to re-download software?

    Hi, My work laptop was just uprgraded from Windows XP to Windows 7 and I cannot find the software anywhere to re-install it.  I found the order confirmation email and managed to login to re-download it, but when I clicked "begin download" I got a mes

  • Installing Aperture on new iMac fails.

    New iMac of late 2012 bought yesterday.Have an iMac of late 2007. After transferring programs and documents I started Aperture and was requested to give serialnumber anew. The serial number for Aperture 2.0 was invalid and so was the number of Apertu