|
|
Theme:
Since its debut in 2007, Ford and Microsoft's Sync infotainment system has made its way into several of the auto maker's models, including the 2012 Focus Electric. At this week's Future in Review tech conference, Ford announced that more than 4 million vehicles in the US have its entertainment platform on board. In addition to dropping that stat, the company talked up its new EV, which it says can charge in half the time it takes for the Nissan Leaf. Maybe Ford caught wind of Nissan's just-announced e-NV200 all-electric van and wanted to remind those in the market for an EV that a blue box isn't the only option. Ford says Sync is now in 4 million vehicles, takes a moment to talk up Focus Electric originally appeared on Engadget on Sat, 26 May 2012 01:31:00 EDT. Please see our terms for use of feeds. Permalink | | Email this | Comments
Description & Source Code
This demo fetches the RSS subscription and binds the content to the ZUL page using ZK's data-binding feature.
<window apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('demo.app.rss_reader.RSSViewModel')"
width="100%" height="500px">
<style src="/widgets/application/rss_reader/Style.css" />
<borderlayout width="100%" height="100%">
<west width="200px" collapsible="true" title="Subscription Title">
<div>
<image src="@load(vm.selectedFeed.feedImageLink)" />
<listbox id="newsListBox" height="430px" model="@load(vm.selectedFeed.feedEntries)" width="100%"
selectedItem="@bind(vm.selectedEntry)">
<template name="model" var="feed">
<listitem>
<listcell label="@load(feed.title)" />
</listitem>
</template>
</listbox>
</div>
</west>
<center>
<groupbox hflex="1" vflex="1" closable="false" mold="3d">
<caption label="@load(vm.selectedEntry.title)">
<a sclass="link" href="@load(vm.selectedEntry.link)" target="_zkdemo">Full Article</a>
</caption>
<html class="desc" content="@load(vm.selectedEntry.descValue)" />
</groupbox>
</center>
</borderlayout>
</window>package demo.app.rss_reader;
import org.zkoss.bind.annotation.Init;
import org.zkoss.zrss.RssBinder;
import org.zkoss.zrss.RssEntry;
import org.zkoss.zrss.RssFeed;
public class RSSViewModel {
private RssFeed selected;
private RssEntry selectEntry;
@Init
public void init() throws Exception {
selected = new RssBinder().lookUpFeed("http://www.engadget.com/rss.xml");
selectEntry = selected.getFeedEntries().get(0);
}
public RssFeed getSelectedFeed() {
return selected;
}
public RssEntry getSelectedEntry() {
return selectEntry;
}
public void setSelectedEntry(RssEntry selectedEntry) {
this.selectEntry = selectedEntry;
}
}
|
|
Theme:
|
