• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Static rendering (without DWR) for mobile UI

    Development general discussion
    3
    5
    3.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      beci
      last edited by

      Hi,

      I have the task to write a simple UI layer which could be used with mobile phones.

      For this, I tried to edit (=dumb down) the WEB-INF/tags/pointComponent.tag, because I thought that the pointComponent.tag is responsible for rendering the actual PointValues. As it seems, only partly: it renders some images, which then will get "overwritten" (or updated) by view.js, ViewDwr. and MiscDwr.**.

      As I understand, the DWR library makes remoting possible. But I'd like to skip that: I don't want any AJAX calls to the server. Rather, I'd like to render a static page with the PointValues already in it. (Yes, continuous updating is not so necessary right now: I'd only like to see the PointValues.)

      For me, the best would be if I could get hold of that DataPoint from the pointComponent.tag with some simple EL expressions, e.g. ${vc.dataPoint.lastValue}.

      Not being able to solve the question above, I tried to write a simple JSP, based on ViewDwr.java. It was something like this:

      
          ViewDao viewDao = new ViewDao(); 
      
          View view = viewDao.getView(4);
      
          List<ViewComponent> viewComponents = view.getViewComponents();
      
          for (ViewComponent vc : viewComponents) {
      
              DataPointVO dp = ((PointComponent)vc).tgetDataPoint();
      
                  String extName = dp.getExtendedName();
      
      

      It kinda works, but it isn't a nice solution. I tried to extract this to a JavaBean, but I wasn't able to import/set up the project in Eclipse. (That might be an other post.) (So no compiling or debugging for me, yet.)

      Actually, I don't even want to write my own beans and JSPs: I'd like to reuse code already written (e.g. pointComponent.tag), but I just can't. Any suggestions?

      Thanks in advance,
      Beci

      1 Reply Last reply Reply Quote 0
      • J
        jupepe
        last edited by

        I think that you should not directly change Mango's existing view components but instead of that to create new mobileView components.
        So you should create your own tag and view files to somehow add on the existing codebase. And in the mobile view you just select use this lightweight non-Ajax view layer after you login to system (or even before that?).
        But technically I don't exactly know how to do it?

        1 Reply Last reply Reply Quote 0
        • M
          mlohbihler
          last edited by

          jupepe has the right idea. There may be some possible reuse of existing code, but don't count on it: Mango was developed with AJAX foremost in mind. I suggest that, to build "static" pages for mobile devices, you create a new set of JSPs and MVC components.

          Editing to note that the "snippet" subdirectory may provide some reusable functionality. But, unlike tags, this code relies upon context attributes, so you'll need to be careful of namespace collisions.

          Best regards,
          Matthew

          1 Reply Last reply Reply Quote 0
          • M
            mlohbihler
            last edited by

            Please see http://mango.serotoninsoftware.com/forum/posts/list/0/207.page#947

            Best regards,
            Matthew

            1 Reply Last reply Reply Quote 0
            • First post
              Last post