+1
Under review

tableview tutorials? Issues with scrolling and sizing

sovtek 12 years ago updated by icahill (Administrator) 12 years ago 29
Any robust samples with tableview utilized as a pager? I'm using tableview just like you normally would have a pdf pager, but I'm having some sizing issues, back scrolling issues, and scroll orientation issues.

Can rowheight be defined for landscape and portrait view as diff values?
To be more specific. Im having trouble in landscape view stacking the images side by side, as well as scrolling horizontally in both landscape and portrait view.
Also, in portrait view I am constricted by the 768 rowheight, where in the view, I need it to be 1024.

My Class



<class name="pageItem">
<panel name="[param:name]" lwidth="512" lheight="768" width="1024" height="768" style="bgRed" valign="center">
<image name="pageImg" source="[param:imgSrc]" lwidth="512" lheight="768" width="768" height="1024"></image>
</panel>
</class>


My tableview


<tableview name="mag" alias="MAG" onclickup="showNav" width="100%" height="100%" rowheight="768" datasource="pagesFeed" orientation="horizontal" paginate="no">
<object datasource="pagesFeed" class="pageItem" name="page-[param:id]" imgSrc="[param:image]"></object>
</tableview>
Probably your best approach here is to onrotate based on orientation, delete the previous tableview and create the new one. Yes that means maintaining two tableview classes, but you can make each one look and feel the way you need it to.


<class name="pageItem">
<panel name="[param:name]" lwidth="512" lheight="768" width="1024" height="768" style="bgRed" valign="center">
<image name="pageImg" source="[param:imgSrc]" lwidth="512" lheight="768" width="768" height="1024"></image>
</panel>
</class>
<class name="table1">
<tableview name="mag" alias="MAG1" onclickup="showNav" width="100%" height="100%" rowheight="768" datasource="pagesFeed" orientation="horizontal" paginate="no">
<object datasource="pagesFeed" class="pageItem" name="page-[param:id]" imgSrc="[param:image]"></object>
</tableview>
</class>
<class name="table2"></class>
<tableview name="mag" alias="MAG2" onclickup="showNav" width="100%" height="100%" rowheight="1024" datasource="pagesFeed" orientation="horizontal" paginate="no">
<object datasource="pagesFeed" class="pageItem" name="page-[param:id]" imgSrc="[param:image]"></object>
</tableview>

<action name="create">
<if lhs="[system:orientation]" operator="e" rhs="landscape">
<create class="table2" target="..."/>
<delete target="MAG1"/>
</if>
<if lhs="[system:orientation]" operator="e" rhs="portrait">
<create class="table1" target="..."/>
<delete target="MAG2"/>
</if>
</action>

Thanks for the speedy response, I'll try this out.
I hooked up the ondevcierotate to the MAINCOLUMN panel. But when I rotate, seemed to have lost my datasource for some reason?



<wire>

<!--
TODOS:
Concept of last action array for bread crumbs (should we use js for this)
Make screen sizes use dimensional measurements
make back button work (page history only?)
show scrub item details when selected
try html based panels
retest png over jpg
hide the spinner once the scrubber datafeed is loaded for the page list

COMPLETED:
organized all code for readability
added text elements within scrubber
converted elements within scrubber to use precise measurements
fill up share screen with icons
scrubber now comes from top instead of bottom
pages within scrubber can now be tapped to show corresponding pdf page
setting up pagination layout
created class for spreads so that we can use the object over and over
added pager scroller bar, working on formatting. can the pager scroller that comes with wire even be styled more?
setup template of how toc will look, also added click actions to toc items
TOC WILL BE A DATA SOURCE FEED
link toc story to page (sometimes pg number doesnt match pdf number - look at the last few TOC items)
-->

<datasources>
<datasource name="issueFeed" source="http://www.blanchardsystems.com/issue.json" query="/issue/node" providertype="json"/>
<datasource name="storiesFeed" source="http://www.blanchardsystems.com/stories.json" query="/stories/node" providertype="json" />
<datasource name="pagesFeed" source="http://www.blanchardsystems.com/pages.json" query="/pages/node" providertype="json" />
</datasources>

<styles>
<style name="bgRed" background="#ff0000" />
<style name="bgTan" background="#FFFFCC" />
<style name="bgGreen" background="#7B7922" />
<style name="bgOrange" background="#FF3300" />
</styles>

<classes>

<!-- JOSHUA -->
<class name="pageItem">
<panel name="[param:name]" lwidth="512" lheight="768" width="1024" height="768" valign="center">
<image name="pageImg" source="[param:imgSrc]" lwidth="512" lheight="768" width="768" height="1024"></image>
</panel>
</class>
<class name="table1">
<tableview name="mag" alias="MAG1" onclickup="showNav" width="768" height="1024" rowheight="1024" datasource="pagesFeed" orientation="horizontal" paginate="no" style="bgRed">
<object datasource="pagesFeed" class="pageItem" name="page-[param:id]" imgSrc="[param:image]"></object>
</tableview>
</class>
<class name="table2">
<tableview name="mag" alias="MAG2" onclickup="showNav" width="1024" height="768" rowheight="768" datasource="pagesFeed" orientation="horizontal" paginate="no" style="bgOrange">
<object datasource="pagesFeed" class="pageItem" name="page-[param:id]" imgSrc="[param:image]"></object>
</tableview>
</class>

<!-- Main Book Page Class -->
<class name="pageItem">
<panel name="[param:name]" lwidth="512" lheight="768" width="1024" height="768" style="bgRed">
<image name="pageImg" source="[param:imgSrc]" lwidth="100%" lheight="100%" width="768" height="1024"></image>
</panel>
</class>
<!-- Scrubber Page Class -->
<class name="thumbItem">
<panel name="[param:name]" width="226" height="335" leftpad="[param:leftpad]" _datasource="pagesFeed">
<image name="thumbImg" width="226" height="305" source="[param:imgSrc]" onclickup="showPageInfo" _storyId="[param:storyId]"></image>
<text name="pageNum" width="25" height="25" alignment="center" align="right" valign="bottom" font="helvetica" size="11" color="#ffffff" text="[param:id]"></text>
</panel>
</class>
<!-- Story Info Class -->
<!-- Give the class an alpha of 0. Then, when a certain toc is clicked (which should have the same story id), give that unique story info alias an alpha of 1 to make it appear -->
<class name="storyItem">
<panel name="storyInfoPanel-[param:id]" alias="STORYINFOPANEL-[param:id]" height="300" width="100%" valign="top">
<text name="storyType" width="70%" height="25" ypos="65" xpos="15" leftinset="15" color="#7c7c7c" font="Georgia" size="24%" align="left" text="[param:storyType]"></text>
<text name="storyName" width="70%" height="45" ypos="95" xpos="15" leftinset="15" color="#ffffff" font="Georgia" size="40%" align="left" text="[param:storyName]"></text>
<text name="storyAuthor" width="70%" height="15" ypos="140" xpos="15" leftinset="15" color="#7c7c7c" font="Georgia" size="13%" align="left" text="[param:storyAuthor]"></text>
<image name="scrubHr" widesource="ui/scrub_hrwide.png" ypos="160" xpos="15"></image>
<text name="storyInfo" width="70%" height="85" ypos="170" xpos="15" leftinset="15" color="#ffffff" font="Helvetica" size="13" align="left" text="[param:storyInfo]"></text>
<text name="storyTags" width="10%" height="25" ypos="140" color="#ffffff" font="Helvetica" size="13" align="right" text="Tags"></text>
<image name="storyPgNumBg" source="ui/scrub_pagenumbg.png" ypos="217" xpos="679" lxpos="909"></image>
<text name="storyNum" width="10%" height="25" ypos="217" color="#ffffff" font="Helvetica" size="13" align="right" text="[param:storyPage]"></text>
</panel>
</class>
<!-- TOC Item Class -->
<class name="tocItem">
<panel name="[param:storyName]" width="100%" height="170" padding-bottom="3">
<image name="tocItemBg" source="ui/toc_itembg.png" width="100%" height="100%"></image>
<image name="storyImage" source="[param:storyImage]" width="144" height="155" xpos="5" ypos="5" onclickup="hideToc" onclick="page" clicktarget="../../MAG" _page="[param:storyPage]"></image>
<text name="storyName" text="[param:storyName]" lwidth="750" width="530" height="30" alignment="left" xpos="170" ypos="15" font="Helvetica-Bold" size="19" color="#FFFFFF" onclickup="hideToc" onclick="page" clicktarget="../../MAG" _page="[param:storyPage]"></text>
<text name="storyInfo" lwidth="750" width="530" height="100" alignment="left" lypos="15" xpos="170" ypos="25" font="Helvetica" size="12" color="#BCBCBC" text="[param:storyInfo]"></text>
<text name="storyAuthor" lwidth="290" width="180" height="25" alignment="left" xpos="170" ypos="130" font="Helvetica-Oblique" size="12" color="#FFFFFF" text="by [param:storyAuthor]"></text>
<text name="storyPage" width="70" height="25" alignment="left" align="right" ypos="130" font="Helvetica-Bold" size="12" color="#FFFFFF" text="Page [param:storyPage]"></text>
</panel>
</class>
<!-- Old Double Column TOC Item Class
<class name="tocItemPanel">
<panel name="[param:name]" lwidth="462" width="350" height="170" ypos="[param:panelYpos]" xpos="[param:panelXpos]" lxpos="[param:panelLXpos]" onclickup="hideToc" onclick="page" clicktarget="../../MAG" _page="[param:_page]">
<image name="tocItemBg" source="ui/toc_itembg.png" width="100%" height="100%"></image>
<image name="[param:imgName]" source="[param:imgSource]" width="144" height="155" xpos="5" ypos="5"></image>
<text name="[param:titleName]" text="[param:titleText]" lwidth="290" width="180" height="30" align="right" alignment="left" ypos="5" font="Helvetica-Bold" size="17" color="#FFFFFF"></text>
<text name="[param:summaryName]" lwidth="290" width="180" height="120" align="right" alignment="left" lypos="5" ypos="15" font="Helvetica" size="12" color="#FFFFFF" text="[param:summaryText]"></text>
<text name="[param:authorName]" lwidth="290" width="180" height="25" align="right" alignment="left" ypos="140" font="Helvetica-Oblique" size="12" color="#FFFFFF" text="[param:authorText]"></text>
</panel>
</class>-->
</classes>

