JBoss Rich Faces SVN: r1535 - in branches/3.0.2/sandbox/scrollable-grid/src/main: resources/org/richfaces/renderkit/html/css and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-07-07 14:25:58 -0400 (Sat, 07 Jul 2007)
New Revision: 1535
Modified:
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
branches/3.0.2/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss
branches/3.0.2/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
Log:
Make header autosizable by content
Modified: branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-07-07 15:44:09 UTC (rev 1534)
+++ branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-07-07 18:25:58 UTC (rev 1535)
@@ -612,7 +612,7 @@
setTimeout(function () {
this.rearrangeRows(options, true, true);
this.container.show();
- this.splash.hide();
+ if(this.splash) this.splash.hide();
this.updateStarted = false;
}.bind(this), 10);
Modified: branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-07-07 15:44:09 UTC (rev 1534)
+++ branches/3.0.2/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-07-07 18:25:58 UTC (rev 1535)
@@ -171,9 +171,11 @@
// sort icons
columns[j].sortDesc = details[1];
columns[j].sortAsc = details[2];
+ columns[j].sortSpace = details[3];
if(ClientUILib.isIE && columns[j].sortDesc) {
Element.setStyle(columns[j].sortDesc, {left: "-10px"});
Element.setStyle(columns[j].sortAsc, {left: "-10px"});
+ Element.setStyle(columns[j].sortSpace, {left: "-10px"});
}
j++;
}
@@ -222,9 +224,11 @@
// sort icons
columns[j].sortDesc = details[1];
columns[j].sortAsc = details[2];
+ columns[j].sortSpace = details[3];
if(ClientUILib.isIE && columns[j].sortDesc) {
Element.setStyle(columns[j].sortDesc, {left: "-10px"});
Element.setStyle(columns[j].sortAsc, {left: "-10px"});
+ Element.setStyle(columns[j].sortSpace, {left: "-10px"});
}
}
j++;
@@ -252,6 +256,7 @@
details[0] = document.getElementById(clientId + ":hsep_" + column);
details[1] = document.getElementById(clientId + ":hsortd_" + column);
details[2] = document.getElementById(clientId + ":hsorta_" + column);
+ details[3] = document.getElementById(clientId + ":hsort_" + column);
return details;
},
agjustSeparators: function() {
@@ -417,9 +422,11 @@
if(i != index) {
Element.setStyle(h.sortDesc, {display: 'none'});
Element.setStyle(h.sortAsc, {display: 'none'});
+ Element.setStyle(h.sortSpace, {display: 'block'});
} else{
Element.setStyle(h.sortDesc, {display: (dir == 'desc' ? 'block' : 'none')});
Element.setStyle(h.sortAsc, {display: (dir == 'asc' ? 'block' : 'none')});
+ Element.setStyle(h.sortSpace, {display: 'none'});
}
}
}
Modified: branches/3.0.2/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss
===================================================================
--- branches/3.0.2/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss 2007-07-07 15:44:09 UTC (rev 1534)
+++ branches/3.0.2/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss 2007-07-07 18:25:58 UTC (rev 1535)
@@ -64,7 +64,6 @@
*/
.ClientUI_Grid_HR {
background-color: #ebeadb;
- height: 22px;
z-index:2;
}
@@ -85,26 +84,29 @@
white-space: nowrap;
border-bottom: 1px solid #cbc7b8;
border-right: 1px solid #ebeadb;
- height:30px !important;
}
+.ClientUI_Grid_HC sort-cell {
+ background-position: right;
+ background-repeat: no-repeat;
+ display: block;
+ width: 16px !important;;
+ position: relative;
+}
+
.ClientUI_Grid_HC .sort-asc {
-/* background-image: url(sort_asc.gif);*/
background-position: right;
background-repeat: no-repeat;
display: none;
- height: 14px;
- width: 16px;
+ width: 16px !important;;
position: relative;
}
.ClientUI_Grid_HC .sort-desc {
-/* background-image: url(sort_desc.gif);*/
background-position: right;
background-repeat: no-repeat;
display: none;
- height: 14px;
- width: 16px;
+ width: 16px !important;;
position: relative;
}
@@ -136,7 +138,7 @@
/**
* Header cell body
*/
-.ClientUI_Grid_HCBody1 {
+.ClientUI_Grid_HCBody {
cursor: default;
padding: 0px 0px;
white-space: nowrap;
@@ -144,15 +146,7 @@
display: block;
overflow: hidden;
width: 100%;
-}
-.ClientUI_Grid_HCBody {
- cursor: default;
font: normal 8pt arial;
- padding: 3px 5px;
- white-space: nowrap;
- position: relative;
- display: block;
- overflow: hidden;
}
.ClientUI_Grid_HCBody span {
font: normal 8pt arial;
Modified: branches/3.0.2/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
===================================================================
--- branches/3.0.2/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-07-07 15:44:09 UTC (rev 1534)
+++ branches/3.0.2/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-07-07 18:25:58 UTC (rev 1535)
@@ -13,25 +13,24 @@
>
<td class="ClientUI_Grid_HC Idg-header-cell #{component.attributes['headerClass']}" id="#{client_id}:hc_#{cell_index}" columnIndex="#{cell_index}" sortable="#{component.attributes['sortable']}">
- <span id="#{client_id}:hcc_#{cell_index}" class="ClientUI_Grid_HCBody1">
- <span id="#{clientId}:hcb_#{cell_index}"
- class="ClientUI_Grid_HCBody">
- <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
- <tbody>
- <tr>
- <td width="100%">
- <span style="width: 100%;">
- <vcp:body/>
- </span>
- </td>
- <td>
- <span id="#{client_id}:hsortd_#{cell_index}" class="sort-desc" />
- <span id="#{client_id}:hsorta_#{cell_index}" class="sort-asc" />
- </td>
- </tr>
- </tbody>
- </table>
- </span>
+ <span id="#{clientId}:hcb_#{cell_index}"
+ class="ClientUI_Grid_HCBody">
+ <table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
+ <tbody>
+ <tr>
+ <td width="100%">
+ <span style="width: 100%;">
+ <vcp:body/>
+ </span>
+ </td>
+ <td>
+ <div id="#{client_id}:hsort_#{cell_index}" class="sort-cell"> </div>
+ <span id="#{client_id}:hsortd_#{cell_index}" class="sort-desc" />
+ <span id="#{client_id}:hsorta_#{cell_index}" class="sort-asc" />
+ </td>
+ </tr>
+ </tbody>
+ </table>
</span>
<jsp:scriptlet>
17 years, 5 months
JBoss Rich Faces SVN: r1534 - in branches/3.0.2: richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-07-07 11:44:09 -0400 (Sat, 07 Jul 2007)
New Revision: 1534
Modified:
branches/3.0.2/richfaces/common/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java
branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
branches/3.0.2/sandbox/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
Calendar:
Last Week line added;
Hidden input field added;
getSelectedDate() added;
Some improvements and optimisation;
TemplateEncoderRenderBase:
Richfaces.eval() changed to Richfaces.evalMacro()
Modified: branches/3.0.2/richfaces/common/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java
===================================================================
--- branches/3.0.2/richfaces/common/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java 2007-07-07 14:35:42 UTC (rev 1533)
+++ branches/3.0.2/richfaces/common/src/main/java/org/richfaces/renderkit/TemplateEncoderRendererBase.java 2007-07-07 15:44:09 UTC (rev 1534)
@@ -77,7 +77,7 @@
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- JSContentHandler contentHandler = new MacroDefinitionJSContentHandler(writer, "Richfaces.eval(\"", "\", context)");
+ JSContentHandler contentHandler = new MacroDefinitionJSContentHandler(writer, "Richfaces.evalMacro(\"", "\", context)");
Result result = new SAXResult(contentHandler);
for (int i = 0; i < bodyChildrenLength; i++) {
Modified: branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
--- branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2007-07-07 14:35:42 UTC (rev 1533)
+++ branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2007-07-07 15:44:09 UTC (rev 1534)
@@ -116,18 +116,41 @@
};
Richfaces.VARIABLE_NAME_PATTERN = /^\s*[_,A-Z,a-z][\w,_]*\s*$/;
+Richfaces.VARIABLE_NAME_PATTERN2 = /^\s*[_,A-Z,a-z][\w,_,\.]*\s*$/;
+Richfaces.getObjectValue = function (str, object) {
+ var a=str.split(".");
+ var value=object[a[0]];
+ var c=1;
+ while (value && c<a.length) value = value[a[c++]];
+ return (value ? value : "");
+}
+
Richfaces.evalMacro = function(template, object)
{
var value="";
+ // variable evaluation
if (Richfaces.VARIABLE_NAME_PATTERN.test(template))
{
value = object[template];
if (!value) {value=window[template]; if (!value) value="";}
- } else
+ }
+ // variable in objects evaluation
+ else if (Richfaces.VARIABLE_NAME_PATTERN2.test(template))
{
- try { value=object.eval(template); } catch (e) { LOG.warn("Exception: "+e.Message + "\n[" + template + "]"); }
+ value = Richfaces.getObjectValue(template, object);
+ if (!value) value=Richfaces.getObjectValue("window."+template, object);
}
+ //js string evaluation
+ else
+ {
+ try {
+ value=object.eval(template);
+ if (typeof value == 'function') {
+ value = value(object);
+ }
+ } catch (e) { LOG.warn("Exception: "+e.Message + "\n[" + template + "]"); }
+ }
return value;
}
Richfaces.evalSimpleMacro = function(template, object)
Modified: branches/3.0.2/sandbox/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- branches/3.0.2/sandbox/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-07-07 14:35:42 UTC (rev 1533)
+++ branches/3.0.2/sandbox/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-07-07 15:44:09 UTC (rev 1534)
@@ -100,8 +100,8 @@
this.id = id;
this.params = parameters;
- if (!this.showWeekDaysBar) this.showWeekDaysBar = true;
- if (!this.showWeeksBar) this.showWeeksBar = true;
+ if (!this.params.showWeekDaysBar) this.params.showWeekDaysBar = true;
+ if (!this.params.showWeeksBar) this.params.showWeeksBar = true;
this.currentDate = this.params.currentDate;
this.selectedDate = this.params.selectedDate;
@@ -116,7 +116,7 @@
this.daysData = {startDate:null, days:[]};
this.days = [];
- var htmlTextHeader = '<div id="div_'+this.params.dayListTableId+'"></div><table border="0" cellpadding="0" cellspacing="0" class="calendar_exterior" id="'+this.params.dayListTableId+'">\n';
+ var htmlTextHeader = '<div id="div_'+this.params.dayListTableId+'"></div><input id="'+this.params.dayListTableId+':input" type="hidden" value="'+this.getSelectedDate()+'"><table border="0" cellpadding="0" cellspacing="0" class="calendar_exterior" id="'+this.params.dayListTableId+'">\n';
var controlsHeaderContext = {
nextYearControl: Calendar.nextYearControl,
previousYearControl: Calendar.previousYearControl,
@@ -170,10 +170,17 @@
obj.component = this;
obj.innerHTML = htmlTextHeader+htmlControlsHeader+htmlTextWeekDayBar+htmlTextWeek+htmlTextFooter;
+ this.submitFunction = this.params.submitFunction.bind(this);
this.prepareEvents();
- this.submitFunction = this.params.submitFunction.bind(this);
},
+ getSelectedDate: function() {
+ if (!this.selectedDate) return "";
+ var value = this.selectedDate.getMonth()+1; value = (value<10 ? "0"+value : value);
+ var date = this.selectedDate.getDate(); value += "/"+(date<10 ? "0"+date : date);
+ return value+"/"+this.selectedDate.getFullYear();
+ },
+
isWeekend: function(weekday) {
return (weekday == this.firstWeekendDayNumber || weekday == this.secondWeekendDayNumber);
},
@@ -209,7 +216,9 @@
this.selectedDateElement = obj;
Element.addClassName(obj, "Selecteddayclass");
- $('div_'+this.params.dayListTableId+'_selected_date').innerHTML=obj.data+"/"+(this.currentDate.getMonth()+1)+"/"+this.currentDate.getFullYear();
+ var selecteddate = this.getSelectedDate();
+ $('div_'+this.params.dayListTableId+'_selected_date').innerHTML=selecteddate;
+ $(this.params.dayListTableId+':input').value=selecteddate;
} else {
if (daydata._month==-1) this.prevMonth(); else this.nextMonth();
}
@@ -295,12 +304,14 @@
var previousMonthDays = daysInMonth(currentYear, currentMonth-1);
var p=0;
+ var month=-1;
this.days = [];
var dayCounter = previousMonthDays - wd + 1;
// previuos month days
- if (wd>0) while (dayCounter<=previousMonthDays) {this.days.push({day:dayCounter, _isWeekend: this.isWeekend(p), _month:-1, _className:"Disableddayclass"}); dayCounter++; p++; }
+ if (wd>0) while (dayCounter<=previousMonthDays) {this.days.push({day:dayCounter, _isWeekend: this.isWeekend(p), _month:month, _className:"Disableddayclass"}); dayCounter++; p++; }
dayCounter = 1;
+ month=0;
// current month days
if (this.daysData && this.daysData.index[currentYear+'-'+currentMonth]!=undefined)
@@ -310,9 +321,9 @@
while (dayCounter<firstDay)
{
if (this.isWeekend(p%7))
- this.days.push({day:dayCounter, _isWeekend: true, _month:0, _className:"Weekenddayclass", _hoverClassName:"Hoveredweekclass"});
+ this.days.push({day:dayCounter, _isWeekend: true, _month:month, _className:"Weekenddayclass", _hoverClassName:"Hoveredweekclass"});
else
- this.days.push({day:dayCounter, _isWeekend: false, _month:0, _className:"Commondayclass", _hoverClassName:"Hovereddayclass"});
+ this.days.push({day:dayCounter, _isWeekend: false, _month:month, _className:"Commondayclass", _hoverClassName:"Hovereddayclass"});
dayCounter++;
p++;
@@ -327,7 +338,7 @@
obj = this.daysData.days[idx];
obj.day = dayCounter;
obj._isWeekend = flag;
- obj._month = 0;
+ obj._month = month;
if (flag) {obj._className = "Weekenddayclass"; obj._hoverClassName = "Hoveredweekclass";}
else {obj._className = "Commondayclass"; obj._hoverClassName = "Hovereddayclass";}
this.days.push(obj);
@@ -336,21 +347,17 @@
p++;
}
}
- while (dayCounter<=currentMonthDays)
+ while (p<42)
{
+ if (dayCounter>currentMonthDays) {dayCounter=1; month=1;}
if (this.isWeekend(p%7))
- this.days.push({day:dayCounter, _isWeekend: true, _month:0, _className:"Weekenddayclass", _hoverClassName:"Hoveredweekclass"});
+ this.days.push({day:dayCounter, _isWeekend: true, _month:month, _className:"Weekenddayclass", _hoverClassName:"Hoveredweekclass"});
else
- this.days.push({day:dayCounter, _isWeekend: false, _month:0, _className:"Commondayclass", _hoverClassName:"Hovereddayclass"});
+ this.days.push({day:dayCounter, _isWeekend: false, _month:month, _className:"Commondayclass", _hoverClassName:"Hovereddayclass"});
dayCounter++;
p++;
}
- dayCounter = 1;
- // next month days
- var ld = 7-p%7;
- if (ld!=7) while (dayCounter<=ld) { this.days.push({day:dayCounter++, _isWeekend: this.isWeekend(p%7), _month:1, _className:"Disableddayclass"}); }
-
// render
p=0;
var element;
@@ -358,7 +365,10 @@
var wn;
if (this.params.showWeeksBar) wn = weekNumber(currentYear, currentMonth, this.params.minDaysInFirstWeek, this.params.firstWeekDay); /// fix it
this.selectedDayElement=null;
+ var weekflag=true;
+ var _d=new Date();
+
for (var k=1;k<7;k++)
{
//
@@ -370,11 +380,14 @@
// week number update
if (this.params.showWeeksBar)
{
- if (k!=1 && currentMonth==11 && dataobj && dataobj.day>27)
+ if (weekflag && currentMonth==11 &&
+ (k==5||k==6) &&
+ (dataobj._month==1 || (currentMonthDays-dataobj.day+1)<this.params.minDaysInFirstWeek) )
{
- if (getFirstWeek(currentYear+1, this.params.minDaysInFirstWeek, this.params.firstWeekDay).weekNumber==1) wn=1;
+ wn=1;
+ weekflag=false;
}
- element.innerHTML = (dataobj) ? this.params.weekNumberMarkup( {weekNumber: wn++} ) : "";
+ element.innerHTML = this.params.weekNumberMarkup( {weekNumber: wn++} );
if (k==1&&wn>52) wn=1;
element = element.nextSibling;
}
@@ -384,22 +397,18 @@
// TODO fix start/stop event's calls
this.stopCellEvents(element);
- if (dataobj) {
- element.data=dataobj.day;
- element.innerHTML = this.params.dayListMarkup( dataobj );
- element.className = dataobj._className + (todayflag && dataobj._month==0 && dataobj.day==todaydate ? " Todayclass" : "");
- if (selectedflag && dataobj._month==0 && dataobj.day==selecteddate) { this.selectedDateElement = element; element.className+=" Selecteddayclass"; }
- this.setCellEvents(element);
- p++;
- } else {
- //element.data="";
- element.innerHTML = "";
- }
+ element.data=dataobj.day;
+ element.innerHTML = this.params.dayListMarkup( dataobj );
+ element.className = dataobj._className + (todayflag && dataobj._month==0 && dataobj.day==todaydate ? " Todayclass" : "");
+ if (selectedflag && dataobj._month==0 && dataobj.day==selecteddate) { this.selectedDateElement = element; element.className+=" Selecteddayclass"; }
+ this.setCellEvents(element);
+ p++;
dataobj = this.days[p];
element=element.nextSibling;
}
}
+ alert(new Date().getTime()-_d.getTime());
},
nextMonth: function() {
17 years, 5 months
JBoss Rich Faces SVN: r1533 - branches/3.0.2/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-07-07 10:35:42 -0400 (Sat, 07 Jul 2007)
New Revision: 1533
Modified:
branches/3.0.2/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
Log:
http://jira.jboss.com/jira/browse/RF-415 fixed
Modified: branches/3.0.2/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
--- branches/3.0.2/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-07-07 13:28:08 UTC (rev 1532)
+++ branches/3.0.2/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-07-07 14:35:42 UTC (rev 1533)
@@ -144,6 +144,13 @@
getNearestValue: function(value){
var pos;
pos = this.binsearch(this.availableValues, value);
+ if (pos>0) {
+ var prevPos = pos-1;
+ if ( Math.abs(value-this.availableValues[prevPos])<
+ Math.abs(this.availableValues[pos]-value) ) {
+ pos = prevPos;
+ }
+ }
return this.roundFloat(this.availableValues[pos]);
},
17 years, 5 months
JBoss Rich Faces SVN: r1532 - in trunk/docs/userguide/en/src/main/docbook: modules and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-07-07 09:28:08 -0400 (Sat, 07 Jul 2007)
New Revision: 1532
Modified:
trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
http://jira.jboss.com/jira/browse/RF-391
http://jira.jboss.com/jira/browse/RF-389
Modified: trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml 2007-07-07 13:25:01 UTC (rev 1531)
+++ trunk/docs/userguide/en/src/main/docbook/included/modalPanel.xml 2007-07-07 13:28:08 UTC (rev 1532)
@@ -429,10 +429,15 @@
<ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/modalPanel.jsf?c=moda..."
>Here</ulink> you can see the example of <emphasis role="bold"
><rich:modalPanel></emphasis> usage and sources for the given example. </para>
- <para>More information about using <emphasis role="bold"
- ><rich:modalPanel></emphasis> could be found <ulink
- url="http://labs.jboss.com/wiki/ModalPanelWizards">here</ulink> and in the <link linkend="Organizewizards">FAQ</link> chapter of the guide.
- </para>
+ <para>Information about wizards using the <emphasis role="bold"
+ ><rich:modalPanel></emphasis> component could be found in the <ulink
+ url="http://labs.jboss.com/wiki/ModalPanelWizards">Wiki article</ulink> and in the <link
+ linkend="Organizewizards">FAQ</link> chapter of the guide. </para>
+ <para>Examples of validation in <emphasis role="bold"><rich:modalPanel></emphasis>
+ could be found in the <ulink url="http://labs.jboss.com/wiki/ModalPanelValidation">Wiki
+ article</ulink> and on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061517"
+ >RichFaces Users Forum</ulink>. </para>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-07-07 13:25:01 UTC (rev 1531)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-07-07 13:28:08 UTC (rev 1532)
@@ -115,7 +115,7 @@
<?dbhtml filename="Organizewizards"?>
<title>How to organize wizards using the <rich:modalPanel> component?</title>
<para>It's necessary to put <emphasis role="bold"
- ><a4j:include></emphasis> inside the <emphasis
+ ><a4j:include></emphasis> inside the <emphasis
role="bold"><rich:modalPanel></emphasis> and perform
navigation inside it, as it's shown in the example below:</para>
<programlisting role="XML"><![CDATA[...
@@ -160,16 +160,19 @@
]]></programlisting>
<para>For information, follow the <ulink
- url="http://labs.jboss.com/wiki/ModalPanelWizards"
- >link</ulink>.</para>
+ url="http://labs.jboss.com/wiki/ModalPanelWizards"
+ >link</ulink>.</para>
</section>
<section>
<?dbhtml filename="Howtopreventmodalpanelfromclosure"?>
<title>How to prevent modalPanel from closing when the validation inside fails?</title>
- <para>The answer could be found <ulink
- url="http://labs.jboss.com/wiki/ModalPanelValidation"
- >here</ulink>.</para>
+ <para>Examples of validation in <emphasis role="bold"
+ ><rich:modalPanel></emphasis> could be found in the
+ <ulink url="http://labs.jboss.com/wiki/ModalPanelValidation">Wiki
+ article</ulink> and on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061517"
+ >RichFaces Users Forum</ulink>. </para>
</section>
<section>
@@ -189,7 +192,8 @@
<?dbhtml filename="DoesRichFacesworkwithfacelets"?>
<title>Does RichFaces work with facelets?</title>
<para>Main <ulink url="http://livedemo.exadel.com/richfaces-demo/"> demo</ulink> of
- RichFaces is a facelets based application. Full Facelets support is one of the main features. So, the answer is yes.</para>
+ RichFaces is a facelets based application. Full Facelets support is one of
+ the main features. So, the answer is yes.</para>
</section>
<!-- <section>
@@ -418,4 +422,4 @@
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059044#..."
>here</ulink>.</para>
</section>
- </chapter>
+</chapter>
17 years, 5 months
JBoss Rich Faces SVN: r1531 - trunk/docs/ajaxguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-07-07 09:25:01 -0400 (Sat, 07 Jul 2007)
New Revision: 1531
Modified:
trunk/docs/ajaxguide/en/src/main/docbook/included/log.xml
Log:
http://jira.jboss.com/jira/browse/RF-414
Modified: trunk/docs/ajaxguide/en/src/main/docbook/included/log.xml
===================================================================
--- trunk/docs/ajaxguide/en/src/main/docbook/included/log.xml 2007-07-06 19:22:46 UTC (rev 1530)
+++ trunk/docs/ajaxguide/en/src/main/docbook/included/log.xml 2007-07-07 13:25:01 UTC (rev 1531)
@@ -60,5 +60,10 @@
attribute on the component. </para>
<para>Example:</para><programlisting role="XML"><![CDATA[<a4j:log level="ALL" popup="false" width="400" height="200"/>]]></programlisting>
<para>The component defined this way is decoded on a page as <emphasis role="bold"><property><div></property></emphasis> inside a page, where all the information beginning with informational message is generated.</para>
+ <note>
+ <title>Note:</title>
+ <para><emphasis role="bold"><a4j:log></emphasis> is getting renewed automatically after execution of ajax requests. Don't renew <emphasis role="bold"><a4j:log></emphasis> by using reRender!</para>
+ </note>
+
</section>
</chapter>
17 years, 5 months
JBoss Rich Faces SVN: r1530 - in branches/3.0.2/richfaces: dataTable/src/main/resources/org/richfaces/renderkit/html/css and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-07-06 15:22:46 -0400 (Fri, 06 Jul 2007)
New Revision: 1530
Modified:
branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/blueSky.skin.properties
branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/classic.skin.properties
branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/deepMarine.skin.properties
branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/emeraldTown.skin.properties
branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/japanCherry.skin.properties
branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/plain.skin.properties
branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/ruby.skin.properties
branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/wine.skin.properties
branches/3.0.2/richfaces/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss
Log:
Remove hard-coded borders from dataTable.
Modified: branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/blueSky.skin.properties
===================================================================
--- branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/blueSky.skin.properties 2007-07-06 17:02:52 UTC (rev 1529)
+++ branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/blueSky.skin.properties 2007-07-06 19:22:46 UTC (rev 1530)
@@ -48,3 +48,4 @@
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#C0C0C0
+tableBorderWidth=1px
Modified: branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/classic.skin.properties
===================================================================
--- branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/classic.skin.properties 2007-07-06 17:02:52 UTC (rev 1529)
+++ branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/classic.skin.properties 2007-07-06 19:22:46 UTC (rev 1530)
@@ -48,5 +48,4 @@
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#C0C0C0
-
-
+tableBorderWidth=1px
Modified: branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/deepMarine.skin.properties
===================================================================
--- branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/deepMarine.skin.properties 2007-07-06 17:02:52 UTC (rev 1529)
+++ branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/deepMarine.skin.properties 2007-07-06 19:22:46 UTC (rev 1530)
@@ -48,7 +48,4 @@
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#C0C0C0
-
-
-
-
+tableBorderWidth=1px
Modified: branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/emeraldTown.skin.properties
===================================================================
--- branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/emeraldTown.skin.properties 2007-07-06 17:02:52 UTC (rev 1529)
+++ branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/emeraldTown.skin.properties 2007-07-06 19:22:46 UTC (rev 1530)
@@ -48,7 +48,4 @@
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#C0C0C0
-
-
-
-
+tableBorderWidth=1px
Modified: branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/japanCherry.skin.properties
===================================================================
--- branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/japanCherry.skin.properties 2007-07-06 17:02:52 UTC (rev 1529)
+++ branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/japanCherry.skin.properties 2007-07-06 19:22:46 UTC (rev 1530)
@@ -48,6 +48,4 @@
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#DFA5A5
-
-
-
+tableBorderWidth=1px
Modified: branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/plain.skin.properties
===================================================================
--- branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/plain.skin.properties 2007-07-06 17:02:52 UTC (rev 1529)
+++ branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/plain.skin.properties 2007-07-06 19:22:46 UTC (rev 1530)
@@ -47,4 +47,5 @@
tableBackgroundColor=#{null}
tableFooterBackgroundColor=#{null}
tableSubfooterBackgroundColor=#{null}
-tableBorderColor=#{null}
\ No newline at end of file
+tableBorderColor=#{null}
+tableBorderWidth=0px
Modified: branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/ruby.skin.properties
===================================================================
--- branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/ruby.skin.properties 2007-07-06 17:02:52 UTC (rev 1529)
+++ branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/ruby.skin.properties 2007-07-06 19:22:46 UTC (rev 1530)
@@ -48,7 +48,4 @@
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#C0C0C0
-
-
-
-
+tableBorderWidth=1px
Modified: branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/wine.skin.properties
===================================================================
--- branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/wine.skin.properties 2007-07-06 17:02:52 UTC (rev 1529)
+++ branches/3.0.2/richfaces/common/src/main/resources/META-INF/skins/wine.skin.properties 2007-07-06 19:22:46 UTC (rev 1530)
@@ -49,6 +49,4 @@
tableFooterBackgroundColor=#cccccc
tableSubfooterBackgroundColor=#f1f1f1
tableBorderColor=#B6AD84
-
-
-
+tableBorderWidth=1px
Modified: branches/3.0.2/richfaces/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss
===================================================================
--- branches/3.0.2/richfaces/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss 2007-07-06 17:02:52 UTC (rev 1529)
+++ branches/3.0.2/richfaces/dataTable/src/main/resources/org/richfaces/renderkit/html/css/table.xcss 2007-07-06 19:22:46 UTC (rev 1530)
@@ -3,22 +3,26 @@
xmlns:u='http:/jsf.exadel.com/template/util'
xmlns="http://www.w3.org/1999/xhtml" >
<u:selector name=".dr-table" >
- <u:style name="border-top" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-top" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
- <u:style name="border-left" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-left" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
<u:style name="background-color" skin="tableBackgroundColor" /> <!--tableBackgroundColor-->
<u:style name="border-collapse" value="collapse" />
</u:selector>
<u:selector name=".dr-table-cell" >
- <u:style name="border-right" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-right" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
- <u:style name="border-bottom" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-bottom" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
<u:style name="padding" value="4px 4px 4px 4px"/>
<u:style name="font-size" skin="generalSizeFont"/> <!--generalSizeFont-->
@@ -28,11 +32,13 @@
</u:selector>
<u:selector name=".dr-subtable-cell" >
- <u:style name="border-right" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-right" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
- <u:style name="border-bottom" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-bottom" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
<u:style name="padding" value="4px 4px 4px 4px"/>
<u:style name="font-size" skin="generalSizeFont"/> <!--generalSizeFont-->
@@ -54,11 +60,13 @@
</u:selector>
<u:selector name=".dr-table-headercell" >
- <u:style name="border-right" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-right" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
- <u:style name="border-bottom" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-bottom" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
<u:style name="padding" value="4px 4px 4px 4px"/>
<u:style name="color" skin="headerTextColor"/> <!--headerTextColor-->
@@ -73,11 +81,13 @@
</u:selector>
<u:selector name=".dr-table-subheadercell" >
- <u:style name="border-right" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-right" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
- <u:style name="border-bottom" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-bottom" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
<u:style name="padding" value="4px 4px 4px 4px"/>
<u:style name="text-align" value="center"/>
@@ -96,11 +106,13 @@
</u:selector>
<u:selector name=".dr-table-footercell" >
- <u:style name="border-right" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-right" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
- <u:style name="border-bottom" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-bottom" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
<u:style name="padding" value="4px 4px 4px 4px"/>
<u:style name="color" skin="generalTextColor"/> <!--headerTextColor-->
@@ -115,11 +127,13 @@
</u:selector>
<u:selector name=".dr-table-subfootercell" >
- <u:style name="border-right" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-right" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
- <u:style name="border-bottom" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-bottom" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
<u:style name="padding" value="4px 4px 4px 4px"/>
<u:style name="text-align" value="left"/>
@@ -143,11 +157,13 @@
</u:selector>
<u:selector name=".dr-subtable-headercell" >
- <u:style name="border-right" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-right" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
- <u:style name="border-bottom" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-bottom" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
<u:style name="padding" value="4px 4px 4px 4px"/>
<u:style name="text-align" value="center"/>
@@ -162,11 +178,13 @@
</u:selector>
<u:selector name=".dr-subtable-footercell" >
- <u:style name="border-right" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-right" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
- <u:style name="border-bottom" value="1px solid"> <!--tableBorderColor-->
- <f:verbatim skin="tableBorderColor" />
+ <u:style name="border-bottom" value="solid"> <!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
</u:style>
<u:style name="padding" value="4px 4px 4px 4px"/>
<u:style name="text-align" value="left"/>
17 years, 5 months
JBoss Rich Faces SVN: r1529 - in branches/3.0.2/richfaces/modal-panel/src/main: java/org/richfaces/component and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-07-06 13:02:52 -0400 (Fri, 06 Jul 2007)
New Revision: 1529
Modified:
branches/3.0.2/richfaces/modal-panel/src/main/config/component/modalPanel.xml
branches/3.0.2/richfaces/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java
branches/3.0.2/richfaces/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
branches/3.0.2/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
branches/3.0.2/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-69
Modified: branches/3.0.2/richfaces/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- branches/3.0.2/richfaces/modal-panel/src/main/config/component/modalPanel.xml 2007-07-06 16:30:51 UTC (rev 1528)
+++ branches/3.0.2/richfaces/modal-panel/src/main/config/component/modalPanel.xml 2007-07-06 17:02:52 UTC (rev 1529)
@@ -176,7 +176,7 @@
<defaultvalue>false</defaultvalue>
</property>
<property>
- <name>keepState</name>
+ <name>keepVisualState</name>
<classname>boolean</classname>
<description>
</description>
Modified: branches/3.0.2/richfaces/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java
===================================================================
--- branches/3.0.2/richfaces/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java 2007-07-06 16:30:51 UTC (rev 1528)
+++ branches/3.0.2/richfaces/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java 2007-07-06 17:02:52 UTC (rev 1529)
@@ -21,7 +21,10 @@
package org.richfaces.component;
-import javax.faces.component.UIComponentBase;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
import org.ajax4jsf.framework.skin.Skin;
@@ -31,12 +34,14 @@
* JSF component class
*
*/
-public abstract class UIModalPanel extends UIComponentBase {
+public abstract class UIModalPanel extends UIInput {
public static final String COMPONENT_TYPE = "org.richfaces.ModalPanel";
private static final String COMPONENT_FAMILY = "org.richfaces.ModalPanel";
+ private Map visualOptions;
+
/**
* Shadow depth.
*/
@@ -72,8 +77,8 @@
public abstract boolean isShowWhenRendered();
public abstract void setShowWhenRendered(boolean opened);
- public abstract boolean isKeepState();
- public abstract void setKeepState(boolean keepState);
+ public abstract boolean isKeepVisualState();
+ public abstract void setKeepVisualState(boolean keepVisualState);
public boolean getRendersChildren() {
return true;
@@ -111,4 +116,13 @@
return shadowStyle;
}
+
+ public Map getVisualOptions() {
+ if (null == visualOptions)
+ visualOptions = new HashMap();
+ return visualOptions;
+ }
+ public void setVisualOptions(Map visualOptions) {
+ this.visualOptions = visualOptions;
+ }
}
Modified: branches/3.0.2/richfaces/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
===================================================================
--- branches/3.0.2/richfaces/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java 2007-07-06 16:30:51 UTC (rev 1528)
+++ branches/3.0.2/richfaces/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java 2007-07-06 17:02:52 UTC (rev 1529)
@@ -22,8 +22,11 @@
package org.richfaces.renderkit;
import java.io.IOException;
+import java.util.Iterator;
import java.util.Map;
+import java.util.Set;
+import javax.faces.component.UIComponent;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.servlet.ServletContext;
@@ -39,17 +42,44 @@
* created 13.02.2007
*
*/
-public class ModalPanelRendererBase extends AjaxComponentRendererBase {
+public class ModalPanelRendererBase extends InputRendererBase {
//TODO nick - set sizeA to actual min value
private static final int sizeA = 10;
+ private static final String STATE_OPTION_SUFFIX = "StateOption_";
+
protected String[] RESIZERS = new String[] {
"NWU", "N", "NEU", "NEL", "E",
"SEU", "SEL", "S", "SWL",
"SWU", "W", "NWL"
};
+ protected void doDecode(FacesContext context, UIComponent component) {
+ super.doDecode(context, component);
+
+ UIModalPanel panel = (UIModalPanel)component;
+ ExternalContext exCtx = context.getExternalContext();
+ Map rqMap = exCtx.getRequestParameterMap();
+ Object clnId = rqMap.get(panel.getClientId(context) + "OpenedState");
+
+ if (panel.isKeepVisualState()) {
+ if (null != clnId) {
+ panel.setShowWhenRendered(new Boolean((String) clnId).booleanValue());
+
+ Iterator it = rqMap.entrySet().iterator();
+ while ( it.hasNext()) {
+ Map.Entry entry = (Map.Entry)it.next();
+ int suffixPos = entry.getKey().toString().indexOf(STATE_OPTION_SUFFIX);
+ if (-1 != suffixPos) {
+ String key = entry.getKey().toString().substring(suffixPos + STATE_OPTION_SUFFIX.length());
+ panel.getVisualOptions().put(key, entry.getValue());
+ }
+ }
+ }
+ }
+ }
+
protected Class getComponentClass() {
return UIModalPanel.class;
}
@@ -101,26 +131,20 @@
public String getShowScript(FacesContext context, UIModalPanel panel) {
StringBuffer result = new StringBuffer();
- ExternalContext exCtx = context.getExternalContext();
- Map rqMap = exCtx.getRequestParameterMap();
- Object clnId = rqMap.get(panel.getClientId(context) + "OpenedState");
-
- if (panel.isKeepState()) {
- if (null != clnId) {
- boolean opened = new Boolean((String) clnId).booleanValue();
- panel.setShowWhenRendered(opened);
- if (opened) {
- result.append("Richfaces.showModalPanel('" + panel.getClientId(context) + "');");
- }
- } else {
- if (panel.isShowWhenRendered()) {
- result.append("Richfaces.showModalPanel('" + panel.getClientId(context) + "');");
- }
- }
- } else {
- if (null == clnId && panel.isShowWhenRendered()) {
- result.append("Richfaces.showModalPanel('" + panel.getClientId(context) + "');");
+ if (panel.isKeepVisualState() && panel.isShowWhenRendered()) {
+ result.append("Richfaces.showModalPanel('" + panel.getClientId(context) + "', {");
+
+ Iterator it = panel.getVisualOptions().entrySet().iterator();
+ while (it.hasNext()) {
+ Map.Entry entry = (Map.Entry)it.next();
+
+ result.append(entry.getKey() + ": '" + entry.getValue() + "'");
+ if (it.hasNext()) {
+ result.append(", ");
+ }
}
+
+ result.append("});");
}
return result.toString();
}
Modified: branches/3.0.2/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- branches/3.0.2/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-07-06 16:30:51 UTC (rev 1528)
+++ branches/3.0.2/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-07-06 17:02:52 UTC (rev 1529)
@@ -358,10 +358,11 @@
}
var forms = this.cdiv.getElementsByTagName("form");
- if (forms) {
- this.formOnload = this.setStateInput.bindAsEventListener(this);
+
+ if (this.options.keepVisualState && forms) {
+ this.formOnsubmit = this.setStateInput.bindAsEventListener(this);
for (var i = 0; i < forms.length; i++) {
- Event.observe(forms[i], "submit", this.formOnload);
+ Event.observe(forms[i], "submit", this.formOnsubmit);
}
}
@@ -388,16 +389,18 @@
Object.extend(options, opts);
}
+ Object.extend(this.options, options);
+
if (options.width) {
if (this.minWidth > options.width) {
options.width = this.minWidth;
}
if (this.iframe) {
- this.iframe.style.width = options.width + 'px';
+ this.iframe.style.width = options.width + (/px/.test(options.width) ? '' : 'px');
}
- this.contentDiv.style.width = options.width + 'px';
- this.shadowDiv.style.width = options.width + 'px';
+ this.contentDiv.style.width = options.width + (/px/.test(options.width) ? '' : 'px');
+ this.shadowDiv.style.width = options.width + (/px/.test(options.width) ? '' : 'px');
}
if (options.height) {
@@ -406,10 +409,10 @@
}
if (this.iframe) {
- this.iframe.style.height = options.height + 'px';
+ this.iframe.style.height = options.height + (/px/.test(options.height) ? '' : 'px');
}
- this.contentDiv.style.height = options.height + 'px';
- this.shadowDiv.style.height = options.height + 'px';
+ this.contentDiv.style.height = options.height + (/px/.test(options.height) ? '' : 'px');
+ this.shadowDiv.style.height = options.height + (/px/.test(options.height) ? '' : 'px');
}
if (options.left) {
@@ -530,7 +533,7 @@
hide: function(opts) {
this.restoreFocus();
- this.traverseSelects(true);
+ this.traverseSelects(true);
if (this.div.style.removeExpression) {
this.div.style.removeExpression("width");
@@ -560,6 +563,13 @@
var event = {};
event.parameters = opts || {};
if (this.eventOnHide) this.eventOnHide(event);
+
+ var forms = this.cdiv.getElementsByTagName("form");
+ if (this.options.keepVisualState && forms) {
+ for (var i = 0; i < forms.length; i++) {
+ Event.stopObserving(forms[i], "submit", this.formOnsubmit);
+ }
+ }
this.shown = false;
},
@@ -608,6 +618,7 @@
newPos += diff.deltaX;
this.cdiv.mpLeft = newPos;
+ cssHash.left = newPos + 'px';
} else {
newPos = Richfaces.getComputedStyleSize(this.cdiv, "left");
newPos += diff.deltaX;
@@ -648,6 +659,7 @@
newPos += diff.deltaY;
this.cdiv.mpTop = newPos;
+ cssHash.top = newPos + 'px';
} else {
newPos = Richfaces.getComputedStyleSize(this.cdiv, "top");
newPos += diff.deltaY;
@@ -662,6 +674,9 @@
if (this.iframe) {
Element.setStyle(this.iframe, cssHashWH);
}
+
+ Object.extend(this.options, cssHash);
+ Object.extend(this.options, cssHashWH);
var w = this.context.width();
var h = this.context.height();
@@ -689,14 +704,28 @@
},
setStateInput: function(e) {
- if (e && e.target) {
+ var target = e.target ? e.target : e.srcElement;
+ if (e && target) {
var input = document.createElement("input");
input.type = "hidden";
input.id = this.markerId.id + "OpenedState";
input.name = this.markerId.id + "OpenedState";
input.value = this.shown ? "true" : "false";
+ target.appendChild(input);
- e.target.appendChild(input);
+ var keys = $H(this.options).keys();
+ if (keys) {
+ for (var i = 0; i < keys.length; i++) {
+ input = document.createElement("input");
+ input.type = "hidden";
+ input.id = this.markerId.id + "StateOption_" + keys[i];
+ input.name = this.markerId.id + "StateOption_" + keys[i];
+ input.value = this.options[keys[i]];
+ target.appendChild(input);
+
+ }
+ }
+
return true;
}
}
Modified: branches/3.0.2/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- branches/3.0.2/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-07-06 16:30:51 UTC (rev 1528)
+++ branches/3.0.2/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-07-06 17:02:52 UTC (rev 1529)
@@ -134,7 +134,7 @@
onshow: #{onshow},
onhide: #{onhide},
- keepState: #{component.keepState},
+ keepVisualState: #{component.keepVisualState},
showWhenRendered: #{component.showWhenRendered}
});
</script>
17 years, 5 months
JBoss Rich Faces SVN: r1528 - trunk/samples/tree-demo/src/main/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-07-06 12:30:51 -0400 (Fri, 06 Jul 2007)
New Revision: 1528
Modified:
trunk/samples/tree-demo/src/main/java/org/richfaces/Bean.java
trunk/samples/tree-demo/src/main/java/org/richfaces/Library.java
trunk/samples/tree-demo/src/main/java/org/richfaces/Organism.java
trunk/samples/tree-demo/src/main/java/org/richfaces/Pathway.java
Log:
tree-demo made compilable
Modified: trunk/samples/tree-demo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/samples/tree-demo/src/main/java/org/richfaces/Bean.java 2007-07-06 16:16:01 UTC (rev 1527)
+++ trunk/samples/tree-demo/src/main/java/org/richfaces/Bean.java 2007-07-06 16:30:51 UTC (rev 1528)
@@ -33,16 +33,16 @@
import javax.faces.context.FacesContext;
import javax.faces.event.FacesEvent;
-import org.ajax4jsf.dnd.event.DropEvent;
-import org.ajax4jsf.framework.ajax.AjaxContext;
-import org.richfaces.component.ListRowKey;
-import org.richfaces.component.TreeNode;
-import org.richfaces.component.TreeNodeImpl;
-import org.richfaces.component.TreeRowKey;
+import org.richfaces.event.DropEvent;
+import org.ajax4jsf.context.AjaxContext;
+import org.richfaces.model.ListRowKey;
+import org.richfaces.model.TreeNode;
+import org.richfaces.model.TreeNodeImpl;
+import org.richfaces.model.TreeRowKey;
import org.richfaces.component.UITree;
import org.richfaces.component.UITreeNode;
-import org.richfaces.component.events.NodeExpandedEvent;
-import org.richfaces.component.events.NodeSelectedEvent;
+import org.richfaces.event.NodeExpandedEvent;
+import org.richfaces.event.NodeSelectedEvent;
import org.richfaces.component.xml.XmlTreeDataBuilder;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
Modified: trunk/samples/tree-demo/src/main/java/org/richfaces/Library.java
===================================================================
--- trunk/samples/tree-demo/src/main/java/org/richfaces/Library.java 2007-07-06 16:16:01 UTC (rev 1527)
+++ trunk/samples/tree-demo/src/main/java/org/richfaces/Library.java 2007-07-06 16:30:51 UTC (rev 1528)
@@ -1,6 +1,6 @@
package org.richfaces;
-import org.richfaces.component.TreeNode;
+import org.richfaces.model.TreeNode;
import java.util.HashMap;
import java.util.Iterator;
Modified: trunk/samples/tree-demo/src/main/java/org/richfaces/Organism.java
===================================================================
--- trunk/samples/tree-demo/src/main/java/org/richfaces/Organism.java 2007-07-06 16:16:01 UTC (rev 1527)
+++ trunk/samples/tree-demo/src/main/java/org/richfaces/Organism.java 2007-07-06 16:30:51 UTC (rev 1528)
@@ -1,6 +1,6 @@
package org.richfaces;
-import org.richfaces.component.TreeNode;
+import org.richfaces.model.TreeNode;
import java.util.Iterator;
import java.util.ArrayList;
Modified: trunk/samples/tree-demo/src/main/java/org/richfaces/Pathway.java
===================================================================
--- trunk/samples/tree-demo/src/main/java/org/richfaces/Pathway.java 2007-07-06 16:16:01 UTC (rev 1527)
+++ trunk/samples/tree-demo/src/main/java/org/richfaces/Pathway.java 2007-07-06 16:30:51 UTC (rev 1528)
@@ -1,6 +1,6 @@
package org.richfaces;
-import org.richfaces.component.TreeNode;
+import org.richfaces.model.TreeNode;
import java.util.HashMap;
import java.util.Map;
17 years, 5 months
JBoss Rich Faces SVN: r1527 - branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/json.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-07-06 12:16:01 -0400 (Fri, 06 Jul 2007)
New Revision: 1527
Modified:
branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js
Log:
fixes
Modified: branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js
===================================================================
--- branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js 2007-07-06 16:03:27 UTC (rev 1526)
+++ branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js 2007-07-06 16:16:01 UTC (rev 1527)
@@ -83,7 +83,8 @@
//ET.prototype = new JSNode();
ET.prototype.getContent = function(context) {
var value = this.value;
- if (value && value.getContent) {
+ if (typeof value=="function") value=value(context);
+ if (value && value.getContent) {
value = value.getContent(context);
}
@@ -100,9 +101,7 @@
T.prototype = new JSNode();
T.prototype.getContent = function(context) {
var value = this.value;
- if (value && value.getContent) {
- value = value.getContent(context);
- }
+ if (typeof value=="function") value=value(context);
if (value) return this.xmlEscape(value);
17 years, 5 months
JBoss Rich Faces SVN: r1526 - branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-07-06 12:03:27 -0400 (Fri, 06 Jul 2007)
New Revision: 1526
Modified:
branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
Log:
Modified: branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
--- branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2007-07-06 16:01:55 UTC (rev 1525)
+++ branches/3.0.2/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2007-07-06 16:03:27 UTC (rev 1526)
@@ -104,15 +104,35 @@
var value = '';
try {
- with (object) {
- value = eval(template);
+ value = object.eval(template);
if (typeof value == 'function') {
value = value(object);
}
- }
} catch (e) {
LOG.warn('Exception: ' + e.message + '\n[' + template + ']');
}
return value;
};
+
+Richfaces.VARIABLE_NAME_PATTERN = /^\s*[_,A-Z,a-z][\w,_]*\s*$/;
+
+Richfaces.evalMacro = function(template, object)
+{
+ var value="";
+ if (Richfaces.VARIABLE_NAME_PATTERN.test(template))
+ {
+ value = object[template];
+ if (!value) {value=window[template]; if (!value) value="";}
+ } else
+ {
+ try { value=object.eval(template); } catch (e) { LOG.warn("Exception: "+e.Message + "\n[" + template + "]"); }
+ }
+ return value;
+}
+Richfaces.evalSimpleMacro = function(template, object)
+{
+ var value = object[template];
+ if (!value) {value=window[template]; if (!value) value="";}
+ return value;
+}
17 years, 5 months