hi, is it possible to do this with tapestry...

2006-08-18 Thread zqzuk

Hi, the scenario is that i have a collection of Attendance objects- for
example, Attendance(Student s, String class, String attended) - to be
displayed on a page. and i would like a checkbox (or other components
whichever appropriate) for each row. so if the student attended the class,
user can tick the box. user then ticks those boxes if the student attended
the class, then finally click a button save, and program will figure out
which Attendance objects are changed and commit database transactions.

so something like this:

---
Student   class attended
---
Bob math   ticked
Henry  physicsticked
Anne   englishticked
Nick history unticked

[Save Button]
--

each row above represents an Attendance object. the problem is, because the
number of rows are variant, so i m using a For component to produce these
rows automatcally. but how can i know which checkboxex are ticked, and which
checkbox is for which row? as these boxex are produced at runtime and
assigned different names at runtime isnt it? unlike the DirectLink component
which can pass parameters such as the object's id, how does a checkbox (or
if other appropriate components) identify the row?

i could use directlink instead and open up another window where user tick
the box in a separate page for each Attendance row, but that would be bad
design...

any suggestions pleaes, thanks very much!
-- 
View this message in context: 
http://www.nabble.com/hi%2C-is-it-possible-to-do-this-with-tapestry...-tf2126696.html#a5867937
Sent from the Tapestry - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can you always have valid html with tapestry templates?

2006-08-18 Thread Denis McCarthy

Hi,
I have tables that are populated by a @ForEach component in my html. The 
html template is like this

table
trtdblah blah/td/tr

span jwcid=[EMAIL PROTECTED] ...
tr - stuff iterated over by the foreach /tr
/span
/table

Now I recently upgraded to eclipse callisto using the Web tools project, 
and the html validator is complaining that the above is not valid html 
(which, in fairness it isn't, as the span occurs within a table but not 
within a td). Is there some html-compliant way to structure this, or 
will I have to live with my tapestry templates being non-html compliant?

TIA
Denis



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can you always have valid html with tapestry templates?

2006-08-18 Thread andyhot
Use:
table
trtdblah blah/td/tr

tr jwcid=[EMAIL PROTECTED] elemente=tr...
stuff iterated over by the foreach
/tr

/table

Denis McCarthy wrote:
 Hi,
 I have tables that are populated by a @ForEach component in my html.
 The html template is like this
 table
 trtdblah blah/td/tr

 span jwcid=[EMAIL PROTECTED] ...
 tr - stuff iterated over by the foreach /tr
 /span
 /table

 Now I recently upgraded to eclipse callisto using the Web tools
 project, and the html validator is complaining that the above is not
 valid html (which, in fairness it isn't, as the span occurs within a
 table but not within a td). Is there some html-compliant way to
 structure this, or will I have to live with my tapestry templates
 being non-html compliant?
 TIA
 Denis



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hi, is it possible to do this with tapestry...

2006-08-18 Thread zqzuk

hi, thanks for prompt reply,

then you just need to bind the checkbox value to a
currentAttendance.persentognl

sorry could you be more specific about this please? i still dont quite
understand. like this?


property name=currentAttendance/
component id=attendances type=For
binding name=source value=attendances/
binding name=value value=currentAttendance/
binding name=element value=literal:tr/
/component
component id=student type=Insert
binding name=value value=currentAttendance.student.name/
/component
component id=classname type=Insert
binding name=value value=currentAttendance.classname/
/component
component id=tickbox type=CheckBox
binding name=value value=currentAttendance.attended/
/component


then i suppose i need to change Attendance.attended to boolean type? 

also, when SAVE is clicked, how can i update each object? would it be:

for each(element in getAttendances()){
getCurrentAttendance().set..   // but how can i get the variable
values of each attendance
}

thanks alot!







karthik.nar wrote:
 
 you should ensure that the Attendance list provided to the For loop is
 exactly the same both during render and rewind.
 
 then, irrespective of the number of rows the render/rewind sequence will
 be
 exactly the same.
 
 so the checkbox  on render will correspond to the same Attendance object
 when the rewind happens.
 
 then you just need to bind the checkbox value to a
 currentAttendance.persentognl
 
 
 On 8/18/06, zqzuk [EMAIL PROTECTED] wrote:


 Hi, the scenario is that i have a collection of Attendance objects- for
 example, Attendance(Student s, String class, String attended) - to be
 displayed on a page. and i would like a checkbox (or other components
 whichever appropriate) for each row. so if the student attended the
 class,
 user can tick the box. user then ticks those boxes if the student
 attended
 the class, then finally click a button save, and program will figure
 out
 which Attendance objects are changed and commit database transactions.

 so something like this:

 ---
 Student   class attended
 ---
 Bob math   ticked
 Henry  physicsticked
 Anne   englishticked
 Nick history unticked

 [Save Button]
 --

 each row above represents an Attendance object. the problem is, because
 the
 number of rows are variant, so i m using a For component to produce these
 rows automatcally. but how can i know which checkboxex are ticked, and
 which
 checkbox is for which row? as these boxex are produced at runtime and
 assigned different names at runtime isnt it? unlike the DirectLink
 component
 which can pass parameters such as the object's id, how does a checkbox
 (or
 if other appropriate components) identify the row?

 i could use directlink instead and open up another window where user tick
 the box in a separate page for each Attendance row, but that would be bad
 design...

 any suggestions pleaes, thanks very much!
 --
 View this message in context:
 http://www.nabble.com/hi%2C-is-it-possible-to-do-this-with-tapestry...-tf2126696.html#a5867937
 Sent from the Tapestry - User forum at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 
 -- 
 Thanks, Karthik
 
 

