JBoss Rich Faces SVN: r14785 - in branches/community/3.3.X/samples/richfaces-demo/src/main: webapp/richfaces/dataTableScroller/examples and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2009-07-06 07:53:11 -0400 (Mon, 06 Jul 2009)
New Revision: 14785
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTableScroller/examples/customScroller.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-7163
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2009-07-06 11:43:36 UTC (rev 14784)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2009-07-06 11:53:11 UTC (rev 14785)
@@ -138,8 +138,6 @@
for (int i = 1; i <= allCars.size() / getRows()+1; i++) {
if (Math.abs(i - scrollerPage) < 5) {
SelectItem item = new SelectItem(i);
- if (scrollerPage == i)
- item.setDisabled(true);
list.add(item);
}
}
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTableScroller/examples/customScroller.xhtml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTableScroller/examples/customScroller.xhtml 2009-07-06 11:43:36 UTC (rev 14784)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTableScroller/examples/customScroller.xhtml 2009-07-06 11:53:11 UTC (rev 14785)
@@ -72,8 +72,8 @@
</f:facet>
<f:facet name="pages">
<h:panelGroup>
- <h:outputText value="Page " />
- <h:selectOneMenu value="#{dataTableScrollerBean.scrollerPage}"
+ <h:outputText value="Page "/>
+ <h:selectOneMenu value="#{dataTableScrollerBean.scrollerPage}"
onchange="#{rich:component('ds')}.switchToPage(this.value)">
<f:selectItems value="#{dataTableScrollerBean.pagesToScroll}" />
</h:selectOneMenu>
15 years, 5 months
JBoss Rich Faces SVN: r14784 - branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2009-07-06 07:43:36 -0400 (Mon, 06 Jul 2009)
New Revision: 14784
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
Log:
https://jira.jboss.org/jira/browse/RF-7161
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2009-07-06 11:16:04 UTC (rev 14783)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2009-07-06 11:43:36 UTC (rev 14784)
@@ -63,7 +63,7 @@
private SortOrder order = new SortOrder();
- private int scrollerPage;
+ private int scrollerPage=1;
private ArrayList<DemoInventoryItem[]> model = null;
@@ -135,7 +135,7 @@
public List<SelectItem> getPagesToScroll() {
List<SelectItem> list = new ArrayList<SelectItem>();
- for (int i = 0; i <= allCars.size() / getRows(); i++) {
+ for (int i = 1; i <= allCars.size() / getRows()+1; i++) {
if (Math.abs(i - scrollerPage) < 5) {
SelectItem item = new SelectItem(i);
if (scrollerPage == i)
15 years, 5 months
JBoss Rich Faces SVN: r14783 - in branches/community/3.3.X/samples/richfaces-demo/src/main: webapp/richfaces/dataTable and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2009-07-06 07:16:04 -0400 (Mon, 06 Jul 2009)
New Revision: 14783
Modified:
branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/editDataTable.xhtml
branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/editTable.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-7469
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2009-07-06 11:02:17 UTC (rev 14782)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2009-07-06 11:16:04 UTC (rev 14783)
@@ -12,6 +12,8 @@
import java.util.Random;
import java.util.Set;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
import org.richfaces.component.UIScrollableDataTable;
@@ -21,16 +23,15 @@
import org.richfaces.model.selection.SimpleSelection;
/**
- * @author Nick Belaevski - nbelaevski(a)exadel.com
- * created 02.03.2007
+ * @author Nick Belaevski - nbelaevski(a)exadel.com created 02.03.2007
*
*/
public class DataTableScrollerBean {
-
- private DemoInventoryItem currentItem = new DemoInventoryItem();
+ private DemoInventoryItem currentItem = new DemoInventoryItem();
+
private int rows = 10;
-
+
public int getRows() {
return rows;
}
@@ -39,74 +40,91 @@
this.rows = rows;
}
+ public void fetchCurrentRow(ActionEvent event) {
+ String vin=(FacesContext.getCurrentInstance().
+ getExternalContext().getRequestParameterMap().get("vin"));
+ currentRow = Integer.parseInt(FacesContext.getCurrentInstance().
+ getExternalContext().getRequestParameterMap().get("row"));
+ for (DemoInventoryItem item : allCars) {
+ if (item.getVin().equals(vin)){
+ currentItem=item;
+ break;
+ }
+ }
+ }
+
private Set<Integer> keys = new HashSet<Integer>();
-
- private int currentRow;
-
+
+ private int currentRow;
+
private SimpleSelection selection = new SimpleSelection();
-
+
private UIScrollableDataTable table;
-
+
private SortOrder order = new SortOrder();
-
+
private int scrollerPage;
-
+
private ArrayList<DemoInventoryItem[]> model = null;
-
+
private ArrayList<DemoInventoryItem> selectedCars = new ArrayList<DemoInventoryItem>();
- private ArrayList<Facet> columns = new ArrayList<Facet>();
+ private ArrayList<Facet> columns = new ArrayList<Facet>();
private static int DECIMALS = 1;
private static int ROUNDING_MODE = BigDecimal.ROUND_HALF_UP;
-
- private List <DemoInventoryItem> allCars = null;
+ private List<DemoInventoryItem> allCars = null;
+
public DataTableScrollerBean() {
initColumnsHeaders();
- SortField[] fields = {new SortField("make", true)};
+ SortField[] fields = { new SortField("make", true) };
order.setFields(fields);
}
-
- public List <DemoInventoryItem> getAllCars() {
+
+ public List<DemoInventoryItem> getAllCars() {
synchronized (this) {
if (allCars == null) {
allCars = new ArrayList<DemoInventoryItem>();
for (int k = 0; k <= 5; k++) {
- try{
+ try {
switch (k) {
case 0:
- allCars.addAll(createCar("Chevrolet","Corvette", 5));
- allCars.addAll(createCar("Chevrolet","Malibu", 8));
- allCars.addAll(createCar("Chevrolet","S-10", 10));
- allCars.addAll(createCar("Chevrolet","Tahoe", 6));
+ allCars
+ .addAll(createCar("Chevrolet", "Corvette",
+ 5));
+ allCars.addAll(createCar("Chevrolet", "Malibu", 8));
+ allCars.addAll(createCar("Chevrolet", "S-10", 10));
+ allCars.addAll(createCar("Chevrolet", "Tahoe", 6));
break;
case 1:
- allCars.addAll(createCar("Ford","Taurus", 12));
- allCars.addAll(createCar("Ford","Explorer", 11));
+ allCars.addAll(createCar("Ford", "Taurus", 12));
+ allCars.addAll(createCar("Ford", "Explorer", 11));
break;
case 2:
- allCars.addAll(createCar("Nissan","Maxima", 9));
+ allCars.addAll(createCar("Nissan", "Maxima", 9));
break;
case 3:
- allCars.addAll(createCar("Toyota","4-Runner", 7));
- allCars.addAll(createCar("Toyota","Camry", 15));
- allCars.addAll(createCar("Toyota","Avalon", 13));
+ allCars.addAll(createCar("Toyota", "4-Runner", 7));
+ allCars.addAll(createCar("Toyota", "Camry", 15));
+ allCars.addAll(createCar("Toyota", "Avalon", 13));
break;
case 4:
- allCars.addAll(createCar("GMC","Sierra", 8));
- allCars.addAll(createCar("GMC","Yukon", 10));
+ allCars.addAll(createCar("GMC", "Sierra", 8));
+ allCars.addAll(createCar("GMC", "Yukon", 10));
break;
case 5:
- allCars.addAll(createCar("Infiniti","G35", 6));
+ allCars.addAll(createCar("Infiniti", "G35", 6));
break;
- /*case 6:
- allCars.addAll(createCar("UAZ","469", 6));
- break;*/
+ /*
+ * case 6: allCars.addAll(createCar("UAZ","469", 6));
+ * break;
+ */
default:
break;
}
- }catch(Exception e){
- System.out.println("!!!!!!loadAllCars Error: " + e.getMessage());
+ } catch (Exception e) {
+ System.out.println("!!!!!!loadAllCars Error: "
+ + e.getMessage());
e.printStackTrace();
}
}
@@ -117,74 +135,85 @@
public List<SelectItem> getPagesToScroll() {
List<SelectItem> list = new ArrayList<SelectItem>();
- for (int i = 0; i <=allCars.size()/getRows(); i++) {
- if (Math.abs(i-scrollerPage) < 5){
+ for (int i = 0; i <= allCars.size() / getRows(); i++) {
+ if (Math.abs(i - scrollerPage) < 5) {
SelectItem item = new SelectItem(i);
- if (scrollerPage==i) item.setDisabled(true);
+ if (scrollerPage == i)
+ item.setDisabled(true);
list.add(item);
- }
+ }
}
return list;
}
public List<DemoInventoryItem> getTenRandomCars() {
List<DemoInventoryItem> result = new ArrayList<DemoInventoryItem>();
- int size = getAllCars().size()-1;
+ int size = getAllCars().size() - 1;
for (int i = 0; i < 10; i++) {
result.add(getAllCars().get(rand(1, size)));
}
return result;
}
-
+
public int genRand() {
- return rand(1,10000);
+ return rand(1, 10000);
}
- public List <DemoInventoryItem> createCar(String make, String model, int count){
+ public List<DemoInventoryItem> createCar(String make, String model,
+ int count) {
- ArrayList <DemoInventoryItem> iiList = null;
+ ArrayList<DemoInventoryItem> iiList = null;
- try{
+ try {
int arrayCount = count;
DemoInventoryItem[] demoInventoryItemArrays = new DemoInventoryItem[arrayCount];
- for (int j = 0; j < demoInventoryItemArrays.length; j++){
+ for (int j = 0; j < demoInventoryItemArrays.length; j++) {
DemoInventoryItem ii = new DemoInventoryItem();
ii.setMake(make);
ii.setModel(model);
- ii.setStock(randomstring(6,7));
- ii.setVin(randomstring(14,15));
- ii.setMileage(new BigDecimal(rand(5000,80000)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setMileageMarket(new BigDecimal(rand(25000,45000)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setPrice(new Integer(rand(15000,55000)));
- ii.setPriceMarket(new BigDecimal(rand(15000,55000)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setDaysLive(rand(1,90));
- ii.setChangeSearches(new BigDecimal(rand(0,5)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setChangePrice(new BigDecimal(rand(0,5)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setExposure(new BigDecimal(rand(0,5)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setActivity(new BigDecimal(rand(0,5)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setPrinted(new BigDecimal(rand(0,5)).setScale(DECIMALS, ROUNDING_MODE));
- ii.setInquiries(new BigDecimal(rand(0,5)).setScale(DECIMALS, ROUNDING_MODE));
+ ii.setStock(randomstring(6, 7));
+ ii.setVin(randomstring(14, 15));
+ ii.setMileage(new BigDecimal(rand(5000, 80000)).setScale(
+ DECIMALS, ROUNDING_MODE));
+ ii.setMileageMarket(new BigDecimal(rand(25000, 45000))
+ .setScale(DECIMALS, ROUNDING_MODE));
+ ii.setPrice(new Integer(rand(15000, 55000)));
+ ii.setPriceMarket(new BigDecimal(rand(15000, 55000)).setScale(
+ DECIMALS, ROUNDING_MODE));
+ ii.setDaysLive(rand(1, 90));
+ ii.setChangeSearches(new BigDecimal(rand(0, 5)).setScale(
+ DECIMALS, ROUNDING_MODE));
+ ii.setChangePrice(new BigDecimal(rand(0, 5)).setScale(DECIMALS,
+ ROUNDING_MODE));
+ ii.setExposure(new BigDecimal(rand(0, 5)).setScale(DECIMALS,
+ ROUNDING_MODE));
+ ii.setActivity(new BigDecimal(rand(0, 5)).setScale(DECIMALS,
+ ROUNDING_MODE));
+ ii.setPrinted(new BigDecimal(rand(0, 5)).setScale(DECIMALS,
+ ROUNDING_MODE));
+ ii.setInquiries(new BigDecimal(rand(0, 5)).setScale(DECIMALS,
+ ROUNDING_MODE));
demoInventoryItemArrays[j] = ii;
}
- iiList = new ArrayList<DemoInventoryItem>(Arrays.asList(demoInventoryItemArrays));
+ iiList = new ArrayList<DemoInventoryItem>(Arrays
+ .asList(demoInventoryItemArrays));
- }catch(Exception e){
+ } catch (Exception e) {
System.out.println("!!!!!!createCategory Error: " + e.getMessage());
e.printStackTrace();
}
return iiList;
}
- public static int rand(int lo, int hi)
- {
+ public static int rand(int lo, int hi) {
Random rn2 = new Random();
- //System.out.println("**" + lo);
- //System.out.println("**" + hi);
+ // System.out.println("**" + lo);
+ // System.out.println("**" + hi);
int n = hi - lo + 1;
int i = rn2.nextInt() % n;
if (i < 0)
@@ -192,12 +221,11 @@
return lo + i;
}
- public static String randomstring(int lo, int hi)
- {
+ public static String randomstring(int lo, int hi) {
int n = rand(lo, hi);
byte b[] = new byte[n];
for (int i = 0; i < n; i++)
- b[i] = (byte)rand('A', 'Z');
+ b[i] = (byte) rand('A', 'Z');
return new String(b);
}
@@ -208,18 +236,19 @@
public void setSelection(SimpleSelection selection) {
this.selection = selection;
}
-
+
public String takeSelection() {
getSelectedCars().clear();
- if (getSelection().isSelectAll()){
+ if (getSelection().isSelectAll()) {
getSelectedCars().addAll(allCars);
- }else{
+ } else {
Iterator<Object> iterator = getSelection().getKeys();
- while (iterator.hasNext()){
+ while (iterator.hasNext()) {
Object key = iterator.next();
table.setRowKey(key);
if (table.isRowAvailable()) {
- getSelectedCars().add((DemoInventoryItem) table.getRowData());
+ getSelectedCars().add(
+ (DemoInventoryItem) table.getRowData());
}
}
}
@@ -241,42 +270,42 @@
public void setTable(UIScrollableDataTable table) {
this.table = table;
}
-
- public void initColumnsHeaders(){
+
+ public void initColumnsHeaders() {
columns.clear();
String header;
- String footer="";
+ String footer = "";
header = "Chevrolet";
- Facet facet = new Facet(header ,footer);
+ Facet facet = new Facet(header, footer);
columns.add(facet);
header = "Ford";
- facet = new Facet(header ,footer);
+ facet = new Facet(header, footer);
columns.add(facet);
header = "Nissan";
- facet = new Facet(header ,footer);
+ facet = new Facet(header, footer);
columns.add(facet);
header = "Toyota";
- facet = new Facet(header ,footer);
+ facet = new Facet(header, footer);
columns.add(facet);
header = "GMC";
- facet = new Facet(header ,footer);
+ facet = new Facet(header, footer);
columns.add(facet);
header = "Infiniti";
- facet = new Facet(header ,footer);
+ facet = new Facet(header, footer);
columns.add(facet);
}
-
+
public ArrayList<DemoInventoryItem[]> getModel() {
- if (model == null){
+ if (model == null) {
model = new ArrayList<DemoInventoryItem[]>();
for (int i = 0; i < 9; i++) {
DemoInventoryItem[] items = new DemoInventoryItem[6];
- items[0]=createCar("Chevrolet","Corvette", 1).get(0);
- items[1]=createCar("Ford","Explorer", 1).get(0);
- items[2]=createCar("Nissan","Maxima", 1).get(0);
- items[3]=createCar("Toyota","Camry", 1).get(0);
- items[4]=createCar("GMC","Yukon", 1).get(0);
- items[5]=createCar("Infiniti","G35", 1).get(0);
+ items[0] = createCar("Chevrolet", "Corvette", 1).get(0);
+ items[1] = createCar("Ford", "Explorer", 1).get(0);
+ items[2] = createCar("Nissan", "Maxima", 1).get(0);
+ items[3] = createCar("Toyota", "Camry", 1).get(0);
+ items[4] = createCar("GMC", "Yukon", 1).get(0);
+ items[5] = createCar("Infiniti", "G35", 1).get(0);
model.add(items);
}
}
@@ -336,5 +365,5 @@
public void setKeys(Set<Integer> keys) {
this.keys = keys;
}
-
+
}
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/editDataTable.xhtml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/editDataTable.xhtml 2009-07-06 11:02:17 UTC (rev 14782)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/editDataTable.xhtml 2009-07-06 11:16:04 UTC (rev 14783)
@@ -7,14 +7,14 @@
xmlns:rich="http://richfaces.org/rich">
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
-
-
-
<p>
In this example you could see two basic and frequently asked use-cases
implemented. Here is editing and deleting of the table cells via modal panel component.
</p>
-
+ <p>
+ Additionally to the buttons in the last column you could use
+ context menu to call <i>delete/edit</i> dialog.
+ </p>
<fieldset class="demo_fieldset">
<legend class="demo_legend">DataTable Column/ColumnGroup example</legend>
<div class="sample-container">
Modified: branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/editTable.xhtml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/editTable.xhtml 2009-07-06 11:02:17 UTC (rev 14782)
+++ branches/community/3.3.X/samples/richfaces-demo/src/main/webapp/richfaces/dataTable/examples/editTable.xhtml 2009-07-06 11:16:04 UTC (rev 14783)
@@ -4,76 +4,101 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
-
+ <style>
+.active-row {
+ background-color: #FFEBDA;
+}
+</style>
<h:form>
+ <script type="text/javascript">
+ var row;
+ </script>
+ <rich:contextMenu attached="false" id="menu" submitMode="ajax" oncollapse="row.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
+ <rich:menuItem value="Edit Record" ajaxSingle="true"
+ oncomplete="#{rich:component('editPanel')}.show()"
+ actionListener="#{dataTableScrollerBean.fetchCurrentRow}">
+ <a4j:actionparam name="vin" value="{carVin}" />
+ <a4j:actionparam name="row" value="{currentRow}" />
+ </rich:menuItem>
+ <rich:menuItem value="Remove Record" ajaxSingle="true"
+ oncomplete="#{rich:component('deletePanel')}.show()"
+ actionListener="#{dataTableScrollerBean.fetchCurrentRow}">
+ <a4j:actionparam name="vin" value="{carVin}" />
+ <a4j:actionparam name="row" value="{currentRow}" />
+ </rich:menuItem>
+ </rich:contextMenu>
<a4j:region>
- <rich:dataTable value="#{dataTableScrollerBean.allCars}"
- var="category" rows="20" rowKeyVar="row"
- ajaxKeys="#{dataTableScrollerBean.keys}" id="table">
- <f:facet name="header">
- <h:outputText value="Cars Store"/>
- </f:facet>
- <rich:column>
+ <rich:dataTable value="#{dataTableScrollerBean.allCars}"
+ var="category" rows="20" rowKeyVar="row"
+ ajaxKeys="#{dataTableScrollerBean.keys}" id="table"
+ onRowContextMenu="if (row) row.style.backgroundColor='#{a4jSkin.tableBackgroundColor}';
+ this.style.backgroundColor='#F1F1F1'; row=this;
+ #{rich:component('menu')}.show(event,{carVin:'#{category.vin}', currentRow:'#{row}'});
+ return false;">
<f:facet name="header">
- <h:outputText value="Make" />
+ <h:outputText value="Cars Store" />
</f:facet>
- <h:outputText value="#{category.make}" id="make" />
- </rich:column>
- <rich:column>
- <f:facet name="header">
- <h:outputText value="Model" />
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Make" />
+ </f:facet>
+ <h:outputText value="#{category.make}" id="make" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
+ </f:facet>
+ <h:outputText value="#{category.model}" id="model" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{category.price}" id="price" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Mileage" />
+ </f:facet>
+ <h:outputText value="#{category.mileage}" />
+ </rich:column>
+ <rich:column width="200px">
+ <f:facet name="header">
+ <h:outputText value="VIN" />
+ </f:facet>
+ <h:outputText value="#{category.vin}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Stock" />
+ </f:facet>
+ <h:outputText value="#{category.stock}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ Actions
</f:facet>
- <h:outputText value="#{category.model}" id="model" />
- </rich:column>
- <rich:column>
- <f:facet name="header">
- <h:outputText value="Price" />
+ <a4j:commandLink ajaxSingle="true" id="editlink"
+ oncomplete="#{rich:component('editPanel')}.show()">
+ <h:graphicImage value="/images/icons/edit.gif" style="border:0" />
+ <f:setPropertyActionListener value="#{category}"
+ target="#{dataTableScrollerBean.currentItem}" />
+ <f:setPropertyActionListener value="#{row}"
+ target="#{dataTableScrollerBean.currentRow}" />
+ </a4j:commandLink>
+ <rich:toolTip for="editlink" value="Edit" />
+ <a4j:commandLink ajaxSingle="true" id="deletelink"
+ oncomplete="#{rich:component('deletePanel')}.show()">
+ <h:graphicImage value="/images/icons/delete.gif" style="border:0" />
+ <f:setPropertyActionListener value="#{row}"
+ target="#{dataTableScrollerBean.currentRow}" />
+ </a4j:commandLink>
+ <rich:toolTip for="deletelink" value="Delete" />
+ </rich:column>
+ <f:facet name="footer">
+ <rich:datascroller renderIfSinglePage="false" maxPages="5" />
</f:facet>
- <h:outputText value="#{category.price}" id="price" />
- </rich:column>
- <rich:column>
- <f:facet name="header">
- <h:outputText value="Mileage" />
- </f:facet>
- <h:outputText value="#{category.mileage}" />
- </rich:column>
- <rich:column width="200px">
- <f:facet name="header">
- <h:outputText value="VIN" />
- </f:facet>
- <h:outputText value="#{category.vin}" />
- </rich:column>
- <rich:column>
- <f:facet name="header">
- <h:outputText value="Stock" />
- </f:facet>
- <h:outputText value="#{category.stock}" />
- </rich:column>
- <rich:column>
- <f:facet name="header">
- Actions
- </f:facet>
- <a4j:commandLink ajaxSingle="true" id="editlink"
- oncomplete="#{rich:component('editPanel')}.show()">
- <h:graphicImage value="/images/icons/edit.gif" style="border:0"/>
- <f:setPropertyActionListener value="#{category}"
- target="#{dataTableScrollerBean.currentItem}" />
- <f:setPropertyActionListener value="#{row}"
- target="#{dataTableScrollerBean.currentRow}" />
- </a4j:commandLink>
- <rich:toolTip for="editlink" value="Edit"/>
- <a4j:commandLink ajaxSingle="true" id="deletelink"
- oncomplete="#{rich:component('deletePanel')}.show()">
- <h:graphicImage value="/images/icons/delete.gif" style="border:0"/>
- <f:setPropertyActionListener value="#{row}"
- target="#{dataTableScrollerBean.currentRow}" />
- </a4j:commandLink>
- <rich:toolTip for="deletelink" value="Delete"/>
- </rich:column>
- <f:facet name="footer">
- <rich:datascroller renderIfSinglePage="false" maxPages="5"/>
- </f:facet>
- </rich:dataTable>
+ </rich:dataTable>
</a4j:region>
</h:form>
@@ -83,8 +108,8 @@
</f:facet>
<f:facet name="controls">
<h:panelGroup>
- <h:graphicImage value="/images/modal/close.png"
- id="hidelink" styleClass="hidelink"/>
+ <h:graphicImage value="/images/modal/close.png" id="hidelink"
+ styleClass="hidelink" />
<rich:componentControl for="editPanel" attachTo="hidelink"
operation="hide" event="onclick" />
</h:panelGroup>
@@ -92,22 +117,23 @@
<h:form>
<rich:messages style="color:red;"></rich:messages>
<h:panelGrid columns="1">
- <a4j:outputPanel ajaxRendered="true">
- <h:panelGrid columns="2">
- <h:outputText value="Make"/>
- <h:inputText value="#{dataTableScrollerBean.currentItem.make}" />
- <h:outputText value="Model" />
- <h:inputText value="#{dataTableScrollerBean.currentItem.model}" />
- <h:outputText value="Price" />
- <h:inputText value="#{dataTableScrollerBean.currentItem.price}" label="Price" immediate="true"/>
- </h:panelGrid>
- <rich:message showSummary="true" showDetail="false" for="price"/>
- </a4j:outputPanel>
- <a4j:commandButton value="Store"
- action="#{dataTableScrollerBean.store}"
- reRender="make, model, price"
- oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('editPanel')}.hide();" />
- </h:panelGrid>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:panelGrid columns="2">
+ <h:outputText value="Make" />
+ <h:inputText value="#{dataTableScrollerBean.currentItem.make}" />
+ <h:outputText value="Model" />
+ <h:inputText value="#{dataTableScrollerBean.currentItem.model}" />
+ <h:outputText value="Price" />
+ <h:inputText value="#{dataTableScrollerBean.currentItem.price}"
+ label="Price" immediate="true" />
+ </h:panelGrid>
+ <rich:message showSummary="true" showDetail="false" for="price" />
+ </a4j:outputPanel>
+ <a4j:commandButton value="Store"
+ action="#{dataTableScrollerBean.store}"
+ reRender="make, model, price"
+ oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('editPanel')}.hide();" />
+ </h:panelGrid>
</h:form>
</rich:modalPanel>
<rich:modalPanel id="deletePanel" autosized="true" width="200">
@@ -127,27 +153,27 @@
<table width="100%">
<tbody>
<tr>
- <td align="center" width="50%">
- <a4j:commandButton value="Yes" ajaxSingle="true"
- action="#{dataTableScrollerBean.delete}"
- oncomplete="#{rich:component('deletePanel')}.hide();"
- reRender="table" />
+ <td align="center" width="50%"><a4j:commandButton value="Yes"
+ ajaxSingle="true" action="#{dataTableScrollerBean.delete}"
+ oncomplete="#{rich:component('deletePanel')}.hide();"
+ reRender="table" /></td>
+ <td align="center" width="50%"><a4j:commandButton
+ value="Cancel"
+ onclick="#{rich:component('deletePanel')}.hide();return false;" />
</td>
- <td align="center" width="50%">
- <a4j:commandButton value="Cancel"
- onclick="#{rich:component('deletePanel')}.hide();return false;" />
- </td>
</tr>
</tbody>
</table>
</h:form>
</rich:modalPanel>
- <a4j:status onstart="#{rich:component('wait')}.show()" onstop="#{rich:component('wait')}.hide()"/>
- <rich:modalPanel id="wait" autosized="true" width="200" height="120" moveable="false" resizeable="false">
+ <a4j:status onstart="#{rich:component('wait')}.show()"
+ onstop="#{rich:component('wait')}.hide()" />
+ <rich:modalPanel id="wait" autosized="true" width="200" height="120"
+ moveable="false" resizeable="false">
<f:facet name="header">
- <h:outputText value="Processing"/>
+ <h:outputText value="Processing" />
</f:facet>
- <h:outputText value="Wait Please..."/>
+ <h:outputText value="Wait Please..." />
</rich:modalPanel>
<rich:messages></rich:messages>
</ui:composition>
15 years, 5 months
JBoss Rich Faces SVN: r14782 - branches/community/3.3.X/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-07-06 07:02:17 -0400 (Mon, 06 Jul 2009)
New Revision: 14782
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/mediaOutput.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/mediaOutput.xml
Log:
RF-7427: a4j:mediaOutput component description review
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/mediaOutput.desc.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/mediaOutput.desc.xml 2009-07-06 08:55:10 UTC (rev 14781)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/mediaOutput.desc.xml 2009-07-06 11:02:17 UTC (rev 14782)
@@ -8,8 +8,8 @@
</sectioninfo>
<title>Description</title>
- <para>The <emphasis role="bold">
- <property><a4j:mediaOutput></property>
- </emphasis> component implements one of the basic features specified in the framework. The component is a facility for generating images, video, sounds and other binary resources defined by you on-the-fly.</para>
+ <para>
+ The <emphasis role="bold"><property><a4j:mediaOutput></property></emphasis> component is a facility for generating images, video, sounds and other binary resources defined by you on-the-fly.
+ </para>
</section>
</root>
\ No newline at end of file
Modified: branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/mediaOutput.xml
===================================================================
--- branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/mediaOutput.xml 2009-07-06 08:55:10 UTC (rev 14781)
+++ branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/mediaOutput.xml 2009-07-06 11:02:17 UTC (rev 14782)
@@ -36,18 +36,13 @@
</table>
<section>
- <title>Creating on a page</title>
+ <title>Creating the Component with a Page Tag</title>
<para>Component definition on a page for graphical data output</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML"><![CDATA[...
-<a4j:mediaOutput element="img" cacheable="false" session="true"
- createContent="#{paintBean.paint}" value="#{paintData}"
- mimeType="image/jpeg"/>
-...
-]]></programlisting>
+ <programlisting role="XML"><![CDATA[<a4j:mediaOutput element="img" cacheable="false" session="true" createContent="#{paintBean.paint}" value="#{paintData}" mimeType="image/jpeg"/>]]></programlisting>
</section>
<section>
@@ -62,54 +57,138 @@
...
]]></programlisting>
</section>
- <section>
- <title>Key attributes and ways of usage</title>
- <para>To use the component it's necessary to define it on a page and set Java methods for data keeping and data transmission to output stream. </para>
- <para>Here is the content of <code>paintData</code> that is a bean containing output data</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="JAVA"><![CDATA[package demo;
+
+ <section>
+ <title>Details of usage</title>
+ <para>
+ The <emphasis role="bold"><property><a4j:mediaOutput></property></emphasis> component is used for generating images, videos or sounds on-the-fly.
+ Let's consider an image creation and generate a JPEG image with verification digits for captcha (the image will include just digits without any graphical noise and distortion).
+ </para>
+ <para>
+ Write the following line on the page:
+ </para>
+ <programlisting role="XML"><![CDATA[<a4j:mediaOutput element="img" cacheable="false" session="false" createContent="#{mediaBean.paint}" value="#{mediaData}" mimeType="image/jpeg"/>]]></programlisting>
+
+ <para>
+ As You see from the example above, first it is necessary to specify the kind of media data You want to generate.
+ This can be done with the help of <emphasis><property>"element"</property></emphasis> attribute, which possible values are <code>img</code>, <code>object</code>, <code>applet</code>, <code>script</code>, <code>link</code> or <code>a</code>.
+ </para>
+ <para>
+ The <emphasis><property>"cacheable"</property></emphasis> defines whether the response will be cached or not. In our case we don't need our image to be cached, cause we need it to be changed every time we refresh the page.
+ </para>
+ <para>
+ The <emphasis><property>"mimeType"</property></emphasis> attribute defines the type of output content. It is used to define the corresponded type in the header of an HTTP response.
+ </para>
+
+ <para>The <emphasis role="bold"><property><a4j:mediaOutput></property></emphasis> attribute has two main attributes:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis><property>"createContent"</property></emphasis> specifies a method that will be used for content creating.
+ The method accepts two parameters.
+ The first one — with an <code>java.io.OutputStream</code> type — is a reference to the stream that should be used for output.
+ An output stream accepts output bytes and sends them to a recipient.
+ The second parameter is a reference to the component's <emphasis><property>"value"</property></emphasis> attribute and has <code>java.lang.Object</code> type.
+ This parameter contains deserialized object with data specified in the <emphasis><property>"value"</property></emphasis> attribute.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis><property>"value"</property></emphasis> attribute specifies a bean class that keeps data for transmitting it into a stream in the method specified with <emphasis><property>"createContent"</property></emphasis> .
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ Now let's create the <code>MediaBean</code> class and specify there a primitive random-number generator and <code>paint</code> method that will convert the generated numbers into an output stream and give a JPEG image as a result.
+ The code for <code>MediaBean</code> class is going to look as following:
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[package demo;
-public class PaintData implements Serializable{
- private static final long serialVersionUID = 1L;
- Integer width=100;
- Integer weight=50;
- ...
-}
-]]></programlisting>
- <para>The Paint method of the <code>paintBean</code> class is a method transmitting graphical data into output stream.</para>
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Random;
+import javax.imageio.ImageIO;
+
+public class MediaBean {
+ public void paint(OutputStream out, Object data) throws IOException{
+ Integer high = 9999;
+ Integer low = 1000;
+ Random generator = new Random();
+ Integer digits = generator.nextInt(high - low + 1) + low;
+ if (data instanceof MediaData) {
+ MediaData paintData = (MediaData) data;
+ BufferedImage img = new BufferedImage(paintData.getWidth(),paintData.getHeight(),BufferedImage.TYPE_INT_RGB);
+ Graphics2D graphics2D = img.createGraphics();
+ graphics2D.setBackground(paintData.getBackground());
+ graphics2D.setColor(paintData.getDrawColor());
+ graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
+ graphics2D.setFont(paintData.getFont());
+ graphics2D.drawString(digits.toString(), 20, 35);
+ ImageIO.write(img,"png",out);
+ }
+ }
+}]]></programlisting>
+
+<para>
+ Now it is necessary to create a class that will keep transmissional data that will be used as input data for a content creation method.
+ The code for <code>MediaData</code> class is going to be as following:
+</para>
+ <note>
+ <title>Note:</title>
+ <para>A bean class transmitted into value should implement <code>Serializable</code> interface in order to be encoded to the URL of the resource.
+ </para>
+ </note>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[package demo;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.io.Serializable;
+
+public class MediaData implements Serializable{
+
+ private static final long serialVersionUID = 1L;
+ Integer Width=110;
+ Integer Height=50;
+ Color Background=new Color(190, 214, 248);
+ Color DrawColor=new Color(0,0,0);
+ Font font = new Font("Serif", Font.TRUETYPE_FONT, 30);
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="JAVA"><![CDATA[public void paint(OutputStream out, Object data) throws IOException{
- //Some code that puts binary data to "out" Stream
-}
-]]></programlisting>
- <para>As it was shown in the example above there are two main components:</para>
- <itemizedlist>
- <listitem><para>
- <emphasis><property> "createContent" </property></emphasis>specifies a method accepting 2 parameters. The first (of <code>java.io.OutputStream</code> type) defines a stream, where any binary data is output. The second (of <code>java.lang.Object</code> type) contains deserialized object with data specified in the <emphasis >
- <property>"value"</property>
- </emphasis> attribute.
- </para></listitem>
- <listitem><para>
- Value specifies a bean class keeping data for transmitting into a method that transmits it into a stream.
- </para></listitem>
- </itemizedlist>
- <note><title>Note:</title><para>A bean class transmitted into value should <code>implement Serializable</code> interface.
- </para>
- </note>
- <para>Hence, when using the component it's possible to output your data of any type on a page with Ajax requests.</para>
+ // Corresponding getters and setters
+
+}]]></programlisting>
+
+ <para>
+ As a result the <emphasis role="bold"><property><a4j:mediaOutput></property></emphasis> component will generate the following image that will be updated on each page refresh:
+ </para>
+ <figure>
+ <title>
+ Using the <emphasis role="bold"><property><a4j:mediaOutput></property></emphasis> for generating an image for captcha</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/mediaOutput_init.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Hence, when using the component it's possible to output your data of any type on a page with Ajax requests.</para>
</section>
<section>
<title>Relevant resources links</title>
- <para>
- <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/mediaOutput.jsf?c=med...">On the component LiveDemo page</ulink> you can see the example of <emphasis role="bold"
- ><property><a4j:mediaOutput ></property></emphasis> usage and sources for the given example.
- </para>
+ <para>
+ Vizit the <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/mediaOutput.jsf?c=med...">MediaOutput page</ulink> at RichFaces LiveDemo for more examples of component usage and their sources.
+ </para>
</section>
</chapter>
\ No newline at end of file
15 years, 5 months
JBoss Rich Faces SVN: r14781 - in branches/sandbox/rf4_build/examples/trunk: components and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-07-06 04:55:10 -0400 (Mon, 06 Jul 2009)
New Revision: 14781
Modified:
branches/sandbox/rf4_build/examples/trunk/components/pom.xml
branches/sandbox/rf4_build/examples/trunk/pom.xml
Log:
Modified: branches/sandbox/rf4_build/examples/trunk/components/pom.xml
===================================================================
--- branches/sandbox/rf4_build/examples/trunk/components/pom.xml 2009-07-06 08:54:30 UTC (rev 14780)
+++ branches/sandbox/rf4_build/examples/trunk/components/pom.xml 2009-07-06 08:55:10 UTC (rev 14781)
@@ -27,12 +27,12 @@
<dependency>
<groupId>org.richfaces.ui.components</groupId>
<artifactId>${example.componentName}-ui</artifactId>
- <version>${ui.version}</version>
+ <version>4.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui.components</groupId>
<artifactId>${example.componentName}Model-ui</artifactId>
- <version>${ui.version}</version>
+ <version>4.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
Modified: branches/sandbox/rf4_build/examples/trunk/pom.xml
===================================================================
--- branches/sandbox/rf4_build/examples/trunk/pom.xml 2009-07-06 08:54:30 UTC (rev 14780)
+++ branches/sandbox/rf4_build/examples/trunk/pom.xml 2009-07-06 08:55:10 UTC (rev 14781)
@@ -11,21 +11,14 @@
<packaging>pom</packaging>
<name>richfaces components examples</name>
-
- <properties>
- <jsf.version>2.0.0-PR2_3</jsf.version>
- <framework.version>${project.version}</framework.version>
- <ui.version>${project.version}</ui.version>
- </properties>
-
- <dependencies>
+ <dependencies>
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>${framework.version}</version>
+ <version>4.0.0-SNAPSHOT</version>
</dependency>
- <!-- TODO: uncomment when assembly will be ready -->
+ <!-- TODO: uncomment when assembly will be ready -->
<!--dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
@@ -34,13 +27,13 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>${jsf.version}</version>
+ <version>2.0.0-PR2_3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>${jsf.version}</version>
+ <version>2.0.0-PR2_3</version>
<scope>provided</scope>
</dependency>
<dependency>
15 years, 5 months
JBoss Rich Faces SVN: r14780 - in branches/sandbox/rf4_build/docs/trunk: commons and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-07-06 04:54:30 -0400 (Mon, 06 Jul 2009)
New Revision: 14780
Modified:
branches/sandbox/rf4_build/docs/trunk/commons/highlight/pom.xml
branches/sandbox/rf4_build/docs/trunk/commons/pom.xml
branches/sandbox/rf4_build/docs/trunk/commons/resources/en/pom.xml
branches/sandbox/rf4_build/docs/trunk/commons/resources/pom.xml
branches/sandbox/rf4_build/docs/trunk/guides/pom.xml
branches/sandbox/rf4_build/docs/trunk/pom.xml
Log:
Modified: branches/sandbox/rf4_build/docs/trunk/commons/highlight/pom.xml
===================================================================
--- branches/sandbox/rf4_build/docs/trunk/commons/highlight/pom.xml 2009-07-06 08:09:09 UTC (rev 14779)
+++ branches/sandbox/rf4_build/docs/trunk/commons/highlight/pom.xml 2009-07-06 08:54:30 UTC (rev 14780)
@@ -13,8 +13,10 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.docs.commons</groupId>
<artifactId>highlight</artifactId>
+ <name>richfaces code highlighting</name>
- <dependencies>
+
+ <dependencies>
<dependency>
<groupId>org.eclipse.wst.css</groupId>
<artifactId>core</artifactId>
Modified: branches/sandbox/rf4_build/docs/trunk/commons/pom.xml
===================================================================
--- branches/sandbox/rf4_build/docs/trunk/commons/pom.xml 2009-07-06 08:09:09 UTC (rev 14779)
+++ branches/sandbox/rf4_build/docs/trunk/commons/pom.xml 2009-07-06 08:54:30 UTC (rev 14780)
@@ -13,8 +13,10 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.docs</groupId>
<artifactId>commons</artifactId>
- <packaging>pom</packaging>
+ <name>richfaces documentations commons</name>
+ <packaging>pom</packaging>
+
<modules>
<module>resources</module>
<module>highlight</module>
Modified: branches/sandbox/rf4_build/docs/trunk/commons/resources/en/pom.xml
===================================================================
--- branches/sandbox/rf4_build/docs/trunk/commons/resources/en/pom.xml 2009-07-06 08:09:09 UTC (rev 14779)
+++ branches/sandbox/rf4_build/docs/trunk/commons/resources/en/pom.xml 2009-07-06 08:54:30 UTC (rev 14780)
@@ -13,6 +13,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.docs.commons.resources</groupId>
<artifactId>en</artifactId>
+ <name>richfaces documentation resources</name>
</project>
\ No newline at end of file
Modified: branches/sandbox/rf4_build/docs/trunk/commons/resources/pom.xml
===================================================================
--- branches/sandbox/rf4_build/docs/trunk/commons/resources/pom.xml 2009-07-06 08:09:09 UTC (rev 14779)
+++ branches/sandbox/rf4_build/docs/trunk/commons/resources/pom.xml 2009-07-06 08:54:30 UTC (rev 14780)
@@ -13,6 +13,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.docs.commons</groupId>
<artifactId>resources</artifactId>
+ <name>documentation resources</name>
<packaging>pom</packaging>
<modules>
Modified: branches/sandbox/rf4_build/docs/trunk/guides/pom.xml
===================================================================
--- branches/sandbox/rf4_build/docs/trunk/guides/pom.xml 2009-07-06 08:09:09 UTC (rev 14779)
+++ branches/sandbox/rf4_build/docs/trunk/guides/pom.xml 2009-07-06 08:54:30 UTC (rev 14780)
@@ -14,6 +14,7 @@
<groupId>org.richfaces.docs</groupId>
<artifactId>guides</artifactId>
<packaging>pom</packaging>
+ <name>richfaces guides</name>
<!-- all deployed modules should be reflected in version-matrix also -->
<modules>
Modified: branches/sandbox/rf4_build/docs/trunk/pom.xml
===================================================================
--- branches/sandbox/rf4_build/docs/trunk/pom.xml 2009-07-06 08:09:09 UTC (rev 14779)
+++ branches/sandbox/rf4_build/docs/trunk/pom.xml 2009-07-06 08:54:30 UTC (rev 14780)
@@ -9,7 +9,7 @@
<artifactId>docs</artifactId>
<version>4.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>project documentation</name>
+ <name>richfaces project documentation</name>
<properties>
<docs.version>${project.version}</docs.version>
15 years, 5 months
JBoss Rich Faces SVN: r14779 - branches/sandbox/rf4_build.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-07-06 04:09:09 -0400 (Mon, 06 Jul 2009)
New Revision: 14779
Removed:
branches/sandbox/rf4_build/settings.xml
Log:
remove settings.xml
Deleted: branches/sandbox/rf4_build/settings.xml
===================================================================
--- branches/sandbox/rf4_build/settings.xml 2009-07-04 15:05:37 UTC (rev 14778)
+++ branches/sandbox/rf4_build/settings.xml 2009-07-06 08:09:09 UTC (rev 14779)
@@ -1,307 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<!--
- | This is the configuration file for Maven. It can be specified at two levels:
- |
- | 1. User Level. This settings.xml file provides configuration for a single user,
- | and is normally provided in $HOME/.m2/settings.xml.
- |
- | NOTE: This location can be overridden with the system property:
- |
- | -Dorg.apache.maven.user-settings=/path/to/user/settings.xml
- |
- | 2. Global Level. This settings.xml file provides configuration for all maven
- | users on a machine (assuming they're all using the same maven
- | installation). It's normally provided in
- | ${maven.home}/conf/settings.xml.
- |
- | NOTE: This location can be overridden with the system property:
- |
- | -Dorg.apache.maven.global-settings=/path/to/global/settings.xml
- |
- | The sections in this sample file are intended to give you a running start at
- | getting the most out of your Maven installation. Where appropriate, the default
- | values (values used when the setting is not specified) are provided.
- |
- |-->
-<settings>
- <!-- localRepository
- | The path to the local repository maven will use to store artifacts.
- |
- | Default: ~/.m2/repository
- <localRepository>/path/to/local/repo</localRepository>
- -->
- <localRepository>~/.m2t/repository</localRepository>
-
- <!-- interactiveMode
- | This will determine whether maven prompts you when it needs input. If set to false,
- | maven will use a sensible default value, perhaps based on some other setting, for
- | the parameter in question.
- |
- | Default: true
- <interactiveMode>true</interactiveMode>
- -->
-
- <!-- offline
- | Determines whether maven should attempt to connect to the network when executing a build.
- | This will have an effect on artifact downloads, artifact deployment, and others.
- |
- | Default: false
- <offline>false</offline>
- -->
-
- <!-- proxies
- | This is a list of proxies which can be used on this machine to connect to the network.
- | Unless otherwise specified (by system property or command-line switch), the first proxy
- | specification in this list marked as active will be used.
- |-->
- <proxies>
- <!-- proxy
- | Specification for one proxy, to be used in connecting to the network.
- |
- <proxy>
- <id>optional</id>
- <active>true</active>
- <protocol>http</protocol>
- <username>proxyuser</username>
- <password>proxypass</password>
- <host>proxy.host.net</host>
- <port>80</port>
- <nonProxyHosts>local.net,some.host.com</nonProxyHosts>
- </proxy>
- -->
- </proxies>
-
- <!-- servers
- | This is a list of authentication profiles, keyed by the server-id used within the system.
- | Authentication profiles can be used whenever maven must make a connection to a remote server.
- |-->
- <servers>
- <!-- server
- | Specifies the authentication information to use when connecting to a particular server, identified by
- | a unique name within the system (referred to by the 'id' attribute below).
- |
- | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
- | used together.
- |
- <server>
- <id>deploymentRepo</id>
- <username>repouser</username>
- <password>repopwd</password>
- </server>
- -->
-
- <!-- Another sample, using keys to authenticate.
- <server>
- <id>siteServer</id>
- <privateKey>/path/to/private/key</privateKey>
- <passphrase>optional; leave empty if not used.</passphrase>
- </server>
- -->
- </servers>
-
- <!-- mirrors
- | This is a list of mirrors to be used in downloading artifacts from remote repositories.
- |
- | It works like this: a POM may declare a repository to use in resolving certain artifacts.
- | However, this repository may have problems with heavy traffic at times, so people have mirrored
- | it to several places.
- |
- | That repository definition will have a unique id, so we can create a mirror reference for that
- | repository, to be used as an alternate download site. The mirror site will be the preferred
- | server for that repository.
- |-->
- <mirrors>
- <!-- mirror
- | Specifies a repository mirror site to use instead of a given repository. The repository that
- | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
- | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
- |
- <mirror>
- <id>mirrorId</id>
- <mirrorOf>repositoryId</mirrorOf>
- <name>Human Readable Name for this Mirror.</name>
- <url>http://my.repository.com/repo/path</url>
- </mirror>
- -->
- </mirrors>
-
- <!-- profiles
- | This is a list of profiles which can be activated in a variety of ways, and which can modify
- | the build process. Profiles provided in the settings.xml are intended to provide local machine-
- | specific paths and repository locations which allow the build to work in the local environment.
- |
- | For example, if you have an integration testing plugin - like cactus - that needs to know where
- | your Tomcat instance is installed, you can provide a variable here such that the variable is
- | dereferenced during the build process to configure the cactus plugin.
- |
- | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
- | section of this document (settings.xml) - will be discussed later. Another way essentially
- | relies on the detection of a system property, either matching a particular value for the property,
- | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
- | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
- | Finally, the list of active profiles can be specified directly from the command line.
- |
- | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
- | repositories, plugin repositories, and free-form properties to be used as configuration
- | variables for plugins in the POM.
- |
- |-->
- <profiles>
- <!-- profile
- | Specifies a set of introductions to the build process, to be activated using one or more of the
- | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
- | or the command line, profiles have to have an ID that is unique.
- |
- | An encouraged best practice for profile identification is to use a consistent naming convention
- | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
- | This will make it more intuitive to understand what the set of introduced profiles is attempting
- | to accomplish, particularly when you only have a list of profile id's for debug.
- |
- | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
- <profile>
- <id>jdk-1.4</id>
-
- <activation>
- <jdk>1.4</jdk>
- </activation>
-
- <repositories>
- <repository>
- <id>jdk14</id>
- <name>Repository for JDK 1.4 builds</name>
- <url>http://www.myhost.com/maven/jdk14</url>
- <layout>default</layout>
- <snapshotPolicy>always</snapshotPolicy>
- </repository>
- </repositories>
- </profile>
- -->
-
- <!--
- | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
- | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
- | might hypothetically look like:
- |
- | ...
- | <plugin>
- | <groupId>org.myco.myplugins</groupId>
- | <artifactId>myplugin</artifactId>
- |
- | <configuration>
- | <tomcatLocation>${tomcatPath}</tomcatLocation>
- | </configuration>
- | </plugin>
- | ...
- |
- | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
- | anything, you could just leave off the <value/> inside the activation-property.
- |
- <profile>
- <id>env-dev</id>
-
- <activation>
- <property>
- <name>target-env</name>
- <value>dev</value>
- </property>
- </activation>
-
- <properties>
- <tomcatPath>/path/to/tomcat/instance</tomcatPath>
- </properties>
- </profile>
- -->
- <profile>
- <id>RichFaces</id>
- <repositories>
- <repository>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- <id>repository.jboss.com</id>
- <name>Jboss Repository for Maven</name>
- <url>
- http://repository.jboss.com/maven2/
- </url>
- <layout>default</layout>
- </repository>
- <repository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>maven2-snapshots.jboss.com</id>
- <name>Jboss Repository for Maven Snapshots</name>
- <url>http://snapshots.jboss.org/maven2</url>
- <layout>default</layout>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>maven2-snapshots.jboss.com</id>
- <name>Jboss Repository for Maven Snapshots</name>
- <url>http://snapshots.jboss.org/maven2</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- </pluginRepository>
- <pluginRepository>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- <id>repository.jboss.com</id>
- <name>Jboss Repository for Maven</name>
- <url>
- http://repository.jboss.com/maven2/
- </url>
- <layout>default</layout>
- </pluginRepository>
- </pluginRepositories>
- </profile>
- </profiles>
-
- <!-- activeProfiles
- | List of profiles that are active for all builds.
- |
- <activeProfiles>
- <activeProfile>alwaysActiveProfile</activeProfile>
- <activeProfile>anotherAlwaysActiveProfile</activeProfile>
- </activeProfiles>
- -->
- <activeProfiles>
- <activeProfile>RichFaces</activeProfile>
- </activeProfiles>
-</settings>
15 years, 5 months
JBoss Rich Faces SVN: r14778 - branches/community/3.3.X/ui/panelmenu/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-07-04 11:05:37 -0400 (Sat, 04 Jul 2009)
New Revision: 14778
Modified:
branches/community/3.3.X/ui/panelmenu/src/main/config/component/panelMenu.xml
Log:
panelMenuGroup: Several event attributes should be hidden
https://jira.jboss.org/jira/browse/RF-7432
Modified: branches/community/3.3.X/ui/panelmenu/src/main/config/component/panelMenu.xml
===================================================================
--- branches/community/3.3.X/ui/panelmenu/src/main/config/component/panelMenu.xml 2009-07-04 14:36:15 UTC (rev 14777)
+++ branches/community/3.3.X/ui/panelmenu/src/main/config/component/panelMenu.xml 2009-07-04 15:05:37 UTC (rev 14778)
@@ -461,14 +461,47 @@
<classname>java.lang.String</classname>
<description>Target frame for action to execute.</description>
</property>
+
&ui_component_attributes;
&html_input_attributes;
- &html_input_events;
&ui_input_attributes;
&ui_output_attributes;
&html_events;
&ajax_component_attributes;
&ui_command_attributes;
+
+ <property hidden="true">
+ <name>onblur</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property hidden="true">
+ <name>onchange</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property hidden="true">
+ <name>oncomplete</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property hidden="true">
+ <name>onfocus</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property hidden="true">
+ <name>onkeydown</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property hidden="true">
+ <name>onkeypress</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property hidden="true">
+ <name>onkeyup</name>
+ <classname>java.lang.String</classname>
+ </property>
+ <property hidden="true">
+ <name>onselect</name>
+ <classname>java.lang.String</classname>
+ </property>
<property>
<name>oncollapse</name>
<classname>java.lang.String</classname>
15 years, 5 months
JBoss Rich Faces SVN: r14776 - branches/sandbox/rf4_build.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-07-02 14:34:57 -0400 (Thu, 02 Jul 2009)
New Revision: 14776
Modified:
branches/sandbox/rf4_build/make.sh
Log:
Modified: branches/sandbox/rf4_build/make.sh
===================================================================
--- branches/sandbox/rf4_build/make.sh 2009-07-02 18:29:10 UTC (rev 14775)
+++ branches/sandbox/rf4_build/make.sh 2009-07-02 18:34:57 UTC (rev 14776)
@@ -14,7 +14,7 @@
cd $PROJECT_DIR/$MODULE/$TAG_DIR
- if mvn eclipse:clean; then
+ if mvn clean install; then
echo
else
exit $?
15 years, 6 months