T3: IUploadFile

2007-12-16 Thread Nazmul Bhuiyan

Hi,


I'm uploading a file and want to rename the file name after loaded.

I couldn't find any method to do that. Can some one please let me know how
to rename/delete a file in a file system?

I can write this loaded file to a new file (dest)  but couldn't delete the
original file (src)

File src = new File(fileName);
File dest = new File(fileName + . + bak);

getFile().write(dest); // Works OK

src.delete(); // Doesn't work

src.renameTo(dest); //Doesn't work

I've tried the following with no luck:
// Move file (src) to File/directory dest. 
public static synchronized void moveFile(File src, File dest) throws
FileNotFoundException, IOException {
copyFile(src, dest);
src.delete();
}
// Copy file (src) to File/directory dest.
public static synchronized void copyFile(File src, File dest) throws
IOException {
InputStream in = new FileInputStream(src);
OutputStream out = new FileOutputStream(dest);

// Transfer bytes from in to out
byte[] buf = new byte[10240];
int len;
while ((len = in.read(buf))  0) {
out.write(buf, 0, len);
}
in.close();
out.close();
}

Thanks

Naz
-- 
View this message in context: 
http://www.nabble.com/T3%3A-IUploadFile-tp14369576p14369576.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T3: PropertySelection

2007-12-06 Thread Nazmul Bhuiyan

Hello,

I'm having issue with PropertySelection in a Form.

I'm using one page to add and update. Data entry fields of the form gets
changed according to the property selection during add. For example if
infType=DOG selected then the form displays only dog specific fields and if
infType=PAK then the form displays only parking specific fields. All these
works fine.

The problem is when I try to update the record. The form fields are not
displayed accordingly to the infType. If I reselect the item from the
PropertySelection then it shows the fields properly.

I couldn't figure out how to execute the submitOnChange automatically in
pageBeginRender.

If any one help me on this would be very helpful.

public void pageBeginRender(PageEvent event) {

this.userLoggedIn = 
AuthorisationUtil.getNormalisedRemoteUserName(event);

if (!getNewInfringement()  !event.getRequestCycle().isRewinding()) {
   //execute the submitOnChange automatically
}  


.html
---
form jwcid=@Form delegate=ognl:beans.delegate stateful=ognl:true
listener=ognl:listeners.formSubmit
tbody
tr
td width=1% nowrap Infringement Type: /td
td width=99%
select jwcid=infType
option value=0DOG/option
option value=1PRK/option
/select
 *
/td
/tr
/tbody

.page
---
property-specification name=infType type=java.lang.String /
component id=infType type=PropertySelection
binding name=model expression=availInfType/binding
binding name=value expression=InfType/binding
binding name=submitOnChange expression=true/binding
/component


.java
---
public abstract String getInfType();

public abstract void setInfType(String infType);

public IPropertySelectionModel getAvailInfType() {
String[] infTypeArray = 
EfiInfTypeDAO.getActiveEfiInfTypeCodeList()
.toArray(new String[0]);
return new StringPropertySelectionModel(infTypeArray);
}
-- 
View this message in context: 
http://www.nabble.com/T3%3A-PropertySelection-tf4959054.html#a14202683
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T3: Spindle Tomcat

2007-11-08 Thread Nazmul Bhuiyan

Hi,

I'm using WTP to deploy my web application from eclipse.  I've setup the WTP
according to the document
http://wiki.apache.org/tapestry/HowToSetupEclipseWtp.

It works perfect but can't add any other project other then Dynamic Web
project.

Now I've created a Tapestry Web project by spindle but don't know how to
deploy the web app from eclipse. Can I use the WTP or do I need some thing
else?

I'm using the following 
Tapestry 3.0.4 
Eclipse 3.3
Tomcat 5.5

Can anyone please let me know How to deploy Tapestry Web project created by
Spindle from Eclipse?

Thanks

Naz


-- 
View this message in context: 
http://www.nabble.com/T3%3A-Spindle-Tomcat-tf4775829.html#a13661519
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: enable/disable one column according to the other columns result

2007-10-22 Thread Nazmul Bhuiyan

Thanks a lot Nick and Paul.
Naz

Nick Westgate wrote:
 
 There is a Conditional component:
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/Conditional.html
 
 But much more useful are the If, Else and For components here:
 http://www.t-deli.com/
 
 If you want to disable links then Paul has already given you the solution.
 DirectLink has a boolean disabled parameter:
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/DirectLink.html
 
 So use something like:
 disabled=ognl:currentBatch.bchPassFailInd.equals('Failed')
 
 Cheers,
 Nick.
 
 
 Nazmul Bhuiyan wrote:
 There is no @if in T3
 
 I need to disable the direct link fields on the last column according to
 the
 2nd column's value. 
 e.g. if table's 2nd column value is 'Failed' of any row then I want to
 disable the last field of that row.
 And if 2nd column value is 'Passed' then I want to leave enable the
 field.
 
 I don't know how to do this in HTML
 
 Thanks
 
 Naz
 
 
 Nick Westgate wrote:
 It's not clear what you mean by enable/disable.
 You can use @If when you want to include/exclude content.

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 I'm using T3.

 I'm trying to enable/disable last table cell according to my 2nd column
 value.
 My code below:

 tr jwcid=@Foreach source=ognl:batches value=ognl:currentBatch
 element=tr
td-span jwcid=@Insert value=ognl:currentBatch.bchBatchIdId/td  
 td-span jwcid=@Insert
 value=ognl:currentBatch.bchPassFailIndPass/td
td
a 
jwcid=@DirectLink 
listener=ognl:listeners.batchProcessPassedAction 
parameters=ognl:currentBatch.bchBatchId 
title=Processed
   /a  
nbsp;nbsp;
a 
jwcid=@DirectLink 
listener=ognl:listeners.batchProcessFailedAction 
parameters=ognl:currentBatch.bchBatchId 
title=Unsigned
/a 
/td
 Thanks


 Paul Stanton-2 wrote:
 T5 or T4?

 T4 you can do:
  Passed 

 Nazmul Bhuiyan wrote:
 Hi,

 I'm displaying a list of data in a table.
 e.g.
 IdStatus  DirectLink
 1 Passed  Passed - Failed
 2 FailedPassed - Failed

 I want to enable/disable 3rd column 'DirectLink' column according to
 the
 2nd
 column 'Status'.

 Is there any one know how to do this?

 Thanks

 Naz
   

 -
 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]



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

-- 
View this message in context: 
http://www.nabble.com/T3%3A-enable-disable-one-column-according-to-the-other-columns-result-tf4637680.html#a13352223
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T3: enable/disable one column according to the other columns result

2007-10-16 Thread Nazmul Bhuiyan

Hi,

I'm displaying a list of data in a table.
e.g.
IdStatus  DirectLink
1 Passed  Passed - Failed
2 FailedPassed - Failed

I want to enable/disable 3rd column 'DirectLink' column according to the 2nd
column 'Status'.

Is there any one know how to do this?

Thanks

Naz
-- 
View this message in context: 
http://www.nabble.com/T3%3A-enable-disable-one-column-according-to-the-other-columns-result-tf4637680.html#a13245280
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: enable/disable one column according to the other columns result

2007-10-16 Thread Nazmul Bhuiyan

There is no @if in T3

I need to disable the direct link fields on the last column according to the
2nd column's value. 
e.g. if table's 2nd column value is 'Failed' of any row then I want to
disable the last field of that row.
And if 2nd column value is 'Passed' then I want to leave enable the field.

I don't know how to do this in HTML

Thanks

Naz


Nick Westgate wrote:
 
 It's not clear what you mean by enable/disable.
 You can use @If when you want to include/exclude content.
 
 Cheers,
 Nick.
 
 
 Nazmul Bhuiyan wrote:
 I'm using T3.
 
 I'm trying to enable/disable last table cell according to my 2nd column
 value.
 My code below:
 
 tr jwcid=@Foreach source=ognl:batches value=ognl:currentBatch
 element=tr
  td-span jwcid=@Insert value=ognl:currentBatch.bchBatchIdId/td  
 td-span jwcid=@Insert
 value=ognl:currentBatch.bchPassFailIndPass/td
  td
  a 
  jwcid=@DirectLink 
  listener=ognl:listeners.batchProcessPassedAction 
  parameters=ognl:currentBatch.bchBatchId 
  title=Processed
 /a  
  nbsp;nbsp;
  a 
  jwcid=@DirectLink 
  listener=ognl:listeners.batchProcessFailedAction 
  parameters=ognl:currentBatch.bchBatchId 
  title=Unsigned
  /a 
  /td
 Thanks
 
 
 Paul Stanton-2 wrote:
 T5 or T4?

 T4 you can do:
  Passed 

 Nazmul Bhuiyan wrote:
 Hi,

 I'm displaying a list of data in a table.
 e.g.
 IdStatus  DirectLink
 1 Passed  Passed - Failed
 2 FailedPassed - Failed

 I want to enable/disable 3rd column 'DirectLink' column according to
 the
 2nd
 column 'Status'.

 Is there any one know how to do this?

 Thanks

 Naz
   


 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T3%3A-enable-disable-one-column-according-to-the-other-columns-result-tf4637680.html#a13246418
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: Upload

2007-10-02 Thread Nazmul Bhuiyan