<actions>
<!-- On Init Action -->
<action name="oninit" oninit="yes">
<play action="setIssueName" />
</action>

<action name="setIssueName" datasource="issueFeed">
<assign property="object:ISSUENAME.text" value="[datasource:issueFeed.1.name]" />
</action>

<!-- Show page info in scrubber -->
<action name="showPageInfo" datasource="pagesFeed">
<sync>
<assign property="var:storyId" value="_storyId" />
<!--<alert message="Story Id: [var:storyId]"/>-->
<assign property="object:STORYTYPE.text" value="[datasource:storiesFeed.[var:storyId].type]" />
<assign property="object:STORYNAME.text" value="[datasource:storiesFeed.[var:storyId].name]" />
<assign property="object:STORYAUTHOR.text" value="by [datasource:storiesFeed.[var:storyId].author]" />
<assign property="object:STORYINFO.text" value="[datasource:storiesFeed.[var:storyId].info]" />
<assign property="object:STORYPAGE.text" value="Page [datasource:storiesFeed.[var:storyId].page]" />
<assign property="object:STORYTAGS.text" value="[datasource:storiesFeed.[var:storyId].tags]" />
</sync>
</action>

<action name="hideWaiter" datasource="pagesFeed" datasourceevent="querycomplete">
<alpha value="0" target="SCRUBBERWAITER"/>
</action>

<!-- JOSHUA 2 -->
<action name="createTable">
<if lhs="[system:orientation]" operator="e" rhs="landscape">
<alert message="landscape view" />
<create class="table2" target="MAINCOLUMN"/>
<delete target="MAG1"/>
</if>
<if lhs="[system:orientation]" operator="e" rhs="portrait">
<alert message="portrait view" />
<create class="table1" target="MAINCOLUMN"/>
<delete target="MAG2"/>
</if>
</action>

<!-- Toolbar Hide/Show -->
<action name="showNav">
<alpha target="MAINTOOLBAR" value=".95" time=".3"/>
<alpha target="TBSHDW" value="1" time=".3"/>
<set onclickup="hideNav" />
<!-- <sync delay="5">
<play action="hideNav">
</sync> -->
</action>
<action name="hideNav">
<alpha value="0" target="MAINTOOLBAR" time="0"/>
<alpha target="TBSHDW" value="0" time=".3"/>
<set onclickup="showNav" />
</action>
<!-- Toolbar Home Button -->
<action name="homeBtnClick">
<!-- Put Home Button Action Code Here -->
</action>
<action name="homeBtnDown">
<!-- Show Home -->
<alpha value="1" target="HOMEBTNDN" time="0"/>
<alpha value="0" target="HOMEBTN" time="0"/>
<alpha value="0" target="BACKBTNDN" time="0"/>
<alpha value="0" target="TOCBTNDN" time="0"/>
<alpha value="0" target="SCRUBBTNDN" time="0"/>
<alpha value="0" target="SHAREBTNDN" time="0"/>
<alpha value="1" target="BACKBTN" time="0"/>
<alpha value="1" target="TOCBTN" time="0"/>
<alpha value="1" target="SCRUBBTN" time="0"/>
<alpha value="1" target="SHAREBTN" time="0"/>
</action>
<action name="homeBtnUp">
<alpha value="1" target="HOMEBTN" time="0"/>
<alpha value="0" target="HOMEBTNDN" time="0"/>
</action>

<!-- Toolbar Back Button -->
<action name="backBtnClick">
<!-- Put Back Button Action Code Here -->
<alpha value="1" target="BACKBTN" time="0"/>
<alpha value="0" target="BACKBTNDN" time="0"/>
</action>
<action name="backBtnDown">
<alpha value="0" target="BACKBTN" time="0"/>
<alpha value="1" target="BACKBTNDN" time="0"/>
<alpha value="0" target="HOMEBTNDN" time="0"/>
<alpha value="0" target="TOCBTNDN" time="0"/>
<alpha value="0" target="SCRUBBTNDN" time="0"/>
<alpha value="0" target="SHAREBTNDN" time="0"/>
<alpha value="1" target="HOMEBTN" time="0"/>
<alpha value="1" target="TOCBTN" time="0"/>
<alpha value="1" target="SCRUBBTN" time="0"/>
<alpha value="1" target="SHAREBTN" time="0"/>
</action>
<action name="backBtnUp">
<alpha value="1" target="BACKBTN" time="0"/>
<alpha value="0" target="BACKBTNDN" time="0"/>
</action>

<!-- Toolbar TOC Button -->
<action name="showToc">
<translate valign="top" time=".5" target="TOCPANEL"/>
<load target="WEBDATATEST"/>
<play action="tocBtnDown"/>
<!-- Make sure everything else is closed -->
<play action="hideScrubber"/>
<play action="hideShare"/>
</action>
<action name="hideToc">
<translate ypos="-101%" time=".5" target="TOCPANEL"/>
<play action="tocBtnUp"/>
<set onclickup="showToc" target="TOCBTN"/>
</action>
<action name="tocBtnDown">
<set onclickup="hideToc" target="TOCBTNDN"/>
<alpha value="0" target="TOCBTN" time="0"/>
<alpha value="1" target="TOCBTNDN" time="0"/>
</action>
<action name="tocBtnUp">
<alpha value="1" target="TOCBTN" time="0"/>
<alpha value="0" target="TOCBTNDN" time="0"/>
</action>
<!-- App Scrubber Actions -->
<action name="showScrubber">
<sync>
<alpha value="0" target="pagePanel"/>
<load target="pagePanel"/>
<alpha value="1" target="SCRUBBERWAITER"/>
<alpha value="1" target="pagePanel" time=".25"/>
</sync>
<!-- move whole panel to top -->
<translate valign="top" time=".5" target="SCRUBPANEL"/>
<play action="scrubBtnDown"/>
<play action="hideShare"/>
<play action="hideToc"/>
<!--<assign property="datasource:pagesFeed.source" value="http://www.blanchardsystems.com/pages.json" />-->
</action>
<action name="hideScrubber">
<sync>
<alpha value="1" target="pagePanel"/>
<unload target="pagePanel"/>
<alpha value="0" target="pagePanel" time=".25"/>
</sync>
<translate ypos="-100%" time=".5" target="SCRUBPANEL"/>
<play action="scrubBtnUp"/>
<set onclickup="showScrubber" target="SCRUBBTN"/>
<!--<assign property="datasource:pagesFeed.query" value="/nothing" />-->
</action>
<action name="scrubBtnDown">
<set onclickup="hideScrubber" target="SCRUBBTNDN"/>
<alpha value="0" target="SCRUBBTN" time="0"/>
<alpha value="1" target="SCRUBBTNDN" time="0"/>
</action>
<action name="scrubBtnUp">
<alpha value="1" target="SCRUBBTN" time="0"/>
<alpha value="0" target="SCRUBBTNDN" time="0"/>
</action>
<!-- App Share Actions -->
<action name="showShare">
<translate align="right" time=".5" target="SHAREPANEL"/>
<play action="shareBtnDown"/>
<!-- Make sure everything else is closed -->
<play action="hideScrubber"/>
<play action="hideToc"/>
</action>
<action name="hideShare">
<translate xpos="100%" time=".5" target="SHAREPANEL"/>
<play action="shareBtnUp"/>
<set onclickup="showShare" target="SHAREBTN"/>
</action>
<action name="shareBtnDown">
<set onclickup="hideShare" target="SHAREBTNDN"/>
<alpha value="0" target="SHAREBTN" time="0"/>
<alpha value="1" target="SHAREBTNDN" time="0"/>
</action>
<action name="shareBtnUp">
<alpha value="1" target="SHAREBTN" time="0"/>
<alpha value="0" target="SHAREBTNDN" time="0"/>
</action>

<!-- ANIMATIONS -->

<!-- Jump to Page -->
<anim name="page">
<scroll page="_page"/>
</anim>
<!-- Share panel -->
<!-- josh - make this work with our share panel -->
<anim name="share">
<alpha value="0"/>
<scale width="1%" height="1%" align="center" valign="center"/>
<scale width="90%" height="20%" time=".75" align="center" valign="center"/>
<alpha value="1" time="1"/>
<set _url="_fburl" target="buttons/facebook-panel"/>
<set _url="_twitterurl" target="buttons/twitter-panel"/>
<set _url="_linkedinurl" target="buttons/linkedin-panel"/>
<set _emailurl="_emailurl" _emailsubject="_emailsubject" target="buttons/email-panel"/>
</anim>
<anim name="close-share">
<scale width="1%" height="1%" valign="center" align="center" time=".75"/>
<alpha value="0" time=".75"/>
</anim>
<!-- email -->
<anim name="emailattach">
<email toaddress="_addy" subject="_subject" body="_body" attachment="_attachment" mimetype="application/pdf"/>
</anim>
<anim name="email">
<email toaddress="_addy" subject="_subject" body="_body"/>
</anim>
<!-- pdf -->
<!-- josh - can we use this? -->
<anim name="show-pdf">
<translate ypos="0" time="1" target="pdf" />
<sync loop="no" startdelay="0">
<alpha value="1" time="1" target="pdf/wait"/>
<load file="_wire" target="pdf/pdf-wire" />
<alpha value="0" time=".5" target="pdf/wait" />
</sync>
</anim>
<anim name="hide-pdf">
<translate ypos="100%" time="1" target="pdf"/>
<sync loop="no" startdelay="0">
<alpha value="1" target="pdf/wait"/>
<unload delay="1" target="pdf/pdf-wire"/>
<alpha value="0" time=".5" target="pdf/wait"/>
</sync>
</anim>
</actions>

<main>

<!-- Blackout the bg -->
<panel name="background" width="100%" height="100%" background="#000000"></panel>

<panel alias="BODYCOLUMN" name="BODYCOLUMN" width="100%" height="100%">
<!-- Magazine -->
<panel alias="MAINCOLUMN" name="MNC" width="100%" height="100%" xpos="0" ypos="0" ondevicerotate="createTable">
<!-- <include name="issue" alias="INCLUDE" height="100%" width="100%" align="left" valign="top"></include> -->

<!--<pdf name="mag" alias="MAG" onclickup="showNav" source="issue/WITC.pdf" height="100%" width="100%" align="left" valign="top" spreads="yes" covertile="no">
</pdf> -->

<!-- Main Book
<tableview name="mag" alias="MAG" onclickup="showNav" width="100%" height="100%" rowheight="768" datasource="pagesFeed" paginate="no" orientation="horizontal">
<object datasource="pagesFeed" class="pageItem" name="page-[param:id]" imgSrc="[param:image]"></object>
</tableview> -->

</panel>
</panel>

<!-- Curtain: Used to highlight select component -->
<panel name="curtain" height="100%" width="100%" background="#0e0729" alpha="0"></panel>
<platform device="ipad">
<!-- SCRUBBER Offscreen-->
<panel name="SCRUBPANEL" alias="SCRUBPANEL" width="100%" height="100%" ypos="-100%" hidden="no">
<image name="scrubBottomBg" widesource="ui/scrub_bottombgwide.png" source="ui/scrub_bottombg.png" lheight="490" lwidth="1024" height="410" width="768" lypos="282" ypos="282"></image>
<image name="scrubTopBg" source="ui/scrubbgtop.png" width="100%" xpos="0" height="300" ypos="0"></image>
<wait name="waiter" alias="SCRUBBERWAITER" width="100%" height="100%" alpha="1" lypos="135" ypos="0"></wait>

<panel name="pagePanel" height="100%" width="100%" valign="bottom">

<!-- Story Info Panel -->
<panel name="storyInfoPanel" alias="STORYINFOPANEL" height="300" width="100%" valign="top">
<text name="storyType" alias="STORYTYPE" width="70%" height="25" ypos="65" xpos="15" leftinset="15" color="#7c7c7c" font="Georgia" size="24%" align="left" text=""></text>
<text name="storyName" alias="STORYNAME" width="70%" height="45" ypos="95" xpos="15" leftinset="15" color="#ffffff" font="Georgia" size="40%" align="left" text=""></text>
<text name="storyAuthor" alias="STORYAUTHOR" width="70%" height="15" ypos="140" xpos="15" leftinset="15" color="#7c7c7c" font="Georgia" size="13%" align="left" text=""></text>
<image name="scrubHr" source="ui/scrub_hr.png" widesource="ui/scrub_hrwide.png" width="525" height="2" lwidth="750" lheight="2" ypos="160" xpos="15"></image>
<text name="storyInfo" alias="STORYINFO" width="70%" height="85" ypos="170" xpos="15" leftinset="15" color="#ffffff" font="Helvetica" size="13" align="left" text=""></text>
<text name="storyTagsLabel" alias="STORYTAGSLABEL" width="80" height="20" ypos="140" xpos="662" lxpos="910" color="#ffffff" alignment="right" font="Helvetica" size="13" text="Story Tags:"></text>
<text name="storyTags" alias="STORYTAGS" width="180" lwidth="190" height="55" ypos="155" xpos="563" lxpos="795" alignment="right" color="#ffffff" font="Helvetica" size="13" text=""></text>
<image name="storyPgNumBg" source="ui/scrub_pagenumbg.png" ypos="225" xpos="679" lxpos="919"></image>
<text name="storyPage" alias="STORYPAGE" width="10%" height="25" color="#ffffff" font="Helvetica" size="13" ypos="225" xpos="689" lxpos="929" text=""></text>
</panel>

<!-- Scrubber Horizontal Page Listing -->
<panel name="pageListing" width="100%" height="365" lheight="440" lypos="315" ypos="315">
<pager width="100%" height="365" lheight="440" name="contents" align="center" hidden="no" paginate="yes">
<list name="pageList" width="100%" height="100%" datasource="pagesFeed" orientation="horizontal" paginate="no">
<object datasource="pagesFeed" class="thumbItem" name="page-[param:id]" id="[param:id]" imgSrc="[param:thumb]" size="12" page="[param:id]" leftpad="[param:leftpad]" storyId="[param:storyId]"></object>
</list>

<!--<tableview name="pageList" width="100%" height="365" rowheight="365" datasource="pagesFeed" orientation="horizontal" paginate="no" startindex="1">
<object datasource="pagesFeed" class="pageItem" name="page-[param:id]" id="[param:id]" imgSrc="[param:thumb]" size="12" page="[param:id]" leftpad="[param:leftpad]" storyId="[param:storyId]"></object>
</tableview>-->
</pager>
</panel>
<panel name="highlight-white" background="#ffffff" alpha=".1" width="100%" height="1" valign="top"></panel>
<panel name="highlight-black" background="#000000" alpha=".5" width="100%" height="1" topof="highlight-white"></panel>
</panel><!-- end pagePanel -->
</panel><!-- end SCRUBPANEL -->

<!-- APP SHARE PANEL (offscreen)-->
<panel name="SHAREPANEL" alias="SHAREPANEL" width="304" height="100%" xpos="100%" hidden="no" background="#000000">
<image name="shareBg" source="ui/share_bg.png" height="100%" width="100%"></image>
<panel name="actionsPanel" alias="ACTIONSPANEL" width="304" height="400" ypos="43">
<image name="shareTitleBg" source="ui/share_titlebg.png" height="41" width="100%"></image>
<text name="shareActions" width="276" height="39" align="right" size="17" font="helvetica" text="Actions" color="#FFFFFF" ypos="2"></text>
<image name="twitterIcon" source="ui/share_twitter.png" height="82" width="82" xpos="15" ypos="50"></image>
<text name="twitterTxt" width="82" height="25" alignment="center" size="13" font="helvetica" text="Twitter" color="#FFFFFF" xpos="15" ypos="137"></text>
<image name="fbIcon" source="ui/share_fb.png" height="82" width="82" xpos="112" ypos="50"></image>
<text name="fbTxt" width="82" height="25" alignment="center" size="13" font="helvetica" text="Facebook" color="#FFFFFF" xpos="112" ypos="137"></text>
<image name="emailIcon" source="ui/share_email.png" height="82" width="82" xpos="210" ypos="50"></image>
<text name="emailTxt" width="82" height="25" alignment="center" size="13" font="helvetica" text="Email" color="#FFFFFF" xpos="210" ypos="137"></text>
<image name="copyIcon" source="ui/share_copy.png" height="82" width="82" xpos="15" ypos="165"></image>
<text name="copyTxt" width="82" height="25" alignment="center" size="13" font="helvetica" text="Copy Link" color="#FFFFFF" xpos="15" ypos="252"></text>
<image name="favIcon" source="ui/share_favorite.png" height="82" width="82" xpos="112" ypos="165"></image>
<text name="favTxt" width="82" height="25" alignment="center" size="13" font="helvetica" text="Add Favorite" color="#FFFFFF" xpos="112" ypos="252"></text>
</panel>
<panel name="favsPanel" alias="FAVPANEL" width="304" height="350" ypos="445">
<image name="favTitleBg" source="ui/share_titlebg.png" height="41" width="100%"></image>
<text name="favActions" width="276" height="39" align="right" size="17" font="helvetica" text="Favorites" color="#FFFFFF" ypos="2"></text>
</panel>
</panel>
<!-- END APP SHARE PANEL -->

<!-- APP TOC SCREEN offscreen-->
<panel name="TOCPANEL" alias="TOCPANEL" width="100%" height="100%" ypos="-105%" hidden="no" background="#000000" onclickup="showNav">
<!--<web name="WEBDATATEST" alias="WEBDATATEST" zoomable="no" file="tests/test.html" width="100%" height="100%"></web>-->
<image name="tocBg" source="ui/toc_bg.png" width="100%" height="100%"></image>
<list name="tocList" alias="TOCLIST" width="100%" height="100%" datasource="storiesFeed" orientation="vertical" paginate="no">
<object datasource="storiesFeed" name="tocItem" class="tocItem" id="[param:id]" size="12" storyName="[param:name]" storyPage="[param:page]" storyAuthor="[param:author]" storyInfo="[param:info]" storyType="[param:type]" storyImage="[param:image]"></object>
</list>
</panel>

<!-- APP TOOLBAR -->
<panel alias="MAINTOOLBAR" alpha="0" name="MAINTOOLBAR" width="100%" height="55" xpos="0" ypos="0">
<image name="TBBG" height="44" width="100%" alpha=".95" xpos="0" ypos="0" source="ui/tbbg.png"></image>
<text name="issueName" alias="ISSUENAME" text="" width="400" height="100%" align="center" alignment="center" valign="top" font="Helvetica" size="17" color="#FFFFFF"></text>
<panel name="TBSUB" height="44" width="100%" xpos="0" ypos="0">
<panel name="LSPACE2" width="10" height="100%" align="left"></panel>
<panel name="LEFTBUTTONS" fitwidth="yes" height="100%" align="left" rightof="LSPACE2">
<image name="HOMEBTN" alias="HOMEBTN" onclick="homeBtnDown" onclickup="homeBtnClick" source="ui/home.png" height="44" valign="center" align="left"></image>
<image name="HOMEBTNDN" alias="HOMEBTNDN" source="ui/homehlb.png" alpha="0" height="44" valign="center" align="left"></image>
<image name="BACKBTN" alias="BACKBTN" source="ui/back.png" height="44" onclick="backBtnDown" onclickup="backBtnClick" alpha="1" valign="center" align="left" rightof="HOMEBTN"></image>
<image name="BACKBTNDN" alias="BACKBTNDN" source="ui/backhlb.png" height="44" onclickup="backBtnUp" alpha="0" valign="center" align="left" rightof="HOMEBTN"></image>
<image name="TOCBTN" alias="TOCBTN" onclick="tocBtnDown" onclickup="showToc" source="ui/toc.png" height="44" valign="center" align="left" rightof="BACKBTN"></image>
<image name="TOCBTNDN" alias="TOCBTNDN" source="ui/tochlb.png" alpha="0" height="44" valign="center" align="left" rightof="BACKBTN"></image>
</panel>
<panel name="RSPACE1" width="10" height="100%" align="right"></panel>
<panel name="RIGHTBUTTONS" width="50%" height="100%" align="right" leftof="RSPACE1">
<image name="SHAREBTN" alias="SHAREBTN" onclickup="showShare" source="ui/share.png" height="44" valign="center" align="right"></image>
<image name="SHAREBTNDN" alias="SHAREBTNDN" source="ui/sharehlb.png" alpha="0" height="44" valign="center" align="right"></image>
<image name="SCRUBBTN" alias="SCRUBBTN" onclickup="showScrubber" source="ui/scrub.png" height="44" valign="center" align="right" leftof="SHAREBTN"></image>
<image name="SCRUBBTNDN" alias="SCRUBBTNDN" source="ui/scrubhlb.png" height="44" alpha="0" valign="center" align="right" leftof="SHAREBTN"></image>
</panel>
<panel alias="bb2LQHTZZ" name="bb2LQHTZZ" ypos="43" height="1" width="100%" background="#000000"></panel>
</panel>
<image name="TBSHDW" alias="TBSHDW" alpha="0" source="ui/tbdropshadow.png" height="11" width="100%" xpos="0" ypos="44"></image>

</panel>
</platform>

</main>
</wire>
Jessie,

Is this a project that I am a collaborator on? With all the images in the wire, it is hard to test.

Is your datasource appearing initially prior to rotating the device? I can see that the actions are firing on rotate, but I am not seeing a datasource at all, so it is hard to tell if the data is missing or just not getting pulled from your sources.

If you can share the project with me that might help.
I do not yet have it hooked up to appear on load of the app. The only way the table is being drawn right now is through device rotate action "createTable". The data was coming through fine before having to create the new steps of managing two different tableviews for the different orientations.

Is there a particular email address I should use to invite you to collaborate?
Invitation sent for issueSkin app, thanks
Still looking into this, I am seeing the same as you. I will follow up with you soon with an answer.
Jessie,

Taking a deeper dive into the code and reviewing your requests I have made the following determinations.

First of all, my apologies. It escaped me that you were trying to use a tableview horizontally. This is not allowed. Only a pager and a list can function both vertically and horizontally. A tableview is limited to vertical only. This is a limitation by Apple.

This leaves you with the option of using a list view or going back to using a PDF. If you use a list, then you will have to reduce the size of your images to something more manageable to load all at once.

It looks like you are using images that are already stored in your app. Is this by design? If so you could also consider using a create and delete to call images open as you use them. Here is an example of that.


<pager name="mag" alias="MAG" width="100%" height="100%" orientation="horizontal" paginate="yes">
<image width="100%" name="page1" source="pageimages/page-1.jpeg"></image>
<image width="100%" name="page2" alias="2" _alias="2" source="pageimages/page-1.jpeg" suppress="yes" onscrollto="load" onscrollaway="unload"></image>
<image width="100%" name="page3" alias="3" _alias="3" source="pageimages/page-1.jpeg" suppress="yes" onscrollto="load" onscrollaway="unload"></image>
<image width="100%" name="page4" alias="4" _alias="4" source="pageimages/page-4.jpeg" suppress="yes" onscrollto="load" onscrollaway="unload"></image>
<image width="100%" name="page5" alias="5" _alias="5" source="pageimages/page-5.jpeg" suppress="yes" onscrollto="load" onscrollaway="unload">
</pager>

<action name="load">
<load target="_alias"/>
</action>
<action name="unload">
<unload target="_alias"/>
</action>
The images stored within the app are just acting as placeholders right now. I just wanted to get the feed working correctly with these images as a test project.

