Decode function not called for a custom component

I know this problem happened in the past - in the EA2, EA4 and I believe the beta version as well, but does anyone know if it has been solved for the release ?
In short - I'm working with the release, created a menuBar component and the decode method in the renderer is not called after I submit the page. In the past, there were rumors that this happened due to relative paths in the JSP (for js files, images, etc.).
Does anyone else have this problem ? or better , know how to solve it ?
Thanx,
Netta.

It's not that simple - The component is getting rendered, all the encode methods are called and the decode is called also , but only the first time the form is submitted.
I added this custom component to the guessNumber application, and I have a menuBar in the greeting.jsp that leads to the response.jsp and vice versa. it looks like this in the greeting.jsp page -
<!-- Start Menu -->
<t:MenuBar id="bar1" styleClass="myClass" >
<t:Menu id="menu1" name="menu1">
<t:Menu id="menu2" name="menu2">
<t:MenuItem id="item2_1" name="item2_1" action="/mytest/guess/response.jsp"/>
<t:MenuItem id="item2_2" name="item2_2" action="http://www.msn.com"/>
<t:Menu id="menu3" name="menu3">
<t:MenuItem id="item3_1" name="item3_1x" action="http://www.msn.com"/>
</t:Menu>
</t:Menu>
</t:Menu>
<t:MenuItem id="item3" name="item3" action="http://www.cnn.com"/>
</t:MenuBar>
<!-- End Menu -->
In the response it looks like this -
<!-- Start Menu -->
<t:MenuBar id="bar2" styleClass="myClass" >
<t:MenuItem id="item3" name="item3" action="/mytest/guess/greeting.jsp"/>
</t:MenuBar>
<!-- End Menu -->
and every time a menuItem is clicked on, the JS calls submit form.
Since the menus are rendered, I assume there's nothing wrong with the rendererType and any other renderer problem. Since the decode is called only once, I assume the right form is being submitted.
So, what can cause it to stop calling the decode ???
Could it be that becase I go directly to the page and not through the navigation rules ( I call window.open directly from the JS), it creates a problem ??
Please help, I've been wasting so much time on this !
Netta.