The example code working now after removing the following line of code:
public static final Format SIZE_FORMAT = NumberFormat.getNumberInstance();

I'm not exactly sure what's wrong with this line of code.

Thanks a lot.

Naz


Nazmul Bhuiyan wrote:
 
 I've removed that deprecated method from my page.
 
 I'm running this example page as part of my original project. And running
 from inside Eclipse. All other pages working ok. That's how I normally
 test any example before using into my real page.
 
 In the example code there is no .page file. Is my .page file ok?
 
 Thanks
 
 Naz
 
 
 Nick Westgate wrote:
 
 I've tested the example code on the page. It works with the exception
 of file.isTruncated(), which has been deprecated, I presume.
 
 So the rest of the code, ie the code you post below, does work.
 
 It must be a configuration issue. Are you running this example page
 in isolation, or is it part of a larger project? Are you running
 from inside Eclipse? If not, how is Tomcat started?
 
 Cheers,
 Nick.
 
 
 Nazmul Bhuiyan wrote:
 .page:
 page-specification class=com.fujitsu.efi.web.pages.test.UploadPage
 /page-specification
 
 The .page file was missed spelled but after correcting the file name I'm
 getting the following error:
 
 Could not load class UploadPage from WebappClassLoader delegate: false
 repositories: /WEB-INF/classes/ -- Parent Classloader:
 [EMAIL PROTECTED] : UploadPage
 
 
 But com.fujitsu.efi.web.pages.test.UploadPage class exists in
 WEB-INF/classes directory.
 
 Thanks
 
 Naz
 
 
 Nick Westgate wrote:
 What about your .page file?

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 If you click on the link I've provided you will see the code. I've
 copied
 the
 code from there. This is from my Upload.html and formSubmit is as
 below:

 private IUploadFile file;
 private File serverFile;

 public IUploadFile getFile() { return file; }

 public void setFile(IUploadFile value) {
 file = value;
 }
 public void formSubmit(IRequestCycle cycle) { 
 InputStream fis = file.getStream(); 
 FileOutputStream fos = null;
  
 try { 
 fos = new FileOutputStream(new  File(file.getFileName()));
 byte[] buffer = new byte[1024];  
 while (true) {
 int length = fis.read(buffer);  
 if (length   0) {
 break;
 }
 fos.write(buffer, 0, length);   
 }
 fis.close();
 fos.close();
 serverFile = new File(file.getFileName());

 } catch (IOException ioe) {
 ioe.printStackTrace();
 } finally {
 if (fis != null) {
 try { fis.close(); } catch (IOException ioe) {}
 }   
 if (fos != null) {
 try { fos.close(); } catch (IOException ioe) {}
 }
 }
 }


 Nick Westgate wrote:
 Ok. Is this in a page or a component?
 And your Java code? Do you have a formSubmit listener?

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 I've copied the code from
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html

 form jwcid=@Form listener=ognl:listeners.formSubmit
 table bgcolor=#c0c0c0 cellpadding=4
 tr
 td colspan=2File:nbsp;input jwcid=@Upload 
 file=ognl:file
 type=file/input/td
 /tr
 tr
 td colspan=2input type=submit 
 value=Upload/input/td
 /tr


 Thanks

 Naz


 Nick Westgate wrote:
 Please post the (relevant parts of) the code.

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 I'm getting an error when trying the Upload component example in
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html.

 Unable to resolve expression 'listeners.formSubmit' for
 [EMAIL PROTECTED] 
 binding: ExpressionBinding[UploadPage listeners.formSubmit
 cachedValue=null] 

 I've modified the listener.formSubmit to listeners.formSubmit
 according
 to
 Nick and still getting the error.

 Nick's answer for same issue in this forum:
 http://www.nabble.com/Form-upload-and-download-tf2236396.html#a6201542

 Is there anything missed?

 Thanks

 Naz
 -
 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]



 -
 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]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T3%3A

Re: T3: Upload

2007-10-01 Thread Nazmul Bhuiyan

I've removed that deprecated method from my page.

I'm running this example page as part of my original project. And running
from inside Eclipse. All other pages working ok. That's how I normally test
any example before using into my real page.

In the example code there is no .page file. Is my .page file ok?

Thanks

Naz


Nick Westgate wrote:
 
 I've tested the example code on the page. It works with the exception
 of file.isTruncated(), which has been deprecated, I presume.
 
 So the rest of the code, ie the code you post below, does work.
 
 It must be a configuration issue. Are you running this example page
 in isolation, or is it part of a larger project? Are you running
 from inside Eclipse? If not, how is Tomcat started?
 
 Cheers,
 Nick.
 
 
 Nazmul Bhuiyan wrote:
 .page:
 page-specification class=com.fujitsu.efi.web.pages.test.UploadPage
 /page-specification
 
 The .page file was missed spelled but after correcting the file name I'm
 getting the following error:
 
 Could not load class UploadPage from WebappClassLoader delegate: false
 repositories: /WEB-INF/classes/ -- Parent Classloader:
 [EMAIL PROTECTED] : UploadPage
 
 
 But com.fujitsu.efi.web.pages.test.UploadPage class exists in
 WEB-INF/classes directory.
 
 Thanks
 
 Naz
 
 
 Nick Westgate wrote:
 What about your .page file?

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 If you click on the link I've provided you will see the code. I've
 copied
 the
 code from there. This is from my Upload.html and formSubmit is as
 below:

 private IUploadFile file;
 private File serverFile;

 public IUploadFile getFile() { return file; }

 public void setFile(IUploadFile value) {
 file = value;
 }
 public void formSubmit(IRequestCycle cycle) { 
 InputStream fis = file.getStream(); 
 FileOutputStream fos = null;
  
 try { 
 fos = new FileOutputStream(new  File(file.getFileName()));
 byte[] buffer = new byte[1024];  
 while (true) {
 int length = fis.read(buffer);  
 if (length   0) {
 break;
 }
 fos.write(buffer, 0, length);   
 }
 fis.close();
 fos.close();
 serverFile = new File(file.getFileName());

 } catch (IOException ioe) {
 ioe.printStackTrace();
 } finally {
 if (fis != null) {
 try { fis.close(); } catch (IOException ioe) {}
 }   
 if (fos != null) {
 try { fos.close(); } catch (IOException ioe) {}
 }
 }
 }


 Nick Westgate wrote:
 Ok. Is this in a page or a component?
 And your Java code? Do you have a formSubmit listener?

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 I've copied the code from
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html

 form jwcid=@Form listener=ognl:listeners.formSubmit
 table bgcolor=#c0c0c0 cellpadding=4
  tr
  td colspan=2File:nbsp;input jwcid=@Upload 
 file=ognl:file
 type=file/input/td
  /tr
  tr
  td colspan=2input type=submit 
 value=Upload/input/td
  /tr


 Thanks

 Naz


 Nick Westgate wrote:
 Please post the (relevant parts of) the code.

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 I'm getting an error when trying the Upload component example in
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html.

 Unable to resolve expression 'listeners.formSubmit' for
 [EMAIL PROTECTED] 
 binding: ExpressionBinding[UploadPage listeners.formSubmit
 cachedValue=null] 

 I've modified the listener.formSubmit to listeners.formSubmit
 according
 to
 Nick and still getting the error.

 Nick's answer for same issue in this forum:
 http://www.nabble.com/Form-upload-and-download-tf2236396.html#a6201542

 Is there anything missed?

 Thanks

 Naz
 -
 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]



 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T3%3A-Upload-tf4531396.html#a12987390
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: Upload

2007-09-30 Thread Nazmul Bhuiyan

.page:
page-specification class=com.fujitsu.efi.web.pages.test.UploadPage
/page-specification

The .page file was missed spelled but after correcting the file name I'm
getting the following error:

Could not load class UploadPage from WebappClassLoader delegate: false
repositories: /WEB-INF/classes/ -- Parent Classloader:
[EMAIL PROTECTED] : UploadPage


But com.fujitsu.efi.web.pages.test.UploadPage class exists in
WEB-INF/classes directory.

Thanks

Naz


Nick Westgate wrote:
 
 What about your .page file?
 
 Cheers,
 Nick.
 
 
 Nazmul Bhuiyan wrote:
 If you click on the link I've provided you will see the code. I've copied
 the
 code from there. This is from my Upload.html and formSubmit is as below:
 
 private IUploadFile file;
 private File serverFile;
 
 public IUploadFile getFile() { return file; }
 
 public void setFile(IUploadFile value) {
 file = value;
 }
 public void formSubmit(IRequestCycle cycle) { 
 InputStream fis = file.getStream(); 
 FileOutputStream fos = null;
  
 try { 
 fos = new FileOutputStream(new  File(file.getFileName()));
 byte[] buffer = new byte[1024];  
 while (true) {
 int length = fis.read(buffer);  
 if (length   0) {
 break;
 }
 fos.write(buffer, 0, length);   
 }
 fis.close();
 fos.close();
 serverFile = new File(file.getFileName());
 
 } catch (IOException ioe) {
 ioe.printStackTrace();
 } finally {
 if (fis != null) {
 try { fis.close(); } catch (IOException ioe) {}
 }   
 if (fos != null) {
 try { fos.close(); } catch (IOException ioe) {}
 }
 }
 }
 
 
 Nick Westgate wrote:
 Ok. Is this in a page or a component?
 And your Java code? Do you have a formSubmit listener?

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 I've copied the code from
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html

 form jwcid=@Form listener=ognl:listeners.formSubmit
 table bgcolor=#c0c0c0 cellpadding=4