We definitely won't want to use pdf since it is not compatible with android, so I'll try the load/unload method with a list. Hopefully that works out. I will let you know how everything goes.

Thanks
The load/onload works. It does take a second for it to load so I'll see if I can maybe load 4 at a time if thats possible.

On another note:
Is there a way to target every odd number of the datasource? When within landscape view, I would like to have the pages stacked up next to each other so that they paginate like spreads.

Example:
image with id of 3, rightof="2"
image with id of 5, rightof="4"
etc
List tags do have an attribute called "step". Defines a set of objects to pass within a list. Example: If a step is set to 2, then the list will return index numbers 1,3,5, etc.

This way you could use 2 lists, one for odd and one for even results.
ok, just to be sure. Is it even possible to have paginate="yes" and have it paginate 2 items at a time?
No, paginate only allows you to display one node at a time.
ah, so when in landscape view, if I wanted to show 2 pages on the screen at a time...and also load the pages as we go with this load function, then I will probably have to load the previous and next 5 pages of the current page onscrollto, so as to make sure the image is loaded while the scrolling is occurring. Since paginate="no" is a bit quicker and free flowing.
Hey Ian, if you view my issueSkin project youll notice that I am still having trouble creating separate lists according to which orientation I am in. It creates the list object, but the datasource does not feed the information.
It looks like you are using a class within a class, which is causing your _alias to get lost since you are moving it from one class to another class and then to an action. You can only move an object variable (underscore) from one object to another, not through a third. So you need to move _alias to your listL class for starters.

Also your loadPage1 action doesn't seem to be targeting any objects that are defined in the main.wire. I am not seeing that.

Start there and then we will see where you are at.

Thanks.
Hey Ian, to test the gathering of information from the datasource in a simpler manner, I created classes named testList and pageItemTest. In this scenario, I'm not looking to get any variables. When in portrait mode, I just want to be able to get the data from pages.json and display the number of the page\

Process:
-run createList action
-creates testList class, which uses pagesFeed as datasource.
(I simply want to display the page id large within the view, but im not even getting that information.)

There is no problem with the datasource b/c it was working fine when I was just using a single list for each orientation. The problem of losing my data began happening when I started creating a new list based on orientation.

I use loadPage1 to load the first page (image) of the magazine, since my pages are loaded onscrollto. Im not using it in this test scenario, however.
Okay. I looked at your code. You had a text tag that wasn't formatted correctly, so I fixed that and you are now returning "page-[param:id]" on every page of your list.
If i comment out the createList action, and move the testListNew out of the class, and into the MAINCOLUMN, it works fine. There just seems to be a loss of data when I use the createList action to create my list through a class.
On line 56 you need to add a font, color and alignment to your text tag.
I think u may have been viewing the app when I had taken it out of the create class and just did the list statically to make sure my datasource was working fine. You can see that I now have the text tag formatted correctly, but still the information is not being shown.
We should at least be able to see the waiter that is above the text
Are there any examples out there of app's using different datasources within different lists per orientation? It seems as if everything for 'testList' should be correct...
Im going to be working on the app, so here is an update of the latest code that has not been changed.



<wire>

<!--
TODOS:
Concept of last action array for bread crumbs (should we use js for this)
Make screen sizes use dimensional measurements
make back button work (page history only?)
show scrub item details when selected
try html based panels
retest png over jpg
hide the spinner once the scrubber datafeed is loaded for the page list

COMPLETED:
organized all code for readability
added text elements within scrubber
converted elements within scrubber to use precise measurements
fill up share screen with icons
scrubber now comes from top instead of bottom
pages within scrubber can now be tapped to show corresponding pdf page
setting up pagination layout
created class for spreads so that we can use the object over and over
added pager scroller bar, working on formatting. can the pager scroller that comes with wire even be styled more?
setup template of how toc will look, also added click actions to toc items
TOC WILL BE A DATA SOURCE FEED
link toc story to page (sometimes pg number doesnt match pdf number - look at the last few TOC items)
Now using leftpad="[eval: [param:id] % 2 == 0 ? 20 : 0 ]" within the scrubber page feed, so that we could remove the left="20" on the even numbered page items
-->

<datasources>
<datasource name="issueFeed" source="http://www.blanchardsystems.com/issue.json" query="/issue/node" providertype="json" />
<datasource name="storiesFeed" source="http://www.blanchardsystems.com/stories.json" query="/stories/node" providertype="json" />
<datasource name="pagesFeed" source="http://www.blanchardsystems.com/pages.json" query="/pages/node" providertype="json" />
<!--<datasource name="pagesFeedL" source="http://www.blanchardsystems.com/pagesL.json" query="/pages/node" providertype="json" />-->
</datasources>

<styles>
<style name="bgRed" background="#ff0000" />
<style name="bgTan" background="#FFFFCC" />
<style name="bgGreen" background="#7B7922" />
<style name="bgOrange" background="#FF3300" />
</styles>

<classes>

<!-- Mag -->
<class name="pageItemTest">
<panel name="[param:name]" width="100%" height="100%">
<wait name="waiter" width="100%" height="100%" alpha="1" valign="center"></wait>
<text name="text-[param:id]" width="100%" height="100%" color="#FFFFFF" alignment="center" align="center" font="helvetica" size="45" valign="center" text="[param:name]"></text>
</panel>
</class>
<class name="testList">
<list name="testListNew" alias="TESTLISTNEW" onclickup="showNav" width="100%" height="100%" datasource="pagesFeed" paginate="yes" orientation="horizontal" align="center" valign="center" style="bgRed">
<object name="page-[param:id]" class="pageItemTest" datasource="pagesFeed" id="[param:id]"></object>
</list>
</class>

<!--
Separate List for Portrait and Landscape Views.
When in portrait, we want to show one page at a time and use pages.json
When in landscape, we want to show 2 pages at a time and use pagesL.json -->
<!-- portrait view pages list -->
<class name="pageItem">
<panel name="[param:name]" width="768" height="1020" lypos="46">
<wait name="waiter" width="100%" height="100%" alpha="1" valign="center"></wait>
<image name="pageImg" source="[param:imgSrc]" lwidth="512" lheight="700" width="768" height="1020" suppress="yes" onscrollto="load" onscrollaway="unload" alias="[param:id]" _alias="[param:_alias]" align="center" valign="center"></image>
</panel>
</class>
<class name="listP">
<list name="magP" alias="MAGP" onclickup="showNav" width="100%" height="100%" datasource="pagesFeed" paginate="yes" orientation="horizontal" align="center" valign="center" style="bgRed">
<object datasource="pagesFeed" class="pageItem" name="page-[param:id]" imgSrc="[param:image]" id="[param:id]" _alias="[param:id]"></object>
</list>
</class>

<!-- landscape view pages in spreads list -->
<class name="spreadL">
<panel name="[param:name]" width="1020" height="768" lypos="46">
<wait name="waiter" width="100%" height="100%" alpha="1" valign="center"></wait>
<image name="pageImgL" source="[param:imgLSrc]" width="512" height="768" suppress="yes" onscrollto="load" onscrollaway="unload" alias="[param:imgLId]" _alias="[param:_alias]" align="center" valign="center"></image>
<image name="pageImgR" source="[param:imgRSrc]" width="512" height="768" suppress="yes" onscrollto="load" onscrollaway="unload" alias="[param:imgRId]" _alias="[param:_alias]" align="center" valign="center"></image>
</panel>
</class>
<class name="listL">
<list name="magL" alias="MAGL" onclickup="showNav" width="100%" height="100%" datasource="pagesFeedL" paginate="yes" orientation="horizontal" align="center" valign="center">
<object datasource="pagesFeedL" class="spreadL" name="page-[param:id]" imgLId="[param:imageLId]" imgLSrc="[param:imageL]" imgRId="[param:imageRId]" imgRSrc="[param:imageR]" _alias="[param:id]"></object>
</list>
</class>

