Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am currently trying to solve this very same problem. A framework would be nice, and I'm all ears if anyone has tested and approved one. That said, I can't find anything mature enough for me to be justify moving from Struts for the mobile view.</p> <p>My best solution currently is to create actions for each of the parts of my full page which will be displayed on full browsers. Then to reuse those actions to display page segments on the mobile side.</p> <p>I found trying to make one page look right for a desktop browser and a mobile browser simultaneously was not a sustainable approach. </p> <p>jQuery mobile looks like a very promising library for styling the elements retrieved by struts.</p> <p>So while it is surely possible to cram both versions of the site into one action I think taking the time to create small reusable actions that result in jsp snippits will pay off as your app scales.</p> <p>Here are some possibilities for the near future:</p> <p>(I can't add these as links as I don't have enough reputation...you'll have to add the 'http://www.')</p> <p>Struts2 jQuery Mobile Project homepage: <a href="http://code.google.com/p/struts2-jquery/" rel="nofollow">http://code.google.com/p/struts2-jquery/</a></p> <p>Struts2 jQuery Mobile project: code.google.com/p/struts2-jquery/downloads/detail?name=struts2-jquery-mobile-showcase-3.1.1.war</p> <p>an example of struts2 jQuery Mobile: weinfreund.de/struts2-jquery-mobile-showcase/index.action</p> <p>@fajrian - using 'user agent' to determine a browser type could become a real pain as more and more mobile and desktop browsers are released. A better approach would be to determine whether to display a mobile version or full version based on the window's dimensions. <a href="http://particletree.com/examples/dynamiclayouts/" rel="nofollow">A perfect example</a>.</p> <p>edit - Check out CSS3 media queries.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload