Download Link doesn't work on 1.5.x

2012-01-19 Thread ricmancio
In Wicket 1.4.x I used

Link link   =   new Link(download){

@Override
public void onClick() {

*IResourceStream stream = new FileResourceStream(new File(path +
fileName));
getRequestCycle().setRequestTarget(new 
ResourceStreamRequestTarget(stream)
.setFileName(fileName));*
}
};
*
After migration on 1.5.x what code should I use?*

I'm trying with:


*getRequestCycle().scheduleRequestHandlerAfterCurrent(new
ResourceStreamRequestHandler(stream)
 .setFileName(fileName));*

...
but doesn't work

tnk



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Download-Link-doesn-t-work-on-1-5-x-tp4309507p4309507.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Download Link doesn't work on 1.5.x

2012-01-19 Thread ricmancio
thanks for the suggestion, but now it works

also from the documentation:

*https://cwiki.apache.org/WICKET/migration-to-wicket-15.html*

*Redirect to non wicket or external page*

suggests replacing old code :
*
getRequestCycle().setRequestTarget(new
RedirectRequestTarget(/usage.html));*

with:

*getRequestCycle().scheduleRequestHandlerAfterCurrent(new
RedirectRequestHandler(/usage.html));*



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Download-Link-doesn-t-work-on-1-5-x-tp4309507p4309548.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Download Link doesn't work on 1.5.x

2012-01-19 Thread ricmancio
no question, *I replaced:*

Link link = new Link(download){

@Override
public void onClick() {
IResourceStream stream = new FileResourceStream(new File(path + fileName));

getRequestCycle().scheduleRequestHandlerAfterCurrent(new
ResourceStreamRequestHandler(stream).setFileName(fileName));

.

*with*

new DownloadLink(download, new File(path + fileName))

tnk



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Download-Link-doesn-t-work-on-1-5-x-tp4309507p4309595.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: TinyMCE and textarea : validation problem

2011-12-29 Thread ricmancio
I solved it.
I added TinyMceAjaxSubmitModifier class to my AjaxButton:

fc  = new AjaxButton(button,form){

.

};

fc.add(new TinyMceAjaxSubmitModifier());
form.add(fc);

*In conclusion:*

I added *TinyMceBehavior *to my textarea field

and

I added *TinyMceAjaxSubmitModifier *to my AjaxButton field

thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TinyMCE-and-textarea-validation-problem-tp4240317p4242178.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



TinyMCE and textarea : validation problem

2011-12-28 Thread ricmancio
I have a panel where I have a form,feedback and  textarea field done so:

//*add feedback panel*

final FeedbackPanel feedback = new FeedbackPanel(feedback);
feedback.setOutputMarkupId(true);
add(feedback);

//*add form*

Form form = new Form(form, 
new CompoundPropertyModel(segnif));

//*add component*

FormComponent   fc;

fc = new TextArea(text,new PropertyModel(form,text));
fc.setRequired(true);

*the field is required*

*if I add TinyMce so:*

I imports wicket.contrib.tinymce.TinyMceBehavior and modify the code:


fc = new TextArea(text,new PropertyModel(form,text));
fc.add(new TinyMceBehavior());
fc.setRequired(true);

then I write on textarea field but on the feedback is written that field is
required,
as if I had not written anything

Validation does not work, when introduce TinyMce, Why?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/TinyMCE-and-textarea-validation-problem-tp4240317p4240317.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org