Andrei | 18 Apr 19:24 2014
Picon

Click goes to ATTIC or developed more?

I read on click dev list that Click can go to ATTIC or developed more
What will it be?
Thanks

Scott Gray | 17 Jan 11:25 2014
Picon

Fwd: ASF Board Meeting Summary - January 15, 2014

Did Malcolm properly resign by notifying the Apache Board and has a
new PMC Chair been chosen?  This is the second project report that
hasn't been delivered.

Regards
Scott

---------- Forwarded message ----------
From: Brett Porter <chairman <at> apache.org>
Date: 17 January 2014 05:24
Subject: ASF Board Meeting Summary - January 15, 2014
To: committers <at> apache.org

The January board meeting took place on the 15th.

The following directors were present:

  Shane Curcuru
  Doug Cutting
  Bertrand Delacretaz
  Roy T. Fielding
  Jim Jagielski
  Chris Mattmann
  Brett Porter
  Sam Ruby
  Greg Stein

The following officers were present:

  Ross Gardler
(Continue reading)

Scott Gurney | 19 Nov 20:29 2013

Using Tables with the TablePaginator and Maintaining State

I'm looking for some guidance from any Click users who have used Click Tables in their work.  In particular, I'd like to know any "rules of thumb" for designing pages (or sequences of pages in a workflow) so that table pagination works consistently.

 

You see, I have a first version of a relatively simple application built using Click.  In one sequence of pages in a workflow, I'm using a request parameter from the query string to dynamically choose the data to display in a table of results.  The obvious problem with this approach is table pagination doesn't function properly because the original query string is not maintained between requests. So page 1 of the table works but none of the other pages in the table do.

 

Anyone else run into this, choose to continue using request parameters, and find an elegant way of saving state?  I'm second-guessing altogether my approach of using a request parameter for this purpose. 

 

Any thoughts are appreciated.

 

Scott

mail <at> scottgurney.com

 

tomasz bandura | 17 Nov 07:46 2013
Picon

spring + menu RuntimeException

Hello,

I use click (2.3.0) and spring (3.2.4)

When I try to run my app, I get during start:

(...)
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.mytest.page.HomePage]: Constructor threw exception; nested exception is java.lang.RuntimeException: No Context available on ThreadLocal Context Stack
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1000)
... 21 more

java.lang.RuntimeException: No Context available on ThreadLocal Context Stack
at org.apache.click.Context$ContextStack.peek(Context.java:966)
at org.apache.click.Context$ContextStack.access$000(Context.java:917)
at org.apache.click.Context.getThreadLocalContext(Context.java:165)
at org.apache.click.extras.control.MenuFactory.loadFromMenuXml(MenuFactory.java:499)
at org.apache.click.extras.control.MenuFactory.getRootMenu(MenuFactory.java:302)
at org.apache.click.extras.control.MenuFactory.getRootMenu(MenuFactory.java:255)
at org.apache.click.extras.control.MenuFactory.getRootMenu(MenuFactory.java:197)
at com.mytest.page.BaseTemplate.<init>(BaseTemplate.java:19)

where BaseTemplate.java:19

        rootMenu = menuFactory.getRootMenu();



Without menu it runs correctly ( I did spring configuration according to  documentation )


How to solve it?


Tomasz


werne | 7 Nov 12:22 2013

IntelliJ plug-in for Apache Click?

Is there any IntelliJ plug-in for Apache Click in the working?

tnx

--
View this message in context: http://click.1134972.n2.nabble.com/IntelliJ-plug-in-for-Apache-Click-tp7578705.html
Sent from the click-user mailing list archive at Nabble.com.

Kiril Valev | 14 Oct 11:52 2013
Picon

Automatic component refresh via AJAX

Hi,

does a built-in feature exist which automatically refreshes a
component using AJAX? I created a Table which displays values from a
database. I need to refresh the table once per second.

Using jQuery "$.get" and "setTimeout()" would be a solution, but is
there a way of doing such things directly in Click?

Thanks!

Kiril Valev | 17 Sep 13:24 2013
Picon

Running Apache Click with embedded Jetty

Hi,

is it possible to run an Apache Click app with an embedded server like
Jetty? I want to create a stand alone application.

Thanks.

Kiril Valev | 7 Sep 17:53 2013
Picon

LinkDecorator with custom link text

Hi,

is it possible to use a LinkDecorator and still get the link text from
the DataProvider without overriding the render method in Decorator?
The examples show only static text when using LinkDecorator (Either
"Edit" or "Delete"). Can I get the link text by property?

Thanks!

Kristian Lind | 5 Sep 20:46 2013
Picon

Disable form validation before submit.

Hi. 

I have a form where a change in a dropdown is submitting the form to populate other fields, depending what was chosen in the dropdown. 

My problem is, that the form validation is returning an error, because some fields were not provided. 
So I wanna disable the form validation until the save button is pressed... 

see attached pictures and the java file. 




--
Best regards

Kristian Lind
Attachment (class.java): application/octet-stream, 23 KiB
Kristian Lind | 15 Aug 01:25 2013
Picon

