Shehzaad khan wrote:okay..
Can you please give me some idea how you have created and detecting two Views for coderanch?
We did something similar to what you propose, but a bit more centralized. In the Command class, we changed one method to:
Then in the template mapping we defined a mobile template for each template. (For the pages that don't have mobile views, it points to the same html file as the non-mobile view. This also let us transition one at a time.)
The other significant piece of functionality is an enum we created called MobileStatus.java (code attached). We show the mobile view if the user typed /mobile in the URL or is on a mobile type device (as determined by WURFLManager). We then keep track of the information so once a user is mobile, he/she stays mobile unless explicitly clicking the full site link.