View Full Version : Disappearing tab element
jtesolin
07-25-2008, 09:25 AM
I have a small app with 5 elements. The tab slider is bring in xml data with weather information on each tab. It loads correctly initially, however, once I select an item, the tabs at the bottom will disappear.
I tried changing heights and views with now luck. One of the heights I changed was on the text element in the tab element, but it just cut off the xml data.
Has anyone encountered this before? I saw a post (http://forum.openlaszlo.org/showthread.php?t=4774) that had the same problem, but the fix was only for 1 xml feed.
(files are attached - screenshot, xml feeds, and lzx code).
concretepeanut
07-25-2008, 09:37 AM
Have you tried changing the height of the canvas? If you don't put a height attribute, it will resize to whatever size it needs to fit the view.
jtesolin
07-25-2008, 09:42 AM
Have you tried changing the height of the canvas? If you don't put a height attribute, it will resize to whatever size it needs to fit the view.
yes, I tried changing the height of the canvas, for some reason the tab element just seems to stop.
senshi
07-25-2008, 12:43 PM
I can't reproduce that issue (at least using the latest trunk).
jtesolin
07-28-2008, 05:11 AM
I can't reproduce that issue (at least using the latest trunk).
Wow, that's strange. Perhaps I should update my version? I downloaded the openlaszlo-4.1.1.war (dev kit). Do you have the nightly version?
Thanks for the screenshot.
jtesolin
07-28-2008, 09:52 AM
I tried the nightly build with no luck.
jtesolin
07-31-2008, 09:16 AM
I can't reproduce that issue (at least using the latest trunk).
Are you using a full version? What type of OpenLazlo install awere you successful on?
I have the dev kit on tomcat 5.5, using windows XP.
alyjeje
08-01-2008, 05:30 AM
I've exactly the same thing !!
I don't know how fix it ! it's very strange :(
senshi
08-03-2008, 10:24 AM
I just tried it in the OL4.1-editor (http://openlaszlo.org/lps4.1/laszlo-explorer/editor.jsp?src=my-apps/copy-of-hello.lzx), no problems for me so far:
<canvas width="300" height="500">
<!-- DATA SOURCE -->
<dataset name="rssdata" >
<rss version="2.0" xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
<channel>
<item>
<description><![CDATA[
<img src="http://l.yimg.com/us.yimg.com/i/us/we/52/26.gif"/><br />
<b>Current Conditions:</b><br />
Cloudy, 13 C<BR />
<BR /><b>Forecast:</b><BR />
Tue - Showers. High: 14 Low: 7<br />
Wed - PM Light Rain. High: 18 Low: 9<br />
<br />
<a href="http://us.rd.yahoo.com/dailynews/rss/weather/Toronto__CA/*http://weather.yahoo.com/forecast/CAXX0504_c.html">Full Forecast at Yahoo! Weather</a><BR/>
(provided by The Weather Channel)<br/>
]]></description>
</item>
</channel>
</rss><!-- api2.weather.re4.yahoo.com uncompressed/chunked Tue May 6 12:04:46 PDT 2008 -->
</dataset>
<view x="5" y="5">
<view layout="spacing:1">
<tabslider id="t" width="280" height="490" inset_left="20" inset_top="20">
<tabelement id="te1" text="Calgary Weather" layout="spacing:2" datapath="rssdata:/rss/channel">
<view datapath="item">
<text datapath="description/text()" width="235" multiline="true"/>
</view>
</tabelement>
<tabelement id="te2" text="Halifax Weather" layout="spacing:2" datapath="rssdata:/rss/channel">
<view datapath="item">
<text datapath="description/text()" width="235" multiline="true"/>
</view>
</tabelement>
<tabelement id="te3" text="Montreal Weather" layout="spacing:2" datapath="rssdata:/rss/channel">
<view datapath="item">
<text datapath="description/text()" width="235" multiline="true"/>
</view>
</tabelement>
<tabelement id="te4" text="Toronto Weather" layout="spacing:2" datapath="rssdata:/rss/channel" selected="true">
<view datapath="item">
<text datapath="description/text()" width="235" multiline="true"/>
</view>
</tabelement>
<tabelement id="te5" text="Vancouver Weather" layout="spacing:2" datapath="rssdata:/rss/channel">
<view datapath="item">
<text datapath="description/text()" width="235" multiline="true"/>
</view>
</tabelement>
</tabslider>
</view>
</view>
</canvas>
jtesolin
10-24-2008, 10:38 AM
I just tried it in the OL4.1-editor (http://openlaszlo.org/lps4.1/laszlo-explorer/editor.jsp?src=my-apps/copy-of-hello.lzx), no problems for me so far:
That worked for me as well. The only difference between the version you posted, and the original I provided was how the data was included. Does this mean I am referencing the xml portions wrong?
original:
<dataset name="rssdata" src="forecastrss.xml" request="true" type="http" />
<dataset name="rssdata2" src="forecastrssMont.xml" request="true" type="http" />
<dataset name="rssdata3" src="forecastrssVan.xml" request="true" type="http" />
<dataset name="rssdata4" src="forecastrssHalifax.xml" request="true" type="http" />
<dataset name="rssdata5" src="forecastrssCal.xml" request="true" type="http" />
From Senshi:
<dataset name="rssdata" >
<rss version="2.0" xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
<channel>
<item>
<description><![CDATA[
<img src="http://l.yimg.com/us.yimg.com/i/us/we/52/26.gif"/><br />
<b>Current Conditions:</b><br />
Cloudy, 13 C<BR />
<BR /><b>Forecast:</b><BR />
Tue - Showers. High: 14 Low: 7<br />
Wed - PM Light Rain. High: 18 Low: 9<br />
<br />
<a href="http://us.rd.yahoo.com/dailynews/rss/weather/Toronto__CA/*http://weather.yahoo.com/forecast/CAXX0504_c.html">Full Forecast at Yahoo! Weather</a><BR/>
(provided by The Weather Channel)<br/>
]]></description>
</item>
</channel>
</rss><!-- api2.weather.re4.yahoo.com uncompressed/chunked Tue May 6 12:04:46 PDT 2008 -->
</dataset>
senshi
10-25-2008, 01:19 PM
Ok, I've found the reason:
At an early stage, the "<tabslider>" tries to calculate its required bounds. But at that time, all "<tabelement>"s aren't set visible, because the data wasn't loaded yet (any data-bound "<view>" remains invisible until the data arrives). May you file a bug-report at JIRA to help to fix that bug, thanks!
In the meantime, you've got two possibilities:
1) either set "visibility='visible'" on your "<tabelement>"s (this overrides the data-bound <-> visible logic)
2) or set the complete datapath on the inner view
jtesolin
10-27-2008, 08:47 AM
1) either set "visibility='visible'" on your "<tabelement>"s (this overrides the data-bound <-> visible logic)
excellent! that worked thanks! I also files that bug report.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.