<!-- Scrubber Page Class -->
<class name="thumbItem">
<panel name="[param:name]" width="226" height="335" leftpad="[param:leftpad]" _datasource="pagesFeed">
<image name="thumbImg" width="226" height="305" source="[param:imgSrc]" onclickup="showPageInfo" _storyId="[param:storyId]"></image>
<text name="pageNum" width="25" height="25" alignment="center" align="right" valign="bottom" font="helvetica" size="11" color="#ffffff" text="[param:id]"></text>
</panel>
</class>
<!-- Story Info Class -->
<!-- Give the class an alpha of 0. Then, when a certain toc is clicked (which should have the same story id), give that unique story info alias an alpha of 1 to make it appear -->
<class name="storyItem">
<panel name="storyInfoPanel-[param:id]" alias="STORYINFOPANEL-[param:id]" height="300" width="100%" valign="top">
<text name="storyType" width="70%" height="25" ypos="65" xpos="15" leftinset="15" color="#7c7c7c" font="Georgia" size="24%" align="left" text="[param:storyType]"></text>
<text name="storyName" width="70%" height="45" ypos="95" xpos="15" leftinset="15" color="#ffffff" font="Georgia" size="40%" align="left" text="[param:storyName]"></text>
<text name="storyAuthor" width="70%" height="15" ypos="140" xpos="15" leftinset="15" color="#7c7c7c" font="Georgia" size="13%" align="left" text="[param:storyAuthor]"></text>
<image name="scrubHr" widesource="ui/scrub_hrwide.png" ypos="160" xpos="15"></image>
<text name="storyInfo" width="70%" height="85" ypos="170" xpos="15" leftinset="15" color="#ffffff" font="Helvetica" size="13" align="left" text="[param:storyInfo]"></text>
<text name="storyTags" width="10%" height="25" ypos="140" color="#ffffff" font="Helvetica" size="13" align="right" text="Tags"></text>
<image name="storyPgNumBg" source="ui/scrub_pagenumbg.png" ypos="217" xpos="679" lxpos="909"></image>
<text name="storyNum" width="10%" height="25" ypos="217" color="#ffffff" font="Helvetica" size="13" align="right" text="[param:storyPage]"></text>
</panel>
</class>
<!-- TOC Item Class USING IMAGES-->
<class name="tocItem">
<panel name="[param:storyName]" width="100%" height="170" padding-bottom="3">
<image name="tocItemBg" source="ui/toc_itembg.png" width="100%" height="100%"></image>
<image name="storyImage" source="[param:storyImage]" width="144" height="155" xpos="5" ypos="5" onclickup="hideToc" onclick="loadStoryFromTOC" clicktarget="../../MAG" _storyPage="[param:storyPage]"></image>
<text name="storyName" text="[param:storyName]" lwidth="350" width="330" height="30" alignment="left" xpos="170" ypos="15" font="Helvetica-Bold" size="19" color="#FFFFFF" onclickup="hideToc" onclick="page" clicktarget="../../MAG" _page="[param:storyPage]"></text>
<text name="storyInfo" lwidth="300" width="195" height="100" alignment="left" lypos="35" xpos="170" ypos="33" font="Helvetica" size="12" color="#BCBCBC" text="[param:storyInfo]"></text>
<text name="storyAuthor" lwidth="290" width="180" height="25" alignment="left" xpos="170" ypos="130" font="Helvetica-Oblique" size="12" color="#FFFFFF" text="by [param:storyAuthor]"></text>
<text name="storyPage" width="70" height="25" alignment="left" align="right" ypos="130" font="Helvetica-Bold" size="12" color="#FFFFFF" text="Page [param:storyPage]"></text>
</panel>
</class>
</classes>

<actions>
<!-- On Init Action -->
<action name="oninit" oninit="yes">
<play action="setIssueName" />
<play action="createList" />
</action>

<action name="createList">
<if lhs="[system:orientation]" operator="e" rhs="portrait">
<sync>
<alert message="portrait view" />
<create class="testList" target="MAINCOLUMN"/>
<!--<play action="loadPage1" />-->
</sync>
</if>
<if lhs="[system:orientation]" operator="e" rhs="landscape">
<sync>
<alert message="landscape view" />
<delete target="TESTLISTNEW"/>
</sync>
</if>
</action>

<action name="setIssueName" datasource="issueFeed">
<assign property="object:ISSUENAME.text" value="[datasource:issueFeed.1.name]" />
</action>

<!-- Show page info in scrubber -->
<action name="showPageInfo" datasource="pagesFeed">
<sync>
<assign property="var:storyId" value="_storyId" />
<assign property="object:STORYTYPE.text" value="[datasource:storiesFeed.[var:storyId].type]" />
<assign property="object:STORYNAME.text" value="[datasource:storiesFeed.[var:storyId].name]" />
<assign property="object:STORYAUTHOR.text" value="by [datasource:storiesFeed.[var:storyId].author]" />
<assign property="object:STORYINFO.text" value="[datasource:storiesFeed.[var:storyId].info]" />
<assign property="object:STORYPAGE.text" value="Page [datasource:storiesFeed.[var:storyId].page]" />
<assign property="object:STORYTAGS.text" value="[datasource:storiesFeed.[var:storyId].tags]" />
</sync>
</action>

<action name="loadStoryFromTOC">
<alert message="loading page _storyPage" />
<play action="hideToc" />
<load target="_storyPage"/>
<scroll page="_storyPage"/>
</action>

<action name="hideWaiter" datasource="pagesFeed" datasourceevent="querycomplete">
<alpha value="0" target="SCRUBBERWAITER"/>
</action>

<!-- have to load first 5 pages of mag on init -->
<action name="loadPage1">
<load target="1"/>
</action>

<!-- not using right now -->
<action name="load">
<load target="_alias"/><!-- load the page scrolled to -->
</action>
<action name="unload">
<unload target="_alias"/><!-- unload the page scrolled away from -->
</action>

<!-- Toolbar Hide/Show -->
<action name="showNav">
<alpha target="MAINTOOLBAR" value=".95" time=".3"/>
<alpha target="TBSHDW" value="1" time=".3"/>
<set onclickup="hideNav" />
<!-- <sync delay="5">
<play action="hideNav">
</sync> -->
</action>
<action name="hideNav">
<alpha value="0" target="MAINTOOLBAR" time="0"/>
<alpha target="TBSHDW" value="0" time=".3"/>
<set onclickup="showNav" />
</action>
<!-- Toolbar Home Button -->
<action name="homeBtnClick">
<!-- Put Home Button Action Code Here -->
</action>
<action name="homeBtnDown">
<!-- Show Home -->
<alpha value="1" target="HOMEBTNDN" time="0"/>
<alpha value="0" target="HOMEBTN" time="0"/>
<alpha value="0" target="BACKBTNDN" time="0"/>
<alpha value="0" target="TOCBTNDN" time="0"/>
<alpha value="0" target="SCRUBBTNDN" time="0"/>
<alpha value="0" target="SHAREBTNDN" time="0"/>
<alpha value="1" target="BACKBTN" time="0"/>
<alpha value="1" target="TOCBTN" time="0"/>
<alpha value="1" target="SCRUBBTN" time="0"/>
<alpha value="1" target="SHAREBTN" time="0"/>
</action>
<action name="homeBtnUp">
<alpha value="1" target="HOMEBTN" time="0"/>
<alpha value="0" target="HOMEBTNDN" time="0"/>
</action>

<!-- Toolbar Back Button -->
<action name="backBtnClick">
<!-- Put Back Button Action Code Here -->
<alpha value="1" target="BACKBTN" time="0"/>
<alpha value="0" target="BACKBTNDN" time="0"/>
</action>
<action name="backBtnDown">
<alpha value="0" target="BACKBTN" time="0"/>
<alpha value="1" target="BACKBTNDN" time="0"/>
<alpha value="0" target="HOMEBTNDN" time="0"/>
<alpha value="0" target="TOCBTNDN" time="0"/>
<alpha value="0" target="SCRUBBTNDN" time="0"/>
<alpha value="0" target="SHAREBTNDN" time="0"/>
<alpha value="1" target="HOMEBTN" time="0"/>
<alpha value="1" target="TOCBTN" time="0"/>
<alpha value="1" target="SCRUBBTN" time="0"/>
<alpha value="1" target="SHAREBTN" time="0"/>
</action>
<action name="backBtnUp">
<alpha value="1" target="BACKBTN" time="0"/>
<alpha value="0" target="BACKBTNDN" time="0"/>
</action>