Similar Messages

  • Ajax:callback function not called for every readystatechange of the request

    Author: khk Posts: 2 Registered: 2/17/06
    Feb 17, 2006 11:04 PM
    Hi
    I am working with an ajax program.
    In that i have defined a callback funtion
    but that function is not being called for every readystatechange of the request object for the first request .
    but it is working fine from the second request.
    function find(start,number){
    var nameField=document.getElementById("text1").value;
    var starting=start;
    var total=number;
    if(form1.criteria[0].checked) {
    http.open("GET", url + escape(nameField)+"&param2="+escape("exact")+"&param4="+escape(starting)+"&param5="+escape(number));
    else if(form1.criteria[2].checked) {
    http.open("GET", url + escape(nameField)+"&param2="+escape("prefix")+"&param4="+escape(starting)+"&param5="+escape(number));
    http.onreadystatechange = callback2;
    http.send(null);
    function callback2(){
    if (http.readyState == 4) {//request state
    if(http.status==200){
    var message=http.responseXML;
    alert(http.responseText);
    Parse2(message);
    }else{
    alert("response is not completed");
    }else{
    alert("request state is :-"+http.readyState);
    }

    Triple post.
    You have been answered here: http://forum.java.sun.com/thread.jspa?threadID=709676

  • Decode not called for all UIComponents in tree

    Many of the faces .jsp pages I have been working with in EA2 have not been updating their models properly.
    The symptom I have observed is that the decode method is not called for all of the UIComponents on the page.
    I think I have tracked this down to a bug in the class com.sun.faces.tree.TreeNavigatorImpl. This class appears to be used internally by some of the .jsf code to navigate the component tree.
    Studying various stack traces, it looks like the method TreeNavigatorImpl.getNextStart() is supposed to provide a preorder traversal of the component tree. Starting from the root of the tree, each call is expected to return the next node. Experimental evidence suggests that it is not doing that properly, and it fails to visit all the nodes in the tree.
    For example, if my component tree looks like this (this is a representation of the tree; not an example of a .jsp page):
    <node id = "/">
       <node id = "page">
          <node id = "carStoreForm">
             <node id = "ba0">
                 <node id = "ba1">
                     <node id = "ba3"/>
                     <node id = "br4"/>
                 </node>
             </node>
             <node id = "bold1"/>
             <node id = "more1"/>
          </node>
       </node>
    </node>A preorder traversal of these nodes should visit nodes:
    '/page'
    '/page/carStoreForm'
    '/page/carStoreForm/ba0'
    '/page/carStoreForm/ba0/ba1'
    '/page/carStoreForm/ba0/ba1/ba3'
    '/page/carStoreForm/ba0/ba1/br4'
    '/page/carStoreForm/bold1'
    '/page/carStoreForm/more1'
    However, when I write test code that calls TreeNavigatorImpl.getNextStart() directly, only the following nodes are returned:
    '/page'
    '/page/carStoreForm'
    '/page/carStoreForm/ba0'
    '/page/carStoreForm/ba0/ba1'
    '/page/carStoreForm/ba0/ba1/ba3'
    '/page/carStoreForm/ba0/ba1/br4'
    It looks to me like the method loses track of the state of the traversal, and prematurely returns null before all the nodes are visited. (It is failing to return the "bold1" and "more1" nodes.)
    This is all extremely speculative. Without jsf source or doc for any of the tree classes, it is difficult to know what is supposed to be going on. And, of course, I may just have a bug in my code.

    Okay, rather than wait for Max to respond, I decompiled the TreeNavigatorImpl class myself and studied the source code. The
    problem arises in the getNextStart() method. If the method returns
    a null value, then presumably the class has successfully traversed
    the entire tree in preorder. Unfortunately, there was a slight
    logic error that would halt traversal after you got to the last node
    of the last subtree at the beginning of your travels.
    The following code should correct this situation (let me know if I've
    introduced any new problems into the mix...). I tested this out using the simple example that Max describes above. The test code appears at the end of my revised method:
    public UIComponent getNextStart() {
    UIComponent cur = null;
    if (startTraversalDone) {
    return cur;
    if (startStack.empty()) {
    cur = root;
    Iterator iter = cur.getChildren();
    if (iter.hasNext()) {
    startStack.push(iter);
    else {
    while (!startStack.empty()) {
         Iterator iter = (Iterator) startStack.peek();
         if (iter != null && iter.hasNext()) {
         cur = (UIComponent) iter.next();
         Iterator childIter = cur.getChildren();
         if (childIter != null && childIter.hasNext()) {
         startStack.push(childIter);
         else {
         if (!iter.hasNext()) {
         startStack.pop();
         break;
    else {
         startStack.pop();
    if (startStack.empty()) {
    startTraversalDone = true;
    if (cur != null) {
    endStack.push(cur);
    return cur;
         public static void main(String[] args) {
              MyComp root = new MyComp("root");
              // build tree....
              MyComp page = new MyComp("page");
              root.addChild(page);
              MyComp csf = new MyComp("csf");
              page.addChild(csf);
              MyComp ba0 = new MyComp("ba0");
              csf.addChild(ba0);
              csf.addChild(new MyComp("bold1"));
              csf.addChild(new MyComp("more1"));
              MyComp ba1 = new MyComp("ba1");
              ba0.addChild(ba1);
              ba1.addChild(new MyComp("ba3"));
              ba1.addChild(new MyComp("ba4"));
              MyTreeNavigator nav = new MyTreeNavigator(root);
              MyComp comp = null;
              while ((comp = (MyComp) nav.getNextStart()) != null) {
                   System.out.println(comp.getComponentId());
    public class MyComp extends UIComponentBase {
         public MyComp(String id) {
              this.setComponentId(id);
         public String getComponentType() {
              return "MyComp";

  • Why is VO getter not called for custom VO attributes?

    Hi,
    The requirement is to add couple of fields on a OAF page. Here is what I did:
    - Created custom VO by extending the standard VO
    - Added fields to the page via personalization.
    The issue is that the values for the custom fields on the page were not showing up. On investigation, I found the VORowImpl getter getAttrInvokeAccessor was not being called for my custom attribute. I tried to check the difference between the attributes for which the getter was called and for which it was not called. I couldn't find any and I'm totally left clueless as to what determines the getter to be called.
    Really appreciate your help to move ahead.
    Thanks,
    Anil
    Edited by: AnilMenta on Mar 5, 2013 10:40 AM

    Hi Anil,
    First of all, Could you please make sure that Extended VO is being picked up during the execution of the page . Ensure that extended VO is substituted
    If the VO is substituted then try Steps below
    1. Enable the diagnostics .. show log on page statements
    2. Search for your custom VO name .
    If you can find your extended VO here, then substitution is right and page is picking up the extended VO.
    Thanks

  • Custom Validator for a Custom Component

    I am having troubling passing values from my custom component
    to my custom validator (via a model). For some reason when the
    validate() function is called for the validator the value parameter
    passed to the validator is not showing the value from my custom
    component.
    I have attached some example code to illustrate.
    Here is my model:
    <mx:Model id="myModel">
    <root>
    <mod>
    <name>{myTextInput.text}</name>
    <date>{myDateField.selectedDate.getTime()}</date>
    <length>{myComp.getLength()}</length>
    </mod>
    </root>
    </mx:Model>
    When I update the value of myTextInput or myDateField the
    model (as sent to the validator) shows the correct value. When I
    change the value of myComp the change is not reflected.
    Is there a particular event (or something) being dispatched
    in the other components to cause the model to get the new value
    that I need to include in my custom component? I am pretty stuck
    and would appreciate any help.
    Many thanks

    Does myComp extend EventDispatcher (or any class which does)?
    You need to flag the getLength() function as bindable and to
    dispatch an event:
    [Bindable('getLengthChange")]
    public function getLength() : Number
    // does whatever it does
    When you update myComp have it dispatchEvent( new
    Event("getLengthChange") ) and I think it will work.

  • UI delegate for a custom component

    Hello folks,
    I am trying to write (as said in the subject) a UI delegate for a custom component. I found the following in a Java FAQ (http://www.mindspring.com/~scdrye/java/faq.html#plaf_delegate):
    8.3. How do I create a UI delegate for my custom component?
    Have your component extend from JComponent (or a descendant of JComponent). Create a subclass of ComponentUI for your custom component, overriding at least the createUI() and paint() methods. To enable the new UI, override four methods of your JComponent subclass:
    public class MyComponent extends JComponent {
    public void updateUI() {
    setUI((MyComponentUI)UIManager.getUI(this));
    public void setUI(MyComponent newUI) {
    super.setUI(newUI);
    public MyComponentUI getUI() {
    return (MyComponentUI)ui;
    public String getUIClassID() {
    return "MyComponentUI";
    Well, it turns out that this is not enough. I also had to add during application start (just before initComponents()) the following:
    UIManager.put(uiClassID, uiClassName);
    to avoid exceptions during start of the program.
    Well, now my component is painted (paintComponent()) is called, but the paint() method in my new UI delegate class is not called when the application starts.
    It just gets called when I explicitily (in this case, using a menu item) change the L&F of the application.
    If this informatio is not enough, I can add some excerpts of my code for the ease of understanding!!
    Thanks a lot!

    If I code a new custom component (extending JComponent, or extending the UI delegate of a standard component) and pretend it to be laf aware then I must create the corresponding UI delegate for each laf, like it happens to be with standard swing components. But I'm not sure it is feasible to create the UI delegates for all unknown existing custom lafs.You are right, this is never going to work. I suggest if you want to make your custom component look & feel aware, you design the way it displays around the l & f of other components that are part of j2se and have l&f implementations.
    http://download.oracle.com/javase/7/docs/api/javax/swing/plaf/ComponentUI.html
    There are instructions here:
    http://download.oracle.com/javase/7/docs/api/javax/swing/LookAndFeel.html
    >
    On the other side, if I create a custom laf then I will also create a custom UI delegate for each standard component, but I can not create UI delegate for all unknown existing custom components.
    The point here is that standard components and standard lafs are universally known, while custom components (or custom ui delegates) and custom lafs are not.
    So the question is: How does a swing developer deal with the case of a new custom component that will be used in an unknown custom laf?
    For instance:
    1. Custom text UI delegate for dealing with styled documents in JTextField. See {thread:id=2284487}.
    2. JTabbedPane with custom UI delegate that paints no tab if the component only contains one tab.
    In both cases I need a UI delegate for each known laf, but what happens if the application is using a laf that certainly will not be aware of this custom functionally?
    Thank you!

  • "Function not authorized for License" error

    Hi All,
    I am getting "Function not authorized for License" error when i am retrieving details from a custom UI Map.
    The UI Map invokes a Business Service which calls a service program.
    I have written a page service for the service program.
    What License is this error indicating?
    I am using CCB 2.3.1 and Eclipse SDK 2.2.0.5.

    Check Admin Menu -> Installation Options Framework -> Accessible Modules to see if any module is turned off.
    Next go to Admin Menu -> Feature Configuration -> Feature Type = Module Configuration and remove an entry of a module which is turned off.
    Try the UI Map again

  • "FUNCTION NOT AVILABLE FOR THIS RESPONSIBILTY. CHANGE RESPONSIBILITY ....

    We have a custom form developed based on Template.fmb, when we register in custom application top(XXLLP_TOP/forms/US folder), it is giving error "Function not avilable for this responsibilty. Change responsibility or contact sysadmin".
    In AOL responsibility , all we did was
    a) Registered custom form XXLLPINVPKWB for custom "LLP Custom Application",
    b) Registered a custom Fuction for the form
    c) Assigned the Function to the Inventory menu (INV_NAVIGATE)
    d) Wwitch Resp to the Inventory resp
    e) Click on the menu entry for our custom form and its giving and error that the Function is not available for this responsibility. Please contact system admininstrator
    My understanding is that when I click the menu it should atleast
    give an error that the fmx is not available in so and so path
    in the status bar and not the error message "Function is not available ...
    Please help us resolving this issues
    Thanks,

    Did you set the CUSTOM_TOP variable for this application in the env file? What does "echo $XXLLP_TOP" return after sourcing the env file as applmgr user?
    Are you able to access other forms in this responsibility?

  • CreateRowFromResultSet not called for first row

    Hi all,
    Jdev Version: 11.1.1.7.0
    I have an XML stored in DB as  a CLOB. I fetch this XML as a CLOB (using clobdomain) in my VO and need to populate a few other transient attributes. I attempted to achieve this by overriding (as per blog entry) method 'createRowFromResultSet'. I observe a weird behaviour where this method does not get invoked for the first row alone.
    A while back, I see another member suffer from a similar issue - forum thread. Is this a bug that appears when using clob and overriding this method?
    Thanks in advance,
    Srini

    Hi,
    we have the same problem. The method createRowFromResultSet() is not called for the first row. We don't have a CLOB. We have a primary key of type Raw. Maybe this is causing the problem.
    We are using JDev 11.1.1.6.
    Regards,
    Linda

  • GET_V Method is not called for custom field

    Hi,
    We are using CRM 7.0
    I have enhanced component BT120H_CPL and added custom fields into view Details with AET. I am trying to implement search help which depends on another field. I have created V-GETTER for my field and tried to implement search help in this method. However, this method is not called in the program scope.
    I have debugged the application and result is :
    V_GETTER method GET_V_ZZAFLD00000D is created in class ZL_BT120H_C_DETAILS_CN00. It should be called from GET_V_S_EXT method but this method is called in class CL_BT120H_C_DETAILS_CN00 and exception occurs since GET_V_ZZAFLD00000D doesnu2019t exist in class CL_BT120H_C_DETAILS_CN00.
    I tried similar scenario : add search help to existing field of another component. However I couldnu2019t able to run GET_V method again.
    ( It works when I write search help id in the AET but in this way I cannot pass import parameter to it )
    Is there anything I am missing ? Thanks in advance for helps.
    Regards
    Abdul.

    Hi,
        Then, the next possible thing is checking the "enhancement set". Press F2 keeping the cursor on any field and check if the view is showing up as enhanced. Find this information under "Active Enhancement set" in the popup details. If this does not happen, then your enhanced view is not being used. You may want to check the COMPONENT_LOADING BADI if you are using more than one assignment set. You may also want to look at this WIKI.
    [http://wiki.sdn.sap.com/wiki/display/CRM/HowToEnhanceaWebUIComponentinSAP+CRM]
    Regards,
    Arun Prakash

  • P and V Getter not called for custom attributes!

    Hi,
    i implemented a new search structure instead of CRMST_QUERY_SLSORD_BTIL for business transaction search.
    I enhanced the new structure with a custom field and generated v and p-getter methods to have a dropdown listbox.
    Unfortunately the p and v getter are not called by the framework.
    The field in the context node is STRUCT./SEW/BILLINGBLOCK.
    I have no idea why this methods are not called by the framework.
    br
    Jürgen

    For the advanced search you do not have to implement a V getter. Instead, you must
    redefine method GET_DQUERY_DEFINITIONS in the implementation class of the view
    controller.

  • Function not available for this responsibility - Custom Form

    Hello All,
    We developed a custom form and was working fine in Testing instance.
    Last week testing instance was refreshed.
    After that all the custom forms are not working. Seeded forms are working properly.
    We checked the form setup(ie form, function, menu and we ran compile security and bounced the server).
    Custom reports under the custom top are working fine.
    Only the form functions throwing the error
    "Function is not available for this responsibility".
    Any ideas. Is the test.class having any impact on this.
    Regards,
    Kannan Balasubramanian.

    Hi,
    Last week testing instance was refreshed.your answer is that the refreshed has remove the custom top definition from your environment.
    Check this
    knick

  • "start" not called for Custom Login Command

    Hello,
    I'm working on getting acegi to handle the authentication instead of the app server. So I extended AppServerLoginCommand and overrode doAuthenticate and "start". But "start" never seems to get called; neither during initialization of the server nor before or after doAuthenticate is called. Note that doAuthenticate *does* get called, so BlazeDS does know about my custom command. I tried implementing just LoginCommand instead of extending AppServerLoginCommand but the same result.
    The reason I need start is because I want to grab the WebApplicationContext and from there get the authenticationManager bean so that doAuthentication can do its job.
    I noticed that "stop" never gets called either.
    Any pointers or clues would be appreciated.
    /r

    I looked through the source code and as best I can tell "start" never gets called for LoginCommand. This is, by no means, a certainty since I only partially followed the stack trace and looked at the source near the place where the LoginCommand gets created, so there may be another point in the lifecycle where start gets called. But anyway, if you look at the file at:
    http://opensource.adobe.com/svn/opensource/blazeds/trunk/modules/core/src/java/flex/messag ing/config/MessagingConfiguration.java
    near
    private LoginCommand initLoginCommand(LoginCommandSettings loginCommandSettings)
    you'll notice that the LoginCommand gets created but start is not called.

  • Can I define a constructor for a Custom Component?

    I have a custom component which I instantiate through ActionScript.  For the sake of clean code, I would like to be able to assign the variables through the constructor like any other class:
    var myComp:CustomComponent = new CustomComponent(arg1, arg2, ...);
    However, when I try to write a constructor in the Script block for the component, it gives me a compile error telling me that I have multiple constructors:
    //In Script tag//
    public function CustomeComponent(arg1, arg2 ...):void { ... }
    Are we not able to define constructors for Custom Components?

    If this post helps, please mark it as such.
    If you create an array variable in your MXML component, and then set it with myVar="[val1, val2, val3]" in the opening tag of your component, then you basically have a constructor in MXML.
    You can use the [Bindable] metadata tag in three places:
    Before a public class definition.
    The [Bindable] metadata tag makes usable as the source of a binding expression all public properties that you defined as variables, and all public properties that are defined by using both a setter and a getter method. In this case, [Bindable] takes no parameters, as the following example shows:
    [Bindable]
    public class TextAreaFontControl extends TextArea {}
    The Flex compiler automatically generates an event named propertyChange, of type PropertyChangeEvent, for all public properties so that the properties can be used as the source of a data binding expression.
    If the property value remains the same on a write, Flex does not dispatch the event or update the property, where not the same translates to the following test:
    (oldValue !== value)
    That means if a property contains a reference to an object, and that reference is modified to reference a different but equivalent object, the binding is triggered. If the property is not modified, but the object that it points to changes internally, the binding is not triggered.
    Note: When you use the [Bindable] metadata tag before a public class definition, it only applies to public properties; it does not apply to private or protected properties, or to properties defined in any other namespace. You must insert the [Bindable] metadata tag before a nonpublic property to make it usable as the source for a data binding expression.
    Before a public, protected, or private property defined as a variable to make that specific property support binding.
    The tag can have the following forms:
    [Bindable]
    public var foo:String;
    The Flex compiler automatically generates an event named propertyChange, of type PropertyChangeEvent, for the property. If the property value remains the same on a write, Flex does not dispatch the event or update the property.
    You can also specify the event name, as the following example shows:
    [Bindable(event="fooChanged")]
    public var foo:String;
    In this case, you are responsible for generating and dispatching the event, typically as part of some other method of your class. You can specify a [Bindable] tag that includes the event specification if you want to name the event, even when you already specified the [Bindable] tag at the class level.
    Before a public, protected, or private property defined by a getter or setter method.
    You must define both a setter and a getter method to use the [Bindable] tag with the property. If you define just a setter method, you create a write-only property that you cannot use as the source of a data-binding expression. If you define just a getter method, you create a read-only property that you can use as the source of a data-binding expression without inserting the [Bindable] metadata tag. This is similar to the way that you can use a variable, defined by using the const keyword, as the source for a data binding expression.
    The tag can have the following forms:
    As far as binding, you can add the [Bindable] tag before the class declaration to make bindable all public properties defined as variables, and all public properties defined by using both a setter and a getter method.

  • Icon for a Custom Component

    Hi --
    I am building a custom component and I have tried to create
    the icon for the
    component using
    [IconFile("iconMaskInput.png")]
    but its not working. Can someone help me out?
    Rich

    Hi --
    I followed your instructions and updated the icon for the
    movie clip inside
    my FLA file that I compiled into a SWC file. However, when I
    installed the
    SWC file the icon did not update in the palette. Is this
    because I had
    already installed the component once? Or did I do something
    wrong?
    Thanks
    Rich
    "gnfontaine" <[email protected]> wrote in
    message
    news:fm4dqs$or1$[email protected]..
    > You need to add it to the component inspector first,
    then copy it into the
    > same
    > folder where you create the install package.
    >
    > 1.) Under the component definition found in the library,
    click the default
    > icon You will be present with a list, the last choice is
    custom.
    > 2.)Check the box display in components panel.
    > 3.)If you are going to distribute the component using
    mxp package, make
    > sure a
    > copy of the component is in the same folder as the mxi
    file and that you
    > add it
    > to the files node in the mxi definition.
    >
    > Hope this helps
    >

Maybe you are looking for

  • Creation of own database for CMS

    Hi all I'm new to BusinessObjects And i'm currently in the midst of installing BusinessObjects Edge Series XI 3.1 and have chosen the option to use my own database server. Going through the installation checklist from the installation guide, there is

  • Help needed in - appending query string

    Hai All, Its very Urgent for me.Can anyone pls tell me how can I do the following. I want the query String of first page to be appended to the next following pages also.

  • Drag and Drop a file to a JForm

    Im developing my desktop app with netbeans. Is there any way to drag a file from your directory explorer (i.e. window's explorer) and drop it on the JForm (Dont mind if on the form directly or over any other object) , and make the app, i.e. show that

  • Continue without error

    Why does the following query runs even after error in each loop ? declare @i int set @i = 100 declare @sql varchar(255) while @i > 0 begin set @sql = 'select * from faketable' exec(@sql) print @i set @i = @i - 1; end

  • People can't open my files

    I am having a problem when I send files to people via email, they are being asked for a password to open the file. Why is this happening? It just started a few days ago. I have had to create new users and give them permission to read/write to files w