-- 
View this message in context: 
http://www.nabble.com/hi%2C-is-it-possible-to-do-this-with-tapestry...-tf2126696.html#a5868510
Sent from the Tapestry - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hi, is it possible to do this with tapestry...

2006-08-18 Thread Karthik N

based on

component id=tickbox type=CheckBox
  binding name=value value=currentAttendance.attended/
/component

when you submit, then the value from the check box will be automatically
inserted into currentAttendance.attended - you don't need to do anything.

if you don't want to change the datatype of the Attendance domain objects,
then you can just have the following methods on your attendance class:

boolean isAttended()
setIsAttended(boolean)

which can behave as a bridge between the checkbox and the underlying
Attendance domain methods.

You can also use translators to bridge this, i don't have a ready example.

Another alternative is to use InvokeListener on the Page to be able to
reassemble your attendance object before the submit method on the page gets
called.

As you can see there are many ways to do it.  I'm in the middle of something
so can't explain more elaborately as this point, but if you get stuck
further will be happy to help in the next day or two.

On 8/18/06, zqzuk [EMAIL PROTECTED] wrote:



hi, thanks for prompt reply,

then you just need to bind the checkbox value to a
currentAttendance.persentognl

sorry could you be more specific about this please? i still dont quite
understand. like this?


property name=currentAttendance/
component id=attendances type=For
binding name=source value=attendances/
binding name=value value=currentAttendance/
binding name=element value=literal:tr/
/component
component id=student type=Insert
binding name=value value=currentAttendance.student.name/
/component
component id=classname type=Insert
binding name=value value=currentAttendance.classname/
/component
component id=tickbox type=CheckBox
binding name=value value=currentAttendance.attended/
/component


then i suppose i need to change Attendance.attended to boolean type?

also, when SAVE is clicked, how can i update each object? would it be:

for each(element in getAttendances()){
getCurrentAttendance().set..   // but how can i get the variable
values of each attendance
}

thanks alot!







karthik.nar wrote:

 you should ensure that the Attendance list provided to the For loop is
 exactly the same both during render and rewind.

 then, irrespective of the number of rows the render/rewind sequence will
 be
 exactly the same.

 so the checkbox  on render will correspond to the same Attendance object
 when the rewind happens.

 then you just need to bind the checkbox value to a
 currentAttendance.persentognl


 On 8/18/06, zqzuk [EMAIL PROTECTED] wrote:


 Hi, the scenario is that i have a collection of Attendance objects- for
 example, Attendance(Student s, String class, String attended) - to be
 displayed on a page. and i would like a checkbox (or other components
 whichever appropriate) for each row. so if the student attended the
 class,
 user can tick the box. user then ticks those boxes if the student
 attended
 the class, then finally click a button save, and program will figure
 out
 which Attendance objects are changed and commit database transactions.

 so something like this:

 ---
 Student   class attended
 ---
 Bob math   ticked
 Henry  physicsticked
 Anne   englishticked
 Nick history unticked

 [Save Button]
 --

 each row above represents an Attendance object. the problem is, because
 the
 number of rows are variant, so i m using a For component to produce
these
 rows automatcally. but how can i know which checkboxex are ticked, and
 which
 checkbox is for which row? as these boxex are produced at runtime and
 assigned different names at runtime isnt it? unlike the DirectLink
 component
 which can pass parameters such as the object's id, how does a checkbox
 (or
 if other appropriate components) identify the row?

 i could use directlink instead and open up another window where user
tick
 the box in a separate page for each Attendance row, but that would be
bad
 design...

 any suggestions pleaes, thanks very much!
 --
 View this message in context:

http://www.nabble.com/hi%2C-is-it-possible-to-do-this-with-tapestry...-tf2126696.html#a5867937
 Sent from the Tapestry - User forum at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 Thanks, Karthik



--
View this message in context:
http://www.nabble.com/hi%2C-is-it-possible-to-do-this-with-tapestry...-tf2126696.html#a5868510
Sent from the Tapestry - User forum at Nabble.com.


-
To unsubscribe, 

Re: hi, is it possible to do this with tapestry...

2006-08-18 Thread zqzuk

thanks so much! i ll have a go with it!




karthik.nar wrote:
 
 based on
 
 component id=tickbox type=CheckBox