FormTable.

How to use the form table without Cayenne. 

I am using a form table, the user can then change the values... and click save. 
But when trying to save the changes the rowlist in empty... 



private JSIFormTable optionFormTable = new JSIFormTable("optionFormTable");
public EditProduct() {
try {
buildOptionFormTable();
} catch (NumberFormatException e) {
logger.error(e.getMessage(), e);
setRedirect(com.farheap.jsi.dashboard.pages.errors.Error.class);
return;
}
}

<at> Override
public void onInit() {
ClickUtils.bind(form);
super.onInit();
}

<at> SuppressWarnings("unchecked")
private void init(final Long productId) throws SystemException {
productOptionDataProvider = new PagingDataProvider() {
<at> Override
public int size() {
Integer size = 0;
try {
size = Integer.parseInt(dashboardSBBeanLocal.getProductOptionCount(productId).toString());
} catch (SystemException e) {
logger.error(e.getMessage(), e);
setRedirect(com.farheap.jsi.dashboard.pages.errors.Error.class);
}
return size;
}

<at> Override
public List<ProductOptionEnt> getData() {
List<ProductOptionEnt> productOptions = null;
int start = optionFormTable.getFirstRow();
int count = optionFormTable.getPageSize();
String sortColumn = optionFormTable.getSortedColumn();
if (StringUtils.isBlank(sortColumn)) {
sortColumn = "id";
}
boolean ascending = optionFormTable.isSortedAscending();
try {
//Long id = Long.parseLong(optionFormTable.getControlLink().getParameter("productId"));
productOptions = dashboardSBBeanLocal.getProductOptions(productId, start, count, sortColumn, ascending);
} catch (SystemException e) {
logger.error(e.getMessage(), e);
setRedirect(com.farheap.jsi.dashboard.pages.errors.Error.class);
}
return productOptions;
}
};
optionFormTable.setDataProvider(productOptionDataProvider);

}

public boolean onSaveOptionFormTable() throws SystemException {
if (optionFormTable.getForm().isValid()) {
List<ProductOptionEnt> productOptions = optionFormTable.getRowList();
dashboardSBBeanLocal.saveProductOptions(productOptions);
}
Long id = Long.parseLong(idField2.getValue());
HashMap<String, String> m = new HashMap<String, String>();
m.put("productId", "" + id);
setRedirect(CopyOfEditProduct.class, m);
return true;
}

private void buildOptionFormTable() {
optionFormTable.getForm().setButtonAlign(Form.ALIGN_RIGHT);
optionFormTable.setClass(Table.CLASS_ITS);
optionFormTable.setPageSize(Constants.MAX_PAGE_SIZE);
optionFormTable.setSortable(true);
optionFormTable.addStyleClass("dash_table80center");
optionFormTable.addColumn(new Column("id", "id"));
optionFormTable.addColumn(new Column("optionType", "Options"));

JSIOptionValueSelect select = new JSIOptionValueSelect();
select.setDependentFieldName("optionType");
Column column = new FieldColumn("value", "Value", select);
optionFormTable.addColumn(column);

RegexField basePrice = new RegexField();
basePrice.setPattern(PRICE_REGEX);
basePrice.setTextAlign("right");
column = new FieldColumn("basePrice", basePrice);
//column.setTextAlign("right");
optionFormTable.addColumn(column);

RegexField unitPrice = new RegexField();
unitPrice.setPattern(PRICE_REGEX);
unitPrice.setTextAlign("right");
column = new FieldColumn("unitPrice", unitPrice);
optionFormTable.addColumn(column);

optionFormTable.setPaginator(new TableInlinePaginator(optionFormTable));
optionFormTable.setPaginatorAttachment(Table.PAGINATOR_INLINE);

optionFormTable.setTableButtonClass("jsi_form_table_buttons");
Button button = new Submit("save", "Save", this, "onSaveOptionFormTable");
button.addStyleClass("btn btn-primary");
optionFormTable.getForm().add(button);
optionFormTable.getForm().add(idField2);

Label label = new Label("label", "Product Options");
label.addStyleClass("");
addControl(optionFormTable);

}





Kristian Lind | 14 Aug 04:07 2013
Picon

Formtable

Hi. 

is it not possible the add a ActionLink to a FormTable.  ? 

I have a submit button.. 

Button button = new Submit("save", "Save", this, "onSaveOptionFormTable");
button.addStyleClass("btn btn-primary");
optionFormTable.getForm().add(button);

But I would like to use a ActionLink, cause I need to go to another page and need to set a parameter, and would like to have the button ( ActionLink ) together with the save button. 

ActionLink addOptionLink = new ActionLink("addOptionLink", "New Option", this, "OnAddOptionLink");
addOptionLink.addStyleClass("btn btn-primary");
addOptionLink.setParameter("productId", productId);
optionFormTable.getForm().add(addOptionLink);

But the link does not show up... only the Save button. 



--
Best regards

Kristian Lind

Gmane