tr
td colspan=2File:nbsp;input jwcid=@Upload 
 file=ognl:file
 type=file/input/td
/tr
tr
td colspan=2input type=submit 
 value=Upload/input/td
/tr


 Thanks

 Naz


 Nick Westgate wrote:
 Please post the (relevant parts of) the code.

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 I'm getting an error when trying the Upload component example in
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html.

 Unable to resolve expression 'listeners.formSubmit' for
 [EMAIL PROTECTED] 
 binding: ExpressionBinding[UploadPage listeners.formSubmit
 cachedValue=null] 

 I've modified the listener.formSubmit to listeners.formSubmit
 according
 to
 Nick and still getting the error.

 Nick's answer for same issue in this forum:
 http://www.nabble.com/Form-upload-and-download-tf2236396.html#a6201542

 Is there anything missed?

 Thanks

 Naz
 -
 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]



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

-- 
View this message in context: 
http://www.nabble.com/T3%3A-Upload-tf4531396.html#a12970887
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T3: Upload

2007-09-27 Thread Nazmul Bhuiyan

I'm getting an error when trying the Upload component example in
http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html.

Unable to resolve expression 'listeners.formSubmit' for
[EMAIL PROTECTED] 
binding: ExpressionBinding[UploadPage listeners.formSubmit cachedValue=null] 

I've modified the listener.formSubmit to listeners.formSubmit according to
Nick and still getting the error.

Nick's answer for same issue in this forum:
http://www.nabble.com/Form-upload-and-download-tf2236396.html#a6201542

Is there anything missed?

Thanks

Naz
-- 
View this message in context: 
http://www.nabble.com/T3%3A-Upload-tf4531396.html#a12931369
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: Upload

2007-09-27 Thread Nazmul Bhuiyan

I've copied the code from
http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html

form jwcid=@Form listener=ognl:listeners.formSubmit
table bgcolor=#c0c0c0 cellpadding=4
tr
td colspan=2File:nbsp;input jwcid=@Upload 
file=ognl:file
type=file/input/td
/tr
tr
td colspan=2input type=submit 
value=Upload/input/td
/tr


Thanks

Naz


Nick Westgate wrote:
 
 Please post the (relevant parts of) the code.
 
 Cheers,
 Nick.
 
 
 Nazmul Bhuiyan wrote:
 I'm getting an error when trying the Upload component example in
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html.
 
 Unable to resolve expression 'listeners.formSubmit' for
 [EMAIL PROTECTED] 
 binding: ExpressionBinding[UploadPage listeners.formSubmit
 cachedValue=null] 
 
 I've modified the listener.formSubmit to listeners.formSubmit according
 to
 Nick and still getting the error.
 
 Nick's answer for same issue in this forum:
 http://www.nabble.com/Form-upload-and-download-tf2236396.html#a6201542
 
 Is there anything missed?
 
 Thanks
 
 Naz
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T3%3A-Upload-tf4531396.html#a12934189
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: Upload

2007-09-27 Thread Nazmul Bhuiyan

If you click on the link I've provided you will see the code. I've copied the
code from there. This is from my Upload.html and formSubmit is as below:

private IUploadFile file;
private File serverFile;

public IUploadFile getFile() { return file; }

public void setFile(IUploadFile value) {
file = value;
}
public void formSubmit(IRequestCycle cycle) { 
InputStream fis = file.getStream(); 
FileOutputStream fos = null;
 
try { 
fos = new FileOutputStream(new  File(file.getFileName()));
byte[] buffer = new byte[1024];  
while (true) {
int length = fis.read(buffer);  
if (length   0) {
break;
}
fos.write(buffer, 0, length);   
}
fis.close();
fos.close();
serverFile = new File(file.getFileName());

} catch (IOException ioe) {
ioe.printStackTrace();
} finally {
if (fis != null) {
try { fis.close(); } catch (IOException ioe) {}
}   
if (fos != null) {
try { fos.close(); } catch (IOException ioe) {}
}
}
}


Nick Westgate wrote:
 
 Ok. Is this in a page or a component?
 And your Java code? Do you have a formSubmit listener?
 
 Cheers,
 Nick.
 
 
 Nazmul Bhuiyan wrote:
 I've copied the code from
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html
 
 form jwcid=@Form listener=ognl:listeners.formSubmit
 table bgcolor=#c0c0c0 cellpadding=4
  tr
  td colspan=2File:nbsp;input jwcid=@Upload 
 file=ognl:file
 type=file/input/td
  /tr
  tr
  td colspan=2input type=submit 
 value=Upload/input/td
  /tr
 
 
 Thanks
 
 Naz
 
 
 Nick Westgate wrote:
 Please post the (relevant parts of) the code.

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 I'm getting an error when trying the Upload component example in
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html.

 Unable to resolve expression 'listeners.formSubmit' for
 [EMAIL PROTECTED] 
 binding: ExpressionBinding[UploadPage listeners.formSubmit
 cachedValue=null] 

 I've modified the listener.formSubmit to listeners.formSubmit according
 to
 Nick and still getting the error.

 Nick's answer for same issue in this forum:
 http://www.nabble.com/Form-upload-and-download-tf2236396.html#a6201542

 Is there anything missed?

 Thanks

 Naz
 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T3%3A-Upload-tf4531396.html#a12934608
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: DateTimePicker

2007-09-13 Thread Nazmul Bhuiyan

I couldn't manage to use the displayName for DateTimePicker. I don't know
how to define it. 

I had similar problem with DatePicker and handle it as below:

tr
td Active Date:/td
td
-span jwcid=activeDate /
-span style=color : #f00; *
/td
/tr

component id=activeDate type=DatePicker
binding name=validator expression=beans.requiredDate/
binding name=value expression=activeDate/binding
/component

And then I've done all my validation on my page class. I know it is not
tapestry way.

Can you please show me how should I define my DateTimePicker component with
the the displayName in my html templet? 

I've done for other field as below:

tr
td
span jwcid=@FieldLabel
field=ognl:components.inputAddrTypeCodeOldCode: 
/td
td
input type=text jwcid=inputAddrTypeCodeOld/
/td
/tr

component id=inputAddrTypeCodeOld type=ValidField
static-binding name=displayName value=Code  /
binding name=validator expression=beans.required/
binding name=value expression=addrType.adtTypeCode/
/component


Thanks

Naz


