Re: Controling Dialog Placement

2007-07-27 Thread Martino Piccinato
I think you can do this quiet easily overriding the dojoDialog css
class (assigned by Dialog template to dialog div).

I'm not sure about it though because I?m trying to use Dialog
component without success (see my msg on the list): are you using
Dialog in Tapestry 4.1.2 without problems?

On 7/26/07, Chris Chiappone [EMAIL PROTECTED] wrote:
 I was wondering if there was anyway to control the placement of the
 Dialog component.  I occasionally have more information that a normal
 1024x768 resolution can fit so users have issues seeing everything in
 my dialog box.  Is there a way to force the dialog to stay in place
 while scrolling.

 Thanks,

 --
 ~chris

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

2007-07-27 Thread ra



On 7/27/07, ra [EMAIL PROTECTED] wrote:


 Hi
 is there any presentation regarding tapestry 5. I mean rather powerpoint,
 pdf etc fornat then screencasts

Like the tutorial? http://tapestry.apache.org/tapestry5/tutorial1/


No, I'd like make a presentation for my team,  so I'd like to create rather
a powerpoint slides
-- 
View this message in context: 
http://www.nabble.com/-t5--presentation-tf4157678.html#a11829446
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] presentation

2007-07-27 Thread Robin Helgelin
On 7/27/07, ra [EMAIL PROTECTED] wrote:


 Hi
 is there any presentation regarding tapestry 5. I mean rather powerpoint,
 pdf etc fornat then screencasts

Like the tutorial? http://tapestry.apache.org/tapestry5/tutorial1/

-- 
regards,
Robin

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



Re: [T5] Security of files in the classpath

2007-07-27 Thread Chris Lewis
I'm quite new to Tapestry and just 2 days ago have started working with 
Tap 5. I realize the two (4 vs 5) are disparately different, but one of 
the things nice about the Tap 4 asset service was the checksum feature I 
mentioned that would deny access unless the sum in the url matched that 
of the file. My newness to Tap may show here, but why can't the asset 
service simply ignore requests for files that are not marked (@Asset) as 
assets? I mean doesn't a deny-all first and allow explicit exceptions 
strategy seem much more sane then providing an open door to the whole 
classpath (class bytes included??)?


Robert Zeigler wrote:


Asset service doesn't really need a configuration point here, imo.
You can already make contributions to services that would allow you to 
implement this sort of content filtering.
For instance, you could contribute a RequestFilter. Alternatively, you 
could contribute a Dispatcher to teh MasterDispatcher service.
Contributions to MasterDispatcher are ordered, so you can contribute 
your AssetBlockerDispatcher before the asset service, intercept 
requests to forbidden assets,
and respond appropriately.  You could then make your custom dispatcher 
(or request filter) configurable in the manner that you desire.
You don't rewrite any of the asset service, you get your content 
filtering, and you can write it as a drop-in module for any new projects.


Robert

On Jul 26, 2007, at 7/266:18 PM , Daniel Jue wrote:


Thiago, my apologies.  You are correct.  I would think this is big a
problem if you can't hide important files from users!

Dan

On 7/26/07, Thiago H de Paula Figueiredo [EMAIL PROTECTED] wrote:
On Thu, 26 Jul 2007 16:46:37 -0300, Daniel Jue [EMAIL PROTECTED] 
wrote:


 Hi,  Just don't put configuration resources there.

I'm not sure you had understood what I've said.

My hibernate.cfg.xml is in /src/main/resources. So it is copied by
Eclipse/NetBeans/Maven/whatever to my webapp's classpath. And 
anything in

the classpath, as far as I can see, is accessible via
applicatiourl/assets. As many frameworks expect their configuration
files to be in the classpath, I think we have a little, easy to solve
problem here. :)

Thiago

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



Re: [T5] Set the text field size in BeanEditForm

2007-07-27 Thread Marcelo lotif
Good solution John, but has the same problem of the other...

for example: i have 40 fields. 25 of them i want to set the size=80, then
i have to repeat this code 25 times on the beaneditform body. I was thinking
in a way to set the size as we set the label, just adding
registration-size=80 on the .properties file, for example, but it seems that
it  doesn't have this feature...

a question for the commiters: there is any chance of adding it?

2007/7/27, Jan Laníček [EMAIL PROTECTED]:


 Hi,

 You can use this way :)

 JAVA:

 @Inject
 private Messages _messages;

public Messages getMessages()
 {
 return _messages;
 }

 HTML:

 form t:type=beaneditform object=registration
  submitLabel=Gravar
 
  t:parameter name=firstName
  label t:type=Label for=firstName/
  input t:type=TextField t:id=firstName
  t:value=registration.firstName
  size=${messages:registration.field.size}/
  (Informe o nome)
  /t:parameter
 
  /form

 PROPERTIES file:
 registration.field.size=40

 John


 Marcelo lotif wrote:
 
  this is easy, but when you have a dozen fields to set, this becomes a
  little
  verbose...
  isn't a way to set it via .properties file?
 
  Em 25/07/07, Marcus [EMAIL PROTECTED] escreveu:
 
  Olá Marcelo,
 
 
  form t:type=beaneditform object=registration
  submitLabel=Gravar
 
  t:parameter name=firstName
  label t:type=Label for=firstName/
  input t:type=TextField t:id=firstName
  t:value=registration.firstName size=40/
  (Informe o nome)
  /t:parameter
 
  /form
 
 
  Marcus
 
 
 
 
  --
  Atenciosamente,
  Marcelo Lotif
 
 

 --
 View this message in context:
 http://www.nabble.com/-T5--Set-the-text-field-size-in-BeanEditForm-tf4144626.html#a11825431
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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




-- 
Atenciosamente,
Marcelo Lotif


How to download a file from portlet

2007-07-27 Thread Atanu


Hi All,


I am following the recommendations at
http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?pageId=3132
while I download a file from a portlet. I include the request from portlet
to servlet using a PortletRequestDispatcher. But while rendering, portal
prints the binary contents in the portlet page, instead of giving an option
for download.

 

I am using Struts 2 in Liferay 4.2.x. Can you please point out what am I
missing here?
 

Thanks and regards,

Atanu Dasgupta

 

 

Here are my code snippets.

 

= STRUTS ACTION ==

 

RenderRequest request = PortletActionContext.getRenderRequest();

String uuid = (String) request.getParameter(reportUuid);

RenderResponse res = PortletActionContext.getRenderResponse();

PortletRequestDispatcher rd =
PortletActionContext.getPortletConfig()

   
.getPortletContext().getRequestDispatcher(/download?reportUuid= + uuid);

try {

  rd.include(request, res);

} catch (IOException ioe) {

  ioe.printStackTrace();

} catch (PortletException pe) {

  pe.printStackTrace();

= SERVLET ==

res.setContentType(application/xdownload);

res.setHeader(Content-Disposition, attachment;
filename=x.pdf);

try {

  res.setContentLength(report.getData().available());

} catch (IOException e) {

  e.printStackTrace();

}

 



try {

  OutputStream os = res.getOutputStream();

  InputStream is = report.getData();  // get the actual Data

  int read = 0;

  byte[] bytes = new byte[1024];

  while((read = is.read(bytes)) != -1) {

os.write(bytes, 0, read);

  }

  os.flush();

  os.close();

  is.close();

} catch (IOException ioe) {

  ioe.printStackTrace();

}

 

-- 
View this message in context: 
http://www.nabble.com/Portlets-and-Liferay--tf1836171.html#a11828846
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Problem with Match Validation

2007-07-27 Thread Richard Levenberg
Can anyone provide a simple example of using the Match validation of 4.1.2?

I have done everything I can think of to set the match of one TextField
to the id of another. How is the component to compare against
specified? Do I need the property tags? using ognl:verify causes an
exception. Using just verify (not sure if that refers to the component
id or the property), but it doesn't verify even if the values of the
text fields are the same.

r

?xml version=1.0 encoding=UTF-8?
!DOCTYPE page-specification PUBLIC
  -//Apache Software Foundation//Tapestry Specification 4.0//EN
  http://tapestry.apache.org/dtd/Tapestry_4_0.dtd;
 
page-specification
  asset name=stylesheet path=corp.css/
  property name=passphrase/
  property name=verify/
  component id=passphrase type=TextField
binding name=value value=ognl:passphrase/
binding name=translator value=translator:string,trim=true/
binding name=validators
value=validators:required,minLength=6,match=verify/
binding name=displayName value=literal:Passphrase/
  /component
  component id=verify type=TextField
binding name=value value=ognl:verify/
binding name=translator value=translator:string,trim=true/
binding name=validators value=validators:required/
binding name=displayName value=literal:Verify Passphrase/
  /component
  component id=errors type=Delegator
binding name=delegate value=beans.delegate.firstError/
  /component
  component id=form type=Form
binding name=delegate value=beans.delegate/
binding name=listener value=ognl:listeners.doSubmit/
  /component
/page-specification


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



Re: [T5] Set the text field size in BeanEditForm

2007-07-27 Thread Marcelo lotif
thank you howard, this feature will help a lot :)

