Custom tag losing onchange value when page is refreshed

Hi all,
I'm still using JSF 1.1 and I have an issue with a custom tag. When my page is first displayed, the onchange attribute contains my script but, when I refresh the page it's not there anymore. The custom tag if an input for dates. It can have of to 4 dropdown list, year, month, day and time.
Any idea what I might be doing wrong?
Thanks

Verify that the custom component saves the value of the onchange attribute in its state (see UIComponent.saveState() and UIComponent.restoreState()).

Similar Messages

  • How to use custome tag lib in the JSP page?

    How to use custome tag lib in the JSP page?...with JDeveloper

    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtTopicFile.working_with_jsp_pages%7Cjsp_ptagsregistering~html/

  • In custom tag, trying to include JSP Page, not processing tags

    Now I have this in the correct forum!
    I am in a custom tag where one of my attributes (myIncludePage) is the name of another JSP file that I want to include. So, in my custom tag doStartTag() I have:
    out.println("<td>");
    pageContext.include(myIncludePage);
    out.println("</td>");
    The included page is rendered with the custom tags in it not processed (I see my tags in the generated HTML)
    How do I get the included page to be "processed"?
    Thanks in advance,
    Sam

    Sorry, wrong forum, should be in the JSP forum. Hope someone can still help!

  • In custom tag, trying to include JSP page, not processing JSP tags

    I am in a custom tag where one of my attributes (myIncludePage) is the name of another JSP file that I want to include. So in my custom tag doStartTag() I have:
    out.println("<td>");
    pageContext.include(myIncludePage);
    out.println("</td>");
    The included page is rendered with the custom tags in it not processed (I see my tags in the generated HTML)
    How do I get the included page to be "processed"
    Thanks in advance
    Sam

    Sorry, wrong forum, should be in the JSP forum. Hope someone can still help!

  • Allow custom tag on folder name when importing

    I like the "2007-07-08" folder name syntax, but I would like to append a name to it, such as "2007-07-08 Ski Trip" or "2007-07-09 Pets". It is painful to have to go to custom, change the template, go back, import, and do this again and again. How about just an extra textbox on the import screen for "Title" of the import, which can be appended to the date?
    Thanks.
    Running Vista Ultimate.

    I miss the same thing, and others have stated this aswell! Just like file naming has the {custom text} option, folder naming should have exactly the same!
    The folder name preset YEAR-MONTH-DATE works fine, but I also want to add a custom text at the end, just like SoCalSteve.
    > How about just renaming the folder(s) after the import(s) are complete. This can done in the Folders panel using Rename on the context menu; a template isn't required.
    I know this is not too hard. But the idea with LR is to avoid extra steps like this. When you're done with the import dialog, you should be ready for working / reviewing photographs. Starting renaming folders after every import prooves that the import dialog needs more work.

  • Validating items when page is refreshed

    Hi all,
    I have a page that contains a select list, two date pickers and a classic report. The page items are all used for filtering on the report.
    When any of the items has their values changed, a dynamic action fires and refreshes the report region, without submitting the page. This currently works as required.
    However, I want to validate the date pickers, ie. End Date cannot be before Start Date. This seems easy to do with the validation section when the page is being submitted, but I cant work out how to do this when the region is being refreshed dynamically.
    Can anyone offer a suggestion?
    Apex version 4.0
    Regards
    ~P

    Implement PRG pattern. After finishing of the POST processing, but before sending anything to the response, immediately invoke a Redirect to a new GET request on the same URL. Then refreshing won't resend the POST request, but only the GET request.

  • Custom Tag Capitalization Problem..

    All,
              OS: Windows 2000
              App Server: Weblogic 6.0 sp 2
              JDK: 1.3 (and tried 1.3.1)
              I have a set of custom tags that run fine when I use them on an app server (such as Enhydra) with JDK 1.2.2, but when I switch to JDK 1.3.x, which weblogic 6.x requires, they suddenly start generating errors with attributes which have capitalized letters in them. For example, in my taglib I have:
              <attribute>
              <name>closeConnection</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
              </attribute>
              and in the support class I have:
              * Get the value of closeConnection.
              * @return value of closeConnection.
              public boolean getCloseConnection() {
              return closeConnection;
              * Set the value of closeConnection.
              * @param v Value to assign to closeConnection.
              public void setCloseConnection(String v) {
              if(v.toUpperCase().equals("TRUE")){
              this.closeConnection = true;
              } else {
              this.closeConnection = false;
              When I go to the page that this tag is on, I get the following output:
              Parsing of JSP File '/index.jsp' failed:
              /index.jsp(1): Error in using tag library uri='/cwerks' prefix='cwerks': There is no setter method for property 'closeconnection', for Tag class 'net.cwerks.taglib.MyTag'
              probably occurred due to an error in /index.jsp line 1:
              <%@ taglib uri="/cwerks" prefix="cwerks" %>
              Thu Aug 02 19:06:52 PDT 2001
              Note that the 'closeconnection' is all lowercase despite the fact that it is upper case in the tld and in the class itself.
              I came across a similar problem in weblogic 5.1 when I upgraded from JDK 1.2.2 to JDK 1.3. I tried changing the JDK for weblogic 6.0 sp 2 to 1.2.2, but a dll was missing. I also tried switching it to 1.3.1, but that did not help. It seems like introspection may have changed slightly between the two version. I'm shocked, and a bit suspicious, that I haven't seen this problem all over the newsgroups. Anyone else seen this?
              Thank you,
              Carson Gross
              [email protected]
              [att1.html]
              

    A solution presents itself:
              The problem was NOT with capitalization. Instead, the problem was as
              follows:
              My method was for setting a boolean, but I took a string so that people
              wouldn't have to type:
              <mytags:tag foo="<%=true%>" />
              instead, they could type:
              <mytags:tag foo="true" />
              which would call the setter method with a string "true", which would be then
              converted to a boolean within my class.
              So my setter has this signature:
              public void setFoo(String s)
              and my getter has this signature:
              public boolean getFoo() /* I know this isn't standard, but isFoo doesn't
              sound good to me*/
              I can't tell if it's because JavaBeans changed slightly between jdk 1.2.2
              and 1.3.x, or if Weblogic changed the way that they do things (I suspect the
              latter, since I had things working fine in WL 5.2 w/ jdk 1.2.2 and then
              things broke with WL 5.2 w/ jdk 1.3), but this no longer returns foo as a
              valid property to be set, and since weblogic 6.x relies on JavaBeans,
              instead of straight up introspection, it barfs. (I found this out by using
              jad/emacs, a wicked combination for those who want to poke around in jars).
              Anyway, I hope I can save someone else who has this same, albeit
              specialized, problem a lot of pain by my discovery. Your getters and
              setters better be of the same type with custom tags, or weblogic w/ jdk1.3.x
              is gonna barf when parsing the tld.
              Cheers, and thank God that's behind me,
              Carson Gross
              [email protected]
              ====================================================
              "Carson Gross" <[email protected]> wrote in message
              news:[email protected]...
              The plot grows thicker...
              The tags work fine on Tomcat 3.2.2
              I deploy the example tags that came with wl60 that have more than one
              capital letter in thier attributes, and they work fine. But my tag library
              stubbornly insists on not working so long as I keep the attributes with more
              than one capital letter in. If I remove the offending attributes, or change
              them to have only one capital letter, they work, but this is not an
              acceptable solution. (I guess.)
              I even created an simple introspection class to make sure that the acutal
              methods were there. They were.
              I am at a complete loss here... I guess it's tomcat for now.
              Cheers,
              Carson Gross
              [email protected]
              "Carson Gross" <[email protected]> wrote in message
              news:[email protected]...
              All,
              OS: Windows 2000
              App Server: Weblogic 6.0 sp 2
              JDK: 1.3 (and tried 1.3.1)
              I have a set of custom tags that run fine when I use them on an app server
              (such as Enhydra) with JDK 1.2.2, but when I switch to JDK 1.3.x, which
              weblogic 6.x requires, they suddenly start generating errors with attributes
              which have capitalized letters in them. For example, in my taglib I have:
              <attribute>
              <name>closeConnection</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
              </attribute>
              and in the support class I have:
              * Get the value of closeConnection.
              * @return value of closeConnection.
              public boolean getCloseConnection() {
              return closeConnection;
              * Set the value of closeConnection.
              * @param v Value to assign to closeConnection.
              public void setCloseConnection(String v) {
              if(v.toUpperCase().equals("TRUE")){
              this.closeConnection = true;
              } else {
              this.closeConnection = false;
              When I go to the page that this tag is on, I get the following output:
              Parsing of JSP File '/index.jsp' failed:
              /index.jsp(1): Error in using tag library uri='/cwerks' prefix='cwerks':
              There is no setter method for property 'closeconnection', for Tag class
              'net.cwerks.taglib.MyTag'
              probably occurred due to an error in /index.jsp line 1:
              <%@ taglib uri="/cwerks" prefix="cwerks" %>
              Thu Aug 02 19:06:52 PDT 2001
              Note that the 'closeconnection' is all lowercase despite the fact that it is
              upper case in the tld and in the class itself.
              I came across a similar problem in weblogic 5.1 when I upgraded from JDK
              1.2.2 to JDK 1.3. I tried changing the JDK for weblogic 6.0 sp 2 to 1.2.2,
              but a dll was missing. I also tried switching it to 1.3.1, but that did not
              help. It seems like introspection may have changed slightly between the two
              version. I'm shocked, and a bit suspicious, that I haven't seen this
              problem all over the newsgroups. Anyone else seen this?
              Thank you,
              Carson Gross
              [email protected]
              

  • Custom Tag with boolean Attribute problems

    Hi,
    I've created a simple custom tag that is expecting a boolean attribute called "disabled". In my Tag derived class I've created a setDisabled(boolean b) method and set the following in the tag descriptor:
    <attribute>
         <name>disabled</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
    </attribute>I'm using a JSTL expression "${someExpression}" which, when I do a c:out on the value, returns true.
    I call the tag like this:
    <mytag disabled="${someExpression}"/>However, in my custom tag class the value is passed as false. I can get true passed in if I hard code it, but that isn't going to work.
    I've tried a number of different combinations and even read through this forum for the last 2 hours and cannot seem to figure it out.
    What am I doing wrong?
    Thanks,
    John

    TLD File, per your previous recommendation:
    <attribute>
         <name>disabled</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
         <type>boolean</type>
    </attribute>My Tag class (snippet):
    public class ButtonTag extends TagSupport
      private boolean disabled;
      public ButtonTag() {}
      public boolean isDisabled()
         return disabled;
      public void setDisabled(boolean b)
        disabled = b;
    }A sample of the jsp file invoking it:
    <c:set var="result" value="${computedValue}"/>
    <ltm:button disabled="${result}"/>Regardless of the value of result, ("true" or "false") it always passes false to the setDisabled method of the button tag class.

  • Using gateway'd URLs in JSP custom tag attributes

    Hello,
    I am running Plumtree G6 using a gateway prefix to gateway Javascript from a remote server. I have recently discovered, thanks to people's help on the forum here, that in certain cases, you need to wrap a URL in a pt:url tag in order for Plumtree to recognize it as a URL that has to be gateway'd (i.e. a URL inside of a Javascript function).
    However, I have a custom tag that contains a contextPath attribute. This custom tag then includes other XML files that get included in the final page that is displayed. I am passing this value as my contextPath:
    <mytag:body sessionName="mysession" campusName="SampleCampus" contextPath="<pt:url pt:href='http://localhost:7021/application/scripts' xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'/>"/>
    However, in the resulting content that is created from this custom tag, the contextPath value is still set to <pt:url pt:href=......./>, and not the actual gateway'd URL. I would have thought that Plumtree would have recognized and gateway'd this URL before it got substituted in the custom tag.
    Does anyone have any thoughts on how to get around a problem like this? One thought I had was to get ahold of the gateway URL value and pass that value directly in my contextPath attribute. Is it possible to get that gateway value, or is there a better solution here?
    Thanks again for any help you can provide.

    Chris,
    I added your code, changed the portlet's web service to send a login token for this portlet, and was then getting some ClassNotFoundExceptions related to Axis classes. So, I went and added all of the jar files from the devkit's lib directory (i.e. plumtree\ptedk\5.3\devkit\WEB-INF\lib), recompiled, and those errors went away. But, now I see the following error:
    java.lang.NoSuchFieldError: RPC
         at com.plumtree.remote.prc.soap.QueryInterfaceAPISoapBindingStub.(QueryInterfaceAPISoapBindingStub.java:27)
         at com.plumtree.remote.prc.soap.QueryInterfaceAPIServiceLocator.getQueryInterfaceAPI(QueryInterfaceAPIServiceLocator.java:43)
         at com.plumtree.remote.prc.soap.QueryInterfaceProcedures.(QueryInterfaceProcedures.java:37)
         at com.plumtree.remote.prc.xp.XPRemoteSession.(XPRemoteSession.java:202)
         at com.plumtree.remote.prc.xp.XPRemoteSessionFactory.GetTokenContext(XPRemoteSessionFactory.java:80)
         at com.plumtree.remote.portlet.xp.XPPortletContext.getRemotePortalSession(XPPortletContext.java:261)
         at com.plumtree.remote.portlet.PortletContextWrapper.getRemotePortalSession(PortletContextWrapper.java:45)
         at jsp_servlet._collabrasuite.__riarooms._jspService(__riarooms.java:325)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:417)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    I am using version 5.3 of the EDK, and running Plumtree Foundation G6. Have you ever seen an error like this before?
    Thanks again for all of your help.

  • All custom tags fail in JBoss3.2.3/Tomcat 5.0.16 (works in Tomcat 4.x)

    All pages that contain a custom tag fail with the following exception: HTTP Status 500 -
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    java.lang.NullPointerException
         org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:153)
         uploadQS1_jsp._jspx_meth_strutshtml_hidden_0(uploadQS1_jsp.java:225)
         uploadQS1_jsp._jspService(uploadQS1_jsp.java:100)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
         org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    note The full stack trace of the root cause is available in the Tomcat logs.Even a simple <struts-html: hidden ... /> tag causes this exception. As long as the page has no custom tags, it is served fine. The same web-app works as expected in JBoss3.2.3/Tomcat4.x.
    It almost looks as if Tomcat is looking in a object pool for a custom tag object reference and when it fails to find one, throws a null-pointer instead of instantiating a new one to work with. (This is pure speculation on my part).
    Did the TLD's req's change, or the setup for Tomcat? It's not my tags, even Struts tags fail. Any ideas why my tags aren't "resolving"?

    Has anyone had any luck getting this to run or run into this problem? It fails even with a fresh JBoss install using tomcat 5.0.16.

  • Problem in using jsp 1.1 custom tag library in websphere

    I am using was 3.5.2. Everything has been installed properly. I am using jdeveloper 3.2 for building the jsp application using custom tag library. But when I run the jsp file in browser, its gives dr. watson on java.exe. I am using websphere 3.5.2 application server.
    Have any body got this type of prob. ...
    pls respond asap.
    Thanks in Advance
    Yogesh

    Let me explain the problem again
    I am using was(websphere) 3.5.2. Everything has been installed properly. I am using jdeveloper 3.2 for building the jsp application using custom tag library.
    Application works fine in JDeveloper 3.2.
    Application works fine even when deployed on JRun 3.0. ( we are evaluating various web servers).
    How when deployed on WAS and I run the jsp file in browser, its gives dr. watson on java.exe. I am using websphere 3.5.2 application server.
    WAS has typical settings as against JRun and Tomcat and may be I have not set the necessary paths.
    Have any body got this type of prob. ...
    pls respond asap.
    Thanks in Advance
    Yogesh
    null

  • Custom tag error

    I'm tring to create a new JSF custom tag. my custom tag inherits from another custom tag called tab.
    the tld look like this :
    <taglib>
    <tlib-version>1.0</tlib-version>
         <jsp-version>1.2</jsp-version>
    <short-name>actab</short-name>
    <uri>http://jsftutorials.com/</uri>
    <tag>
    <name>actab</name>
    <tag-class>com.ca.accesscontrol.tabs.monolithic.ACTabTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
              <name>include</name>
         </attribute>
    <attribute>
         <name>name</name>
         <required>true</required>
         <rtexprvalue>false</rtexprvalue>
         <description>Tab name to be displayed on this tab.</description>
         </attribute>
    <attribute>
              <name>id</name>
         </attribute>     
    </tag>
    </taglib>
    I'm tring to use the custom tag in the jsp, when I specify the attrbute name I get the following error:
    monolithic.jsp(14,13) Attribute name invalid according to the specified TLD
    when I remove the name attribute from the jsp I get the following error :
    monolithic.jsp(13,10) According to the TLD attribute name is mandatory for tag actab.
    does anyone have an idea about what the problem is ?

    a bit more info required I think.
    Is there more to that exception than you posted - coming from your code?
    Maybe you can put try/catch code in your Tag source file to catch and print any exceptions that occur.
    Beans property conversion would indicate that it has translating one type to another.
    What attributes does this tag take. Should width be an integer - and 96% causes it an error?
    Lets see the tld file, and maybe some basic source?

  • Custom tag as performance hits.

              Hi All,
              I want to know if there is a correlation between the number of custom tags used in
              a JSP page and the page's performance.
              Is there a guideline/study which indicates (or otherwise) that increasing the number
              of custom tags decreases the loading (rendering) time of the JSP page. I understand
              that more tags mean more jsp-compilation time but I am interested in runtime performance.
              Thanks,
              Anu
              

    I want to know if there is a correlation between the number of custom tags          used in
              > a JSP page and the page's performance.
              >
              > Is there a guideline/study which indicates (or otherwise) that increasing
              the number
              > of custom tags decreases the loading (rendering) time of the JSP page. I
              understand
              > that more tags mean more jsp-compilation time but I am interested in
              runtime performance.
              Each additional tag adds some runtime overhead. The overhead is primarily
              determined by the quality of the tag implementation. I'd rather have 1000
              well written tags than 1 poorly written one ;-) ... e.g. if you are doing
              JDBC calls from a tag, then you will probably get into trouble in a hurry.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              Clustering Weblogic? You're either using Coherence, or you should be!
              Download a Tangosol Coherence eval today at http://www.tangosol.com/
              "Anu Agrawal" <[email protected]> wrote in message
              news:3cd821c0$[email protected]..
              >
              

  • How to get and set custom tag attributes

    How do i get and set custom tag attributes from a jsp page?

    Not sure if this is what your looking for, but....
    example...
    < taglibprefix:testtag attribute1="x" attribute2="y">
    ...of course, the attributes have to be defined in your taglib (.tld) file

  • Initialization of parameter values in JSP Custom Tag Handlers

    Hi - I have a tag handler for a custom tag that has no body, but accepts
              some parameters.
              If the parameters are optional and are passed with the tag in the source jsp
              page, then all is fine.
              However, for subsequent uses of the same tag in the same page if the
              optional parameters are omitted, the previous values remain in the instance
              of the tag handler class, as the attributes for the tag handler are declared
              as instance variables (with corresponding getters and setters) as per the
              tag handler specs.
              eg:
              <abc:sometag attrib1="a" attrib2="b"/>
              if attrib1 and attrib2 are optional, then a subsequent use of this tag, eg:
              <abc:sometag/>
              attrib1 and attrib2 still have their previously assigned values of "a" and
              "b".
              Is there a method I can call to get the actual values of the attributes that
              were passed on a particular call to the tag handler, or is there a way to
              initialize the attributes before the tag handler processing method, eg
              doBeforeBody(), doAfterBody(), is called?
              Thanks,
              Kevin Hooke
              

    Yeah, just call the JSPWriter's print method instead of using the StringBuffer, or write your own subclass of StringBuffer (or StringBuilder if Java 5+) which will do this for you automatically when the size is at a certain point, and clear it out)

Maybe you are looking for

  • Powerpoint audio

    I have spent a hudge amount of time creating powerpoint slides with voice narration attached directy to shapes(not the slides themselves) with and without animation. After importing into captivate, non of the audio narration plays even the shapes are

  • Intercompany Ind

    hi In derivation rule in COPA one CO consultant used Intercompany Ind. Please tell me how and where this indicator is created. because on a copied client of QA it is not shown. regards

  • Wrong business systems are displayed

    Hello all, i have met a problem in XI/PI. We are using XI/PI 7.11 (dual stack) und one SLD for test- and product-systems. The SLD runs on SAP Solution Manager System (7.10). On XI test-system i have tried to add another business systeme in integratio

  • Clicking any button in the crystal toolbar refreshes the current page???

    Post Author: Saiedh CA Forum: Crystal Reports I have a crystalviewer that is setup in a table and the report loads fine the first time, but if I click any of the buttons such as next, previous, print, group tree, it will refresh the page.  Basically

  • Newly added contacts don't appear in my contact list.

    I recently upgraded from a iPhone 3GS to a 4S. When I add a new contact on my phone it does not appear in my contact list. If I go to a new text message and type the name it appears as a suggestion and I can select it that way. I'm unable to edit the