<!-- Toolbar TOC Button -->
<action name="showToc">
<translate valign="top" time=".5" target="TOCPANEL"/>
<load target="WEBDATATEST"/>
<play action="tocBtnDown"/>
<!-- Make sure everything else is closed -->
<play action="hideScrubber"/>
<play action="hideShare"/>
</action>
<action name="hideToc">
<translate ypos="-101%" time=".5" target="TOCPANEL"/>
<play action="tocBtnUp"/>
<set onclickup="showToc" target="TOCBTN"/>
</action>
<action name="tocBtnDown">
<set onclickup="hideToc" target="TOCBTNDN"/>
<alpha value="0" target="TOCBTN" time="0"/>
<alpha value="1" target="TOCBTNDN" time="0"/>
</action>
<action name="tocBtnUp">
<alpha value="1" target="TOCBTN" time="0"/>
<alpha value="0" target="TOCBTNDN" time="0"/>
</action>
<!-- App Scrubber Actions -->
<action name="showScrubber">
<sync>
<alpha value="0" target="pagePanel"/>
<load target="pagePanel"/>
<alpha value="1" target="SCRUBBERWAITER"/>
<alpha value="1" target="pagePanel" time=".25"/>
</sync>
<!-- move whole panel to top -->
<translate valign="top" time=".5" target="SCRUBPANEL"/>
<play action="scrubBtnDown"/>
<play action="hideShare"/>
<play action="hideToc"/>
<!--<assign property="datasource:pagesFeed.source" value="http://www.blanchardsystems.com/pages.json" />-->
</action>
<action name="hideScrubber">
<sync>
<alpha value="1" target="pagePanel"/>
<unload target="pagePanel"/>
<alpha value="0" target="pagePanel" time=".25"/>
</sync>
<translate ypos="-100%" time=".5" target="SCRUBPANEL"/>
<play action="scrubBtnUp"/>
<set onclickup="showScrubber" target="SCRUBBTN"/>
<!--<assign property="datasource:pagesFeed.query" value="/nothing" />-->
</action>
<action name="scrubBtnDown">
<set onclickup="hideScrubber" target="SCRUBBTNDN"/>
<alpha value="0" target="SCRUBBTN" time="0"/>
<alpha value="1" target="SCRUBBTNDN" time="0"/>
</action>
<action name="scrubBtnUp">
<alpha value="1" target="SCRUBBTN" time="0"/>
<alpha value="0" target="SCRUBBTNDN" time="0"/>
</action>
<!-- App Share Actions -->
<action name="showShare">
<translate align="right" time=".5" target="SHAREPANEL"/>
<play action="shareBtnDown"/>
<!-- Make sure everything else is closed -->
<play action="hideScrubber"/>
<play action="hideToc"/>
</action>
<action name="hideShare">
<translate xpos="100%" time=".5" target="SHAREPANEL"/>
<play action="shareBtnUp"/>
<set onclickup="showShare" target="SHAREBTN"/>
</action>
<action name="shareBtnDown">
<set onclickup="hideShare" target="SHAREBTNDN"/>
<alpha value="0" target="SHAREBTN" time="0"/>
<alpha value="1" target="SHAREBTNDN" time="0"/>
</action>
<action name="shareBtnUp">
<alpha value="1" target="SHAREBTN" time="0"/>
<alpha value="0" target="SHAREBTNDN" time="0"/>
</action>

<!-- ANIMATIONS -->

<!-- Jump to Page -->
<!-- this was the old way of jumping to page within pdf -->
<anim name="page">
<scroll page="_page"/>
</anim>
<!-- Share panel -->
<!-- josh - make this work with our share panel -->
<anim name="share">
<alpha value="0"/>
<scale width="1%" height="1%" align="center" valign="center"/>
<scale width="90%" height="20%" time=".75" align="center" valign="center"/>
<alpha value="1" time="1"/>
<set _url="_fburl" target="buttons/facebook-panel"/>
<set _url="_twitterurl" target="buttons/twitter-panel"/>
<set _url="_linkedinurl" target="buttons/linkedin-panel"/>
<set _emailurl="_emailurl" _emailsubject="_emailsubject" target="buttons/email-panel"/>
</anim>
<anim name="close-share">
<scale width="1%" height="1%" valign="center" align="center" time=".75"/>
<alpha value="0" time=".75"/>
</anim>
<!-- email -->
<anim name="emailattach">
<email toaddress="_addy" subject="_subject" body="_body" attachment="_attachment" mimetype="application/pdf"/>
</anim>
<anim name="email">
<email toaddress="_addy" subject="_subject" body="_body"/>
</anim>
<!-- pdf -->
</actions>

<main>

<!-- Blackout the bg -->
<panel name="background" width="100%" height="100%" background="#000000"></panel>

<panel alias="BODYCOLUMN" name="BODYCOLUMN" width="100%" height="100%">
<!-- Magazine -->
<panel alias="MAINCOLUMN" name="MNC" width="100%" height="100%" xpos="0" ypos="0" ondevicerotate="createList">
<!--
<list name="mag" alias="MAG" onclickup="showNav" width="100%" height="100%" datasource="pagesFeed" paginate="yes" orientation="horizontal" align="center" valign="center">
<object datasource="pagesFeed" class="pageItem" name="page-[param:id]" imgSrc="[param:image]" id="[param:id]"></object>
</list>
-->
</panel>
</panel>

<!-- Curtain: Used to highlight select component -->
<panel name="curtain" height="100%" width="100%" background="#0e0729" alpha="0"></panel>
<platform device="ipad">
<!-- SCRUBBER Offscreen-->
<panel name="SCRUBPANEL" alias="SCRUBPANEL" width="100%" height="100%" ypos="-100%" hidden="no">
<image name="scrubBottomBg" widesource="ui/scrub_bottombgwide.png" source="ui/scrub_bottombg.png" lheight="490" lwidth="1024" height="410" width="768" lypos="282" ypos="282"></image>
<image name="scrubTopBg" source="ui/scrubbgtop.png" width="100%" xpos="0" height="300" ypos="0"></image>
<wait name="waiter" alias="SCRUBBERWAITER" width="100%" height="100%" alpha="1" lypos="135" ypos="0"></wait>

<panel name="pagePanel" height="100%" width="100%" valign="bottom">

<!-- Story Info Panel -->
<panel name="storyInfoPanel" alias="STORYINFOPANEL" height="300" width="100%" valign="top">
<text name="storyType" alias="STORYTYPE" width="70%" height="25" ypos="65" xpos="15" leftinset="15" color="#7c7c7c" font="Georgia" size="24%" align="left" text=""></text>
<text name="storyName" alias="STORYNAME" width="70%" height="45" ypos="95" xpos="15" leftinset="15" color="#ffffff" font="Georgia" size="40%" align="left" text=""></text>
<text name="storyAuthor" alias="STORYAUTHOR" width="70%" height="15" ypos="140" xpos="15" leftinset="15" color="#7c7c7c" font="Georgia" size="13%" align="left" text=""></text>
<image name="scrubHr" source="ui/scrub_hr.png" widesource="ui/scrub_hrwide.png" width="525" height="2" lwidth="750" lheight="2" ypos="160" xpos="15"></image>
<text name="storyInfo" alias="STORYINFO" width="70%" height="85" ypos="170" xpos="15" leftinset="15" color="#ffffff" font="Helvetica" size="13" align="left" text=""></text>
<text name="storyTagsLabel" alias="STORYTAGSLABEL" width="80" height="20" ypos="140" xpos="662" lxpos="910" color="#ffffff" alignment="right" font="Helvetica" size="13" text="Story Tags:"></text>
<text name="storyTags" alias="STORYTAGS" width="180" lwidth="190" height="55" ypos="155" xpos="563" lxpos="795" alignment="right" color="#ffffff" font="Helvetica" size="13" text=""></text>
<image name="storyPgNumBg" source="ui/scrub_pagenumbg.png" ypos="225" xpos="679" lxpos="919"></image>
<text name="storyPage" alias="STORYPAGE" width="10%" height="25" color="#ffffff" font="Helvetica" size="13" ypos="225" xpos="689" lxpos="929" text=""></text>
</panel>

<!-- Scrubber Horizontal Page Listing -->
<panel name="pageListing" width="100%" height="365" lheight="440" lypos="315" ypos="315">
<pager width="100%" height="365" lheight="440" name="contents" align="center" hidden="no" paginate="yes">
<list name="pageList" width="100%" height="100%" datasource="pagesFeed" orientation="horizontal" paginate="no">
<!--<object datasource="pagesFeed" class="thumbItem" name="page-[param:id]" alias="SCRUBPAGE-[param:id]" id="[param:id]" imgSrc="[param:thumb]" size="12" page="[param:id]" leftpad="[param:leftpad]" storyId="[param:storyId]"></object>-->
<object datasource="pagesFeed" class="thumbItem" name="page-[param:id]" alias="SCRUBPAGE-[param:id]" id="[param:id]" imgSrc="[param:thumb]" size="12" page="[param:id]" leftpad="[eval: [param:id] % 2 == 0 ? 20 : 0 ]" storyId="[param:storyId]"></object>
</list>
</pager>
</panel>
<panel name="highlight-white" background="#ffffff" alpha=".1" width="100%" height="1" valign="top"></panel>
<panel name="highlight-black" background="#000000" alpha=".5" width="100%" height="1" topof="highlight-white"></panel>
</panel><!-- end pagePanel -->
</panel><!-- end SCRUBPANEL -->