2007/7/27, Howard Lewis Ship [EMAIL PROTECTED]:

 Yes, what's needed is another annotation to cover this situtation, perhaps
 @Width.  I think I added a JIRA issue for this already.

 On 7/27/07, Marcelo lotif [EMAIL PROTECTED] wrote:
 
  Good solution John, but has the same problem of the other...
 
  for example: i have 40 fields. 25 of them i want to set the size=80,
  then
  i have to repeat this code 25 times on the beaneditform body. I was
  thinking
  in a way to set the size as we set the label, just adding
  registration-size=80 on the .properties file, for example, but it seems
  that
  it  doesn't have this feature...
 
  a question for the commiters: there is any chance of adding it?
 
  2007/7/27, Jan Laníček [EMAIL PROTECTED]:
  
  
   Hi,
  
   You can use this way :)
  
   JAVA:
  
   @Inject
   private Messages _messages;
  
  public Messages getMessages()
   {
   return _messages;
   }
  
   HTML:
  
   form t:type=beaneditform object=registration
submitLabel=Gravar
   
t:parameter name=firstName
label t:type=Label for=firstName/
input t:type=TextField t:id=firstName
t:value=registration.firstName
size=${messages:registration.field.size}/
(Informe o nome)
/t:parameter
   
/form
  
   PROPERTIES file:
   registration.field.size=40
  
   John
  
  
   Marcelo lotif wrote:
   
this is easy, but when you have a dozen fields to set, this becomes
 a
little
verbose...
isn't a way to set it via .properties file?
   
Em 25/07/07, Marcus [EMAIL PROTECTED] escreveu:
   
Olá Marcelo,
   
   
form t:type=beaneditform object=registration
submitLabel=Gravar
   
t:parameter name=firstName
label t:type=Label for=firstName/
input t:type=TextField t:id=firstName
t:value=registration.firstName size=40/
(Informe o nome)
/t:parameter
   
/form
   
   
Marcus
   
   
   
   
--
Atenciosamente,
Marcelo Lotif
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/-T5--Set-the-text-field-size-in-BeanEditForm-tf4144626.html#a11825431
   Sent from the Tapestry - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  Atenciosamente,
  Marcelo Lotif
 



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




-- 
Atenciosamente,
Marcelo Lotif


[T5] BeanEditForm and RadioGroups

2007-07-27 Thread Marcelo lotif
Hi all,
is that a way to add a RadioGroup to a BeanEditForm?
i tried to add the following code to the beaneditform body, but it didn't
work...

t:parameter name=tipo
  label t:type=Label for=tipo /
  t:radiogroup value=fornecedor.tipo t:id=tipo
t:radio value=radio_op1 / Fornecedor
t:radio value=radio_op2 / Outros
  /t:radiogroup
/t:parameter

this works out of the beaneditform, but not inside it. all the variables and
properties are strings
am i missing something or the component just don't support radios yet?


-- 
Atenciosamente,
Marcelo Lotif


t5 - XMLNS Error

2007-07-27 Thread Evan Rawson - Work
my eclipse keeps throwing this question on all of my t5 documents when my pages 
are setup similiarly to this

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN 
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;

html xmlns=http://www.w3.org/1999/xhtml; 
xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;

head

titleThis is a test/title

/head

body

divthis is a test/div

/body

/html





the specific error it sayes is, 

Error - Attribute xmlns:t must be declared for element type html.

im using xml buddy on windows vista business edition.

thanx
evan








[T4] Gerenating Response -- Component

2007-07-27 Thread Daniel Ruiz
Hello, 

I´ve been looking the docs and I couldn't find how to do this in the proper
way..

Using the following structure:

public abstract class Viewer extends BasePage {

@InitialValue(literal:default value message..)
public abstract void setMessage(String message);
public abstract String getMessage();

}

pubic abstract class Sender extends BasePage {

@InjectPage(Viewer)
public abstract Viewer getViewer();

public IPage onSend() {
Viewer viewer = getViewer();
viewer.setMessage(test message);
***
String response = viewer.executeAndGetResponseAsHtml(); //
How to do this?..
}
}


Little explanation, I just clicked on a DirectLink in Sender class, I need
this method do call another Component with a set of attributes and execute
it background, and get the generated HTML into a string (which I will add as
the the body of an e-mail I will send).. 

I can't find a way to do this, but I think its pretty possible and I'm just
too new in Tapestry to make this work..

Can someone help me in how to get this step to work? - About the method
'executeAndGetResponseAsHtml', I don’t have this method implemented, this is
the part I need help.


Thanks in advance, 



[]'s Daniel Ruiz

Internal Virus Database is out-of-date.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.7.7/816 - Release Date: 5/23/2007
3:59 PM
 


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



Re: [T4] Gerenating Response -- Component

2007-07-27 Thread Ben Dotte
Hi Daniel,

You might want to take a look at the wiki for some suggestions about
sending HTML e-mail generated by Tapestry:

http://wiki.apache.org/tapestry/SendingHtmlEmailWithTap