Nick Westgate wrote:
 
 Hmm, looks like you are trying to edit a value of type DateTimePicker!
 
 property-specification is used to define properties of your Java class.
 You are presumably trying to edit a date, so something like:
 
 .page
 property-specification name=offnHearDate type=java.lang.Date/
 component id=offnHearDatePicker type=myws:DateTimePicker
  binding name=validator expression=beans.requiredDate /
  binding name=value expression=offnHearDate/binding
  binding name=displayName expression='The field name' /
 /component
 
 All bindings given above are marked as required in DateTimePicker.jwc.
 
 .java
  public abstract Date getOffnHearDate();
  public abstract void setOffnHearDate(Date offnHearDate);
 
 Cheers,
 Nick.
 
 
 Nazmul Bhuiyan wrote:
 Please help me finding what I'm missing here?
 
 I'm getting the following error:
 
 org.apache.tapestry.ApplicationRuntimeException 
 Unable to convert 'myws:DateTimePicker' to a property type. 
 location: context:/InfringementEdit.page, line 39, column 74 

 org.apache.tapestry.ApplicationRuntimeException 
 Could not load class myws:DateTimePicker from WebappClassLoader delegate:
 false repositories: /WEB-INF/classes/ -- Parent Classloader:
 [EMAIL PROTECTED] :
 myws:DateTimePicker 
 
 
 
 .application
 application name=eFileWeb
  library id=contrib
 specification-path=/org/apache/tapestry/contrib/Contrib.library / 
  library id=myws
 specification-path=/myws/tapestry/components/MyWorkspace.library/
 /application
 
 
 .page
 
 property-specification name=offnHearDate type=myws:DateTimePicker/
 component id=offnHearDate type=DateTimePicker
  binding name=validator expression=beans.requiredDate /
  binding name=value expression=offnHearDate/binding
 /component
 
 
 .java
  public abstract DateTimePicker getOffnHearDate();
  public abstract void setOffnHearDate(DateTimePicker offnHearDate);
 
 Thanks
 
 Naz
 
 Nick Westgate wrote:
 Most readers here won't have a T3 project handy,
 and even fewer will have used this component (I haven't).

 Please define didn't work.

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 I've downloaded the myworkspace-0.2.jar from
 http://myworkspace.sourceforge.net/component-library.html.
 I've tried to use this component as DatePicker but didn't work. I must
 have
 missed something basic.
 Can some one please some example how to use this component?
 For example: in the html templet, .page and the java?
 Thanks
 Naz
 -
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T3%3A-DateTimePicker-tf4344767.html#a12665364
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: DateTimePicker

2007-09-12 Thread Nazmul Bhuiyan

Please help me finding what I'm missing here?

I'm getting the following error:

org.apache.tapestry.ApplicationRuntimeException 
Unable to convert 'myws:DateTimePicker' to a property type. 
location: context:/InfringementEdit.page, line 39, column 74 
   
org.apache.tapestry.ApplicationRuntimeException 
Could not load class myws:DateTimePicker from WebappClassLoader delegate:
false repositories: /WEB-INF/classes/ -- Parent Classloader:
[EMAIL PROTECTED] : myws:DateTimePicker 



.application
application name=eFileWeb
library id=contrib
specification-path=/org/apache/tapestry/contrib/Contrib.library /
library id=myws
specification-path=/myws/tapestry/components/MyWorkspace.library/
/application


.page

property-specification name=offnHearDate type=myws:DateTimePicker/
component id=offnHearDate type=DateTimePicker
binding name=validator expression=beans.requiredDate /
binding name=value expression=offnHearDate/binding
/component


.java
public abstract DateTimePicker getOffnHearDate();
public abstract void setOffnHearDate(DateTimePicker offnHearDate);

Thanks

Naz

Nick Westgate wrote:
 
 Most readers here won't have a T3 project handy,
 and even fewer will have used this component (I haven't).
 
 Please define didn't work.
 
 Cheers,
 Nick.
 
 
 Nazmul Bhuiyan wrote:
 I've downloaded the myworkspace-0.2.jar from
 http://myworkspace.sourceforge.net/component-library.html.
 I've tried to use this component as DatePicker but didn't work. I must
 have
 missed something basic.
 Can some one please some example how to use this component?
 For example: in the html templet, .page and the java?
 Thanks
 Naz
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T3%3A-DateTimePicker-tf4344767.html#a12648572
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: CheckBox

2007-09-05 Thread Nazmul Bhuiyan

Hi Nick,

Few more basic questions:
To use contrib's component I have added the following lines in my
.application file as below:
  library id=contrib
specification-path=/org/apache/tapestry/contrib/Contrib.library /

How should I define the path to use the ListPropertySelectionModel as there
is no library.
I'm getting path exception.
library id=tasselListSelection
specification-path=/org/rz/tapestryutils/ListPropertySelectionModel.class/


Can you please please give me some example how should I use this
ListPropertySelectionModel? I'm not using Palette.

Thanks


Nick Westgate wrote:
 
 You can write your own selection model, or of course use what others have
 already written to address this problem.
 
 Check out this thread:
 http://www.nabble.com/Multiple-Select-tf144431.html#a400648
 
 Since you are using a list it's easiest to use Robert's
 ListPropertySelectionModel.
 http://www.tapestrycomponents.org/Tassel/app?service=external/ViewComponentsp=SListPropertySelectionModel
 
 Cheers,
 Nick.
 
 
 Nazmul Bhuiyan wrote:
 Hi Nick,
 
 Is there any method that I can use to create a
 ObjectPropertySelectionModel
 model instead of StringPropertySelectionModel as below?
 
 public static final IPropertySelectionModel theModel = 
 new StringPropertySelectionModel(new String[] {a, b, c}); 
 
 My page displays a list of objects and I want select some of these
 objects
 and do something about it.
 
 
 Thanks
 
 Naz
 
 
 Nick Westgate wrote:
 You'll want to use the MultiplePropertySelection component:
 http://tapestry.apache.org/tapestry3/doc/api/org/apache/tapestry/contrib/form/MultiplePropertySelection.html

 If you need to change the rendering style you can just grab
 the source for the default renderer (which generates a table)
 and change it to output things differently.

 Cheers,
 Nick.


 Nick Westgate wrote:
 It depends how T3's method matching works, but you might need:
 public void formSubmit(IRequestCycle cycle)

 Note the I in IRequestCycle.

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 Hello,

 I’ve a list of objects displayed in a page. I want to collect ids of
 selected object by adding a check box for each of these objects. Then 
 I’ll
 use another action event to do something with this collection of ids.

 But I’m getting the following error message:

 Unable to resolve expression 'formSubmit' for
 [EMAIL PROTECTED] 

 binding:ExpressionBinding[InfringementsMaint formSubmit]
 location:context:/InfringementsMaint.html, line 10

 Can any one please help me out on this?

 My code below:

 .html
 table border=1 cellpadding=1 cellspacing=0 class=jive-table
 form jwcid=@Form listener=ognl:listeners.formSubmit
 div class=jive-contentBoxHeaderInfringement List/div
 tr class=jive-table-header
 tdInf Type/td
 tdTran Type/td
 tdName/td
 tdAddress/td
 tdOffence/td
 tdReminder/td
 tdEdit/Delete/td
 tdAdd to Batch/td
 /tr
 tr jwcid=@Foreach source=ognl:infringements
 value=ognl:currentInfringement element=tr
 td/td
 td/td
 td/td
 td/td
 td/td
 td/td

 td
 input type=checkbox jwcid=@Checkbox 
 selected=ognl:addToBatch/
 /td
 /tr
 /form
 /table

 .page
 property-specification name=addToBatch type=boolean 
 persistent=yes/

 .java
 public abstract boolean isAddToBatch();
 public abstract void setAddToBatch(boolean value);

 public void formSubmit(RequestCycle cycle) {
 if (isAddToBatch()) {
//Get all the infringement Id to add into Batch and add 
 them into
 a collection
 }
 }

 -
 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]



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

-- 
View this message in context: 
http://www.nabble.com/T3%3A-CheckBox-tf4369817.html#a12513557
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T3: CheckBox

2007-09-02 Thread Nazmul Bhuiyan

Hello,

I’ve a list of objects displayed in a page. I want to collect ids of
selected object by adding a check box for each of these objects. Then I’ll
use another action event to do something with this collection of ids.

But I’m getting the following error message:

Unable to resolve expression 'formSubmit' for
[EMAIL PROTECTED]
binding:ExpressionBinding[InfringementsMaint formSubmit]
location:   context:/InfringementsMaint.html, line 10

Can any one please help me out on this?

My code below:

.html
table border=1 cellpadding=1 cellspacing=0 class=jive-table
form jwcid=@Form listener=ognl:listeners.formSubmit
div class=jive-contentBoxHeaderInfringement List/div
tr class=jive-table-header
tdInf Type/td
tdTran Type/td
tdName/td
tdAddress/td
tdOffence/td
tdReminder/td
tdEdit/Delete/td
tdAdd to Batch/td
/tr
tr jwcid=@Foreach source=ognl:infringements
value=ognl:currentInfringement element=tr
td/td
td/td
td/td
td/td
td/td
td/td

td
input type=checkbox jwcid=@Checkbox 
selected=ognl:addToBatch/
/td
/tr
/form
/table

.page
property-specification name=addToBatch type=boolean persistent=yes/

.java
public abstract boolean isAddToBatch();
public abstract void setAddToBatch(boolean value);

public void formSubmit(RequestCycle cycle) {
if (isAddToBatch()) {
   //Get all the infringement Id to add into Batch and add them into
a collection
}
}

-- 
View this message in context: 
http://www.nabble.com/T3%3A-CheckBox-tf4369817.html#a12455075
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T3: DateTimePicker

2007-08-28 Thread Nazmul Bhuiyan

I've downloaded the myworkspace-0.2.jar from
http://myworkspace.sourceforge.net/component-library.html.
I've tried to use this component as DatePicker but didn't work. I must have
missed something basic.
Can some one please some example how to use this component?
For example: in the html templet, .page and the java?
Thanks
Naz
-- 
View this message in context: 
http://www.nabble.com/T3%3A-DateTimePicker-tf4344767.html#a12377971
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T3: Disable TextField

2007-08-19 Thread Nazmul Bhuiyan

Hi,
I’m trying to disable one field according to the condition (new or update).
But I’m getting the following error.
Can any one please check and tell me what I’m doing wrong?
I’ve been following the component reference in
http://tapestry.apache.org/tapestry3/doc/ComponentReference/TextField.html
and using disabled=ognl:true.

Thanks

Naz

Error:
Template for component UserEdit contains multiple references to embedded
component inputUserLogin.


html:



tr
td width=1% nowrap

 User Login: 

/td
td width=99%
input type=text 
  jwcid=inputUserLogin 
  size=20 
  maxlength=20/
 /td
/tr 


tr
td width=1% nowrap

User Login: 

 /td
 td width=99%
 input type=text 
   jwcid=inputUserLogin 
   disabled=ognl:true 
   size=20 
   maxlength=20/
  /td
/tr



.pgae
component id=inputUserLogin type=ValidField
static-binding name=displayName value=User Login /
binding name=validator expression=beans.required/
binding name=value expression=user.usrLogin/
/component

-- 
View this message in context: 
http://www.nabble.com/T3%3A-Disable-TextField-tf4296203.html#a12228918
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: Disable TextField

2007-08-19 Thread Nazmul Bhuiyan

Disable works but it is failing when I put the condition.

span jwcid=@Conditional condition=ognl:newUser
disabled=ognl:false

span jwcid=@Conditional condition=ognl:newUser
disabled=ognl:true




Nazmul Bhuiyan wrote:
 
 Hi,
 I’m trying to disable one field according to the condition (new or
 update). But I’m getting the following error.
 Can any one please check and tell me what I’m doing wrong?
 I’ve been following the component reference in
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/TextField.html
 and using disabled=ognl:true.
 
 Thanks
 
 Naz
 
 Error:
 Template for component UserEdit contains multiple references to embedded
 component inputUserLogin.
 
 
 html:
 
 
 
 tr
 td width=1% nowrap
 
  User Login: 
 
 /td
   td width=99%
 input type=text 
   jwcid=inputUserLogin 
   size=20 
   maxlength=20/
  /td
 /tr 
 
   
 tr
   td width=1% nowrap
   
   User Login: 
 
  /td
td width=99%
  input type=text 
jwcid=inputUserLogin 
disabled=ognl:true 
size=20 
maxlength=20/
   /td
   /tr
 
 
 
 .pgae
 component id=inputUserLogin type=ValidField
 static-binding name=displayName value=User Login /
 binding name=validator expression=beans.required/
 binding name=value expression=user.usrLogin/
 /component
 
 

-- 
View this message in context: 
http://www.nabble.com/T3%3A-Disable-TextField-tf4296203.html#a12229106
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: Disable TextField

2007-08-19 Thread Nazmul Bhuiyan

Thanks a lot.

Allen Guo wrote:
 
 there are one more inputUserLogin  in .html file. It's not be allowed
 For this case, you have to define two components with different name in
 .page file.
 
 2007/8/20, Nazmul Bhuiyan  [EMAIL PROTECTED]:


 Hi,
 I'm trying to disable one field according to the condition (new or
 update).
 But I'm getting the following error.
 Can any one please check and tell me what I'm doing wrong?
 I've been following the component reference in
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/TextField.html
 and using disabled=ognl:true.

 Thanks

 Naz

 Error:
 Template for component UserEdit contains multiple references to embedded
 component inputUserLogin.


 html:



 tr
 td width=1% nowrap

  User Login:

 /td
 td width=99%
 input type=text
   jwcid=inputUserLogin
   size=20
   maxlength=20/
  /td
 /tr


 tr
 td width=1% nowrap

 User Login:

  /td
  td width=99%
  input type=text
