0 Replies Latest reply on May 25, 2008 11:16 PM by aozoren

    Mobile seam

    aozoren

      Hi - I have a rather special problem but i will try to make it sound like a generic problem so it might appeal to everyone.


      I am trying to serve mobile pages and my initial attempt was to build my own 'wap servlet' that spits out wml code for basic link, input, etc. functionality.


      I quickly realized that this was a very naive choice of weapon since not all phones understand wml. Some use xhtml, some chtml, etc.


      Luckily there is Wurfl/wall jsp library that converts wall:xxx tags to whatever that device understands via user agent string and it works like charm.


      The problem I could not solve is to make jsp and xhtml live side by side and both be processed by seam.


      I know the likelihood of finding anybody who did wurfl/wall might be slim to none here but that does not mean being able to use seam to serve mobile content is not interesting.


      My first goal is to convert the vanilla seam login page to wurfl/wall so I wrote the following:



      <%@ taglib uri="/WEB-INF/tld/wall.tld" prefix="wall" %>
      
      <wall:document>
      
      <wall:xmlpidtd />
      
      <wall:head>
       <wall:title>m login</wall:title>
      </wall:head>
      
      <wall:body>
       <wall:form action="url" method="post" enable_wml="true">
      username:
         <wall:input type="text" name="username" maxlength="10" value="#{identity.username}" />
      <wall:br />
      username:
         <wall:input type="text" name="password" maxlength="10" value="#{identity.password}" />
      <wall:br />
        <wall:input type="hidden" name="session" value="gfsa87837" />
      
        <wall:input type="submit" value="login" />
       </wall:form>
      </wall:body>
      </wall:document>
      



      The result was that

      #{identity.username}

      code was not converted to values coming from back bean.


      Considering wurfl/wall does some magic to convert wall tags to regular input tags, that is probably normal but not the desired effect.


      Can anybody with a better understanding of jsp/jsf/seam lifecycle help me out to get this show on the road?


      Thanks,