wicket-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno Borges (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (WICKET-3813) Support for device and fallback device specific layout
Date Fri, 17 Jun 2011 19:07:47 GMT

     [ https://issues.apache.org/jira/browse/WICKET-3813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Bruno Borges updated WICKET-3813:
---------------------------------

    Attachment: DeviceStreamLocator.java

> Support for device and fallback device specific layout
> ------------------------------------------------------
>
>                 Key: WICKET-3813
>                 URL: https://issues.apache.org/jira/browse/WICKET-3813
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-core
>            Reporter: Bruno Borges
>         Attachments: DeviceStreamLocator.java
>
>
> Wicket does a great job at locating resources based on variation, style and location.
The current way of locating HTML resources is done by the following schema:
>    Page[_variation][_style][_locale].extension
> where:
> * variation is per Component
> * style and locale are per Session
> * extension is usually ".html"
> The feature proposed here is to add another section, separated by a single dot:
>    Page[_variation][_style][_locale][.device].extension
> The use case that requires this is one where an user's device is identified as an Android
phone and so one could set Session.get().setDevice("android"); 
> Inside ResourceStreamLocator, the current algorithm can just add that as an array of
extensions to iterate.
> Consider the HomePage: 
> - HomePage.html
> - HomePage.m.html
> - HomePage.android.html
> For the Android user, HomePage will render HomePage.android.html file.
> A desktop user will render HomePage.html because Session.get().isStandardDevice(); will
return true
> To support an iPhone user, one could set Session.get().setFallbackDevice("m"); and so,
will render HomePage.m.html which could be a simplier version for other phones but Android.
> I've attached an example of DeviceStreamLocator

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message