jwcid=inputUserLogin
disabled=ognl:true
size=20
maxlength=20/
   /td
 /tr



 .pgae
 component id=inputUserLogin type=ValidField
 static-binding name=displayName value=User Login /
 binding name=validator expression=beans.required/
 binding name=value expression=user.usrLogin/
 /component

 --
 View this message in context:
 http://www.nabble.com/T3%3A-Disable-TextField-tf4296203.html#a12228918
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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


 
 

-- 
View this message in context: 
http://www.nabble.com/T3%3A-Disable-TextField-tf4296203.html#a12229309
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T3: PropertySelecton

2007-08-13 Thread Nazmul Bhuiyan

Hello,

I want the user to choose Code and Description. But I can only let the user
choose Code or the Description by the PropertySelection.
Is there any component similar to PropertySelection that I can use for this
purpose, so that user can see Code and Description?
Some code example would be great help for me.

Regards

Naz


My current code looks like:

.html
tr
  td width=1% nowrapAddress Type: /td
  td width=99%
select jwcid=addrType
  option value=0Postal/option
  option value=1Street/option
/select
  /td
/tr

.page
property-specification name=addrType type=java.lang.String /

component id=addrType type=PropertySelection
binding name=model expression=availAddrType/binding
binding name=value expression=AddrType/binding
/component

.java
public abstract String getAddrType();
public abstract void setAddrType(String addrType);

public IPropertySelectionModel getAvailAddrType() {
String[] addrTypeArray = 
EfiAddrTypeDAO.getActiveEfiAddrTypeDescrList().toArray(new String[0]);
return new StringPropertySelectionModel(addrTypeArray);
}

-- 
View this message in context: 
http://www.nabble.com/T3%3A-PropertySelecton-tf4264534.html#a12136626
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: PropertySelecton

2007-08-13 Thread Nazmul Bhuiyan

Not really, I’m retrieving data from the database that has code and
description. If I display code in the PropertySelection then that doesn’t
make any sense to user. I would like to display the description beside the
code.
 
I also need to enable and disable some of the fields according to the item
selected form the PropertySelection.

Even better if I can render only specific fields to enter specific data if
user selects one thing in PropertySelection and other fields to enter other
data if user selects other.

For example if user selects org=Y then user should only see the organization
specific fields in the form and if user selects org=N then user should only
see the person specific fields in the form to enter data.

Is there any T3 specific code example that I can see to understand how
onchange works?

Thanks a lot


Jessek wrote:
 
 Do you mean having two select lists where the second list depends on
 what is selected in the first?
 
 I use this ~all~ the time in combination with @EventListener to update
 the second list when something changes via onchange in the first.
 
 On 8/13/07, Nazmul Bhuiyan [EMAIL PROTECTED] wrote:

 Hello,

 I want the user to choose Code and Description. But I can only let the
 user
 choose Code or the Description by the PropertySelection.
 Is there any component similar to PropertySelection that I can use for
 this
 purpose, so that user can see Code and Description?
 Some code example would be great help for me.

 Regards

 Naz


 My current code looks like:

 .html
 tr
   td width=1% nowrapAddress Type: /td
   td width=99%
 select jwcid=addrType
   option value=0Postal/option
   option value=1Street/option
 /select
   /td
 /tr

 .page
 property-specification name=addrType type=java.lang.String /

 component id=addrType type=PropertySelection
 binding name=model expression=availAddrType/binding
 binding name=value expression=AddrType/binding
 /component

 .java
 public abstract String getAddrType();
 public abstract void setAddrType(String addrType);

 public IPropertySelectionModel getAvailAddrType() {
 String[] addrTypeArray =
 EfiAddrTypeDAO.getActiveEfiAddrTypeDescrList().toArray(new String[0]);
 return new StringPropertySelectionModel(addrTypeArray);
 }

 --
 View this message in context:
 http://www.nabble.com/T3%3A-PropertySelecton-tf4264534.html#a12136626
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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


 
 
 -- 
 Jesse Kuhnert
 Tapestry/Dojo team member/developer
 
 Open source based consulting work centered around
 dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T3%3A-PropertySelecton-tf4264534.html#a12138311
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T3: loosing the User object as soon as the edit action is invoked?

2007-07-25 Thread Nazmul Bhuiyan


After making the EfiUser persist in the UserEdit.page the edit works fine
but after editing one user if I want to add a new user then the page get
populated the previous user. I’m setting user to the EditUser page only in
edit action. But in new action I’m not setting any user but still it is
getting the previous user. Note I’m using same page for add and update.

There must be something that I’m doing wrong in pageBeginRender method.

please look at the following code below?

UserListActive page invoke the action below and set the user to the UserEdit
page accordingly:

   public void userNewAction(IRequestCycle cycle) {

  UserEdit nextPage = (UserEdit) cycle.getPage(UserEdit);
  nextPage.setUserId(0);
  nextPage.setNewUser(true);
  cycle.activate(nextPage);
   }

   public void userEditAction(IRequestCycle cycle) {
  
  UserEdit nextPage = (UserEdit) cycle.getPage(UserEdit);
  Object[] parameters = cycle.getServiceParameters();
  int id = ((Integer) parameters[0]).intValue();

  EfiUser user = EfiUserDAO.getEfiUserById(id);
 
  nextPage.setUser(user);
  nextPage.setNewUser(false);
  cycle.activate(nextPage);
   }



Page spec:

property-specification name=user
type=com.fujitsu.efi.infringement.model.EfiUser persistent=yes/

UserEdit page:

   public void pageBeginRender(PageEvent event) {

  if (!getNewUser()  !event.getRequestCycle().isRewinding()) {
 EfiUser user = getUser();
 setActiveDate(getUser().getUsrActiveDate().getTime());

 if (getUser().getUsrExpiryDate() != null) {
  
setExpiryDate(getUser().getUsrExpiryDate().getTime());
 }

  } else {

 userLoggedIn =
AuthorisationUtil.getNormalisedRemoteUserName(event);
 if (getUser() == null) {
   setUser(new EfiUser());
 }
  }
   }

Thanks

Naz


Nick Westgate wrote:
 
 How is the User object persisted?
 (What relates to it in your UserEdit.page file?)
 
 Cheers,
 Nick.
 
 
 Nazmul Bhuiyan wrote:
 I’m loosing the User object as soon as the edit action is invoked?
 
 I’m setting an object (e.g. User) in page UserMaint.java to the page
 UserEdit.java.
 
 UserMaint.java
 
 public void userEditAction(IRequestCycle cycle) {
 UserEdit nextPage = (UserEdit) cycle.getPage(UserEdit);
  Object[] parameters = cycle.getServiceParameters();
  int id = ((Integer) parameters[0]).intValue();
 
  EfiUser user = EfiUserDAO.getEfiUserById(id);
  
  nextPage.setUser(user);
  nextPage.setNewUser(false);
  cycle.activate(nextPage);
 }
 
 In pageBeginRender method of UserEdit shows the User object with all the
 attributes:
 
 UserEdit.java
 
 public abstract void setUser(EfiUser user);
 public abstract EfiUser getUser()
 
 public void pageBeginRender(PageEvent event) {
 
   if (!getNewUser()  !event.getRequestCycle().isRewinding()) {
  
 System.out.println(Inside pageBeginRender..);
 System.out.println(user:  + getUser());
 System.out.println(ID:  + getUser().getUsrUserId());
  .
  .
  etc
   }  
 }
 
