How to construct the component tree in my custom component?Help!

Hi, i am writing a custom component like this:
public class HtmlCategory extends HtmlPanelGrid
     public void processRestoreState(javax.faces.context.FacesContext context,
            java.lang.Object state)
          setColumns(1);
          HtmlCommandLink link=new HtmlCommandLink();
          link.setValue("Let's Bingo");
          MyUtil.setActionListener(context,link,"#{temp.mytest}");
          UIParameter param=new UIParameter();
          param.setName("name");
          param.setValue("Robin!");
          link.getChildren().add(param);
          param.setParent(link);
          getChildren().add(link);
          link.setParent(this);
          super.processRestoreState(context,state);
}         you see, i want to construct the compont tree at Restore View phase this way,because the structure of the component tree will always be the same, so i don't the user to write extra code.
But the children of the component are not rendered,the renderer of the HtmlCategory component just extends the HtmlGridRenderer(myfaces) directly,and always calls the "super" methods in the encode methods of the renderer.
I got a message from the console:
Wrong columns attribute for PanelGrid id0:id4: -2147483648
but i have set the columns attribute in the code above, so what's happening? or please give some advice about how to render the component tree by myself in Restore View with the tree constructing code in the custom component class code,just lke the code above.
Best Regards:)
Robin

Well, i don't know if i have got my question clear.
usually, according to the tags you use in the jsf page, a component tree will be created at the Restore View phase,for example:
<f:form>
  <h:panelGrid ...........>                         
          <h:dataTable ................>
          </h:dataTable>
   </h:panelGrid>
</f:form>but because i am writing a component for my web app, all the child components and their attributes are not likely to change. so i want to reduce the tags into one custom tag, and construct the component tree internally by myself.But it is not the case of backing bean.So i wrote the the code in the method:
public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)as it is shown in my orginal message.But it seems that it is not right way to construct my component tree.So where should i put the code that construct the component tree?Overriding the method :
public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)is not the right way?
Best Regards:)
Robin

