You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/07/10 04:00:50 UTC
svn commit: r962744 - in
/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/calendars:
Calendars.java calendars.bxml
Author: gbrown
Date: Sat Jul 10 02:00:50 2010
New Revision: 962744
URL: http://svn.apache.org/viewvc?rev=962744&view=rev
Log:
Update calendars tutorial to use namespace binding.
Removed:
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/calendars/Calendars.java
Modified:
pivot/trunk/tutorials/src/org/apache/pivot/tutorials/calendars/calendars.bxml
Modified: pivot/trunk/tutorials/src/org/apache/pivot/tutorials/calendars/calendars.bxml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/calendars/calendars.bxml?rev=962744&r1=962743&r2=962744&view=diff
==============================================================================
--- pivot/trunk/tutorials/src/org/apache/pivot/tutorials/calendars/calendars.bxml (original)
+++ pivot/trunk/tutorials/src/org/apache/pivot/tutorials/calendars/calendars.bxml Sat Jul 10 02:00:50 2010
@@ -16,22 +16,30 @@ See the License for the specific languag
limitations under the License.
-->
-<calendars:Calendars title="Calendars" maximized="true"
+<Window title="Calendars" maximized="true"
xmlns:bxml="http://pivot.apache.org/bxml"
- xmlns:calendars="org.apache.pivot.tutorials.calendars"
xmlns="org.apache.pivot.wtk">
<Border styles="{padding:8}">
<Form>
<Form.Section>
<Border Form.label="Calendar" styles="{color:10}">
- <Calendar bxml:id="calendar"/>
+ <Calendar bxml:id="calendar" selectedDate="${calendarButton.selectedDate}">
+ <calendarSelectionListeners>
+ function selectedDateChanged(calendar, previousSelectedDate) {
+ calendar.year = calendar.selectedDate.year;
+ calendar.month = calendar.selectedDate.month;
+ }
+ </calendarSelectionListeners>
+ </Calendar>
</Border>
- <CalendarButton bxml:id="calendarButton" Form.label="Calendar button"/>
+ <CalendarButton bxml:id="calendarButton" Form.label="Calendar button"
+ selectedDate="${calendar.selectedDate}"/>
</Form.Section>
<Form.Section>
- <Label bxml:id="selectedDateLabel" Form.label="Selected date"/>
+ <Label bxml:id="selectedDateLabel" Form.label="Selected date"
+ text="${calendar.selectedDate}"/>
</Form.Section>
</Form>
</Border>
-</calendars:Calendars>
+</Window>