binding name=value value=currentAttendance.attended/
 /component
 
 when you submit, then the value from the check box will be automatically
 inserted into currentAttendance.attended - you don't need to do anything.
 
 if you don't want to change the datatype of the Attendance domain objects,
 then you can just have the following methods on your attendance class:
 
 boolean isAttended()
 setIsAttended(boolean)
 
 which can behave as a bridge between the checkbox and the underlying
 Attendance domain methods.
 
 You can also use translators to bridge this, i don't have a ready example.
 
 Another alternative is to use InvokeListener on the Page to be able to
 reassemble your attendance object before the submit method on the page
 gets
 called.
 
 As you can see there are many ways to do it.  I'm in the middle of
 something
 so can't explain more elaborately as this point, but if you get stuck
 further will be happy to help in the next day or two.
 
 On 8/18/06, zqzuk [EMAIL PROTECTED] wrote:


 hi, thanks for prompt reply,

 then you just need to bind the checkbox value to a
 currentAttendance.persentognl

 sorry could you be more specific about this please? i still dont quite
 understand. like this?


 property name=currentAttendance/
 component id=attendances type=For
 binding name=source value=attendances/
 binding name=value value=currentAttendance/
 binding name=element value=literal:tr/
 /component
 component id=student type=Insert
 binding name=value value=currentAttendance.student.name/
 /component
 component id=classname type=Insert
 binding name=value value=currentAttendance.classname/
 /component
 component id=tickbox type=CheckBox
 binding name=value value=currentAttendance.attended/
 /component


 then i suppose i need to change Attendance.attended to boolean type?

 also, when SAVE is clicked, how can i update each object? would it be:

 for each(element in getAttendances()){
 getCurrentAttendance().set..   // but how can i get the variable
 values of each attendance
 }

 thanks alot!







 karthik.nar wrote:
 
  you should ensure that the Attendance list provided to the For loop is
  exactly the same both during render and rewind.
 
  then, irrespective of the number of rows the render/rewind sequence
 will
  be
  exactly the same.
 
  so the checkbox  on render will correspond to the same Attendance
 object
  when the rewind happens.
 
  then you just need to bind the checkbox value to a
  currentAttendance.persentognl
 
 
  On 8/18/06, zqzuk [EMAIL PROTECTED] wrote:
 
 
  Hi, the scenario is that i have a collection of Attendance objects-
 for
  example, Attendance(Student s, String class, String attended) - to be
  displayed on a page. and i would like a checkbox (or other components
  whichever appropriate) for each row. so if the student attended the
  class,
  user can tick the box. user then ticks those boxes if the student
  attended
  the class, then finally click a button save, and program will figure
  out
  which Attendance objects are changed and commit database transactions.
 
  so something like this:
 
 
 ---
  Student   class attended
 
 ---
  Bob math   ticked
  Henry  physicsticked
  Anne   englishticked
  Nick history unticked
 
  [Save Button]
  --
 
  each row above represents an Attendance object. the problem is,
 because
  the
  number of rows are variant, so i m using a For component to produce
 these
  rows automatcally. but how can i know which checkboxex are ticked, and
  which
  checkbox is for which row? as these boxex are produced at runtime and
  assigned different names at runtime isnt it? unlike the DirectLink
  component
  which can pass parameters such as the object's id, how does a checkbox
  (or
  if other appropriate components) identify the row?
 
  i could use directlink instead and open up another window where user
 tick
  the box in a separate page for each Attendance row, but that would be
 bad
  design...
 
  any suggestions pleaes, thanks very much!
  --
  View this message in context:
 
 http://www.nabble.com/hi%2C-is-it-possible-to-do-this-with-tapestry...-tf2126696.html#a5867937
  Sent from the Tapestry - User forum at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  Thanks, Karthik
 
 

 --
 View this message in context:
 

Re: tapdoc

2006-08-18 Thread andyhot
thx Norbert!

Just saw that we're not currently generating javadocs for contib (why???) at
http://tapestry.apache.org/tapestry4.1/tapestry-contrib/apidocs/index.html
but I guess you could already include this link in
TapDocTask.java (for the external javadoc references)

Norbert Sándor wrote:
 Hello,

 I have converted Tapdoc to Maven2, so it now has a standard website
 at: http://www.erinors.com/developer/project/tapdoc/
 The jar and the source code is available from our maven2 repository.
 You can download a Maven2-based demo application from the website as
 well.

 (Please note:
 - the Maven2 integration is partial, currently the ant-plugin is used
 to integrate tapdoc to maven-based projects
 - the source code needs further cleanup)

 Regards,
 Norbert Sándor

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can you always have valid html with tapestry templates?

2006-08-18 Thread Xiaoshu Wang
I don't see that as a valid HTML yet. The jwcid attribute is not specified
in HTML.  Maybe Tapestry should put up a namespace for its tag.  So, we can
use 

span tapestry:jwcid=[EMAIL PROTECTED] tapestry:element=tr ...

It will make it at least an XHTML document.