From Debug:
 Inside pageBeginRender..
 user: [EMAIL PROTECTED]
 ID: 1
 
 But in the updateUser method the User object is different and the fields
 I
 don’t want to update are null.
 
 UserEdit.java
 
 public void updateUser(IRequestCycle cycle) {
  System.out.println(In updateUser);
 
  IValidationDelegate delegate = getValidationDelegate();
 
  //HibernateUtil.restartSession();
 
  System.out.println(Inside updateUser..);
 System.out.println(user:  + getUser());
 System.out.println(ID:  + getUser().getUsrUserId());
  .
  .
  etc 
 }
 
From Debug:
 Inside updateUser..
 user: [EMAIL PROTECTED]
 ID: 0
 
 Please help.
 
 Naz
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T3%3A-loosing-the-User-object-as-soon-as-the-edit-action-is-invoked--tf4133892.html#a11804499
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



RE: JumpStart v1.6 - for Tapestry 4.1.2

2007-07-23 Thread Bhuiyan, Nazmul
Hi,
Is it possible for you to put some tips to use tomcat with your
JumpStart?
Thanks
Naz
-Original Message-
From: Geoff Callender [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 24 July 2007 2:18 a.m.
To: Tapestry users
Subject: JumpStart v1.6 - for Tapestry 4.1.2

Hi all,

JumpStart v1.6.0 is now available.  New features include: it works  
with Tapestry 4.1.2, it has a more Maven-like project structure, and  
it builds its exploded EAR file on the fly.  You'll find it at the  
usual place:

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

JumpStart v1.5.0 has also been released today for those wanting to  
stay with Tapestry 4.0.2 but get the other new features.

Comments and suggestions welcomed.  Be brutal or helpful - I don't  
care which, because it all helps to make this stuff more useful.

Cheers,

Geoff Callender

-
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]



T3: loosing the User object as soon as the edit action is invoked?

2007-07-23 Thread Nazmul Bhuiyan

I’m loosing the User object as soon as the edit action is invoked?

I’m setting an object (e.g. User) in page UserMaint.java to the page
UserEdit.java.

UserMaint.java

public void userEditAction(IRequestCycle cycle) {
UserEdit nextPage = (UserEdit) cycle.getPage(UserEdit);
Object[] parameters = cycle.getServiceParameters();
int id = ((Integer) parameters[0]).intValue();

EfiUser user = EfiUserDAO.getEfiUserById(id);

nextPage.setUser(user);
nextPage.setNewUser(false);
cycle.activate(nextPage);
}

In pageBeginRender method of UserEdit shows the User object with all the
attributes:

UserEdit.java

public abstract void setUser(EfiUser user);
public abstract EfiUser getUser()

public void pageBeginRender(PageEvent event) {

  if (!getNewUser()  !event.getRequestCycle().isRewinding()) {

System.out.println(Inside pageBeginRender..);
System.out.println(user:  + getUser());
System.out.println(ID:  + getUser().getUsrUserId());
.
.
etc
  } 
}

From Debug:
Inside pageBeginRender..
user: [EMAIL PROTECTED]
ID: 1

But in the updateUser method the User object is different and the fields I
don’t want to update are null.

UserEdit.java

public void updateUser(IRequestCycle cycle) {
System.out.println(In updateUser);

IValidationDelegate delegate = getValidationDelegate();

//HibernateUtil.restartSession();

System.out.println(Inside updateUser..);
System.out.println(user:  + getUser());
System.out.println(ID:  + getUser().getUsrUserId());
.
.
etc 
}

From Debug:
Inside updateUser..
user: [EMAIL PROTECTED]
ID: 0

Please help.

Naz
-- 
View this message in context: 
http://www.nabble.com/T3%3A-loosing-the-User-object-as-soon-as-the-edit-action-is-invoked--tf4133892.html#a11757072
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



RE: T3: loosing the User object as soon as the edit action is invoked?

2007-07-23 Thread Bhuiyan, Nazmul
Hi Nick,

Thanks a lot.

I've added persistent=yes and it is working.

property-specification name=user
type=com.fujitsu.efi.infringement.model.EfiUser persistent=yes/


Naz

-Original Message-
From: Nick Westgate [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 24 July 2007 5:30 p.m.
To: Tapestry users
Subject: Re: T3: loosing the User object as soon as the edit action is
invoked?

How is the User object persisted?
(What relates to it in your UserEdit.page file?)

Cheers,
Nick.


Nazmul Bhuiyan wrote:
 I'm loosing the User object as soon as the edit action is invoked?
 
 I'm setting an object (e.g. User) in page UserMaint.java to the page
 UserEdit.java.
 
 UserMaint.java
 
 public void userEditAction(IRequestCycle cycle) {
 UserEdit nextPage = (UserEdit) cycle.getPage(UserEdit);
   Object[] parameters = cycle.getServiceParameters();
   int id = ((Integer) parameters[0]).intValue();
 
   EfiUser user = EfiUserDAO.getEfiUserById(id);
   
   nextPage.setUser(user);
   nextPage.setNewUser(false);
   cycle.activate(nextPage);
 }
 
 In pageBeginRender method of UserEdit shows the User object with all
the
 attributes:
 
 UserEdit.java
 
 public abstract void setUser(EfiUser user);
 public abstract EfiUser getUser()
 
 public void pageBeginRender(PageEvent event) {
 
   if (!getNewUser()  !event.getRequestCycle().isRewinding()) {
   
 System.out.println(Inside pageBeginRender..);
 System.out.println(user:  + getUser());
 System.out.println(ID:  + getUser().getUsrUserId());
   .
   .
   etc
   }   
 }
 
From Debug:
 Inside pageBeginRender..
 user: [EMAIL PROTECTED]
 ID: 1
 
 But in the updateUser method the User object is different and the
fields I
 don't want to update are null.
 
 UserEdit.java
 
 public void updateUser(IRequestCycle cycle) {
   System.out.println(In updateUser);
 
   IValidationDelegate delegate = getValidationDelegate();
 
   //HibernateUtil.restartSession();
 
   System.out.println(Inside updateUser..);
 System.out.println(user:  + getUser());
 System.out.println(ID:  + getUser().getUsrUserId());
   .
   .
   etc 
 }
 
From Debug:
 Inside updateUser..
 user: [EMAIL PROTECTED]
 ID: 0
 
 Please help.
 
 Naz

-
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]



T5 Tutorial

2007-07-09 Thread Nazmul Bhuiyan

Hello,

I'm following the T5 tutorial and getting the following error. I've ran this
at my work pc. Is there any proxy issue here or some thing else?

