TreeView Error in MVC pattern

<htmlb:tree id        = "ztr_dpt"
                  showTitle = "false"
                  table2 = "//MODEL/ZA_IT_TREETAB">
      </htmlb:tree>
table2(MODEL/ZA_IT_TREETAB) structure:
treeid   |  childid  |  text   |   statues |   click
ztr_dpt |   001     |  aaa  |  open     |   001            
ztr_dpt |   02       |  bbb  |  open     |   02        
the error text:
Type conflict in the ASSIGN statement in the program CL_HTMLB_TREE=================CP .
why?

the sample itab content you had shown, is it in the same fashion
whats there in the parent field?
it should be some thing like below
Treeid     parent id  child id     
S       |         |C1       |          |          |
S       |SA       |C2       |          |          |
S       |SAB      |C4       |          |          |
S       |SA       |D5       |          |          |
S       |SAC      |E        |          |
Regards
Raja

Similar Messages

  • What is your strategy for form validation when using MVC pattern?

    This is more of a general discussion topic and will not necessarily have a correct answer. I'm using some of the Flex validator components in order to do form validation, but it seems I'm always coming back to the same issue, which is that in the world of Flex, validation needs to be put in the view components since in order to show error messages you need to set the source property of the validator to an instance of a view component. This again in my case seems to lead to me duplicating the code for setting up my Validators into several views. But, in terms of the MVC pattern, I always thought that data validation should happen in the model, since whether or not a piece of data is valid might be depending on business rules, which again should be stored in the model. Also, this way you'd only need to write the validation rules once for all fields that contain the same type of information in your application.
    So my question is, what strategies do you use when validating data and using an MVC framework? Do you create all the validators in the views and just duplicate the validator if the exact same rules are needed in some other view, or do you store the validators in the model and somehow reference them from the views, changing the source properties as needed? Or do you use some completely different strategy for validating forms and showing error messages to the user?

    Thanks for your answer, JoshBeall. Just to clarify, you would basically create a subclass of e.g. TextInput and add the validation rules to that? Then you'd use your subclass when you need a textinput with validation?
    Anyway, I ended up building sort of my own validation framework. Because the other issue I had with the standard validation was that it relies on inheritance instead of composition. Say I needed a TextInput to both check that it doesn't contain an empty string or just space characters, is between 4 and 100 characters long, and follows a certain pattern (e.g. allows only alphanumerical characters). With the Flex built in validators I would have to create a subclass or my own validator in order to meet all the requirements and if at some point I need another configuration (say just a length and pattern restriction) I would have to create another subclass which duplicates most of the rules, or I would have to build a lot of flags and conditional statements into that one subclass. With the framework I created I can just string together different rules using composition, and the filter classes themselves can be kept very simple since they only need to handle a single condition (check the string length for instance). E.g. below is the rule for my username:
    library["user_name"] = new EmptyStringFilter( new StringLengthFilter(4,255, new RegExpFilter(/^[a-z0-9\-@\._]+$/i) ) );
    <code>library</code> is a Dictionary that contains all my validation rules, and which resides in the model in a ValidationManager class. The framework calls a method <code>validate</code> on the stored filter references which goes through all the filters, the first filter to fail returns an error message and the validation fails:
    (library["user_name"] as IValidationFilter).validate("testuser");
    I only need to setup the rule once for each property I want to validate, regardless where in the app the validation needs to happen. The biggest plus of course that I can be sure the same rules are applied every time I need to validate e.g. a username.
    The second part of the framework basically relies on Chris Callendar's great ErrorTipManager class and a custom subclass of spark.components.Panel (in my case it seemed like the reasonable place to put the code needed, although perhaps extending Form would be even better). ErrorTipManager allows you to force open a error tooltip on a target component easily. The subclass I've created basically allows me to just extend the class whenever I need a form and pass in an array of inputs that I want to validate in the creationComplete handler:
    validatableInputs = [{source:productName, validateAs:"product_name"},
                         {source:unitWeight, validateAs:"unit_weight", dataField:"value"},
                   {source:unitsPerBox, validateAs:"units_per_box", dataField:"value"},
                        {source:producer, validateAs:"producer"}];
    The final step is to add a focusOut handler on the inputs that I want to validate if I want the validation to happen right away. The handler just calls a validateForm method, which in turn iterates through each of the inputs in the validatableInputs array, passing a reference of the input to a suitable validation rule in the model (a reference to the model has been injected into the view for this).
    Having written this down I could probably improve the View side of things a bit, remove the dependency on the Panel component and make the API easier (have the framework wire up more of the boilerplate like adding listeners etc). But for now the code does what it needs to.

  • Can i use Custom Tags for Database retrieval (as per MVC pattern)?

    In our project we are dealing with database, and i've used the Cutom Tags for database retrieval (as per the Article from Mr Faisal Khan) and it is working fine. But i have a doubt if it affects the performance in any way . I wanted to know if its recommendable to use Custom Tags for the DB retrieval as per MVC Pattern or shall i create a intermediate bean and then call the bean in custom tag.
    Thanks
    Prakash

    Putting database code in your JSPs certainly couples your view to the database. That's usually not good.
    If it's a simple app, it might be justified.
    When you start having lots of pages and complex business logic it becomes less attractive. - MOD

  • Protecting Presentation JSP in a MVC Pattern

    why should I use "login-config" type authentication to protect my presentation JSP used in an MVC pattern from direct access, when I can protect it simply by placing it in my WEB-INF?

    Authentication is not just to protect presentation layer but any resource served by the application server.

  • MVC pattern in flash builder

    I am trying to figure out the MVC patter in flash builder. I understand we can seperate view and controller by building custom components as view and populate them in the controller file. However, I don't know how to apply the Model login in flash builder. Do i create a Model folder and file and using that file to receive data?
    For example:
    Main controller:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx"
                                     minWidth="955" minHeight="600"
                                     xmlns:components="components.*">
              <fx:Declarations>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
                        <s:HTTPService url="test.come" id="testData" result="testData_resultHandler(event)"/>  //Data here
              </fx:Declarations>
              <fx:Script>
                        <![CDATA[
                                  import mx.collections.ArrayCollection;
                                  import mx.rpc.events.ResultEvent;
                                  public var testData:ArrayCollection;
                                  protected function testData_resultHandler(event:ResultEvent):void
                                            testData=event.result.something...   //How to seperate the Data with the main controller?????
                        ]]>
              </fx:Script>
    //view
              <components:videoList />
         <components:videoList2 />
         <components:videoList3 />
    </s:Application>
    I appreciate any replies. Thanks a lot.

    The usual pattern in flex is to have an mxml component 'the view', an actionscript class (the controller), and some additional actionscript classes that represent the data objects (the model). Your 'main' application class is responsible for creating a new instance of the controller, usually as response to the creationComplete event. The controller then initiallizes/retrieves the 'Model' objects and passes them back to the view which binds them to the appropriate fields. So at the bare minimum for an MVC project your are going to have Main.mxml, MainController.as, and Model.as.
    This is not the most elegant solution since it tends to create tight coupling between the controller and the view. If you want to use the MVC pattern on any project that involves more than 3 or 4 simple views you will probably want to look into a custom MVC framework like Cairingorm or the Tide framework from GraniteDS. Make sure you have a solid understanding of the basics first though. 

  • Infopath throws error "only specific pattern allowed" when use regular expression for validation in schema

    This is MS info path question, I could not find specific forum for Info-Path So asking my question here
    I am creating Info-Path form from schema. In the schema, the filename has restriction that it can only have extension .pdf or .PDF. But while filling out the form even if I type filename with extension ".pdf", I still see error "only
    specific pattern allowed".
    Below is my schema I used to create form
    <?xml version="1.0" encoding="utf-8" ?>
    <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Document">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="FileName" type="FileNameType"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:simpleType name ="FileNameType">
    <xs:restriction base="xs:string">
    <xs:pattern value="^.*\.(pdf|PDF)$"/>
    <xs:minLength value="1" />
    <xs:maxLength value="128" />
    </xs:restriction>
    </xs:simpleType>
    </xs:schema>

    Hi
    This is the forum to discuss questions about Microsoft Office development. For your question, I recommend you post the question to the Answers forum for Infopath
    Microsoft Community for​ InfoPath​
    By the way, you can get support from here.  Support for Microsoft InfoPath
    Thank you for your understanding.
    Best Regards
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Java server faces mvc pattern

    Well i dont know any knowledge of java servr faces.Dows java Server faces encapsulate mvc pattern like struts other then html tag library.
    Thanks.

    JSF only addresses the "user interface" framework portion of a web application. You can perhaps think of it as standardizing the "V" in MVC (I don't know if this is quite right, is it so Craig?). We wish that there will be another JSR in the future that standardizes rest of the "C" of the MVC.
    -Mete

  • MenuItem ActionListener bug (MVC pattern)

    Hello. I'm implementing a book store system using the MVC pattern, but due to the fact that the method actionPerformed() is in class libraryController it doesn't work (and I need it in this class due to the MVC pattern). Can anyone help me? Thanks.
       class libraryView extends JFrame{
      JMenuItem addBook = new JMenuItem("Add Book");
      JMenuItem deleteBook = new JMenuItem("Delete Book");
       JMenuItem modifyByTitle = new JMenuItem("Modify by Title");
       JMenuItem modifyByAuthor = new JMenuItem("Modify by Author");
       JMenuItem searchByTitle = new JMenuItem("Search by Title");
        JMenuItem searchByAuthor = new JMenuItem("Search by Author");
        JMenuItem searchByID = new JMenuItem("Search by ID");
        JMenuItem bookListing = new JMenuItem("Book Listing");
       public JPanel createContentPane()
            JPanel totalGUI = new JPanel();
            totalGUI.setBackground(Color.white);
            totalGUI.setMinimumSize(new Dimension(300, 200));
            totalGUI.setPreferredSize(new Dimension(500, 500));
            totalGUI.setMaximumSize(new Dimension(300, 200));
            totalGUI.setOpaque(true);
            return totalGUI;
        public JMenuBar createMenuBar(){
            JMenuBar menuBar = new JMenuBar();
            JMenu menu = new JMenu("Options");
            menuBar.add(menu);
            menuBar.setBackground(Color.pink);
            addBook.setFont(new Font("Helvetica",Font.PLAIN,13));
            menu.add(addBook);
            deleteBook.setFont(new Font("Microsoft Sans Serif",Font.PLAIN,13));
            menu.add(deleteBook);
           JMenu modifyBook = new JMenu("Modify Book");
            modifyBook.setFont(new Font("Helvetica",Font.PLAIN,13));
            menu.add(modifyBook);
            modifyByTitle.setFont(new Font("Helvetica",Font.PLAIN,13));
            modifyBook.add(modifyByTitle);
            modifyByAuthor.setFont(new Font("Helvetica",Font.PLAIN,13));
            modifyBook.add(modifyByAuthor);
            JMenu searchBook = new JMenu("Search Book");
            searchBook.setFont(new Font("Helvetica",Font.PLAIN,13));
            menu.add(searchBook);
            searchByTitle.setFont(new Font("Helvetica",Font.PLAIN,13));
            searchBook.add(searchByTitle);
            searchByAuthor.setFont(new Font("Helvetica",Font.PLAIN,13));
            searchBook.add(searchByAuthor);
            searchByID.setFont(new Font("Helvetica",Font.PLAIN,13));
            searchBook.add(searchByID);
            bookListing.setFont(new Font("Helvetica",Font.PLAIN,13));
            menu.add(bookListing);
            return menuBar;
        private static void createAndShowGUI(){
            //Create and set up the window.
            // JFrame.setDefaultLookAndFeelDecorated(true);
            JFrame frame = new JFrame("[=] JMenuBar [=]");
            //Create and set up the content pane.
            libraryView libr_obj = new libraryView();
            frame.setContentPane(libr_obj.createContentPane());
            // We now also set the MenuBar of the Frame to our MenuBar
            frame.setJMenuBar(libr_obj.createMenuBar());
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setVisible(true);
       public void init_view(){
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
        void MenuActionListeners(ActionListener al) {
            addBook.setActionCommand("addBook");
            addBook.addActionListener(al);
            deleteBook.setActionCommand("deleteBook");
            deleteBook.addActionListener(al);
            modifyByTitle.setActionCommand("modifyByTitle");
            modifyByTitle.addActionListener(al);
            modifyByAuthor.setActionCommand("modifyByAuthor");
            modifyByAuthor.addActionListener(al);
            searchByTitle.setActionCommand("searchByTitle");
            searchByTitle.addActionListener(al);
            searchByAuthor.setActionCommand("searchByAuthor");
            searchByAuthor.addActionListener(al);
            searchByID.setActionCommand("searchByID");
            searchByID.addActionListener(al);
            bookListing.setActionCommand("bookListing");
            bookListing.addActionListener(al);
    class libraryController implements ActionListener{
         libraryModel model;
         libraryView view;
       public libraryController (libraryModel model, libraryView view) {
            this.model = model;
            this.view  = view;
            this.view.init_view();
            view.MenuActionListeners(this);
       public void actionPerformed(ActionEvent ae)
        String action_com = ae.getActionCommand();
            if (action_com.equals("addBook"))
              System.out.println("add Book");
    }

    Thanks. I think you were right with the new object created, but I still have the problem, although I add the menu bar directly to the frame. Could you provide me a good link or smtg cause I really can't figure it out how to do it. Thank you.
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package librabrymanagementf;
    import java.awt.event.ActionEvent;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    public class Main {
        public static void main(String[] args) {
                  // Creates a model of the system logic.
            libraryModel model = new libraryModel();
            // Creaties a view for the system logic.
            libraryView view = new libraryView();
            // Creates a controller that links the two.
            libraryController controller = new libraryController(model, view);
      class libraryModel{
      class libraryView extends JFrame{
        JFrame frame = new JFrame("[=] JMenuBar [=]");
        JMenuItem addBook = new JMenuItem("Add Book");
        JMenuBar menuBar = new JMenuBar();
        JMenu menu = new JMenu("Options");
        public libraryView()
        frame.setSize(400,400);
          frame.setVisible(true);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          menuBar.add(menu);
          menu.add(addBook);
          menu.add(deleteBook);
          frame.setJMenuBar(menuBar);
        public void MenuActionListeners(ActionListener al) {
            addBook.setActionCommand("addBook");
            addBook.addActionListener(al);
    class libraryController implements ActionListener{
         libraryModel model;
         libraryView view;
       public libraryController (libraryModel model, libraryView view) {
            this.model = model;
            this.view  = view;
            view.MenuActionListeners(this);
       public void actionPerformed(ActionEvent ae)
        String action_com = ae.getActionCommand();
            if (action_com.equals("addBook"))
              System.out.println("oki");
       

  • How to apply mvc pattern  to mastermind game coding?

    Hello,
    I am trying to create the mastermind board. i want to know how to apply the MVC pattern to the design
    View -- creating the board
    Model --??
    Controller --??
    I am not able to understand what should be in the model and what shud be in the controller.
    Can anybody help
    Thanks,
    Manju

    * Model - The model represents enterprise data and the business rules that govern access to and updates of this data. Often the model serves as a software approximation to a real-world process, so simple real-world modeling techniques apply when defining the model.
    * View -The view renders the contents of a model. It accesses enterprise data through the model and specifies how that data should be presented. It is the view's responsibility to maintain consistency in its presentation when the model changes. This can be achieved by using a push model, where the view registers itself with the model for change notifications, or a pull model, where the view is responsible for calling the model when it needs to retrieve the most current data.
    * Controller - The controller translates interactions with the view into actions to be performed by the model. In a stand-alone GUI client, user interactions could be button clicks or menu selections, whereas in a Web application, they appear as GET and POST HTTP requests. The actions performed by the model include activating business processes or changing the state of the model. Based on the user interactions and the outcome of the model actions, the controller responds by selecting an appropriate view.
    http://java.sun.com/blueprints/patterns/MVC-detailed.html

  • Observer, MVC pattern

    Hi!
    I am trying to learn about the Observer, MVC pattern.
    The problem is that I cant find any good tutorial... Does anyone know any?

    Hi!
    Sorry for the delay, I have been away!
    I hear what you are saying. Can you then recommend me some Observer guide?
    Can you please give me some tips on how I should design the program.
    This is the design problem I have:
    In the program there are about 4 different components where each component is well suited for the MVC-pattern.
    These for components depend on each other. So for example if the components are A, B, C and D, D can depend on A, B and C. But B only depends on A and B. "depend" may be blurry. In the first case were D depended on A, B and C. That means that when something happens in A, B or C. They will have to update/call a method or something like that in D.

  • Design dialog program using the MVC pattern

    Hi,
    I have to design a dialog program using the MVC pattern , with all the controllers lying inside function modules.
    I have searched out on net and could find out that BSP applications are designed using the MVC concept.Please suggest how can the dialog program be designed using MVC pattern.

    I'm currently developing a classic Dynpro dialog program.  I have a module pool, with screens.  I've tightly coupled the module pool with a controller class.  Anything that happens in the module pool, is handled by the controller class. All the logic of screen handling is done by the controller class.
    What remains in the module pool is the capturing of the okcode. the next screen to go to (if applicable), the setting of field attributes.  But the okcode is sent straight to the controller for processing, and the screen/field information is also held in the controller.
    I've also rewritten the auto-generated tab handling code, so the logic is done via a class. 
    So, it is possible - just aim to have as LITTLE as possible in the module pool or function group.
    The model, of course, is in a separate class.

  • Pop Up Error using MVC method after Validation in  DO_HANDLE_EVENT Method

    Hi Experts,.
    I am rather new to BSP applications and I am working using MVC at the moment. I have a requirement which apparently is simple, but am yet to get that done successfully.
    I have a couple of buttons on my BSP View screen, on click of these buttons, the User Name would be verified with entries in a Custom table and if the User Name is not found, an error message would pop up stating, "You are not Authorized to use this option".
    On click of the button, the event which is triggered is handled in the DO_HANDLE_EVENT Method of the Controller for the view.
    The check is performed in that method. Thereafter the method DO_REQUEST follows automatically which loads the view yet again. I want to throw a pop up error message at this instance if the User Name was not the authorized one.
    I have used Java Script to throw pop up message but only in case of field content validation where I did not need to navigate away from the view for the validations. But how do I bo about for this example.
    Any help would be highly appreciated.
    Regards,
    Subhrangsu

    Hi
    1. You can call the view in pop-up because you will be calling the controller using open.window.
    Here is the sample code:
    method DO_REQUEST .
      data:
            li_vw           type ref to   if_bsp_page,
            lv_form_field   type          string,
            li_md           type ref to   zcl_model01.
      dispatch_input( ).
      li_md ?= get_model( 'm01' ).
      lv_form_field = request->get_form_field( 'invoice_create' ).
      if lv_form_field is initial.
    *------ Request to display main page
        li_vw = create_view( view_name = 'main.htm' ).
        li_vw->set_attribute( name = 'model' value = li_md ).
        call_view( li_vw ).
      elseif lv_form_field eq 'true'.
    *------ Request to display Invoice page in pop-up
        li_vw = create_view( view_name = 'invoice.htm' ).
        li_vw->set_attribute( name = 'model' value = li_md ).
        call_view( li_vw ).
      endif.
    endmethod.
    Layout :
       function do_Invoice()
          { var s=0; r=1; w=300; h=300; x=screen.width/2;
            x=x-w/2;
            var y=screen.height/4;
            y=y-h/2;
            popUp=window.open('main.do?invoice_create=true','win','width='+ w
            +',height='+ h +', left=' + x +',top='+ y +');
    Regards,
    G. Nikhil Kumar

  • Error running mvc application

    why when I run a MVC application is giving me an error saying
    Server Error in '/' Application.
    The resource cannot be found.
    Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled
    correctly.            
    Requested URL: /
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.340
    thanks         
                

    I'd ask them over here.
    http://forums.asp.net/
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Error imaq color pattern

    hi, I'm trying to do a draft color pattern recognition, but labview gives me this error, I hope you can help me, let the files, thank you very much
    Error -1074395384 occurred at IMAQ Match Color Pattern
    Possible reason(s):
    IMAQ Vision: Invalid color template image.
    Attachments:
    pastillas1.png ‏55 KB
    pastillas2.jpg ‏42 KB
    Parámetros de Búsqueda Color.vi ‏78 KB

    Hello,
    the general idea is:
    Best regards,
    K
    https://decibel.ni.com/content/blogs/kl3m3n
    "Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."

  • [Error] No timing pattern determined for horizon in /SAPAPO/SEQ1

    Hi Experts,
    I'm trying to use transaction /SAPAPO/SEQ1 for Model Mix Planning (Sequencing) and I get this error message :
    No timing pattern determined for horizon 2010/07/09 11:00:00 to 2010/07/14 19:00:00
    Message no. /SAPAPO/SEQ130
    Can't find anything on it on the Web or OSS.
    Does anybody ever had this error ?
    Thanks,
    Marc

    Hi Ranjini,
    Please look into the following
    1) Customer master data is fully maintained
    2) Customer number ranges are fully defined in customisation
    3) Customer address details are maintained
    4) Is there any special characters used while defining customer data or customer
    number like $, #,[ etc.,?
    5) Customer int models are active in SCM side prior to IDOC processing (including
    customer, demand, stocks etc)
    Please confirm your findings
    Regards
    R. Senthil Mareeswaran.

Maybe you are looking for

  • EJB 3.0 specification is finalized??

    Hi, We have a new J2EE proyect, we planning make it with EJB 3.0,but i dont know, this specification is finalized?? we are looking for application servers, we work with WebLogic, but yet no have full support to EJB 3.0. I dont nkow that use j2ee ejb

  • While syncing my ipod all songs and pictures were cleaned out of it and now it is not recognized by itunes.  Help!

    Whiling syncing my ipod all of my music and pictures were cleaned out and now my ipod is not recognized my itunes.  I have uninstalled and reinstalled itunes and it didn't help.  Any suggestions?

  • What can be done if ur camcorder is not qualified for FCE HD 3.5?

    I recently brought the HDV Sony HC3 and the Final Cut Express HD 3.5... the problem i have now is that the Final Cut express HD 3.5 did not support my camcorder, do i have to wait for the new software update for my camcorder to be in the qualifed dev

  • What is error code 3259?

    What is error code 3259.  I have tried several attempts to download system 4.3.5, and the material fully downloads and then crashes prior to installing the update.  I get the following message and the error code 3259. Anybody know how to fix this?

  • Language specific material

    Hi Is it possible to have language specific stock in a plant? As per the issue, an order has to be created in CRM for a material which has more than one language specific stock i.e. 100 qty in english , 100 qty in french. when tried its taking  the s