Xiaoshu
 Use:
 table
 trtdblah blah/td/tr
 
 tr jwcid=[EMAIL PROTECTED] elemente=tr... stuff iterated 
 over by the foreach /tr
 
 /table
 
 Denis McCarthy wrote:
  Hi,
  I have tables that are populated by a @ForEach component in my html.
  The html template is like this
  table
  trtdblah blah/td/tr
 
  span jwcid=[EMAIL PROTECTED] ...
  tr - stuff iterated over by the foreach /tr /span /table
 
  Now I recently upgraded to eclipse callisto using the Web tools 
  project, and the html validator is complaining that the 
 above is not 
  valid html (which, in fairness it isn't, as the span occurs 
 within a 
  table but not within a td). Is there some html-compliant way to 
  structure this, or will I have to live with my tapestry templates 
  being non-html compliant?
  TIA
  Denis
 
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
 Andreas Andreou - [EMAIL PROTECTED] - 
 http://andyhot.di.uoa.gr Tapestry / Tacos developer Open 
 Source / J2EE Consulting 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DynamicSelectionList and ArrayIndexOutOfBoundsException

2006-08-18 Thread Waimun Yeow
The second version of the demo helped me to correct the way custom  
objects are passed in the selection property model classes. I have  
made the changes in my selection model classes and also the  
pageBeginningRender() method.  However, I am still having the same  
problem. I have posted the .page and codes below.


-waimun

!-- .page --
property-specification name=toDepartment  
type=project6.model.UserDepartment

persistent=no /

property-specification name=user type=project6.model.UserAccount
persistent=no /

property-specification name=departmentSelectionModel
		type=org.apache.tapestry.form.IPropertySelectionModel  
persistent=no /


property-specification name=usersByDepartmentList
type=java.util.List initial-value=new java.util.ArrayList()
persistent=no /



property-specification name=userDepartmentDao
type=project6.dao.UserDepartmentDao
global.getApplicationContext().getBean(userDepartmentDao)
/property-specification

property-specification name=userAccountDao
type=project6.dao.UserAccountDao
global.getApplicationContext().getBean(userAccountDao)
/property-specification
component id=referralForm type=Form
binding name=listener expression=listeners.formSubmit/
/component
component id=deptSelection type=PropertySelection
binding name=value expression=toDepartment /
binding name=model expression=departmentSelectionModel /
binding name=disabled expression=false /
static-binding name=submitOnChange value=false /
/component

component id=userSelection type=man:DynamicSelectionList
binding name=parent expression=components.deptSelection /
binding name=value expression=user /
binding name=childList expression=usersByDepartmentList /
/component

!-- .page --

/* method's code for page */

public void pageBeginRender(PageEvent event) {

List allDepartments = getUserDepartmentDao().findAll();

if (getDepartmentSelectionModel() == null) {
setDepartmentSelectionModel(new 
DepartmentSelectionModel(
allDepartments));
}

if (getUsersByDepartmentList().size() == 0) {

DepartmentSelectionModel deptModel = (DepartmentSelectionModel)  
getDepartmentSelectionModel();



for (Iterator it = deptModel.getDepartmentList().iterator(); it
.hasNext();) {


UserDepartment d = (UserDepartment) it.next();

List usersByDepartment = 
getUserAccountDao().findByDepartment(d);

if (usersByDepartment.size() == 0) {
List a = new ArrayList();
a.add(getUserAccountDao().findByUsername(Waimun 
Yeow));
usersByDepartment = a;
}

getUsersByDepartmentList().add(
new 
UsersByDepartmentSelectionModel(usersByDepartment));

}

}


if (getToDepartment() == null) {
setToDepartment((UserDepartment) getDepartmentSelectionModel 
().getOption(4));

}

}
/* method's code for page */