<!-- APP SHARE PANEL (offscreen)-->
<panel name="SHAREPANEL" alias="SHAREPANEL" width="304" height="100%" xpos="100%" hidden="no" background="#000000">
<image name="shareBg" source="ui/share_bg.png" height="100%" width="100%"></image>
<panel name="actionsPanel" alias="ACTIONSPANEL" width="304" height="400" ypos="43">
<image name="shareTitleBg" source="ui/share_titlebg.png" height="41" width="100%"></image>
<text name="shareActions" width="276" height="39" align="right" size="17" font="helvetica" text="Actions" color="#FFFFFF" ypos="2"></text>
<image name="twitterIcon" source="ui/share_twitter.png" height="82" width="82" xpos="15" ypos="50"></image>
<text name="twitterTxt" width="82" height="25" alignment="center" size="13" font="helvetica" text="Twitter" color="#FFFFFF" xpos="15" ypos="137"></text>
<image name="fbIcon" source="ui/share_fb.png" height="82" width="82" xpos="112" ypos="50"></image>
<text name="fbTxt" width="82" height="25" alignment="center" size="13" font="helvetica" text="Facebook" color="#FFFFFF" xpos="112" ypos="137"></text>
<image name="emailIcon" source="ui/share_email.png" height="82" width="82" xpos="210" ypos="50"></image>
<text name="emailTxt" width="82" height="25" alignment="center" size="13" font="helvetica" text="Email" color="#FFFFFF" xpos="210" ypos="137"></text>
<image name="copyIcon" source="ui/share_copy.png" height="82" width="82" xpos="15" ypos="165"></image>
<text name="copyTxt" width="82" height="25" alignment="center" size="13" font="helvetica" text="Copy Link" color="#FFFFFF" xpos="15" ypos="252"></text>
<image name="favIcon" source="ui/share_favorite.png" height="82" width="82" xpos="112" ypos="165"></image>
<text name="favTxt" width="82" height="25" alignment="center" size="13" font="helvetica" text="Add Favorite" color="#FFFFFF" xpos="112" ypos="252"></text>
</panel>
<panel name="favsPanel" alias="FAVPANEL" width="304" height="350" ypos="445">
<image name="favTitleBg" source="ui/share_titlebg.png" height="41" width="100%"></image>
<text name="favActions" width="276" height="39" align="right" size="17" font="helvetica" text="Favorites" color="#FFFFFF" ypos="2"></text>
</panel>
</panel>
<!-- END APP SHARE PANEL -->

<!-- APP TOC SCREEN offscreen-->
<panel name="TOCPANEL" alias="TOCPANEL" width="100%" height="100%" ypos="-105%" hidden="no" background="#000000" onclickup="showNav">
<!--<web name="WEBDATATEST" alias="WEBDATATEST" zoomable="no" file="tests/test.html" width="100%" height="100%"></web>-->
<image name="tocBg" source="ui/toc_bg.png" width="100%" height="100%"></image>
<list name="tocList1" alias="TOCLIST" width="50%" height="100%" datasource="storiesFeed" orientation="vertical" paginate="no" align="left">
<object datasource="storiesFeed" name="tocItem" class="tocItem" id="[param:id]" size="12" storyName="[param:name]" storyPage="[param:page]" storyAuthor="[param:author]" storyInfo="[param:info]" storyType="[param:type]" storyImage="[param:image]" lhs="[eval: [param:id] % 2]" operator="e" rhs="1"></object>
</list>
<list name="tocList2" alias="TOCLIST" width="50%" height="100%" datasource="storiesFeed" orientation="vertical" paginate="no" align="right">
<object datasource="storiesFeed" name="tocItem" class="tocItem" id="[param:id]" size="12" storyName="[param:name]" storyPage="[param:page]" storyAuthor="[param:author]" storyInfo="[param:info]" storyType="[param:type]" storyImage="[param:image]" lhs="[eval: [param:id] % 2]" operator="e" rhs="0"></object>
</list>
</panel>

<!-- APP TOOLBAR -->
<panel alias="MAINTOOLBAR" alpha="0" name="MAINTOOLBAR" width="100%" height="55" xpos="0" ypos="0">
<image name="TBBG" height="44" width="100%" alpha=".95" xpos="0" ypos="0" source="ui/tbbg.png"></image>
<text name="issueName" alias="ISSUENAME" text="" width="400" height="100%" align="center" alignment="center" valign="top" font="Helvetica" size="17" color="#FFFFFF"></text>
<panel name="TBSUB" height="44" width="100%" xpos="0" ypos="0">
<panel name="LSPACE2" width="10" height="100%" align="left"></panel>
<panel name="LEFTBUTTONS" fitwidth="yes" height="100%" align="left" rightof="LSPACE2">
<image name="HOMEBTN" alias="HOMEBTN" onclick="homeBtnDown" onclickup="homeBtnClick" source="ui/home.png" height="44" valign="center" align="left"></image>
<image name="HOMEBTNDN" alias="HOMEBTNDN" source="ui/homehlb.png" alpha="0" height="44" valign="center" align="left"></image>
<image name="BACKBTN" alias="BACKBTN" source="ui/back.png" height="44" onclick="backBtnDown" onclickup="backBtnClick" alpha="1" valign="center" align="left" rightof="HOMEBTN"></image>
<image name="BACKBTNDN" alias="BACKBTNDN" source="ui/backhlb.png" height="44" onclickup="backBtnUp" alpha="0" valign="center" align="left" rightof="HOMEBTN"></image>
<image name="TOCBTN" alias="TOCBTN" onclick="tocBtnDown" onclickup="showToc" source="ui/toc.png" height="44" valign="center" align="left" rightof="BACKBTN"></image>
<image name="TOCBTNDN" alias="TOCBTNDN" source="ui/tochlb.png" alpha="0" height="44" valign="center" align="left" rightof="BACKBTN"></image>
</panel>
<panel name="RSPACE1" width="10" height="100%" align="right"></panel>
<panel name="RIGHTBUTTONS" width="50%" height="100%" align="right" leftof="RSPACE1">
<image name="SHAREBTN" alias="SHAREBTN" onclickup="showShare" source="ui/share.png" height="44" valign="center" align="right"></image>
<image name="SHAREBTNDN" alias="SHAREBTNDN" source="ui/sharehlb.png" alpha="0" height="44" valign="center" align="right"></image>
<image name="SCRUBBTN" alias="SCRUBBTN" onclickup="showScrubber" source="ui/scrub.png" height="44" valign="center" align="right" leftof="SHAREBTN"></image>
<image name="SCRUBBTNDN" alias="SCRUBBTNDN" source="ui/scrubhlb.png" height="44" alpha="0" valign="center" align="right" leftof="SHAREBTN"></image>
</panel>
<panel alias="bb2LQHTZZ" name="bb2LQHTZZ" ypos="43" height="1" width="100%" background="#000000"></panel>
</panel>
<image name="TBSHDW" alias="TBSHDW" alpha="0" source="ui/tbdropshadow.png" height="11" width="100%" xpos="0" ypos="44"></image>

</panel>
</platform>

</main>
</wire>

Instead of creating separate lists, I am now using this method which seems to be working:



<list name="mag" alias="MAG" onclickup="showNav" width="100%" height="100%" datasource="pagesFeed" paginate="yes" orientation="horizontal" align="center" valign="center">
<object datasource="pagesFeed" class="pageItem" name="page-[param:id]" imgSrc="[param:image]" id="[param:id]" _alias="[param:id]" lhs="[system:orientation]" operator="e" rhs="portrait"></object>
<object datasource="pagesFeed" class="spreadL" name="page-[param:id]" imgLId="[param:imageLId]" imgLSrc="[param:imageL]" imgRId="[param:imageRId]" imgRSrc="[param:imageR]" _alias="[param:id]" lhs="[system:orientation]" operator="e" rhs="landscape"></object>
</list>

That is a valid approach. I have been looking at your earlier scenario and am still having some issues with the second list ondevice rotate. I may have uncovered a bug, so I am going to escalate this issue.

I will get back to you. Thanks.