C:\tmpmvn archetype:create -DarchetypeGroupId=org.apache.tapestry
-DarchetypeArtifactId=quickstart -DarchetypeVersion=5.0.5
-DgroupId=org.apache.tapestry -DartifactId=tapestry-tutorial1
-DpackageName=org.apache.tapestry.tutorial
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does not
exist or no valid version could be found
[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time:  1 second
[INFO] Finished at: Tue Jul 10 11:38:50 NZST 2007
[INFO] Final Memory: 1M/2M
[INFO]

-- 
View this message in context: 
http://www.nabble.com/T5-Tutorial-tf4053179.html#a11513000
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



RE: T5 Tutorial

2007-07-09 Thread Bhuiyan, Nazmul
C:\tmpmvn --version
Maven version: 2.0.5

-Original Message-
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 10 July 2007 12:53 p.m.
To: Tapestry users
Subject: Re: T5 Tutorial

What version of Maven are you using?

On 7/9/07, Nazmul Bhuiyan [EMAIL PROTECTED] wrote:

 Hello,

 I'm following the T5 tutorial and getting the following error. I've
ran this
 at my work pc. Is there any proxy issue here or some thing else?

 C:\tmpmvn archetype:create -DarchetypeGroupId=org.apache.tapestry
 -DarchetypeArtifactId=quickstart -DarchetypeVersion=5.0.5
 -DgroupId=org.apache.tapestry -DartifactId=tapestry-tutorial1
 -DpackageName=org.apache.tapestry.tutorial
 [INFO] Scanning for projects...
 [INFO] Searching repository for plugin with prefix: 'archetype'.
 [INFO]


 [ERROR] BUILD ERROR
 [INFO]


 [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin'
does not
 exist or no valid version could be found
 [INFO]


 [INFO] For more information, run Maven with the -e switch
 [INFO]


 [INFO] Total time:  1 second
 [INFO] Finished at: Tue Jul 10 11:38:50 NZST 2007
 [INFO] Final Memory: 1M/2M
 [INFO]


 --
 View this message in context:
http://www.nabble.com/T5-Tutorial-tf4053179.html#a11513000
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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




-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
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: T5 Tutorial

2007-07-09 Thread Bhuiyan, Nazmul
Shall I use Maven 2.0.7?
In the tutorial you have mentioned to use Maven 2.0.5

-Original Message-
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 10 July 2007 1:20 p.m.
To: Tapestry users
Subject: Re: T5 Tutorial

And I'm on Maven 2.0.7 at this point.  This sure feels like a Maven
bug (it's complaining about a missing archetype plugin, not anything
to do with Tapestry specifically).

On 7/9/07, Donyee [EMAIL PROTECTED] wrote:
 I change 5.05 to 5.04,then it works fine.

 2007/7/10, Howard Lewis Ship [EMAIL PROTECTED]:
  What version of Maven are you using?
 
  On 7/9/07, Nazmul Bhuiyan [EMAIL PROTECTED] wrote:
  
   Hello,
  
   I'm following the T5 tutorial and getting the following error. I've ran 
   this
   at my work pc. Is there any proxy issue here or some thing else?
  
   C:\tmpmvn archetype:create -DarchetypeGroupId=org.apache.tapestry
   -DarchetypeArtifactId=quickstart -DarchetypeVersion=5.0.5
   -DgroupId=org.apache.tapestry -DartifactId=tapestry-tutorial1
   -DpackageName=org.apache.tapestry.tutorial
   [INFO] Scanning for projects...
   [INFO] Searching repository for plugin with prefix: 'archetype'.
   [INFO]
   
   [ERROR] BUILD ERROR
   [INFO]
   
   [INFO] The plugin 'org.apache.maven.plugins:maven-archetype-plugin' does 
   not
   exist or no valid version could be found
   [INFO]
   
   [INFO] For more information, run Maven with the -e switch
   [INFO]
   
   [INFO] Total time:  1 second
   [INFO] Finished at: Tue Jul 10 11:38:50 NZST 2007
   [INFO] Final Memory: 1M/2M
   [INFO]
   
   --
   View this message in context: 
   http://www.nabble.com/T5-Tutorial-tf4053179.html#a11513000
   Sent from the Tapestry - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  Howard M. Lewis Ship
  TWD Consulting, Inc.
  Independent J2EE / Open-Source Java Consultant
  Creator and PMC Chair, Apache Tapestry
  Creator, Apache HiveMind
 
  Professional Tapestry training, mentoring, support
  and project work.  http://howardlewisship.com
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 徐 依伟



-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com



RE: T5 Tutorial

2007-07-09 Thread Bhuiyan, Nazmul
Hi Nick,

No luck yet and still getting the same error. 

I've upgraded to Maven 2.0.7 and modified the
maven-2.0.7\conf\settings.xml of maven as follows.

The proxy settings are exactly same as eclipse network settings. I'm
pretty sure proxy setting causing the problem.

Can you please check whether the proxy in settings.xml is ok or not?

  proxies
proxy
!-- idoptional/id --
  activetrue/active
  protocolhttp/protocol
host202.27.42.14/host
  port8080/port
  nonProxyHostslocalhost,127.0.0.1/nonProxyHosts
/proxy
  /proxies

I'll try this at home pc tonight and see if it works.

Thanks

Naz
-Original Message-
From: Nick Westgate [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 10 July 2007 2:51 p.m.
To: Tapestry users
Subject: Re: T5 Tutorial

Try upgrading to 2.0.7.

If that doesn't work, googling the error message suggests
it's a network/proxy problem.

http://maven.apache.org/guides/mini/guide-proxies.html

Cheers,
Nick.


Bhuiyan, Nazmul wrote:
 Shall I use Maven 2.0.7?
 In the tutorial you have mentioned to use Maven 2.0.5

-
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: Updated T5 Tutorial

2007-06-28 Thread Bhuiyan, Nazmul
Great!!

Is it possible for you to include Date field and validation into the
form (e.g. Address created on) that capture date and time?
What are the advantages using Jetty over Tomcat?

Thanks a lot for giving us Tapestry

Naz

-Original Message-
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
Sent: Friday, 29 June 2007 9:40 a.m.
To: Tapestry users
Subject: Updated T5 Tutorial

The T5 Tutorial has been updated:

- It is now HTML format, not PDF
- I've added a chapter on forms and validation

it's still very much a work in progress, but I think it will server
many people's needs better than the raw reference documentation.

http://tapestry.apache.org/tapestry5/tutorial1/index.html

-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
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: T3: Question

2007-06-27 Thread Bhuiyan, Nazmul
Hi Nick,

 

Please find attached code.

 

Thanks

 

Naz

 

 

-Original Message-
From: Nick Westgate [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 27 June 2007 3:42 p.m.
To: Tapestry users
Subject: Re: T3: Question

 

Please show us the relevant code.

 

Cheers,

Nick.

 

 

Nazmul wrote:

 As not too many people interested on T3 but I got a existing
application

 developed by T3 that needs some change.

 If some one help me on extending the following tutorial would help me
a lot.

 

 I've been following the tutorial at


http://www.sandcastsoftware.com/downloads/brownbag/tapestry/tapestry-cru
d-a4.pdf

 

 I want to extend this DVD application so that 

 user can choose DVD type from a drop down list (i.e. Action, Drama) 

 and choose a date from a date picker.

 

 I have tried to do this but when I click on Edit the Edit page
displays with all

 data related to the DVD except the Date and the DVD type. The Date
picker field

 is empty and the DVD type drop down field set to Action even the DVD
was Drama.

 

 Please help.

 

 

 

 -

 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]

 

 

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

T3: Question

2007-06-26 Thread Nazmul
As not too many people interested on T3 but I got a existing application
developed by T3 that needs some change.
If some one help me on extending the following tutorial would help me a lot.

I've been following the tutorial at
http://www.sandcastsoftware.com/downloads/brownbag/tapestry/tapestry-crud-a4.pdf

I want to extend this DVD application so that 
user can choose DVD type from a drop down list (i.e. Action, Drama) 
and choose a date from a date picker.

I have tried to do this but when I click on Edit the Edit page displays with all
data related to the DVD except the Date and the DVD type. The Date picker field
is empty and the DVD type drop down field set to Action even the DVD was 
Drama.

Please help.



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



T3: DatePicker

2007-06-18 Thread Nazmul
Hi,
I'm using T3 and new to Tapestry.

I'm validating text fields as below.
tr
  td width=1% nowrap
   span jwcid=@FieldLabel field=ognl:components.inputUserLogin
  User Login: /span
  /td
  td width=99%
input type=text jwcid=inputUserLogin size=20/
  /td
/tr

component id=inputUserLogin type=ValidField
  static-binding name=displayName value=User Login: /
  binding name=validator expression=beans.required/
  binding name=value expression=user.usrLogin/
/component

property-specification name=user 
 type=com.test.efi.infringement.model.EfiUser/

How do I do the similar validation for DatePicker as required filed?

Thanks

Naz



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



T3 binding issue for DatePicker

2007-06-17 Thread Nazmul
If I use the following code in my html and
the page then get the following error:

Html template:
82 tr
83  thspan jwcid=@FieldLabel
field=ognl:components.inputUserActiveDate
Active Date/span/th
84  th Active Date/th
85tdinput jwcid=inputUserActiveDate size=10 //td
86 /tr

Page specification:

component id=inputUserActiveDate type=DatePicker
static-binding name=displayName value=Active Date /
binding name=validator expression=beans.required/
binding name=value expression=user.usrActiveDate/
/component

Error from Tapestry:
Display name not specified and not provided by 
field UserMaint/inputUserActiveDate.
 
binding:
 ExpressionBinding[UserMaint/inputUserActiveDate
cachedValue=org.apache.tapestry.form.
[EMAIL PROTECTED]/inputUserActiveDate]]
 
component:
 org.apache.tapestry.valid.
[EMAIL PROTECTED]/$FieldLabel$4]
 
location:
 context:/WEB-INF/UserMaint.html, line 83

If I use the following code then I don’t get any error
and the UserMaint page displays ok but when I submit
the form then get null for the nputUserActiveDate.
It seems binding not done properly.

Html template:

tr
th Active Date/th
tdinput jwcid=inputUserActiveDate size=10 //td
/tr

Page specification:

component id=inputUserActiveDate type=DatePicker
binding name=validator expression=beans.required/
binding name=value expression=user.usrActiveDate/
/component

Please help.

Naz


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



RE: T3 binding issue for DatePicker

2007-06-17 Thread Bhuiyan, Nazmul
I want to use DatePicker to capture date from user. And would like to
make this field mandatory.
How do I do this?

-Original Message-
From: Nick Westgate [mailto:[EMAIL PROTECTED] 
Sent: Monday, 18 June 2007 4:01 p.m.
To: Tapestry users
Subject: Re: T3 binding issue for DatePicker

Hi Naz.

You're getting confused between DatePicker and DateField.

Cheers,
Nick.


Nazmul wrote:
 If I use the following code in my html and
 the page then get the following error:
 
 Html template:
 82 tr
 83  thspan jwcid=@FieldLabel
 field=ognl:components.inputUserActiveDate
 Active Date/span/th
 84  th Active Date/th
 85tdinput jwcid=inputUserActiveDate size=10 //td
 86 /tr
 
 Page specification:
 
 component id=inputUserActiveDate type=DatePicker
 static-binding name=displayName value=Active Date /
 binding name=validator expression=beans.required/
 binding name=value expression=user.usrActiveDate/
 /component
 
 Error from Tapestry:
 Display name not specified and not provided by 
 field UserMaint/inputUserActiveDate.
  
 binding:
  ExpressionBinding[UserMaint/inputUserActiveDate
 cachedValue=org.apache.tapestry.form.
 [EMAIL PROTECTED]/inputUserActiveDate]]
  
 component:
  org.apache.tapestry.valid.
 [EMAIL PROTECTED]/$FieldLabel$4]
  
 location:
  context:/WEB-INF/UserMaint.html, line 83
 
 If I use the following code then I don't get any error
 and the UserMaint page displays ok but when I submit
 the form then get null for the nputUserActiveDate.
 It seems binding not done properly.
 
 Html template:
 
 tr
 th Active Date/th
 tdinput jwcid=inputUserActiveDate size=10 //td
 /tr
 
 Page specification:
 
 component id=inputUserActiveDate type=DatePicker
 binding name=validator expression=beans.required/
 binding name=value expression=user.usrActiveDate/
 /component
 
 Please help.
 
 Naz
 
 
 -
 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]




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