Similar Messages

  • How to load the destination url of af:goLink   component to a REGION?

    Hi,
    I've a tree in which every node is <af:goLink> component. How to load the destination url of <af:goLink> component to a REGION? Can anyone please tell me whether it is possible or not?
    Thanks
    -Sukumar

    Hi,
    Thanks for the reply. I have looked at the blog.
    But my scenario is little bit different. I'm not trying to load a JSF fragment page or a JSF page or a html page. I'm trying to load a url page which is not related to the applicaton. Eg: I'm trying to load "www.my.oracle.com" web page in the region. So I must use a <af:goLink> component. Please correct me if i have misunderstood the concepts".
    Thanks
    Sukumar

  • How to get the current tree element (node/childnode/childnode/...) ?

    Hello!
    I'm trying to create a kind of a navigation tree for my application.
    It should represent some elements of an XML structure and some other nodes for other options.
    The binding with the context is not a problem, I can create the tree up to all the levels I want to.
    The problem now is, that I don't know, how to get the "current tree element", when there is any action.
    For example:
    public void onActionSelect(...) {
    String test = wdContext.currentTreeNodeElement().getText();
    wdThis.wdGetContext().currentContextElement().setSelectedElement(test);
    With this method I can get the text of the "first level nodes". If I want to get the "second level node", I can do
    String test = wdContext.currentTreeNodeElement().currentChildElement.getText();
    ..and for the next levels so on.
    Isn't there any general method to get the information of the selected element without knowing before, whether it is a nodeElement or a nodeElement.currentChildElement or a nodeElement.currentChildElement.currentChildElement, ...?
    Greetings,
    Ramó

    Hi,
    if you following that pdf ,
    i think your not implemented the below code in DomodifyView method
    if (firstTime) {
          IWDTreeNodeType treeNode = (IWDTreeNodeType) view.getElement("TheNode");
          /* The following line is necessary to create parameter mapping from parameter "path" to parameter "selectedElement".
    Parameter "path" is of type string and contains the string representation of the tree element (its corresponding context element to be exact)
    that raised the onAction event. Parameter "selectedElement" is of type IWDNodeElement (or extends it) and is defined as parameter in the event handler
    that handles the onAction. The parameter mapping defined here translates the String "path" into the corresponding context element that then can
    be accessed within the event handler
          treeNode.mappingOfOnAction().addSourceMapping("path", "selectedElement");
          /* The following line is necessary to create parameter mapping from parameter "path" to parameter "element".
    Parameter "path" is of type string and contains the string representation of the tree element (its corresponding context element to be exact)
    that raised the onLoadChildren event. Parameter "element" is of type IWDNodeElement (or extends it) and is defined as parameter in the event handler
    that handles the onLoadChildren. The parameter mapping defined here translates the String "path" into the corresponding context element that then can
    be accessed within the event handler
          treeNode.mappingOfOnLoadChildren().addSourceMapping("path", "element");
    please cross check once.
    Thanks,
    Ramesh

  • How to refresh the ALV Tree

    Hi,
    I have an ALV Tree report developed using the OOPS. In my ALV Tree output, I have some buttons which will update the database after clicking. The data is correctly updating in the database. But, it is not getting updated in the ALV Tree display. That means, it is not REFRESHing the ALV Tree display. We have to again execute the program in order to see the updated output.
    Could anyone please suggest me how to Refresh the ALV Tree display..?
    We can't use the method 'REFRESH_TABLE_DISPLAY' as it is a PRIVATE method is the class CL_GUI_ALV_TREE.
    Please share your valuable thoughts.
    Thanks & Regards,
    Paddu.

    Hi paddu.
    please check out the link mentioned below,this will help u.
    How to Refresh data on ALV tree
    Regards
    Theres

  • How to make the APEX tree in the "Expand All" shape by default?

    Could anybody please enlighten me on how to make the APEX tree in the "Expand All" shape by default please? I created an APEX tree and by default it's in the "Collapse All" shape. I am using APEX 4.1.0.00.21

    Hi,
    you can check the view source of html and check the onclick code written on that plus sign(Expand All), just copy that onclick javascript code and put it on page javascript event.
    Thanks,
    Jaydip Bosamiya
    +91-76000 23053
    http://jbosamiya.blogspot.com

  • How to construct the constant pool?

    Greetings,
    I seems to have a little bit of a problem.
    I have a text file, generated by the javap -c <class_name> command,
    i.e.:
    javap -c myClass > myClass.txt
    This myClass.txt is the input I've got. I do not have the myClass.class, from which it was generated.
    What I wish to do, is to generate, from this text file, a leagal, runnable, class file (i.e., myClass.class).
    But, I have problems understanding how to construct the constant pool array.
    I have read the VM spec (java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html).
    The thing is, that it does not explain how to extract the needed information from the text file.
    Can someone assist?
    Would appreciate,
    Ohad.

    Compiled from Hello.java
    public class Hello extends java.lang.Object {
        public Hello();
        public static void main(java.lang.String[]);
    Method Hello()
       0 aload_0
       1 invokespecial #6 <Method java.lang.Object()>
       4 return
    Method void main(java.lang.String[])
       0 new #4 <Class java.util.Timer>
       3 dup
       4 invokespecial #7 <Method java.util.Timer()>
       7 new #2 <Class Hello$1>
      10 dup
      11 invokespecial #5 <Method Hello$1()>
      14 lconst_0
      15 lconst_1
      16 invokevirtual #8 <Method void schedule(java.util.TimerTask, long, long)>
      19 returnWell in this example, you have opcodes with arguments which are expressed as (for example) "#7 <Method java.util.Timer()>". This describes a constant pool element. I assume #7 refers to the location within the constant pool, and the text description tells you that it's an item of type method, and gives you the method name. So for all arguments expressed in this form, you'll need to reconstruct a constant pool item.

  • I need to know how to "compress" the Folder Tree.  The File folders are moving to the right and out of sight in Lightroom 5.

    I need to know how to "compress" the Folder Tree.  The File folders are moving to the right and out of sight in Lightroom 5.

    A couple of suggestions that may help:
    - Make sure you've made the left-hand column as wide as possible by grabbing the divider between the column and the Library grid view.
    - You can hide a parent folder from the display by right-clicking it and selecting Hide This Parent. This will shift all the child folders to the left.

  • How to use the LAN NetStream for peer transmission, please help, write a sample code

    How to use the LAN NetStream for peer transmission, please help, write a sample code

    No reply, I reply, Oh

  • I got an ipod touch from my friend, but can't figure out how to change the apple id to get games. Help?

    I got an ipod touch from my friend, but can't figure out how to change the apple id to get games. Help?

    Never mind, I got this.

  • How can identify the default currency for a customer?

    How can identify the default currency for a customer?
    I know that this is being determined when you create a sales order for a particular customer, for example, so I could break this process open and find out what it uses. But I thought it worth asking in this forum first.
    Blue

    Hi Gary,
    As per my understanding of your question I am replying , If you are looking some thing else then I request you to please elaborate your query.
    If you see the BP sales area data in transaction BP, In billing tab you maintain the currency for a customer which is default currency when you create a sales order.
    <b>Reward points if it helps!!</b>
    Best regards,
    Vikash

  • I would like to know how to get the unrestricted quantity excluding actual customer ordr quantities on a given group of items?

    I would like to know how to get the unrestricted quantity excluding actual customer ordr quantities on a given group of items?

    Hi , Welcome to the HP Forums!
    It is a terrific place to find answers and tips!
    For you to have the best experience in the HP forum I would like to direct your attention to the HP Forums Guide.Learn How to Post and More I grasp you would like to replace the keyboard and would like the part number and where to purchase one. Here is a link to the HP Pavilion 17 Notebook PC HP Pavilion 15 Notebook PC Maintenance and Service Guide .  Please note chapter 3, page 20, item 2 for the replacement keyboard part numbers. You stated you were having a difficulty locating where to purchase the part.  Here is a link to  HP Notebook PCs - Ordering HP Certified Replacement Parts for your convenience. You can also try a Google search with the part number for other vendors that may have one.   To say thanks for replying please click the thumbs up icon below. If this has addressed your query please choose solution provided to help other people locate this information.   Best of Luck!

  • How to store the flat file data into custom table?

    Hi,
    Iam working on inbound interface.Can any one tell me how to store the flat file data into custom table?what is the procedure?
    Regards,
    Sujan

    Hie
    u can use function
    F4_FILENAME
    to pick the file from front-end or location.
    then use function
    WS_UPLOAD
    to upload into
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'   "Function to pick file
        EXPORTING
          field_name = 'p_file'     "file
        IMPORTING
          file_name  = p_file.     "file
      CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
         filename                       = p_file1
        TABLES
          data_tab                      = it_line
    *then loop at it_line splitting it into the fields of your custom table.
    loop at it_line.
              split itline at ',' into
              itab-name
              itab-surname.
    endloop.
    then u can insert the values into yo table from the itab work area.
    regards
    Isaac Prince

  • How to fetch the Table Control data to Customer Table(Z-Table) ?

    How to fetch the Table Control data to Customer Table(Z-Table) ?

    Hi Krishna,
    Check this sample programs
    http://www.planetsap.com/online_pgm_main_page.htm
    http://sap.niraj.tripod.com/id29.html
    http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm
    Have a look at below links. It will help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac5135c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm
    Thanks,
    Reward If helpful.

  • HT1296 cannot sync the calendar on my ipad mini with my main imac computer. the settings on itunes say that my ipad is syncing over the air but it is not unfortunately. i cant see how to change the settings if need be. would appreciate help. thanks

    i canot sync the calendar on my ipad mini with my main imac computer. the settings on itunes say that my ipad is syncing over the air but it is not unfortunately. i cant see how to change the settings if need be. would appreciate help. thanks

    i have done this on my ipad mini and my imac but they are still not syncing. my iphone 4 has the icloud symbol but it seems to be unresponsive to touch, I cannot get it to highlight or turn-on. Bit confused.

  • How to Collect the Incoming Payment from Alternative Customer?

    Hi All,
    Can any one solve the below problem and in which screen I have to execute?
    1. How to Collect the Incoming Payment from Alternative Customer, if one Customer is having 2 Accounts in the same Company Code?
    Thanks
    Chandra

    Please see the below link:
    http://help.sap.com/saphelp_47x200/helpdata/en/01/a9b220455711d182b40000e829fbfe/frameset.htm
    Thanks
    Chandra

Maybe you are looking for

  • Problem with using XSD in PI 7.1

    Hi all, I am intergrating with a third party which has provided an XSD definition of their message formats. I have imported this file as an external definition and can use it in my message mapping fine. However I'm trying to create a Message Interfac

  • DM 3.0.0.665 / Can't delete schema information from PK in relational model

    I'm trying to erase schema infromation from primary keys in relational mode by opening Primary Key Properties window and selecting the empty line from "Schema" pull down menu. When I click OK I get the following: "There is a Foreign Key on this Key.

  • Using MBA to access library on old iMac

    I want to share my old iMac's iTunes library with my new MacBook Air (to save space). My iMac is about 5 years old; functional but very slow. Ideally I don't want to touch the iMac and essentially leave it in sleep, using it as an external hard drive

  • List of Objects(UDO)

    Hello, I'm working in a project where I want to make a form for Route entry-- eg-- Mumbai to Goa, Kolkata to Digha etc. like Business Partner Entry form. Then I need to have a list of routes in another form where a field for Route entry is, like BP l

  • Can text but not Video/Audio chat

    I have tried to do video chat with my friend in Japan. It was fine with ADSL usb modem before, but since I changed to ADSL wireless Router, Voyager2091 supplied by BT broadband, I could not get connection. I get "did not respond" message every time..