To be honest we have abandoned this approach due to the complexity
involved and now use FreeMarker for that.

Ben

On 7/27/07, Daniel Ruiz [EMAIL PROTECTED] wrote:
 Hello,

 I´ve been looking the docs and I couldn't find how to do this in the proper
 way..

 Using the following structure:

 public abstract class Viewer extends BasePage {

 @InitialValue(literal:default value message..)
 public abstract void setMessage(String message);
 public abstract String getMessage();

 }

 pubic abstract class Sender extends BasePage {

 @InjectPage(Viewer)
 public abstract Viewer getViewer();

 public IPage onSend() {
 Viewer viewer = getViewer();
 viewer.setMessage(test message);
 ***
 String response = viewer.executeAndGetResponseAsHtml(); //
 How to do this?..
 }
 }


 Little explanation, I just clicked on a DirectLink in Sender class, I need
 this method do call another Component with a set of attributes and execute
 it background, and get the generated HTML into a string (which I will add as
 the the body of an e-mail I will send)..

 I can't find a way to do this, but I think its pretty possible and I'm just
 too new in Tapestry to make this work..

 Can someone help me in how to get this step to work? - About the method
 'executeAndGetResponseAsHtml', I don't have this method implemented, this is
 the part I need help.


 Thanks in advance,



 []'s Daniel Ruiz

 Internal Virus Database is out-of-date.
 Checked by AVG Free Edition.
 Version: 7.5.467 / Virus Database: 269.7.7/816 - Release Date: 5/23/2007
 3:59 PM



 -
 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: IRC

2007-07-27 Thread Evan Rawson - Work

awesome thats a kewl plugin.
- Original Message - 
From: #Cyrille37# [EMAIL PROTECTED]

To: Tapestry users users@tapestry.apache.org
Sent: Saturday, July 21, 2007 5:17 AM
Subject: Re: IRC


Evan Rawson - Work a écrit :
wow IRC, looks like i got another reason to download mIRC again. ill 
definatly be on that channel.

If you use Firefox there is the ChatZilla plugin. Easy to use and it
handle irc:// links

- Original Message - From: Chris Lewis 
[EMAIL PROTECTED]

To: Tapestry users users@tapestry.apache.org
Sent: Friday, July 20, 2007 9:16 AM
Subject: IRC



Dear mailing list,

I'm sure you've probably received messages like this before, but I wanted 
to reiterate that there is an IRC channel for tapestry: #tapestry @ 
irc.freenode.net. There's usually 5 ~ 8 of us in there, and we work/talk 
about Tapestry. I know some people just dont do IRC, but if you're 
interested in talkingin realish time with some tapestry people, come 
check it out.


chris







-
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 confused about Services and XmlHttpResponse

2007-07-27 Thread mogulwraith

I do mean XmlHttpRequest of course...
-- 
View this message in context: 
http://www.nabble.com/T5-confused-about-Services-and-XmlHttpResponse-tf4160459.html#a11837658
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] BeanEditForm and RadioGroups

2007-07-27 Thread Mike_R

According to the component reference I copied below, it should be possible to
override the column with a block, and maybe put your radiogroup in the
block. Haven't tried it myself though.

A component that creates an entire form editting the properties of a
particular bean. Inspired by Trails and BeanForm (both for Tapestry 4).
Generates a simple UI for editting the properties of a JavaBean, with the
flavor of UI for each property (text field, checkbox, drop down list)
determined from the property type, and the order and validation for the
properties determined from annotations on the property's getter and setter
methods. You may add t:parameters to the component; when the name matches
(case insensitive) the name of a property, then the corresponding Block is
renderered, rather than any of the built in property editor blocks. This
allows you to override specific properties with your own customized UI, for
cases where the default UI is insufficient, or no built-in editor type is
appropriate. This component is likely to change more than any other thing in
Tapestry! What's available now is a very limited preview of its eventual
functionality.



Marcelo lotif wrote:
 
 Hi all,
 is that a way to add a RadioGroup to a BeanEditForm?
 i tried to add the following code to the beaneditform body, but it didn't
 work...
 
 t:parameter name=tipo
   label t:type=Label for=tipo /
   t:radiogroup value=fornecedor.tipo t:id=tipo
 t:radio value=radio_op1 / Fornecedor
 t:radio value=radio_op2 / Outros
   /t:radiogroup
 /t:parameter
 
 this works out of the beaneditform, but not inside it. all the variables
 and
 properties are strings
 am i missing something or the component just don't support radios yet?
 
 
 -- 
 Atenciosamente,
 Marcelo Lotif
 
 

-- 
View this message in context: 
http://www.nabble.com/-T5--BeanEditForm-and-RadioGroups-tf4159420.html#a11837722
Sent from the Tapestry - User mailing list archive at Nabble.com.


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