/* models' class */
public class UsersByDepartmentSelectionModel implements  
IPropertySelectionModel, Serializable {


private List usersList = new ArrayList();

private static UserAccountDao dao;

public UsersByDepartmentSelectionModel() {

XmlBeanFactory factory = new XmlBeanFactory(new 
ClassPathResource(
DaoContext.xml));

dao = (UserAccountDao) factory.getBean(userAccountDao);
}

public UsersByDepartmentSelectionModel(List users) {

this();

if (users == null)
return;

usersList = users;
}

public int getOptionCount() {
return usersList.size();
}

public Object getOption(int index) {
return usersList.get(index);
}

public String getLabel(int index) {
return ((UserAccount) usersList.get(index)).getUserName();
}

public String getValue(int index) {
return ((UserAccount) 
usersList.get(index)).getUserId().toString();
}

public Object translateValue(String index) {
return 

RE: Unable to construct service tapestry.multipart.ServletMultipartDecoder

2006-08-18 Thread Andrés Nates

Thanks for your help, with all dependecies and with this lines in
hivemind.xml 

implementation service-
id=tapestry.multipart.ServletMultipartDecoder
create-instance
class=org.apache.tapestry.multipart.MultipartDecoderImpl,maxSize=-1
model=threaded /
/implementation


Everything work fine.


-Mensaje original-
De: Ryan Holmes [mailto:[EMAIL PROTECTED] 
Enviado el: Miércoles, 16 de Agosto de 2006 11:00 p.m.
Para: Tapestry users
Asunto: Re: Unable to construct service
tapestry.multipart.ServletMultipartDecoder

All your jar versions are fine. Try replacing this:

implementation service-id=tapestry.multipart.MultipartDecoder
create-instance
class=org.apache.tapestry.multipart.MultipartDecoderImpl,maxSize=-1
model=threaded /
/implementation

with this:

implementation service- 
id=tapestry.multipart.ServletMultipartDecoder
create-instance
class=org.apache.tapestry.multipart.MultipartDecoderImpl,maxSize=-1
model=threaded /
/implementation


The service-id changed a few months ago (at 4.0.1 I think). There is  
now a tapestry.multipart.ServletMultipartDecoder and  a  
tapestry.portlet.multipart.PortletMultipartDecoder service.

-Ryan

On Aug 16, 2006, at 3:06 PM, Andrés Nates wrote:

 Hello Jesse, I'm have put this version of jars

 tapestry-portlet-4.0.2.jar
 tapestry-4.0.2.jar
 tapestry-annotations-4.0.2.jar
 tapestry-contrib-4.0.2.jar
 commons-codec-1.3.jar
 commons-logging-1.0.4.jar
 commons-fileupload-1.1.jar
 commons-io-1.2-jar
 ognl-2.6.7.jar
 oro-2.0.8.jar
 hivemind-1.1.1.jar
 hivemind-lib-1.1.1.jar


 But the error still appear


 -Mensaje original-
 De: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
 Enviado el: Miércoles, 16 de Agosto de 2006 04:37 p.m.
 Para: Tapestry users
 Asunto: Re: Unable to construct service
 tapestry.multipart.ServletMultipartDecoder

 You need fileupload-1.1..

 http://tapestry.apache.org/tapestry4/dependencies.html

 On 8/16/06, Andrés Nates [EMAIL PROTECTED] wrote:

 I'm have this version of jar

 tapestry-4.0.2
 hivemind-1.1
 hivemind-lib-1.1
 commons-fileupload-1.0

 and the file Hivemind.xml look this:

 ?xml version=1.0?
 module id=com.ttdev.album version=1.0.0
 service-point id=ImageService
 interface=org.apache.tapestry.engine.IEngineService
 invoke-factory
 construct  
 class=com.ttdev.album.ImageService
 set-object property=linkFactory
 value=service:tapestry.url.LinkFactory/
 /construct
 /invoke-factory
 /service-point
 contribution
 configuration-id=tapestry.services.ApplicationServices
 service name=image
 object=service:com.ttdev.album.ImageService/
 /contribution
 contribution configuration- 
 id=tapestry.url.ServiceEncoders
 page-service-encoder id=page extension=html
 service=page/
 encoder id=image
 object=instance:com.ttdev.album.ImageServiceEncoder/
 /contribution
 implementation service- 
 id=tapestry.multipart.MultipartDecoder
 create-instance
 class=org.apache.tapestry.multipart.MultipartDecoderImpl,maxSize=-1
 model=threaded /
 /implementation
 /module


 -Mensaje original-
 De: Ryan Holmes [mailto:[EMAIL PROTECTED]
 Enviado el: Miércoles, 16 de Agosto de 2006 03:57 p.m.
 Para: Tapestry users
 Asunto: Re: Unable to construct service
 tapestry.multipart.ServletMultipartDecoder

 IIRC, the name of that service changed between Tapestry 4.0 and
 4.0.1, but your stacktrace looks correct (well, as correct as a
 stacktrace can be).

 What versions of the following jars do you have:  tapestry, hivemind,
 hivemind-lib and commons-fileupload?

 Also, are you specifying a maximum upload size in your hivemodule.xml
 file? It will look something like this:

implementation service-
 id=tapestry.multipart.ServletMultipartDecoder
  create-instance

 class=org.apache.tapestry.multipart.MultipartDecoderImpl,maxSize=500 
 000
 
model=threaded /
/implementation

 If so, copy and paste that into your response.

 -Ryan

 On Aug 16, 2006, at 7:26 AM, Andrés Nates wrote:

 When I'm run de example of the component upload, this example has a
 basic
 upload component for images (jpeg).  This is the error message









 org.apache.hivemind.ApplicationRuntimeException: Unable to
 construct service
 tapestry.multipart.ServletMultipartDecoder: Could not load class
 org.apache.tapestry.multipart.MultipartDecoderImpl from
 WebappClassLoader
   delegate: false
   repositories:
 /WEB-INF/classes/
 -- Parent Classloader:
 [EMAIL PROTECTED]
 : org/apache/commons/fileupload/servlet/ServletFileUpload

 org.apache.hivemind.impl.servicemodel.ThreadedServiceModel.construct 
 Se
 rviceF
 orCurrentThread(ThreadedServiceModel.java:186)

 org.apache.hivemind.impl.servicemodel.ThreadedServiceModel.getServic 
 eI
 mpleme
 

Dojo Floating Pane to Render a Tapestry Page?

2006-08-18 Thread Karthik N

Hello,

First-off apologies for the cross-post, but I figured I might get answers
from either of the forums.

I'm using Tap 4.0 and Tacos4 beta2.

I already have a FindPage developed.

I have this requirement where I have a Page 1.  Inside Page 1,  I have a
Find button.  On click of the Find button I want to show up FindPage
inside a FloatingPane in Page1.

I'm able to show a simple FindPage using Dojo's FloatingPane  setUrl to
point to FindPage

My questions/concerns:

1) Will I run into any issues with this Dojo FP setUrl approach?
2) Is there a more elegant way to show up the FindPage using some existing
Tacos component?

Thanks, Karthik


Re: Dojo Floating Pane to Render a Tapestry Page?

2006-08-18 Thread andyhot
Karthik N wrote:
 Hello,

 First-off apologies for the cross-post, but I figured I might get answers
 from either of the forums.

 I'm using Tap 4.0 and Tacos4 beta2.
Since you're actively developing, I'd advise a nightly beta-3
(http://tacos.sourceforge.net/nightly/). It bundles
dojo0.3.1 instead of some-trunk-revision-after-0.2.2 :)
Also, documentation in http://tacos.sourceforge.net has been updated
and it describes some new components only available in beta-3

 I already have a FindPage developed.

 I have this requirement where I have a Page 1.  Inside Page 1,  I have a
 Find button.  On click of the Find button I want to show up FindPage
 inside a FloatingPane in Page1.

 I'm able to show a simple FindPage using Dojo's FloatingPane  setUrl to
 point to FindPage

 My questions/concerns:

 1) Will I run into any issues with this Dojo FP setUrl approach?
Does the included FindPage also includes dojo?  There may be some
issues there,
but i'm not sure... if it works however, use it!
 2) Is there a more elegant way to show up the FindPage using some
 existing
 Tacos component?