RE: T3 binding issue for DatePicker

2007-06-17 Thread Bhuiyan, Nazmul
Hi Nick,

I'm new in Tapestry.

There is no usages doc with the component.
Can you please provide me some sample code?

Thanks a lot.

Naz

-Original Message-
From: Nick Westgate [mailto:[EMAIL PROTECTED] 
Sent: Monday, 18 June 2007 4:34 p.m.
To: Tapestry users
Subject: Re: T3 binding issue for DatePicker

Look on Tassel which has various validating components that you can use
or study:
http://www.tapestrycomponents.org/Tassel/app?service=direct/1/Browse/cha
ngeViewsp=SForm-element+%28validating%29

In fact one of them purports to be a ValidDatePicker.
Depsite being marked as GPL, no GPL license statement appears to be
included.

Cheers,
Nick.


Bhuiyan, Nazmul wrote:
 I want to use DatePicker to capture date from user. And would like to
 make this field mandatory.
 How do I do this?
 
 -Original Message-
 From: Nick Westgate [mailto:[EMAIL PROTECTED] 
 Sent: Monday, 18 June 2007 4:01 p.m.
 To: Tapestry users
 Subject: Re: T3 binding issue for DatePicker
 
 Hi Naz.
 
 You're getting confused between DatePicker and DateField.
 
 Cheers,
 Nick.
 
 
 Nazmul wrote:
 If I use the following code in my html and
 the page then get the following error:

 Html template:
 82 tr
 83  thspan jwcid=@FieldLabel
 field=ognl:components.inputUserActiveDate
 Active Date/span/th
 84  th Active Date/th
 85tdinput jwcid=inputUserActiveDate size=10 //td
 86 /tr

 Page specification:

 component id=inputUserActiveDate type=DatePicker
 static-binding name=displayName value=Active Date /
 binding name=validator expression=beans.required/
 binding name=value expression=user.usrActiveDate/
 /component

 Error from Tapestry:
 Display name not specified and not provided by 
 field UserMaint/inputUserActiveDate.
  
 binding:
  ExpressionBinding[UserMaint/inputUserActiveDate
 cachedValue=org.apache.tapestry.form.
 [EMAIL PROTECTED]/inputUserActiveDate]]
  
 component:
  org.apache.tapestry.valid.
 [EMAIL PROTECTED]/$FieldLabel$4]
  
 location:
  context:/WEB-INF/UserMaint.html, line 83

 If I use the following code then I don't get any error
 and the UserMaint page displays ok but when I submit
 the form then get null for the nputUserActiveDate.
 It seems binding not done properly.

 Html template:

 tr
 th Active Date/th
 tdinput jwcid=inputUserActiveDate size=10 //td
 /tr

 Page specification:

 component id=inputUserActiveDate type=DatePicker
 binding name=validator expression=beans.required/
 binding name=value expression=user.usrActiveDate/
 /component

 Please help.

 Naz


 -
 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]
 
 
 
 
 -
 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]




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



T4 question:

2007-06-06 Thread Nazmul
I'm trying to work through the chapter 3 of the book Enjoy web development with
Tapestry This book using tapestry4.1.1 and pointed a bug alert:
BUG ALERT: In Tapestry 4.1.1 there is a bug in NumberTranslator. It will
convert an empty string into 0, not null. This will get pass both the required
and the min validators.

How do I enforce the required in validator?

Thanks

naz


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



RE: T4 question:

2007-06-06 Thread Bhuiyan, Nazmul
Hi,

 

Thanks for your prompt answer.

My question was regarding the validation. The weight field accepts empty
filed even I've used 'required' in the binding.

 

Please see below:

 

 

component id=weight type=TextField

  binding name=value value=Weight /

  binding name=translator value=translator:number, omitZero=true,
pattern=#.#/binding

  binding name=validators value=validators:required[The {0} is
missing!],min=0/binding

  binding name=displayName value=literal:Weight/binding

/component

 

-Original Message-
From: Hugo Palma [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 6 June 2007 10:08 p.m.
To: Tapestry users
Subject: Re: T4 question:

 

Try setting the translator binding to

 

translator:number,omitZero=true

 

See the section on translators here 

http://tapestry.apache.org/tapestry4.1/usersguide/validation.html

 

Nazmul wrote:

 I'm trying to work through the chapter 3 of the book Enjoy web
development with

 Tapestry This book using tapestry4.1.1 and pointed a bug alert:

 BUG ALERT: In Tapestry 4.1.1 there is a bug in NumberTranslator. It
will

 convert an empty string into 0, not null. This will get pass both the
required

 and the min validators.

 

 How do I enforce the required in validator?

 

 Thanks

 

 naz

 

 

 -

 To unsubscribe, e-mail: [EMAIL PROTECTED]

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

 

 

   



RE: T4 question:

2007-06-06 Thread Bhuiyan, Nazmul
I'm new to Tapestry and please suggest me the right version of Tapestry
to use for my project. Tapestry5 is not stable yet. Shall I use 4.0.2?

Thanks

naz


-Original Message-
From: Hugo Palma [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 7 June 2007 10:57 a.m.
To: Tapestry users
Subject: Re: T4 question:

It looks like it.
I have a similar use case in a project and it works fine but using
4.0.2.

Jesse Kuhnert wrote:
 HmmmIt does look like it's possibly a bug.  If you file a jira 
 issue I
 can look at it.

 On 6/6/07, Bhuiyan, Nazmul [EMAIL PROTECTED] wrote:

 Hi,



 Thanks for your prompt answer.

 My question was regarding the validation. The weight field accepts
empty
 filed even I've used 'required' in the binding.



 Please see below:





 component id=weight type=TextField

   binding name=value value=Weight /

   binding name=translator value=translator:number, omitZero=true,
 pattern=#.#/binding

   binding name=validators value=validators:required[The {0} is
 missing!],min=0/binding

   binding name=displayName value=literal:Weight/binding

 /component



 -Original Message-
 From: Hugo Palma [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 6 June 2007 10:08 p.m.
 To: Tapestry users
 Subject: Re: T4 question:



 Try setting the translator binding to



 translator:number,omitZero=true



 See the section on translators here

 http://tapestry.apache.org/tapestry4.1/usersguide/validation.html



 Nazmul wrote:

  I'm trying to work through the chapter 3 of the book Enjoy web
 development with

  Tapestry This book using tapestry4.1.1 and pointed a bug alert:

  BUG ALERT: In Tapestry 4.1.1 there is a bug in NumberTranslator.
It
 will

  convert an empty string into 0, not null. This will get pass both
the
 required

  and the min validators.

 

  How do I enforce the required in validator?

 

  Thanks

 

  naz

 

 

 
-

  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: T4 question:

2007-06-06 Thread Bhuiyan, Nazmul
omitZero=true disable the required and the javascript's client side
validation.

-Original Message-
From: Bhuiyan, Nazmul 
Sent: Thursday, 7 June 2007 11:03 a.m.
To: Tapestry users
Subject: RE: T4 question:

I'm new to Tapestry and please suggest me the right version of Tapestry
to use for my project. Tapestry5 is not stable yet. Shall I use 4.0.2?

Thanks

naz


-Original Message-
From: Hugo Palma [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 7 June 2007 10:57 a.m.
To: Tapestry users
Subject: Re: T4 question:

It looks like it.
I have a similar use case in a project and it works fine but using
4.0.2.

Jesse Kuhnert wrote:
 HmmmIt does look like it's possibly a bug.  If you file a jira 
 issue I
 can look at it.

 On 6/6/07, Bhuiyan, Nazmul [EMAIL PROTECTED] wrote:

 Hi,



 Thanks for your prompt answer.

 My question was regarding the validation. The weight field accepts
empty
 filed even I've used 'required' in the binding.



 Please see below:





 component id=weight type=TextField

   binding name=value value=Weight /

   binding name=translator value=translator:number, omitZero=true,
 pattern=#.#/binding

   binding name=validators value=validators:required[The {0} is
 missing!],min=0/binding

   binding name=displayName value=literal:Weight/binding

 /component



 -Original Message-
 From: Hugo Palma [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 6 June 2007 10:08 p.m.
 To: Tapestry users
 Subject: Re: T4 question:



 Try setting the translator binding to



 translator:number,omitZero=true



 See the section on translators here

 http://tapestry.apache.org/tapestry4.1/usersguide/validation.html



 Nazmul wrote:

  I'm trying to work through the chapter 3 of the book Enjoy web
 development with

  Tapestry This book using tapestry4.1.1 and pointed a bug alert:

  BUG ALERT: In Tapestry 4.1.1 there is a bug in NumberTranslator.
It
 will

  convert an empty string into 0, not null. This will get pass both
the
 required

  and the min validators.

 

  How do I enforce the required in validator?

 

  Thanks

 

  naz

 

 

 
-

  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]




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