Wednesday, December 22, 2010

Tapestry 5.2 Multiple Context Values

This is sample for declaring multiple values on context.
In .tml file:
<t:actionlink t:id="exportToExcel" t:context="[workingUnitId, strDateFrom, strDateTo]">Export to Excel</t:actionlink>

In .java method:
Object onActionFromExportToExcel(Long workingUnitId, String strDateFrom, String strDateTo)

And this is sample for using multiple context values on .java onActivate and onPassivate: 
void onActivate(Long workingUnitId, String strDateFrom, String strDateTo)

List<Object> onPassivate() {
        List list = new ArrayList<Object>();
        list.add(workingUnitId);
        list.add(strDateFrom);
        list.add(strDateTo);
        return list;
    }


Source: http://tapestry.1045711.n5.nabble.com/multiple-context-values-td2429828.html

Tuesday, December 21, 2010

SQL Server Licensing

2 SQL Server license available: Per Processor (unlimited CAL / Client Access License) and Per Server + CAL (CAL is needed for every workstation connecting to SQL Server).

So for web application published on the internet, we should use Per Processor because we can't buy CAL for every person accessing our website.

Per Processor means physical processor, so 1 Quad Core Processor just need 1 Per Processor License.

If SQL Server is hosted on Windows Server, then we need "CAL Windows Server" and "CAL SQL Server" for every client connecting to SQL Server.

Wew.. that would cost a lot of money...

CAL also available "per device" and "per user". We can choose which one more suitable for us.
"Per user" means license is coupled with user, so the user can use multiple device for connecting to server. "Per device" means license is coupled with device (PC/notebook), so any user can use that device for connecting to server.

Source:
http://www.developer.com/db/article.php/3502746
http://www.microsoft.com/sqlserver/2005/en/us/pricing-licensing-faq.aspx
and discussion on dotnet netindonesia mailing-list

Tapestry 5 Samples

Samples for Tapestry 5:

http://jumpstart.doublenegative.com.au/jumpstart/


Beware! This samples not using Tapestry 5.2 yet.
Same of the samples can be simplified if using T5.2, for example: Ajax Select (Ajax Combobox).

Ajax Select on Tapestry 5.2 is very simple.
Look on http://tapestry.apache.org/tapestry5.2-dev/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html section "Chaining of Select Component" for example.

Get Source and Javadoc from Maven

To get sources:
# mvn dependency:sources

To get javadocs:
# mvn dependency:resolve -Dclassifier=javadoc

Source: http://tedwise.com/2010/01/27/maven-micro-tip-get-sources-and-javadocs/