Will if your Page1 was like:
span jwcid=@SearchForm/
div id='results'
span jwcid=@SearchResults/
/div

you could use the popup parameter, to have the contents of the results
div evaluated and
opened in a floating pane. See
http://tacos.sourceforge.net/userguide/EffectsPopups.html
for more...

 Thanks, Karthik



-- 
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dojo Floating Pane to Render a Tapestry Page?

2006-08-18 Thread Karthik N


Will if your Page1 was like:
span jwcid=@SearchForm/
div id='results'
span jwcid=@SearchResults/
/div




Yes, I've used this before and it works very well.  Unfortunately I need to
render an entire existing page as-is, and I can't have a multi-window
app!(customer requirement)  :-(


tableRowsIterator nullPointerException

2006-08-18 Thread anil


Hi 

I'm fairly new to tapestry and am trying to create an implementation of the
IBasicTableModel interface so that I can paginate results and get results
(from Hibernate via Spring) when I need them.

I've written my component but whenever I load the page I get a ognlException
on the tableRowsIterator which seems to stem from a nullPointerException
from getCurrentPageRows.

Does this mean that there's no data being loaded into the table component to
be displayed? I must admit I'm not entirely sure what approach to take to
try and solve the problem.

If anyone could shed any light on what's happening, or could give me an idea
of where to start debugging this I'd be most grateful!

A.
-- 
View this message in context: 
http://www.nabble.com/tableRowsIterator-nullPointerException-tf2128224.html#a5872918
Sent from the Tapestry - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tableRowsIterator nullPointerException

2006-08-18 Thread Karthik N

you would need to post the source of your IBasicTableModel for any further
specific help.

considering you're new to tapestry, i'd suggest a hardcoded implementaiton
of IBasicTableModel first and then get spring/hibernate into the picture.

On 8/18/06, anil [EMAIL PROTECTED] wrote:




Hi

I'm fairly new to tapestry and am trying to create an implementation of
the
IBasicTableModel interface so that I can paginate results and get results
(from Hibernate via Spring) when I need them.

I've written my component but whenever I load the page I get a
ognlException
on the tableRowsIterator which seems to stem from a nullPointerException
from getCurrentPageRows.

Does this mean that there's no data being loaded into the table component
to
be displayed? I must admit I'm not entirely sure what approach to take to
try and solve the problem.

If anyone could shed any light on what's happening, or could give me an
idea
of where to start debugging this I'd be most grateful!

A.
--
View this message in context:
http://www.nabble.com/tableRowsIterator-nullPointerException-tf2128224.html#a5872918
Sent from the Tapestry - User forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Thanks, Karthik


Re: tapdoc

2006-08-18 Thread andyhot
Henri Dupre wrote:
 Oh this looks very nice!
 Does tapdoc take into account also components with annotations that
 have no
 .jwc?

It does... I think it uses a custom doclet to extract javadocs from
those 'annotation-only'
components

 On 8/15/06, Norbert Sándor [EMAIL PROTECTED] wrote:

 Hello,

 I have converted Tapdoc to Maven2, so it now has a standard website at:
 http://www.erinors.com/developer/project/tapdoc/
 The jar and the source code is available from our maven2 repository.
 You can download a Maven2-based demo application from the website as
 well.

 (Please note:
 - the Maven2 integration is partial, currently the ant-plugin is used to
 integrate tapdoc to maven-based projects
 - the source code needs further cleanup)

 Regards,
 Norbert Sándor

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-- 
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tapdoc

2006-08-18 Thread Henri Dupre

Oh this looks very nice!
Does tapdoc take into account also components with annotations that have no
.jwc?


On 8/15/06, Norbert Sándor [EMAIL PROTECTED] wrote:


Hello,

I have converted Tapdoc to Maven2, so it now has a standard website at:
http://www.erinors.com/developer/project/tapdoc/
The jar and the source code is available from our maven2 repository.
You can download a Maven2-based demo application from the website as well.

(Please note:
- the Maven2 integration is partial, currently the ant-plugin is used to
integrate tapdoc to maven-based projects
- the source code needs further cleanup)

Regards,
Norbert Sándor

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Henri Dupre
Actualis Center


Re: DynamicSelectionList and ArrayIndexOutOfBoundsException

2006-08-18 Thread Shing Hing Man
  UsersByDepartmentSelectionModel.java  (and
DepartmentSelectionModel.jav)
looks suspcious.


The  UsersByDepartmentSelectionModel.getOption method
returns a value 
from userLists, but 
UsersByDepartmentSelectionModel.translateValue returns
a value using a dao.


You might like to test 
UsersByDepartmentSelectionModel in a standalone
PropertySelection 
component : select an entry from the drop list. Print
the selected value in a form 
listener method.

Shing



--- Waimun Yeow [EMAIL PROTECTED] wrote:

 The second version of the demo helped me to correct
 the way custom  
 objects are passed in the selection property model
 classes. I have  
 made the changes in my selection model classes and
 also the  
 pageBeginningRender() method.  However, I am still
 having the same  
 problem. I have posted the .page and codes below.
 
 -waimun
 
 !-- .page --
 property-specification name=toDepartment  
 type=project6.model.UserDepartment
   persistent=no /
 
   property-specification name=user
 type=project6.model.UserAccount
   persistent=no /
 
 property-specification
 name=departmentSelectionModel
   

type=org.apache.tapestry.form.IPropertySelectionModel
  
 persistent=no /
   
   property-specification
 name=usersByDepartmentList
   type=java.util.List initial-value=new
 java.util.ArrayList()
   persistent=no /
 
   
 
   property-specification name=userDepartmentDao
   type=project6.dao.UserDepartmentDao
   

global.getApplicationContext().getBean(userDepartmentDao)
   /property-specification
 
   property-specification name=userAccountDao
   type=project6.dao.UserAccountDao
   

global.getApplicationContext().getBean(userAccountDao)
   /property-specification
 component id=referralForm type=Form
 binding name=listener
 expression=listeners.formSubmit/
 /component
   component id=deptSelection
 type=PropertySelection
   binding name=value expression=toDepartment /
   binding name=model
 expression=departmentSelectionModel /
   binding name=disabled expression=false /
   static-binding name=submitOnChange
 value=false /
   /component
 
   component id=userSelection
 type=man:DynamicSelectionList
   binding name=parent
 expression=components.deptSelection /
   binding name=value expression=user /
   binding name=childList
 expression=usersByDepartmentList /
   /component
 
 !-- .page --
 
 /* method's code for page */
 
 public void pageBeginRender(PageEvent event) {
 
 List allDepartments =
 getUserDepartmentDao().findAll();
   
   if (getDepartmentSelectionModel() == null) {
   setDepartmentSelectionModel(new
 DepartmentSelectionModel(
   allDepartments));
   }
 
   if (getUsersByDepartmentList().size() == 0) {
   
   DepartmentSelectionModel deptModel =
 (DepartmentSelectionModel)  
 getDepartmentSelectionModel();
 
 
   for (Iterator it =
 deptModel.getDepartmentList().iterator(); it
   .hasNext();) {
 
   
   UserDepartment d = (UserDepartment) it.next();
 
   List usersByDepartment =
 getUserAccountDao().findByDepartment(d);
   
   if (usersByDepartment.size() == 0) {
   List a = new ArrayList();
   a.add(getUserAccountDao().findByUsername(Waimun
 Yeow));
   usersByDepartment = a;
   }
   
   getUsersByDepartmentList().add(
   new
 UsersByDepartmentSelectionModel(usersByDepartment));
 
   }
 
   }
   
 
   if (getToDepartment() == null) {
   setToDepartment((UserDepartment)
 getDepartmentSelectionModel 
 ().getOption(4));
   }
 
 }
 /* method's code for page */
 
 /* models' class */
 public class UsersByDepartmentSelectionModel
 implements  
 IPropertySelectionModel, Serializable {
 
   private List usersList = new ArrayList();
   
   private static UserAccountDao dao;
 
   public UsersByDepartmentSelectionModel() {
   
   XmlBeanFactory factory = new XmlBeanFactory(new
 ClassPathResource(
   DaoContext.xml));
 
 dao = (UserAccountDao)
 factory.getBean(userAccountDao);
   }
 
   public UsersByDepartmentSelectionModel(List users)
 {
 
   this();
   
   if (users == null)
   return;
 
   usersList = users;
   }
 
   

Re: DynamicSelectionList and ArrayIndexOutOfBoundsException

2006-08-18 Thread Waimun Yeow
Yes, indeed the two selection models are suspicious. I used  
PropertySelection to test DepartmentSelectionModel and the value  
displayed by @Insert shows the correct value of the selected entry  
but the list did not generate selected=selected for the entry after  
submit and hence fell back to no entries listed as  
selected=selected. Is that the correct behavior of  
PropertySelection? I am definitely missing something there. By the  
way, I am using binding name=submitOnChange expression=true /  
to test the PropertySelection.


-waimun

On 8/18/06, Shing Hing Man wrote:
   UsersByDepartmentSelectionModel.java  (and
 DepartmentSelectionModel.jav)
 looks suspcious.


 The  UsersByDepartmentSelectionModel.getOption method
 returns a value
 from userLists, but
 UsersByDepartmentSelectionModel.translateValue returns
 a value using a dao.


 You might like to test
 UsersByDepartmentSelectionModel in a standalone
 PropertySelection
 component : select an entry from the drop list. Print
 the selected value in a form
 listener method.

 Shing



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Easy insert and tapestry 4.1

2006-08-18 Thread andyhot
Just added 0.20 release - better update to it now...

FAQ is at
http://tapfx.sourceforge.net/multiproject/tapfx-easyinsert/faq.html
Prefixes can be changed by adding something like this in your
hivemodule.xml:

contribution configuration-id=EasyInsert.Prefix
use prefix=# /
/contribution

Don't know if this eventually be useful for others, but the new idea
here (for
the next release) is to allow such configurations:

contribution configuration-id=EasyInsert.Prefix
use prefix=# for=ognl/
use prefix=% for=message/
use prefix=* for=prop/
/contribution

Josh Long wrote:
 Seems to work wonderfully, Andreas! Very useful.. Thanks again, and
 apologies for the long delay.

 Josh

 On 8/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hey josh, since i'm not yer ready for a release of easyinsert,
 here's an untested jar to try...



 From Josh Long [EMAIL PROTECTED]:

  Hello all,
 
  Anyone had any success getting the tapfx easy-insert component
 working in
  tapestry 4.1? I tried (err.. dropped it in my classpath under
 WEB-INF/lib/
  and replaced a working span jwcid=@Insert value =ognl:
 company.name
  company/span with ${company.name} on Home.html ) it in mine and was
  rewarded with :
 
  vemodule.xml, line 23, column 21]
  at
 
 org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation

  (AbstractServiceModelImpl.java:166)
  at
 
  not be null.
  [jar:file:/home/jlong/.m2/repository/tapfx/easy-insert/0.15/easy-
  insert-0.15.jar!/META-INF/hivemodule.xml, line 23, column 21]:
  org.apache.hivemind.ApplicationRuntimeException: Unable to
 construct service
  EastInsert.EasyTemplateSource: Parameter parameters must not be null.
  [jar:file:/home/jlong/.m2/repository/tapfx/easy-insert/0.15/easy-
  insert-0.15.jar!/META-INF/hivemodule.xml, line 23, column 21]
 
 
  Thanks again for any help,
 
  Josh
 


 -- 



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DynamicSelectionList and ArrayIndexOutOfBoundsException

2006-08-18 Thread Shing Hing Man
You might like to try  to implemented your own equal 
method in   UserDepartment.java.

Shing



--- Waimun Yeow [EMAIL PROTECTED] wrote:

 Yes, indeed the two selection models are suspicious.
 I used  
 PropertySelection to test DepartmentSelectionModel
 and the value  
 displayed by @Insert shows the correct value of the
 selected entry  
 but the list did not generate selected=selected
 for the entry after  
 submit and hence fell back to no entries listed as  
 selected=selected. Is that the correct behavior of
  
 PropertySelection? I am definitely missing something
 there. By the  
 way, I am using binding name=submitOnChange
 expression=true /  
 to test the PropertySelection.
 
 -waimun
 
 On 8/18/06, Shing Hing Man wrote:
 UsersByDepartmentSelectionModel.java  (and
   DepartmentSelectionModel.jav)
   looks suspcious.
  
  
   The  UsersByDepartmentSelectionModel.getOption
 method
   returns a value
   from userLists, but
   UsersByDepartmentSelectionModel.translateValue
 returns
   a value using a dao.
  
  
   You might like to test
   UsersByDepartmentSelectionModel in a standalone
   PropertySelection
   component : select an entry from the drop list.
 Print
   the selected value in a form
   listener method.
  
   Shing
  
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

Home page :
  http://uk.geocities.com/matmsh/index.html



___ 
Yahoo! Messenger - with free PC-PC calling and photo sharing. 
http://uk.messenger.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]