Re: [Wicket-user] Submit a form at ModalWindow cause the ModalWindow close.

2007-01-03 Thread Igor Vaynberg

you click on the wicket ajax debug link at the bottom of the page and it
should open. then look for errors in the output.

or better yet create a quickstart that reproduces the problem - that is
probably the fastest way to get help

-igor


On 1/3/07, Carfield Yim <[EMAIL PROTECTED]> wrote:


On 1/4/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> http://woogle.billen.dk/search/q/listview%20ajax
>
Have tried
http://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html
but fail. How can I use the AJAX debug window to see what going wrong?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Submit a form at ModalWindow cause the ModalWindow close.

2007-01-03 Thread Carfield Yim
On 1/4/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> http://woogle.billen.dk/search/q/listview%20ajax
>
Have tried 
http://cwiki.apache.org/WICKET/how-to-repaint-a-listview-via-ajax.html
but fail. How can I use the AJAX debug window to see what going wrong?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1.2.4: Test cannot find file

2007-01-03 Thread Igor Vaynberg

mvn package -Dmaven.test.skip=true

-igor


On 1/3/07, TH Lim <[EMAIL PROTECTED]> wrote:



Sorry to cut in :)

ant jar is ok after renaming the the DTD file (for all that matters). I
still encounter problem with "mvn package". I traced the error back to a
test class wicket.markup.html.form.upload.FileUploadFieldTest (line
97-108).
How do I make this test case successful? Thanks.


Frank Bille wrote:
>
> Well it's actually my fault. When I created that unit test I assumed
that
> we
> inclueded wicket-xhtml1-strict.dtd in the release. You should be fine
just
> putting the a file in the root directory (C:\workspace\wicket-1.2.3) and
> call it wicket-xhtml1-strict.dtd. It's not the content that matters but
> that
> that is somewhat big.
>
> I'll fix this in the different releases. Martijn perhaps we should
include
> a
> step in the release process that tests the release (run ant jar or
> something)?
>
> Frank
>
>
> On 1/3/07, TH Lim <[EMAIL PROTECTED]> wrote:
>>
>>
>> I am compiling wicket-1.2.3 from the zip file using "ant jar" and the
>> compilation was terminated unsuccessfully with the message "[junit]
File
>> does not exists. You must provide an existing file:
>> C:\workspace\wicket-1.2.3\wicket-xhtml1-strict.dtd". I found
>> wicket-1.0-xhtml11.dtd in the directories src\site\resources\DTD and
>> docs\DTD. Should rename wicket-1.0-xhtml11.dtd to
>> wicket-xhtml1-strict.dtd
>> and placed it to my local directory C:\workspace\wicket-1.2.3? Please
>> advise.
>>
>>
>> Martijn Dashorst wrote:
>> >
>> > We don't use ant ourselves. The dtd file should be in the root
>> > directory of the zip. Apparently the assembly descriptor used to
build
>> > the download archive didn't pick it up. grmbl.
>> >
>> > You can get the dtd from svn or use the one supplied in the
>> wicket-1.2.3
>> > zip.
>> >
>> > It hasn't been updated for a while (read 1 year or so).
>> >
>> > Martijn
>> >
>> > On 1/2/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
>> >> Hmmm, anyone ?
>> >> Can anybody pass the tests on wicket-1.2.4 with ant ? I'm using
>> building
>> >> a
>> >> fresh distro with ant and the testInternalDetach test fails. Its
>> looking
>> >> for
>> >> the wicket-xhtml1-strict.dtd file and can't find it .
>> >>
>> >>
>> >> On 1/1/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
>> >> > The FileUploadFieldTest try's to upload a non-existent file (
>> >> wicket-xhtml1-strict.dtd ) Where should this file be ? I'm testing
>> using
>> >> ant
>> >> jar task.
>> >> >
>> >> > Iman
>> >> >
>> >>
>> >>
>> >>
>>
-
>> >> Take Surveys. Earn Cash. Influence the Future of IT
>> >> Join SourceForge.net's Techsay panel and you'll get the chance to
>> share
>> >> your
>> >> opinions on IT & business topics through brief surveys - and earn
cash
>> >>
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >>
>> >> ___
>> >> Wicket-user mailing list
>> >> Wicket-user@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >>
>> >>
>> >>
>> >
>> >
>> > --
>> > Vote for Wicket at the
>> > http://www.thebeststuffintheworld.com/vote_for/wicket
>> > Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
>> > http://wicketframework.org
>> >
>> >
>>
-
>> > Take Surveys. Earn Cash. Influence the Future of IT
>> > Join SourceForge.net's Techsay panel and you'll get the chance to
share
>> > your
>> > opinions on IT & business topics through brief surveys - and earn
cash
>> >
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> > ___
>> > Wicket-user mailing list
>> > Wicket-user@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> >
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/1.2.4%3A-Test-cannot-find-file-tf2904045.html#a8139504
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>
-
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys - and earn cash
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>
>
-
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=

Re: [Wicket-user] 1.2.4: Test cannot find file

2007-01-03 Thread TH Lim

Sorry to cut in :)

ant jar is ok after renaming the the DTD file (for all that matters). I
still encounter problem with "mvn package". I traced the error back to a
test class wicket.markup.html.form.upload.FileUploadFieldTest (line 97-108). 
How do I make this test case successful? Thanks.


Frank Bille wrote:
> 
> Well it's actually my fault. When I created that unit test I assumed that
> we
> inclueded wicket-xhtml1-strict.dtd in the release. You should be fine just
> putting the a file in the root directory (C:\workspace\wicket-1.2.3) and
> call it wicket-xhtml1-strict.dtd. It's not the content that matters but
> that
> that is somewhat big.
> 
> I'll fix this in the different releases. Martijn perhaps we should include
> a
> step in the release process that tests the release (run ant jar or
> something)?
> 
> Frank
> 
> 
> On 1/3/07, TH Lim <[EMAIL PROTECTED]> wrote:
>>
>>
>> I am compiling wicket-1.2.3 from the zip file using "ant jar" and the
>> compilation was terminated unsuccessfully with the message "[junit] File
>> does not exists. You must provide an existing file:
>> C:\workspace\wicket-1.2.3\wicket-xhtml1-strict.dtd". I found
>> wicket-1.0-xhtml11.dtd in the directories src\site\resources\DTD and
>> docs\DTD. Should rename wicket-1.0-xhtml11.dtd to
>> wicket-xhtml1-strict.dtd
>> and placed it to my local directory C:\workspace\wicket-1.2.3? Please
>> advise.
>>
>>
>> Martijn Dashorst wrote:
>> >
>> > We don't use ant ourselves. The dtd file should be in the root
>> > directory of the zip. Apparently the assembly descriptor used to build
>> > the download archive didn't pick it up. grmbl.
>> >
>> > You can get the dtd from svn or use the one supplied in the
>> wicket-1.2.3
>> > zip.
>> >
>> > It hasn't been updated for a while (read 1 year or so).
>> >
>> > Martijn
>> >
>> > On 1/2/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
>> >> Hmmm, anyone ?
>> >> Can anybody pass the tests on wicket-1.2.4 with ant ? I'm using
>> building
>> >> a
>> >> fresh distro with ant and the testInternalDetach test fails. Its
>> looking
>> >> for
>> >> the wicket-xhtml1-strict.dtd file and can't find it .
>> >>
>> >>
>> >> On 1/1/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
>> >> > The FileUploadFieldTest try's to upload a non-existent file (
>> >> wicket-xhtml1-strict.dtd ) Where should this file be ? I'm testing
>> using
>> >> ant
>> >> jar task.
>> >> >
>> >> > Iman
>> >> >
>> >>
>> >>
>> >>
>> -
>> >> Take Surveys. Earn Cash. Influence the Future of IT
>> >> Join SourceForge.net's Techsay panel and you'll get the chance to
>> share
>> >> your
>> >> opinions on IT & business topics through brief surveys - and earn cash
>> >>
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> >>
>> >> ___
>> >> Wicket-user mailing list
>> >> Wicket-user@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >>
>> >>
>> >>
>> >
>> >
>> > --
>> > Vote for Wicket at the
>> > http://www.thebeststuffintheworld.com/vote_for/wicket
>> > Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
>> > http://wicketframework.org
>> >
>> >
>> -
>> > Take Surveys. Earn Cash. Influence the Future of IT
>> > Join SourceForge.net's Techsay panel and you'll get the chance to share
>> > your
>> > opinions on IT & business topics through brief surveys - and earn cash
>> >
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> > ___
>> > Wicket-user mailing list
>> > Wicket-user@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/wicket-user
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/1.2.4%3A-Test-cannot-find-file-tf2904045.html#a8139504
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
>

Re: [Wicket-user] Submit a form at ModalWindow cause the ModalWindow close.

2007-01-03 Thread Igor Vaynberg

http://woogle.billen.dk/search/q/listview%20ajax

sigh

-igor


On 1/3/07, Carfield Yim <[EMAIL PROTECTED]> wrote:


My gmail crop my message but I can see it at sourceforge archive... I
don't know why. So I just resend my message again in case another
people only see an empty message

I have refer to


http://www.wicket-library.com/wicket-examples/ajax?wicket:bookmarkablePage=:wicket.examples.ajax.builtin.FormPage

and


http://www.wicket-library.com/wicket-examples/ajax?wicket:bookmarkablePage=:wicket.examples.ajax.builtin.ClockPage


But I cannot make the ModalWIndow updatable, Basically it is a form
contain a listview which will update after the user make some search, I
added an AjaxSelfUpdatingTimerBehavior to that listview and try to make
it update after the form submit, but it don't work, would you let me
know what am I doing wrong? BTW, I have validate that
AjaxSubmitButton.onsubmit is executed


public NewAccount(String id) {
super(id);
WicketUtil.standardHeader(this);
add(new NewAccountForm("form"));
add(new FeedbackPanel("feedback"));
add(userListView = new ListView("users", userList) {
private static final long serialVersionUID = 1L;

public void populateItem(final ListItem listItem) {
final User user = (User) listItem.getModelObject();
listItem.add(new Link("href") {
private static final long serialVersionUID = 1L;

@Override
public void onClick() {
try {
final Account account = new Account();
account.setAccountID(WicketUtil.getAccountId());
WicketUtil.addAccountForUser(user, account);
redirectToInterceptPage(new Edit(account));
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}.add(new Label("label", user.getUsername(;
}
});
userListView.add(new
AjaxSelfUpdatingTimerBehavior(Duration.seconds(1)));
}

public final class NewAccountForm extends Form {
private static final long serialVersionUID = 1L;

private String keyword;

public String getKeyword() {
return keyword;
}

public String getKeywordWildcard() {
return keyword == null ? "%" : "%" + keyword.toLowerCase() +
"%";
}

public void setKeyword(String keyword) {
this.keyword = keyword;
}

public NewAccountForm(final String id) {
super(id);
final TextField username;
add(username = new RequiredTextField("keyword", new
PropertyModel(this, "keyword")));
add(new AjaxSubmitButton("ajax-submit-button", this) {
private static final long serialVersionUID = 1L;
protected void onSubmit(AjaxRequestTarget target, Form
form) {
try {
final boolean isNew =
Boolean.parseBoolean(getRequest().getParameter("isnew"));
if (isNew) {

if(UsernameValidator.userNameDuplication(username, null))
NewAccount.this.error("user with same
username already exist");
else {
final User user = new User();
user.setUsername(getKeyword());
final Account account = new Account();

account.setAccountID(WicketUtil.getAccountId());
if
(WicketUtil.addCustomer(NewAccount.this, user, account, true))
redirectToInterceptPage(new
Edit(account));
}
} else {
userList.clear();

userList.addAll(Application.sqlMap.queryForList("searchUserByNameOrEmail",

getKeywordWildcard()));
if (userList.size() > 0) {
NewAccount.this.info("Just click at the
username to add new account for that user");
}
userListView.modelChanged();
target.addComponent(userListView);
}
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
});
}
}

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Submit a form at ModalWindow cause the ModalWindow close.

2007-01-03 Thread Carfield Yim
My gmail crop my message but I can see it at sourceforge archive... I
don't know why. So I just resend my message again in case another
people only see an empty message

I have refer to

http://www.wicket-library.com/wicket-examples/ajax?wicket:bookmarkablePage=:wicket.examples.ajax.builtin.FormPage

 and

http://www.wicket-library.com/wicket-examples/ajax?wicket:bookmarkablePage=:wicket.examples.ajax.builtin.ClockPage


But I cannot make the ModalWIndow updatable, Basically it is a form
contain a listview which will update after the user make some search, I
added an AjaxSelfUpdatingTimerBehavior to that listview and try to make
it update after the form submit, but it don't work, would you let me
know what am I doing wrong? BTW, I have validate that
AjaxSubmitButton.onsubmit is executed


public NewAccount(String id) {
super(id);
WicketUtil.standardHeader(this);
add(new NewAccountForm("form"));
add(new FeedbackPanel("feedback"));
add(userListView = new ListView("users", userList) {
private static final long serialVersionUID = 1L;

public void populateItem(final ListItem listItem) {
final User user = (User) listItem.getModelObject();
listItem.add(new Link("href") {
private static final long serialVersionUID = 1L;

@Override
public void onClick() {
try {
final Account account = new Account();
account.setAccountID(WicketUtil.getAccountId());
WicketUtil.addAccountForUser(user, account);
redirectToInterceptPage(new Edit(account));
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}.add(new Label("label", user.getUsername(;
}
});
userListView.add(new
AjaxSelfUpdatingTimerBehavior(Duration.seconds(1)));
}

public final class NewAccountForm extends Form {
private static final long serialVersionUID = 1L;

private String keyword;

public String getKeyword() {
return keyword;
}

public String getKeywordWildcard() {
return keyword == null ? "%" : "%" + keyword.toLowerCase() +
"%";
}

public void setKeyword(String keyword) {
this.keyword = keyword;
}

public NewAccountForm(final String id) {
super(id);
final TextField username;
add(username = new RequiredTextField("keyword", new
PropertyModel(this, "keyword")));
add(new AjaxSubmitButton("ajax-submit-button", this) {
private static final long serialVersionUID = 1L;
protected void onSubmit(AjaxRequestTarget target, Form
form) {
try {
final boolean isNew =
Boolean.parseBoolean(getRequest().getParameter("isnew"));
if (isNew) {

if(UsernameValidator.userNameDuplication(username, null))
NewAccount.this.error("user with same
username already exist");
else {
final User user = new User();
user.setUsername(getKeyword());
final Account account = new Account();

account.setAccountID(WicketUtil.getAccountId());
if
(WicketUtil.addCustomer(NewAccount.this, user, account, true))
redirectToInterceptPage(new
Edit(account));
}
} else {
userList.clear();

userList.addAll(Application.sqlMap.queryForList("searchUserByNameOrEmail",

getKeywordWildcard()));
if (userList.size() > 0) {
NewAccount.this.info("Just click at the
username to add new account for that user");
}
userListView.modelChanged();
target.addComponent(userListView);
}
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
});
}
}

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Palette removes values from WizardStep

2007-01-03 Thread Igor Vaynberg

fixed

overriding onmodelchanged is not always enough because that might not always
be invoked. for example in the attached example project it wouldnt be
invoked because the model is changed via a different component.

now palette always syncs its state with the model. it is not the cleanest
design in the world, but keep in mind that palette was my exercise in
learning wicket :) one day i will find time to rewrite it from scratch and
it will be much more elegant.

-igor


On 1/3/07, Nino Wael <[EMAIL PROTECTED]> wrote:


It's the recorder component that needs to be updated... and overide
onModelchanged on palette to update the recorder component.


-Original Message-
From: [EMAIL PROTECTED] on behalf of Igor Vaynberg
Sent: Wed 03-01-2007 07:12
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Palette removes values from WizardStep

looks like a problem with the palette caching some model values, please
add
a bug report and we will look into it asap

-igor


On 1/2/07, De Soca <[EMAIL PROTECTED]> wrote:
>
>
> Hello Happy New Year to all,
>
> I have come across a curious problem when using the Palette component.
> Attached is a quickstart sample of what I am experiencing.
>
> I have 2 palettes, one on the input wizardStep and one on the
confirmation
> wizardStep.
> The values are set properly, and are verified so, in the input
wizardStep.
>
> When I go to the confirm step the values set in the palette in the
> previous
> step are gone. The other form values are still available.
>
> Hopefully I am missing something obvious.
>
> Thanks for all input.
> http://www.nabble.com/file/5188/quickstart-palette.zip
> quickstart-palette.zip
> --
> View this message in context:
>
http://www.nabble.com/Palette-removes-values-from-WizardStep-tf2908589.html#a8125921
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>
-
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] i18n of sentences with links

2007-01-03 Thread Igor Vaynberg

i dont think this is such a bad approach and should work fine in wicket as
well.

see SmartLinkLabel in extensions for something similar.

-igor


On 1/3/07, Ryan <[EMAIL PROTECTED]> wrote:


One tricky i18n problem to solve is how to internationalize a sentence
that has a link somewhere in it. If anyone has solved this problem or
has a suggestion on how to go about doing it in Wicket I would
appreciate the help!

Example sentence:

Use of this Web site constitutes acceptance of the _User Agreement_.

(where the underlined text is a link that normally would be rendered
with a BookmarkablePageLink)

Note that it is tempting to split the sentence into two keys in a
resource bundle (one for the sentence and another for the link text)
and then concat the two strings together to create the sentence. This
might work for a lot of english sentences but does not work for all
languages (for instance if the language requires the link to be in the
middle of the sentence).

In the past (and not using wicket) I have solved this using two place
holders like so:

sentence1=Use of this Web site constitutes acceptance of the {0}User
Agreement{1}.

Then at runtime I construct the dynamic link and replace 0 with the
"" and 1 with "". This solution works but I was hoping
there is a nicer solution with Wicket. Any suggestions?

Thanks,
Ryan

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] i18n of sentences with links

2007-01-03 Thread Ryan
One tricky i18n problem to solve is how to internationalize a sentence
that has a link somewhere in it. If anyone has solved this problem or
has a suggestion on how to go about doing it in Wicket I would
appreciate the help!

Example sentence:

Use of this Web site constitutes acceptance of the _User Agreement_.

(where the underlined text is a link that normally would be rendered
with a BookmarkablePageLink)

Note that it is tempting to split the sentence into two keys in a
resource bundle (one for the sentence and another for the link text)
and then concat the two strings together to create the sentence. This
might work for a lot of english sentences but does not work for all
languages (for instance if the language requires the link to be in the
middle of the sentence).

In the past (and not using wicket) I have solved this using two place
holders like so:

sentence1=Use of this Web site constitutes acceptance of the {0}User
Agreement{1}.

Then at runtime I construct the dynamic link and replace 0 with the
"" and 1 with "". This solution works but I was hoping
there is a nicer solution with Wicket. Any suggestions?

Thanks,
Ryan

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Letting users download flat file

2007-01-03 Thread Igor Vaynberg

set a breakpoint in respond() and see if it actually gets there, also try
printstream.close() at the end to flush the data

-igor


On 1/3/07, Frank Silbermann <[EMAIL PROTECTED]> wrote:


 I am trying to make a button responde by downloading text to the user
which is saved as a .txt file.  Igor suggested I look at DownloadLink,
which downloads a file when clicked.

The code of DownloadLink does not seem to set the content type; does the
system make an assumption based on the file's suffix?

Trying to adapt the code in DownloadLink, I came up with the following
event for my Button subclass:

  public void onClick() {
getRequestCycle().setRequestTarget(

  new IRequestTarget() {

public void detach(RequestCycle requestCycle) {}
public Object getLock(RequestCycle requestCycle) { return null; }

public void respond(RequestCycle requestCycle) {
  WebResponse r = (WebResponse)requestCycle.getResponse();
  r.setAttachmentHeader("myFilename.txt");
  r.setContentType( "text/plain; name=myFileName.txt" );

  PrintStream printStream = new PrintStream(r.getOutputStream());
  printStream.println("Line 1");
  printStream.println("Line 2");}

  }
);
  }

I expect that when I run it and click the button, the browser should
pop-up a box asking me if I wish to save file "myFileName.txt"
-- a file that should contain two lines of text.  But when I run it and
click my button, it goes back to the server, but then nothing happens --the
browser does not prompt me to save anything.

Do you see anything wrong with what I've done?
 --
*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *Igor Vaynberg
*Sent:* Wednesday, January 03, 2007 11:35 AM
*To:* wicket-user@lists.sourceforge.net
*Subject:* Re: [Wicket-user] Letting users download flat file

the proper approach is to push a new request target into the request
cycle, see DownloadLink

-igor


On 1/3/07, Frank Silbermann < [EMAIL PROTECTED]> wrote:
>
>  In my project, I have a button that lets the user download the contents
> of a datatable in a form that MSExcel can interpret:
>   Button button = new Button("excelExport") {
> protected void onSubmit() {
>   getRequestCycle().setRequestTarget(new
> ComponentRequestTarget(dataTable));
>   WebResponse wr=(WebResponse)getResponse();
>   wr.setContentType( "excel/ms-excel; name=myFilename.xls" );
>   wr.setHeader("content-disposition", "attachment;filename=
> myFilename.xls");
> }
>   };
>
> Suppose I want the button to download a text file containing some
> arbitrary text (not necessarily the contents of a DataTable).  Would I do
> something like this?
>
>   Button button = new Button("textfileExport") {
> protected void onSubmit() {
>
>   StringResponse response = new StringResponse();
>   response.write(
>   "Whatever I want contained in the output text file..."
>   );
>   getRequestCycle().setResponse(response);
>
>   WebResponse wr=(WebResponse)getResponse();
>   wr.setContentType( "text/plain; name=myFilename.txt" );
>   wr.setHeader("content-disposition", "attachment;filename=
> myFilename.txt");
> }
>   };
>
> If not, what is the proper approach?
>
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Letting users download flat file

2007-01-03 Thread Frank Silbermann
I am trying to make a button responde by downloading text to the user
which is saved as a .txt file.  Igor suggested I look at DownloadLink,
which downloads a file when clicked.
 
The code of DownloadLink does not seem to set the content type; does the
system make an assumption based on the file's suffix?
 
Trying to adapt the code in DownloadLink, I came up with the following
event for my Button subclass:
 
  public void onClick() {
getRequestCycle().setRequestTarget(

  new IRequestTarget() {
 
public void detach(RequestCycle requestCycle) {}
public Object getLock(RequestCycle requestCycle) { return null;
}
 
public void respond(RequestCycle requestCycle) {
  WebResponse r = (WebResponse)requestCycle.getResponse();
  r.setAttachmentHeader("myFilename.txt");
  r.setContentType( "text/plain; name=myFileName.txt" );
 
  PrintStream printStream = new
PrintStream(r.getOutputStream());
  printStream.println("Line 1");
  printStream.println("Line 2");}

  }
);
  }
 
I expect that when I run it and click the button, the browser should
pop-up a box asking me if I wish to save file "myFileName.txt"
-- a file that should contain two lines of text.  But when I run it and
click my button, it goes back to the server, but then nothing happens
--the browser does not prompt me to save anything.
 
Do you see anything wrong with what I've done?   



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor
Vaynberg
Sent: Wednesday, January 03, 2007 11:35 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Letting users download flat file


the proper approach is to push a new request target into the request
cycle, see DownloadLink

-igor



On 1/3/07, Frank Silbermann < [EMAIL PROTECTED]
 > wrote: 

In my project, I have a button that lets the user download the
contents of a datatable in a form that MSExcel can interpret:

  Button button = new Button("excelExport") {
protected void onSubmit() {
  getRequestCycle().setRequestTarget(new
ComponentRequestTarget(dataTable));
  WebResponse wr=(WebResponse)getResponse();
  wr.setContentType( "excel/ms-excel; name=myFilename.xls"
);
  wr.setHeader("content-disposition",
"attachment;filename=myFilename.xls");
}
  };
 
Suppose I want the button to download a text file containing
some arbitrary text (not necessarily the contents of a DataTable).
Would I do something like this?
 
  Button button = new Button("textfileExport") {
protected void onSubmit() {
 
  StringResponse response = new StringResponse();
  response.write(
  "Whatever I want contained in the output text
file..."
  );
  getRequestCycle().setResponse(response);

  WebResponse wr=(WebResponse)getResponse();
  wr.setContentType( "text/plain; name=myFilename.txt" );
  wr.setHeader("content-disposition",
"attachment;filename=myFilename.txt");
}
  };
 
If not, what is the proper approach?
 



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance
to share your 
opinions on IT & business topics through brief surveys - and
earn cash

http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user 





-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1.2.4: Test cannot find file

2007-01-03 Thread Martijn Dashorst
> Don't you have some scripts to help you release it? You said something about
> a script for doing the mvn clean site assembly:assembly thing in all
> projects. Can't you add a line or two to unpack the release and run mvn test
> in it? Is there something I/we can help you with in setting up a good
> release environment/scripts so it will be easier for you?

I have some scripts to help me, but building the actual stuff is not
what takes the most time.

Wicket 1.x is special in that it requires 2 different JVM's (otherwise
you have the possibility of using 1.5 rt.jar in your 1.4 project):

JDK 1.4:
 * wicket, wicket-extensions, wicket-examples, wicket-spring,
wicket-spring-examples

JDK 1.5:
 * the rest of the projects

So I have two maven start up scripts: mvn4 and mvn. mvn4 uses the
JDK1.4 (doesn't know that 1.5 even exists).


Steps I do:
 - check out the wicket-1.2.x branch
 - try to build all projects
 - fix compilation issues
 - fix unit tests
 - try to build all projects
 - fix dependencies
 - try to build all projects
 - generate the sites
 - fix the site documentation
 - generate the sites
 - try to build all projects
 - commit to svn
 - svn copy wicket-1.2.x to tags/wicket-1.2.5
 - svn copy tags/wicket-1.2.5 to releases/wicket-1.2.5
 - switch to releases/wicket-1.2.5
 - update all project files to use version 1.2.5
 - edit index.xml in site of Wicket project to add release notes
 - generate site for wicket project
 - curse the maven site plugin for being very buggy
 - edit index.xml in site of Wicket project to add release notes
 - generate site for wicket project
 - repeat last 3 steps until the site is workable
 - commit to svn
 - generate assemblies using script
 - look at contents of distributions to see if anything is really wrong
 - try to build jar with mvn, sometimes even with ant
 - rebuild assemblies
 - commit to svn
 - upload assemblies to sf.net
 - create releases for each project in release filesystem
 - assign each zip and tgz to a project and release
 - update release descriptors for each zip and tgz to "platform
independent" and "zip", "tgz" respectivily
 - deploy site to sf.net
 - check if site still works
 - create release notes for email to user, dev, announce list
 - create release notes for javalobby.org, blog

So the biggest problems are in the manual stuff: failing unittests,
maven plugins that don't work, sites that don't generate, and mostly:
waiting for the compiler, jar/javadoc/unittests to do their work.

The last stage is also mind numbing: releasing to sf.net, as each file
released requires about 15 mouse clicks to complete (each click is a
page request).

The best way of helping is ensuring that all the unittests run when a
release vote is held.

Martijn

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket not compiling

2007-01-03 Thread Martijn Dashorst
OK they are in...

Martijn

On 1/3/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> On 1/3/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> > And to resolve your compilation errors upgrade your JDK  to 1.5.08. If
> > you are stuck on 1.5_06 because you're on an Apple, then perform an
> > svn update, because I fixed this last weekend. It needed an extra cast
> > to fool the compiler.
>
> Hang on... Just committing the fix, forgot to do so.
>
> Martijn
>


-- 
Vote for Wicket at the http://www.thebeststuffintheworld.com/vote_for/wicket
Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket not compiling

2007-01-03 Thread Martijn Dashorst
On 1/3/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> And to resolve your compilation errors upgrade your JDK  to 1.5.08. If
> you are stuck on 1.5_06 because you're on an Apple, then perform an
> svn update, because I fixed this last weekend. It needed an extra cast
> to fool the compiler.

Hang on... Just committing the fix, forgot to do so.

Martijn

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket not compiling

2007-01-03 Thread Martijn Dashorst
And to resolve your compilation errors upgrade your JDK  to 1.5.08. If
you are stuck on 1.5_06 because you're on an Apple, then perform an
svn update, because I fixed this last weekend. It needed an extra cast
to fool the compiler.

Martijn

On 1/3/07, Korbinian Bachl <[EMAIL PROTECTED]> wrote:
> You need to call maven with -Dmaven.test.skip=true so he skips the junit
> tests, as not all are passed currently - please also note that 2.0 has many
> api changes as well as needs more  dependency jars as before (logging
> changed)
>
> regards
>
>
> > -Ursprüngliche Nachricht-
> > Von: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Im Auftrag
> > von Peter Neubauer
> > Gesendet: Mittwoch, 3. Januar 2007 21:57
> > An: wicket-user@lists.sourceforge.net
> > Betreff: [Wicket-user] Wicket not compiling
> >
> > Hi there,
> > checking out the latest source from Apache SVN in order to
> > get a wicket SNAPSHOT needed for the svn wicket-phonebook
> > app, I get the following error. Is that me or the source?
> >
> > Cheers
> >
> > /Peter
> >
> > peter-mbp:~/code/wicket/wicket peter$ mvn install [INFO]
> > Scanning for projects...
> > [INFO]
> > --
> > --
> > [INFO] Building Wicket
> > [INFO]task-segment: [install]
> > [INFO]
> > --
> > --
> > [INFO] [resources:resources]
> > [INFO] Using default encoding to copy filtered resources.
> > [INFO] [compiler:compile]
> > Compiling 479 source files to
> > /Users/peter/code/wicket/wicket/target/classes
> > [INFO]
> > --
> > --
> > [ERROR] BUILD FAILURE
> > [INFO]
> > --
> > --
> > [INFO] Compilation failure
> >
> > /Users/peter/code/wicket/wicket/src/main/java/wicket/markup/ht
> > ml/WebPage.java:[169,43]
> > inconvertible types
> > found   : wicket.Component
> > required: wicket.markup.html.internal.HeaderContainer
> >
> > /Users/peter/code/wicket/wicket/src/main/java/wicket/markup/ht
> > ml/list/Loop.java:[171,67]
> > inconvertible types
> > found   : wicket.Component
> > required: wicket.markup.html.list.Loop.LoopItem
> >
> >
> > [INFO]
> > --
> > --
> > [INFO] For more information, run Maven with the -e switch
> > [INFO]
> > --
> > --
> > [INFO] Total time: 13 seconds
> > [INFO] Finished at: Wed Jan 03 21:53:52 CET 2007 [INFO] Final
> > Memory: 7M/39M [INFO]
> > --
> > --
> >
> > --
> > ---
> > Take Surveys. Earn Cash. Influence the Future of IT Join
> > SourceForge.net's Techsay panel and you'll get the chance to
> > share your opinions on IT & business topics through brief
> > surveys - and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge
> &CID=DEVDEV
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Vote for Wicket at the http://www.thebeststuffintheworld.com/vote_for/wicket
Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Wicket not compiling

2007-01-03 Thread Korbinian Bachl
You need to call maven with -Dmaven.test.skip=true so he skips the junit
tests, as not all are passed currently - please also note that 2.0 has many
api changes as well as needs more  dependency jars as before (logging
changed)

regards


> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Im Auftrag 
> von Peter Neubauer
> Gesendet: Mittwoch, 3. Januar 2007 21:57
> An: wicket-user@lists.sourceforge.net
> Betreff: [Wicket-user] Wicket not compiling
> 
> Hi there,
> checking out the latest source from Apache SVN in order to 
> get a wicket SNAPSHOT needed for the svn wicket-phonebook 
> app, I get the following error. Is that me or the source?
> 
> Cheers
> 
> /Peter
> 
> peter-mbp:~/code/wicket/wicket peter$ mvn install [INFO] 
> Scanning for projects...
> [INFO] 
> --
> --
> [INFO] Building Wicket
> [INFO]task-segment: [install]
> [INFO] 
> --
> --
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> Compiling 479 source files to 
> /Users/peter/code/wicket/wicket/target/classes
> [INFO] 
> --
> --
> [ERROR] BUILD FAILURE
> [INFO] 
> --
> --
> [INFO] Compilation failure
> 
> /Users/peter/code/wicket/wicket/src/main/java/wicket/markup/ht
> ml/WebPage.java:[169,43]
> inconvertible types
> found   : wicket.Component
> required: wicket.markup.html.internal.HeaderContainer
> 
> /Users/peter/code/wicket/wicket/src/main/java/wicket/markup/ht
> ml/list/Loop.java:[171,67]
> inconvertible types
> found   : wicket.Component
> required: wicket.markup.html.list.Loop.LoopItem
> 
> 
> [INFO] 
> --
> --
> [INFO] For more information, run Maven with the -e switch 
> [INFO] 
> --
> --
> [INFO] Total time: 13 seconds
> [INFO] Finished at: Wed Jan 03 21:53:52 CET 2007 [INFO] Final 
> Memory: 7M/39M [INFO] 
> --
> --
> 
> --
> ---
> Take Surveys. Earn Cash. Influence the Future of IT Join 
> SourceForge.net's Techsay panel and you'll get the chance to 
> share your opinions on IT & business topics through brief 
> surveys - and earn cash 
> http://www.techsay.com/default.php?page=join.php&p=sourceforge
&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1.2.4: Test cannot find file

2007-01-03 Thread Frank Bille

On 1/3/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:


First we need to know why the file needs to be there. Is there any
reason for the dtd to be in the root directory of the distribution, or
can it reside in another location? Is the dtd actually something we
support, and something that works?



I have only used the dtd because I was looking for a file which weren't too
small for the test and I saw that one. It doesn't matter what type of file I
use, it just have to be of a surden size (can't remember how much)


Second, if we decide that it should be there, then we have to make

sure the maven assembly plugin copies the file into the final
distribution.



I have never given it much thought about why we have something called
xhtml*.dtd. If noone knows why it's there I'm +1 for removing it all
together.


Third, the ant build file exists only for convenience. I want to

include it, but not maintain it. So if the ant build is breaking
regularly, then I'm more inclined to remove it altogether and only
supply the maven build.



+1


Adding more steps to building the release is

something I'm very -1 on. Building a release already takes 1 whole
day.



Don't you have some scripts to help you release it? You said something about
a script for doing the mvn clean site assembly:assembly thing in all
projects. Can't you add a line or two to unpack the release and run mvn test
in it? Is there something I/we can help you with in setting up a good
release environment/scripts so it will be easier for you?


Frank


Martijn


On 1/3/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
>
> On 1/3/07, Frank Bille <[EMAIL PROTECTED]> wrote:
> > Well it's actually my fault. When I created that unit test I assumed
that
> we inclueded wicket-xhtml1-strict.dtd in the release. You should be fine
> just putting the a file in the root directory (C:\workspace\wicket-1.2.3)
> and call it wicket-xhtml1-strict.dtd. It's not the content that matters
but
> that that is somewhat big.
>
> Although unit tests shouldn't rely on external files, I guess you have
no
> choice here. Can you create the file on the fly and delete it afterwards
?
> Or maybe somehow mock the file access thingy ?
> > I'll fix this in the different releases. Martijn perhaps we should
include
> a step in the release process that tests the release (run ant jar or
> something)?
>
> +1
>
> >
> > Frank
> >
> >
> >
> >
> > On 1/3/07, TH Lim <[EMAIL PROTECTED] > wrote:
> > >
> > > I am compiling wicket-1.2.3 from the zip file using "ant jar" and
the
> > > compilation was terminated unsuccessfully with the message "[junit]
File
> > > does not exists. You must provide an existing file:
> > > C:\workspace\wicket-1.2.3\wicket-xhtml1-strict.dtd". I found
> > > wicket-1.0-xhtml11.dtd in the directories src\site\resources\DTD and
> > > docs\DTD. Should rename wicket-1.0-xhtml11.dtd to
> wicket-xhtml1-strict.dtd
> > > and placed it to my local directory C:\workspace\wicket- 1.2.3?
Please
> > > advise.
> > >
> > >
> > > Martijn Dashorst wrote:
> > > >
> > > > We don't use ant ourselves. The dtd file should be in the root
> > > > directory of the zip. Apparently the assembly descriptor used to
build
> > > > the download archive didn't pick it up. grmbl.
> > > >
> > > > You can get the dtd from svn or use the one supplied in the
> wicket-1.2.3
> > > > zip.
> > > >
> > > > It hasn't been updated for a while (read 1 year or so).
> > > >
> > > > Martijn
> > > >
> > > > On 1/2/07, Iman Rahmatizadeh <[EMAIL PROTECTED] > wrote:
> > > >> Hmmm, anyone ?
> > > >> Can anybody pass the tests on wicket-1.2.4 with ant ? I'm using
> building
> > > >> a
> > > >> fresh distro with ant and the testInternalDetach test fails. Its
> looking
> > > >> for
> > > >> the wicket-xhtml1-strict.dtd file and can't find it .
> > > >>
> > > >>
> > > >> On 1/1/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
> > > >> > The FileUploadFieldTest try's to upload a non-existent file (
> > > >> wicket-xhtml1-strict.dtd ) Where should this file be ? I'm
testing
> using
> > > >> ant
> > > >> jar task.
> > > >> >
> > > >> > Iman
> > > >> >
> > > >>
> > > >>
> > > >>
>
-
> > > >> Take Surveys. Earn Cash. Influence the Future of IT
> > > >> Join SourceForge.net's Techsay panel and you'll get the chance to
> share
> > > >> your
> > > >> opinions on IT & business topics through brief surveys - and earn
> cash
> > > >>
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > >>
> > > >> ___
> > > >> Wicket-user mailing list
> > > >> Wicket-user@lists.sourceforge.net
> > > >>
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > Vote for Wicket at the
> > > > http://www.thebeststuffintheworld.com/vote_for/wicket
> > > > Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
> > > > http://wicketframework.org
> > > >
> > > >

[Wicket-user] Wicket not compiling

2007-01-03 Thread Peter Neubauer
Hi there,
checking out the latest source from Apache SVN in order to get a
wicket SNAPSHOT needed for the svn wicket-phonebook app, I get the
following error. Is that me or the source?

Cheers

/Peter

peter-mbp:~/code/wicket/wicket peter$ mvn install
[INFO] Scanning for projects...
[INFO] 

[INFO] Building Wicket
[INFO]task-segment: [install]
[INFO] 

[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 479 source files to /Users/peter/code/wicket/wicket/target/classes
[INFO] 
[ERROR] BUILD FAILURE
[INFO] 
[INFO] Compilation failure

/Users/peter/code/wicket/wicket/src/main/java/wicket/markup/html/WebPage.java:[169,43]
inconvertible types
found   : wicket.Component
required: wicket.markup.html.internal.HeaderContainer

/Users/peter/code/wicket/wicket/src/main/java/wicket/markup/html/list/Loop.java:[171,67]
inconvertible types
found   : wicket.Component
required: wicket.markup.html.list.Loop.LoopItem


[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time: 13 seconds
[INFO] Finished at: Wed Jan 03 21:53:52 CET 2007
[INFO] Final Memory: 7M/39M
[INFO] 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Writing byte[] to a WebResponse

2007-01-03 Thread Igor Vaynberg

yes, that is an added bonus. wicket urls are not hijackable because they are
always session-relative

-igor


On 1/3/07, Korbinian Bachl <[EMAIL PROTECTED]> wrote:


 Isn't it in this case also a "free" download protection inside? - as the
URL only is valid for this session so your download cant be "stolen" by
anyone else by pointing a URL from his site to a server.

unbelievable how much you get with just using wicket for "free"

 --
*Von:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *Im Auftrag von *Igor Vaynberg
*Gesendet:* Mittwoch, 3. Januar 2007 18:13
*An:* wicket-user@lists.sourceforge.net
*Betreff:* Re: [Wicket-user] Writing byte[] to a WebResponse

or even easier (if you dont need a bookmarkable url)

abstract class ByteArrayLink extends Link {

protected abstract byte[] getbytes();
protected abstract String getfilename();

public void onclick() {
getRequestCycle().setRequestTarget(new IRequestTarget() {
   void detach(RequestCycle rc) {}
   Object getLock(RequestCycle rc) { return ByteArrayLink.this; }
   void respond(RequestCycle rc) {
WebResponse r = (WebResponse)requestCycle.getResponse();
r.setAttachmentHeader(getfilename());
response.getOuptutStream().write(getbytes());
}}
}


-igor


On 1/3/07, Janos Cserep <[EMAIL PROTECTED]> wrote:
>
> Very short, very quick DynamicWebResource tutorial:)
>
> 1. Subclass DynamicWebResource
>
> public class MyResource extends DynamicWebResource {
>
> @Override
> protected DynamicWebResource.ResourceState getResourceState() {
>
>   return new ResourceState() {
>
> public byte[] getData() {
>   return "Example".toBytes("UTF-8");
> }
>
> public String getContentType() {
>   return "text/plain";
> }
>};
> }
> }
>
> 2. Open your Application class and append your init() method with the
> following two lines:
>
> getSharedResources().add("myResource", new MyResource( );
> mountSharedResource("/my/resource/url", new
> ResourceReference("myResource").getSharedResourceKey());
>
> 3. Browse to the http://server/context/.../my/resource/url URL and it
> should show the "Example" string
>
> 4. modify getContentType() and getData() to return your objects (you can
> get any HTTP parameter with the getParameter() call of the Resource class in
> getData() so you could pass arguments to theURL like
> http://server/context/.../my/resource/url?id=XkdfG12
>
>
> Janos
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Letting users download flat file

2007-01-03 Thread Igor Vaynberg

the proper approach is to push a new request target into the request cycle,
see DownloadLink

-igor


On 1/3/07, Frank Silbermann <[EMAIL PROTECTED]> wrote:


 In my project, I have a button that lets the user download the contents
of a datatable in a form that MSExcel can interpret:
  Button button = new Button("excelExport") {
protected void onSubmit() {
  getRequestCycle().setRequestTarget(new
ComponentRequestTarget(dataTable));
  WebResponse wr=(WebResponse)getResponse();
  wr.setContentType( "excel/ms-excel; name=myFilename.xls" );
  wr.setHeader("content-disposition", "attachment;filename=
myFilename.xls");
}
  };

Suppose I want the button to download a text file containing some
arbitrary text (not necessarily the contents of a DataTable).  Would I do
something like this?

  Button button = new Button("textfileExport") {
protected void onSubmit() {

  StringResponse response = new StringResponse();
  response.write(
  "Whatever I want contained in the output text file..."
  );
  getRequestCycle().setResponse(response);

  WebResponse wr=(WebResponse)getResponse();
  wr.setContentType( "text/plain; name=myFilename.txt" );
  wr.setHeader("content-disposition", "attachment;filename=
myFilename.txt");
}
  };

If not, what is the proper approach?


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Writing byte[] to a WebResponse

2007-01-03 Thread Korbinian Bachl
Isn't it in this case also a "free" download protection inside? - as the URL
only is valid for this session so your download cant be "stolen" by
anyone else by pointing a URL from his site to a server.
 
unbelievable how much you get with just using wicket for "free"


  _  

Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Igor
Vaynberg
Gesendet: Mittwoch, 3. Januar 2007 18:13
An: wicket-user@lists.sourceforge.net
Betreff: Re: [Wicket-user] Writing byte[] to a WebResponse


or even easier (if you dont need a bookmarkable url)

abstract class ByteArrayLink extends Link {

protected abstract byte[] getbytes();
protected abstract String getfilename();

public void onclick() { 
getRequestCycle().setRequestTarget(new IRequestTarget() {
   void detach(RequestCycle rc) {}
   Object getLock(RequestCycle rc) { return ByteArrayLink.this; }
   void respond(RequestCycle rc) {
WebResponse r = (WebResponse)requestCycle.getResponse(); 
r.setAttachmentHeader(getfilename());
response.getOuptutStream().write(getbytes());
}}
}

  
-igor



On 1/3/07, Janos Cserep <[EMAIL PROTECTED]> wrote: 

Very short, very quick DynamicWebResource tutorial:)

1. Subclass DynamicWebResource

public class MyResource extends DynamicWebResource { 

@Override
protected DynamicWebResource.ResourceState getResourceState() { 

  return new ResourceState() { 

public byte[] getData() { 
  return "Example".toBytes("UTF-8"); 
} 

public String getContentType() { 
  return "text/plain"; 
} 
   }; 
} 
}

2. Open your Application class and append your init() method with the
following two lines:

getSharedResources().add("myResource", new MyResource( ); 
mountSharedResource("/my/resource/url", new
ResourceReference("myResource").getSharedResourceKey()); 

3. Browse to the http://server/context/.../my/resource/url URL and it should
show the "Example" string 

4. modify getContentType() and getData() to return your objects (you can get
any HTTP parameter with the getParameter() call of the Resource class in
getData() so you could pass arguments to theURL like
http://server/context/.../my/resource/url?id=XkdfG12


Janos 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your

opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php

&p=sourceforge&CID=DEVDEV

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
 





-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Writing byte[] to a WebResponse

2007-01-03 Thread Igor Vaynberg

or even easier (if you dont need a bookmarkable url)

abstract class ByteArrayLink extends Link {

protected abstract byte[] getbytes();
protected abstract String getfilename();

public void onclick() {
getRequestCycle().setRequestTarget(new IRequestTarget() {
  void detach(RequestCycle rc) {}
  Object getLock(RequestCycle rc) { return ByteArrayLink.this; }
  void respond(RequestCycle rc) {
   WebResponse r = (WebResponse)requestCycle.getResponse();
   r.setAttachmentHeader(getfilename());
   response.getOuptutStream().write(getbytes());
   }}
}


-igor


On 1/3/07, Janos Cserep <[EMAIL PROTECTED]> wrote:


Very short, very quick DynamicWebResource tutorial:)

1. Subclass DynamicWebResource

public class MyResource extends DynamicWebResource {

@Override
protected DynamicWebResource.ResourceState getResourceState() {

  return new ResourceState() {

public byte[] getData() {
  return "Example".toBytes("UTF-8");
}

public String getContentType() {
  return "text/plain";
}
   };
}
}

2. Open your Application class and append your init() method with the
following two lines:

getSharedResources().add("myResource", new MyResource( );
mountSharedResource("/my/resource/url", new
ResourceReference("myResource").getSharedResourceKey());

3. Browse to the http://server/context/.../my/resource/url URL and it
should show the "Example" string

4. modify getContentType() and getData() to return your objects (you can
get any HTTP parameter with the getParameter() call of the Resource class in
getData() so you could pass arguments to theURL like
http://server/context/.../my/resource/url?id=XkdfG12


Janos

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Letting users download flat file

2007-01-03 Thread Frank Silbermann
In my project, I have a button that lets the user download the contents
of a datatable in a form that MSExcel can interpret:

  Button button = new Button("excelExport") {
protected void onSubmit() {
  getRequestCycle().setRequestTarget(new
ComponentRequestTarget(dataTable));
  WebResponse wr=(WebResponse)getResponse();
  wr.setContentType( "excel/ms-excel; name=myFilename.xls" );
  wr.setHeader("content-disposition",
"attachment;filename=myFilename.xls");
}
  };
 
Suppose I want the button to download a text file containing some
arbitrary text (not necessarily the contents of a DataTable).  Would I
do something like this?
 
  Button button = new Button("textfileExport") {
protected void onSubmit() {
 
  StringResponse response = new StringResponse();
  response.write(
  "Whatever I want contained in the output text file..."
  );
  getRequestCycle().setResponse(response);

  WebResponse wr=(WebResponse)getResponse();
  wr.setContentType( "text/plain; name=myFilename.txt" );
  wr.setHeader("content-disposition",
"attachment;filename=myFilename.txt");
}
  };
 
If not, what is the proper approach?
 
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1.2.4: Test cannot find file

2007-01-03 Thread Martijn Dashorst
First we need to know why the file needs to be there. Is there any
reason for the dtd to be in the root directory of the distribution, or
can it reside in another location? Is the dtd actually something we
support, and something that works?

Second, if we decide that it should be there, then we have to make
sure the maven assembly plugin copies the file into the final
distribution.

Third, the ant build file exists only for convenience. I want to
include it, but not maintain it. So if the ant build is breaking
regularly, then I'm more inclined to remove it altogether and only
supply the maven build. Adding more steps to building the release is
something I'm very -1 on. Building a release already takes 1 whole
day.

Martijn

On 1/3/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
>
> On 1/3/07, Frank Bille <[EMAIL PROTECTED]> wrote:
> > Well it's actually my fault. When I created that unit test I assumed that
> we inclueded wicket-xhtml1-strict.dtd in the release. You should be fine
> just putting the a file in the root directory (C:\workspace\wicket-1.2.3 )
> and call it wicket-xhtml1-strict.dtd. It's not the content that matters but
> that that is somewhat big.
>
> Although unit tests shouldn't rely on external files, I guess you have no
> choice here. Can you create the file on the fly and delete it afterwards ?
> Or maybe somehow mock the file access thingy ?
> > I'll fix this in the different releases. Martijn perhaps we should include
> a step in the release process that tests the release (run ant jar or
> something)?
>
> +1
>
> >
> > Frank
> >
> >
> >
> >
> > On 1/3/07, TH Lim <[EMAIL PROTECTED] > wrote:
> > >
> > > I am compiling wicket-1.2.3 from the zip file using "ant jar" and the
> > > compilation was terminated unsuccessfully with the message "[junit] File
> > > does not exists. You must provide an existing file:
> > > C:\workspace\wicket-1.2.3\wicket-xhtml1-strict.dtd". I found
> > > wicket-1.0-xhtml11.dtd in the directories src\site\resources\DTD and
> > > docs\DTD. Should rename wicket-1.0-xhtml11.dtd to
> wicket-xhtml1-strict.dtd
> > > and placed it to my local directory C:\workspace\wicket- 1.2.3? Please
> > > advise.
> > >
> > >
> > > Martijn Dashorst wrote:
> > > >
> > > > We don't use ant ourselves. The dtd file should be in the root
> > > > directory of the zip. Apparently the assembly descriptor used to build
> > > > the download archive didn't pick it up. grmbl.
> > > >
> > > > You can get the dtd from svn or use the one supplied in the
> wicket-1.2.3
> > > > zip.
> > > >
> > > > It hasn't been updated for a while (read 1 year or so).
> > > >
> > > > Martijn
> > > >
> > > > On 1/2/07, Iman Rahmatizadeh <[EMAIL PROTECTED] > wrote:
> > > >> Hmmm, anyone ?
> > > >> Can anybody pass the tests on wicket-1.2.4 with ant ? I'm using
> building
> > > >> a
> > > >> fresh distro with ant and the testInternalDetach test fails. Its
> looking
> > > >> for
> > > >> the wicket-xhtml1-strict.dtd file and can't find it .
> > > >>
> > > >>
> > > >> On 1/1/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
> > > >> > The FileUploadFieldTest try's to upload a non-existent file (
> > > >> wicket-xhtml1-strict.dtd ) Where should this file be ? I'm testing
> using
> > > >> ant
> > > >> jar task.
> > > >> >
> > > >> > Iman
> > > >> >
> > > >>
> > > >>
> > > >>
> -
> > > >> Take Surveys. Earn Cash. Influence the Future of IT
> > > >> Join SourceForge.net's Techsay panel and you'll get the chance to
> share
> > > >> your
> > > >> opinions on IT & business topics through brief surveys - and earn
> cash
> > > >>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > >>
> > > >> ___
> > > >> Wicket-user mailing list
> > > >> Wicket-user@lists.sourceforge.net
> > > >>
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >>
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > Vote for Wicket at the
> > > > http://www.thebeststuffintheworld.com/vote_for/wicket
> > > > Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
> > > > http://wicketframework.org
> > > >
> > > >
> -
> > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net's Techsay panel and you'll get the chance to
> share
> > > > your
> > > > opinions on IT & business topics through brief surveys - and earn cash
> > > >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > > ___
> > > > Wicket-user mailing list
> > > > Wicket-user@lists.sourceforge.net
> > > >
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> http://www.nabble.com/1.2.4%3A-Test-cannot-find-file-tf2904045.html#a8139504
> > > Sent from the Wicket - User mailing list archive at Nabble.com.
>

Re: [Wicket-user] 1.2.4: Test cannot find file

2007-01-03 Thread Iman Rahmatizadeh

On 1/3/07, Frank Bille <[EMAIL PROTECTED]> wrote:


Well it's actually my fault. When I created that unit test I assumed that
we inclueded wicket-xhtml1-strict.dtd in the release. You should be fine
just putting the a file in the root directory (C:\workspace\wicket-1.2.3 )
and call it wicket-xhtml1-strict.dtd. It's not the content that matters
but that that is somewhat big.



Although unit tests shouldn't rely on external files, I guess you have no
choice here. Can you create the file on the fly and delete it afterwards ?
Or maybe somehow mock the file access thingy ?

I'll fix this in the different releases. Martijn perhaps we should include a

step in the release process that tests the release (run ant jar or
something)?



+1

Frank



On 1/3/07, TH Lim <[EMAIL PROTECTED]> wrote:
>
>
> I am compiling wicket-1.2.3 from the zip file using "ant jar" and the
> compilation was terminated unsuccessfully with the message "[junit] File
> does not exists. You must provide an existing file:
> C:\workspace\wicket-1.2.3\wicket-xhtml1-strict.dtd". I found
> wicket-1.0-xhtml11.dtd in the directories src\site\resources\DTD and
> docs\DTD. Should rename wicket-1.0-xhtml11.dtd to
> wicket-xhtml1-strict.dtd
> and placed it to my local directory C:\workspace\wicket- 1.2.3? Please
> advise.
>
>
> Martijn Dashorst wrote:
> >
> > We don't use ant ourselves. The dtd file should be in the root
> > directory of the zip. Apparently the assembly descriptor used to build
>
> > the download archive didn't pick it up. grmbl.
> >
> > You can get the dtd from svn or use the one supplied in the
> wicket-1.2.3
> > zip.
> >
> > It hasn't been updated for a while (read 1 year or so).
> >
> > Martijn
> >
> > On 1/2/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
> >> Hmmm, anyone ?
> >> Can anybody pass the tests on wicket-1.2.4 with ant ? I'm using
> building
> >> a
> >> fresh distro with ant and the testInternalDetach test fails. Its
> looking
> >> for
> >> the wicket-xhtml1-strict.dtd file and can't find it .
> >>
> >>
> >> On 1/1/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
> >> > The FileUploadFieldTest try's to upload a non-existent file (
> >> wicket-xhtml1-strict.dtd ) Where should this file be ? I'm testing
> using
> >> ant
> >> jar task.
> >> >
> >> > Iman
> >> >
> >>
> >>
> >>
> -
> >> Take Surveys. Earn Cash. Influence the Future of IT
> >> Join SourceForge.net's Techsay panel and you'll get the chance to
> share
> >> your
> >> opinions on IT & business topics through brief surveys - and earn
> cash
> >>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >>
> >> ___
> >> Wicket-user mailing list
> >> Wicket-user@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>
> >>
> >>
> >
> >
> > --
> > Vote for Wicket at the
> > http://www.thebeststuffintheworld.com/vote_for/wicket
> > Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
> > http://wicketframework.org
> >
> >
> -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
> share
> > your
> > opinions on IT & business topics through brief surveys - and earn cash
>
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
> --
> View this message in context: 
http://www.nabble.com/1.2.4%3A-Test-cannot-find-file-tf2904045.html#a8139504
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influe

Re: [Wicket-user] https + closing ModalWindow

2007-01-03 Thread Matej Knopp
Well, it is probably because browsers are trying to prevent cross-site 
scripting. And it seems that pages from http and https are treated like 
pages from different sites.

-Matej

Konstantinos Lazouras wrote:
> Hi all,
> 
> I'm having trouble closing a modal window hosting a non-secure page by 
> using the ModalWindow.close(target).  The modal opened from a secure 
> (https) page. To be a bit more precise:
> 
> if ( ((parentPage is https) && (page in modalWindow is https)) || 
> ((parentPage is http) && (page in modalWindow is http)) )
>modalWindow closes as expected
> else
>modalWindow stays opened!
> 
> Is this the way it should behave? Any ideas why this happens and how to 
> avoid this behaviour?
> 
> 
> thanks,
> Konstantinos
> 
> 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 
> 
> 
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> 
> 
> 
> 
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] https + closing ModalWindow

2007-01-03 Thread Konstantinos Lazouras
Hi all,

I'm having trouble closing a modal window hosting a non-secure page by using 
the ModalWindow.close(target).  The modal opened from a secure (https) page. To 
be a bit more precise:

if ( ((parentPage is https) && (page in modalWindow is https)) || ((parentPage 
is http) && (page in modalWindow is http)) )
   modalWindow closes as expected
else
   modalWindow stays opened!

Is this the way it should behave? Any ideas why this happens and how to avoid 
this behaviour? 


thanks,
Konstantinos







__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com -
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Submit a form at ModalWindow cause the ModalWindow close.

2007-01-03 Thread Matej Knopp
This doesn't really make sense. Why are you using self updating
behavior? Why don't you just update the listview when user submits the
form? And you can't ajax-update a repeater (ListView) directly. You have
to put the listview to e.g. WebMarkupContainer and add the container to
the AjaxRequestTarget.

-Matej

Carfield Yim wrote:
> I have refer to
> 
> http://www.wicket-library.com/wicket-examples/ajax?wicket:bookmarkablePage=:wicket.examples.ajax.builtin.FormPage
> and
> http://www.wicket-library.com/wicket-examples/ajax?wicket:bookmarkablePage=:wicket.examples.ajax.builtin.ClockPage
> 
> But I cannot make the ModalWIndow updatable, Basically it is a form
> contain a listview which will update after the user make some search, I
> added an AjaxSelfUpdatingTimerBehavior to that listview and try to make
> it update after the form submit, but it don't work, would you let me
> know what am I doing wrong? BTW, I have validate that
> AjaxSubmitButton.onsubmit is executed
> 
> 
> public NewAccount(String id) {
> super(id);
> WicketUtil.standardHeader(this);
> add(new NewAccountForm("form"));
> add(new FeedbackPanel("feedback"));
> add(userListView = new ListView("users", userList) {
> private static final long serialVersionUID = 1L;
> 
> public void populateItem(final ListItem listItem) {
> final User user = (User) listItem.getModelObject();
> listItem.add(new Link("href") {
> private static final long serialVersionUID = 1L;
> 
> @Override
> public void onClick() {
> try {
> final Account account = new Account();
> account.setAccountID(WicketUtil.getAccountId());
> WicketUtil.addAccountForUser(user, account);
> redirectToInterceptPage(new Edit(account));
> } catch (SQLException e) {
> throw new RuntimeException(e);
> }
> }
> }.add(new Label("label", user.getUsername(;
> }
> });
> userListView.add(new
> AjaxSelfUpdatingTimerBehavior(Duration.seconds(1)));
> }
> 
> public final class NewAccountForm extends Form {
> private static final long serialVersionUID = 1L;
> 
> private String keyword;
> 
> public String getKeyword() {
> return keyword;
> }
> 
> public String getKeywordWildcard() {
> return keyword == null ? "%" : "%" + keyword.toLowerCase() +
> "%";
> }
> 
> public void setKeyword(String keyword) {
> this.keyword = keyword;
> }
> 
> public NewAccountForm(final String id) {
> super(id);
> final TextField username;
> add(username = new RequiredTextField("keyword", new
> PropertyModel(this, "keyword")));
> add(new AjaxSubmitButton("ajax-submit-button", this) {
> private static final long serialVersionUID = 1L;
> protected void onSubmit(AjaxRequestTarget target, Form
> form) {
> try {
> final boolean isNew =
> Boolean.parseBoolean(getRequest().getParameter("isnew"));
> if (isNew) {
> 
> if(UsernameValidator.userNameDuplication(username, null))
> NewAccount.this.error("user with same
> username already exist");
> else {
> final User user = new User();
> user.setUsername(getKeyword());
> final Account account = new Account();
> 
> account.setAccountID(WicketUtil.getAccountId());
> if
> (WicketUtil.addCustomer(NewAccount.this, user, account, true))
> redirectToInterceptPage(new
> Edit(account));
> }
> } else {
> userList.clear();
> 
> userList.addAll(Application.sqlMap.queryForList("searchUserByNameOrEmail",
> 
> getKeywordWildcard()));
> if (userList.size() > 0) {
> NewAccount.this.info("Just click at the
> username to add new account for that user");
> }
> userListView.modelChanged();
> target.addComponent(userListView);
> }
> } catch (SQLException e) {
> throw new RuntimeException(e);
> }
> }
> });
> }
> }
> 
> On 1/3/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
>> You can't.
>>
>> You have to submit the form using ajax.
>>
>> Martijn
>>
>> On 1/3/07

Re: [Wicket-user] Submit a form at ModalWindow cause the ModalWindow close.

2007-01-03 Thread Carfield Yim
I have refer to

http://www.wicket-library.com/wicket-examples/ajax?wicket:bookmarkablePage=:wicket.examples.ajax.builtin.FormPage
and
http://www.wicket-library.com/wicket-examples/ajax?wicket:bookmarkablePage=:wicket.examples.ajax.builtin.ClockPage

But I cannot make the ModalWIndow updatable, Basically it is a form
contain a listview which will update after the user make some search, I
added an AjaxSelfUpdatingTimerBehavior to that listview and try to make
it update after the form submit, but it don't work, would you let me
know what am I doing wrong? BTW, I have validate that
AjaxSubmitButton.onsubmit is executed


public NewAccount(String id) {
super(id);
WicketUtil.standardHeader(this);
add(new NewAccountForm("form"));
add(new FeedbackPanel("feedback"));
add(userListView = new ListView("users", userList) {
private static final long serialVersionUID = 1L;

public void populateItem(final ListItem listItem) {
final User user = (User) listItem.getModelObject();
listItem.add(new Link("href") {
private static final long serialVersionUID = 1L;

@Override
public void onClick() {
try {
final Account account = new Account();
account.setAccountID(WicketUtil.getAccountId());
WicketUtil.addAccountForUser(user, account);
redirectToInterceptPage(new Edit(account));
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}.add(new Label("label", user.getUsername(;
}
});
userListView.add(new
AjaxSelfUpdatingTimerBehavior(Duration.seconds(1)));
}

public final class NewAccountForm extends Form {
private static final long serialVersionUID = 1L;

private String keyword;

public String getKeyword() {
return keyword;
}

public String getKeywordWildcard() {
return keyword == null ? "%" : "%" + keyword.toLowerCase() +
"%";
}

public void setKeyword(String keyword) {
this.keyword = keyword;
}

public NewAccountForm(final String id) {
super(id);
final TextField username;
add(username = new RequiredTextField("keyword", new
PropertyModel(this, "keyword")));
add(new AjaxSubmitButton("ajax-submit-button", this) {
private static final long serialVersionUID = 1L;
protected void onSubmit(AjaxRequestTarget target, Form
form) {
try {
final boolean isNew =
Boolean.parseBoolean(getRequest().getParameter("isnew"));
if (isNew) {

if(UsernameValidator.userNameDuplication(username, null))
NewAccount.this.error("user with same
username already exist");
else {
final User user = new User();
user.setUsername(getKeyword());
final Account account = new Account();

account.setAccountID(WicketUtil.getAccountId());
if
(WicketUtil.addCustomer(NewAccount.this, user, account, true))
redirectToInterceptPage(new
Edit(account));
}
} else {
userList.clear();

userList.addAll(Application.sqlMap.queryForList("searchUserByNameOrEmail",

getKeywordWildcard()));
if (userList.size() > 0) {
NewAccount.this.info("Just click at the
username to add new account for that user");
}
userListView.modelChanged();
target.addComponent(userListView);
}
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
});
}
}

On 1/3/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> You can't.
>
> You have to submit the form using ajax.
>
> Martijn
>
> On 1/3/07, Carfield Yim <[EMAIL PROTECTED]> wrote:
> > If I have a form inside a ModalWindow, submit the form will cause the
> > ModalWindow close. Can I prevent this behaviour?
> >
> >
-
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
share your
> > opinions on IT & business topics through brief surveys - and earn cash
> >
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > 

Re: [Wicket-user] Writing byte[] to a WebResponse

2007-01-03 Thread Janos Cserep

Very short, very quick DynamicWebResource tutorial:)

1. Subclass DynamicWebResource

public class MyResource extends DynamicWebResource {

@Override
protected DynamicWebResource.ResourceState getResourceState() {

 return new ResourceState() {

   public byte[] getData() {
 return "Example".toBytes("UTF-8");
   }

   public String getContentType() {
 return "text/plain";
   }
  };
}
}

2. Open your Application class and append your init() method with the
following two lines:

getSharedResources().add("myResource", new MyResource( );
mountSharedResource("/my/resource/url", new
ResourceReference("myResource").getSharedResourceKey());

3. Browse to the http://server/context/.../my/resource/url URL and it should
show the "Example" string

4. modify getContentType() and getData() to return your objects (you can get
any HTTP parameter with the getParameter() call of the Resource class in
getData() so you could pass arguments to theURL like
http://server/context/.../my/resource/url?id=XkdfG12


Janos
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1.2.4: Test cannot find file

2007-01-03 Thread Frank Bille

Well it's actually my fault. When I created that unit test I assumed that we
inclueded wicket-xhtml1-strict.dtd in the release. You should be fine just
putting the a file in the root directory (C:\workspace\wicket-1.2.3) and
call it wicket-xhtml1-strict.dtd. It's not the content that matters but that
that is somewhat big.

I'll fix this in the different releases. Martijn perhaps we should include a
step in the release process that tests the release (run ant jar or
something)?

Frank


On 1/3/07, TH Lim <[EMAIL PROTECTED]> wrote:



I am compiling wicket-1.2.3 from the zip file using "ant jar" and the
compilation was terminated unsuccessfully with the message "[junit] File
does not exists. You must provide an existing file:
C:\workspace\wicket-1.2.3\wicket-xhtml1-strict.dtd". I found
wicket-1.0-xhtml11.dtd in the directories src\site\resources\DTD and
docs\DTD. Should rename wicket-1.0-xhtml11.dtd to wicket-xhtml1-strict.dtd
and placed it to my local directory C:\workspace\wicket-1.2.3? Please
advise.


Martijn Dashorst wrote:
>
> We don't use ant ourselves. The dtd file should be in the root
> directory of the zip. Apparently the assembly descriptor used to build
> the download archive didn't pick it up. grmbl.
>
> You can get the dtd from svn or use the one supplied in the wicket-1.2.3
> zip.
>
> It hasn't been updated for a while (read 1 year or so).
>
> Martijn
>
> On 1/2/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
>> Hmmm, anyone ?
>> Can anybody pass the tests on wicket-1.2.4 with ant ? I'm using
building
>> a
>> fresh distro with ant and the testInternalDetach test fails. Its
looking
>> for
>> the wicket-xhtml1-strict.dtd file and can't find it .
>>
>>
>> On 1/1/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
>> > The FileUploadFieldTest try's to upload a non-existent file (
>> wicket-xhtml1-strict.dtd ) Where should this file be ? I'm testing
using
>> ant
>> jar task.
>> >
>> > Iman
>> >
>>
>>
>>
-
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys - and earn cash
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>>
>>
>
>
> --
> Vote for Wicket at the
> http://www.thebeststuffintheworld.com/vote_for/wicket
> Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
> http://wicketframework.org
>
>
-
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

--
View this message in context:
http://www.nabble.com/1.2.4%3A-Test-cannot-find-file-tf2904045.html#a8139504
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Writing byte[] to a WebResponse

2007-01-03 Thread Philip A. Chapman
You have to make your own implemenation of ResourceState.  It's a very
simple class and requires very little to implement.  Check out the very
last section of the UploadDownload page in the wiki:
http://cwiki.apache.org/WICKET/uploaddownload.html

On Wed, 2007-01-03 at 13:07 +0100, Thullner, Robert wrote:
> I subclassed DynamicWebRessource, but I still have the problem that I
> do not know how to add the RessourceState to my WebResponse for my
> download link.
> I found the class ResourceReference but no I did not find out how to
> use it. 
>  
> Do I have to use the ResourceReferece Class or is there another way to
> get my download working?
>  
> Perhaps you could give me a short example
>  
> Thanks
> Robert
> 
>  
> 
> __
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Im Auftrag von
> Philip A. Chapman
> Gesendet: Mittwoch, 03. Jänner 2007 12:03
> An: wicket-user@lists.sourceforge.net
> Betreff: Re: [Wicket-user] Writing byte[] to a WebResponse
> 
> 
> 
> 
> The reason you're getting errors in MS Word is that you're converting
> a byte array into a String using ByteArrayOutputStream's toString()
> method.  A Java String and a byte array are not always the same thing
> due to unicode.
> 
> Subclass wicket.markup.html.DynamicWebResource so that it returns the
> correct instance of ResourceState (also your own implementation).
> Among other things, ResourceState is supposed to provide a byte array
> that is the content of the download.  This would be the byte array
> from your database.
> 
> On Wed, 2007-01-03 at 11:37 +0100, Thullner, Robert wrote:
> 
> > Hello
> > 
> > I store a lot of MS Word and Excel files as a byte[] into my
> > database. 
> > I want to add a feature to download these files from the database
> > again, but I did not find a way to do this in Wicket, without
> > writing the byte[] to a File again.
> > 
> > Is there a way to write a byte[] to a WebResponse? I tried the same
> > Code, which is available at the Export Example from Wicket
> > 
> > I got my byte[] from the database and then wrote it to a
> > ByteArrayOutputStream.Then I used the toString() method. But if I
> > download the file then I get a lot of conversion errors from MS
> > Word, so I would like to write the byte[] directly. 
> > 
> > So I tried this method: response.getOutputStream().write(file); 
> > But using this I get this error:
> > java.lang.UnsupportedOperationException: Cannot get output stream on
> > BufferedResponse
> > 
> > Thanks for any help 
> > Robert
> > 
> > 
> > 
> > -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share your
> > opinions on IT & business topics through brief surveys - and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > ___ Wicket-user mailing list 
> > Wicket-user@lists.sourceforge.net 
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> -- 
> Philip A. Chapman
> 
> Desktop and Web Application Development:
> Java, .NET, PostgreSQL, MySQL, MSSQL
> Linux, Windows 2000, Windows XP
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___ Wicket-user mailing list 
> Wicket-user@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/wicket-user

-- 
Philip A. Chapman

Desktop and Web Application Development:
Java, .NET, PostgreSQL, MySQL, MSSQL
Linux, Windows 2000, Windows XP


signature.asc
Description: This is a digitally signed message part
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Writing byte[] to a WebResponse

2007-01-03 Thread Martijn Dashorst
Like I said: take a look at the jasper reports integration found at
wicket-stuff svn:

http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/branches/WICKET_1_2/wicket-contrib-jasperreports/src/java/wicket/contrib/jasperreports/

And for links to the resources:

http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/branches/WICKET_1_2/wicket-contrib-jasperreports/src/examples/java/wicket/contrib/jasperreports/examples/ReportLinksPage.java?view=markup

Martijn

On 1/3/07, Thullner, Robert <[EMAIL PROTECTED]> wrote:
>
>
> I subclassed DynamicWebRessource, but I still have the problem that I do not
> know how to add the RessourceState to my WebResponse for my download link.
> I found the class ResourceReference but no I did not find out how to use it.
>
> Do I have to use the ResourceReferece Class or is there another way to get
> my download working?
>
> Perhaps you could give me a short example
>
> Thanks
> Robert
>
>
>  
>  Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Im
> Auftrag von Philip A. Chapman
> Gesendet: Mittwoch, 03. Jänner 2007 12:03
> An: wicket-user@lists.sourceforge.net
> Betreff: Re: [Wicket-user] Writing byte[] to a WebResponse
>
>
> The reason you're getting errors in MS Word is that you're converting a byte
> array into a String using ByteArrayOutputStream's toString() method.  A Java
> String and a byte array are not always the same thing due to unicode.
>
> Subclass wicket.markup.html.DynamicWebResource so that it
> returns the correct instance of ResourceState (also your own
> implementation).  Among other things, ResourceState is supposed to provide a
> byte array that is the content of the download.  This would be the byte
> array from your database.
>
> On Wed, 2007-01-03 at 11:37 +0100, Thullner, Robert wrote:
>
> Hello
>
> I store a lot of MS Word and Excel files as a byte[] into my database.
> I want to add a feature to download these files from the database again, but
> I did not find a way to do this in Wicket, without writing the byte[] to a
> File again.
>
> Is there a way to write a byte[] to a WebResponse? I tried the same Code,
> which is available at the Export Example from Wicket
>
> I got my byte[] from the database and then wrote it to a
> ByteArrayOutputStream.Then I used the toString() method. But if I download
> the file then I get a lot of conversion errors from MS Word, so I would like
> to write the byte[] directly.
>
> So I tried this method: response.getOutputStream().write(file);
> But using this I get this error:
> java.lang.UnsupportedOperationException: Cannot get output
> stream on BufferedResponse
>
> Thanks for any help
> Robert
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___ Wicket-user
> mailing list Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
> --
> Philip A. Chapman
>
> Desktop and Web Application Development:
> Java, .NET, PostgreSQL, MySQL, MSSQL
> Linux, Windows 2000, Windows XP
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>


-- 
Vote for Wicket at the http://www.thebeststuffintheworld.com/vote_for/wicket
Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Writing byte[] to a WebResponse

2007-01-03 Thread Thullner, Robert
I subclassed DynamicWebRessource, but I still have the problem that I do not 
know how to add the RessourceState to my WebResponse for my download link.
I found the class ResourceReference but no I did not find out how to use it. 
 
Do I have to use the ResourceReferece Class or is there another way to get my 
download working?
 
Perhaps you could give me a short example
 
Thanks
Robert

 


Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Philip A. 
Chapman
Gesendet: Mittwoch, 03. Jänner 2007 12:03
An: wicket-user@lists.sourceforge.net
Betreff: Re: [Wicket-user] Writing byte[] to a WebResponse


The reason you're getting errors in MS Word is that you're converting a byte 
array into a String using ByteArrayOutputStream's toString() method.  A Java 
String and a byte array are not always the same thing due to unicode.

Subclass wicket.markup.html.DynamicWebResource so that it returns the correct 
instance of ResourceState (also your own implementation).  Among other things, 
ResourceState is supposed to provide a byte array that is the content of the 
download.  This would be the byte array from your database.

On Wed, 2007-01-03 at 11:37 +0100, Thullner, Robert wrote:


Hello

I store a lot of MS Word and Excel files as a byte[] into my database. 
I want to add a feature to download these files from the database 
again, but I did not find a way to do this in Wicket, without writing the 
byte[] to a File again.

Is there a way to write a byte[] to a WebResponse? I tried the same 
Code, which is available at the Export Example from Wicket

I got my byte[] from the database and then wrote it to a 
ByteArrayOutputStream.Then I used the toString() method. But if I download the 
file then I get a lot of conversion errors from MS Word, so I would like to 
write the byte[] directly. 

So I tried this method: response.getOutputStream().write(file); 
But using this I get this error: 
java.lang.UnsupportedOperationException: Cannot get output stream on 
BufferedResponse

Thanks for any help 
Robert




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share 
your
opinions on IT & business topics through brief surveys - and earn cash

http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___ Wicket-user mailing 
list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user

-- 
Philip A. Chapman

Desktop and Web Application Development:
Java, .NET, PostgreSQL, MySQL, MSSQL
Linux, Windows 2000, Windows XP
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1.2.4: Test cannot find file

2007-01-03 Thread TH Lim

I am compiling wicket-1.2.3 from the zip file using "ant jar" and the
compilation was terminated unsuccessfully with the message "[junit] File
does not exists. You must provide an existing file:
C:\workspace\wicket-1.2.3\wicket-xhtml1-strict.dtd". I found
wicket-1.0-xhtml11.dtd in the directories src\site\resources\DTD and
docs\DTD. Should rename wicket-1.0-xhtml11.dtd to wicket-xhtml1-strict.dtd
and placed it to my local directory C:\workspace\wicket-1.2.3? Please
advise.


Martijn Dashorst wrote:
> 
> We don't use ant ourselves. The dtd file should be in the root
> directory of the zip. Apparently the assembly descriptor used to build
> the download archive didn't pick it up. grmbl.
> 
> You can get the dtd from svn or use the one supplied in the wicket-1.2.3
> zip.
> 
> It hasn't been updated for a while (read 1 year or so).
> 
> Martijn
> 
> On 1/2/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
>> Hmmm, anyone ?
>> Can anybody pass the tests on wicket-1.2.4 with ant ? I'm using building
>> a
>> fresh distro with ant and the testInternalDetach test fails. Its looking
>> for
>> the wicket-xhtml1-strict.dtd file and can't find it .
>>
>>
>> On 1/1/07, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
>> > The FileUploadFieldTest try's to upload a non-existent file (
>> wicket-xhtml1-strict.dtd ) Where should this file be ? I'm testing using
>> ant
>> jar task.
>> >
>> > Iman
>> >
>>
>>
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>>
>>
> 
> 
> -- 
> Vote for Wicket at the
> http://www.thebeststuffintheworld.com/vote_for/wicket
> Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
> http://wicketframework.org
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/1.2.4%3A-Test-cannot-find-file-tf2904045.html#a8139504
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Submit a form at ModalWindow cause the ModalWindow close.

2007-01-03 Thread Martijn Dashorst
You can't.

You have to submit the form using ajax.

Martijn

On 1/3/07, Carfield Yim <[EMAIL PROTECTED]> wrote:
> If I have a form inside a ModalWindow, submit the form will cause the
> ModalWindow close. Can I prevent this behaviour?
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Vote for Wicket at the http://www.thebeststuffintheworld.com/vote_for/wicket
Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Submit a form at ModalWindow cause the ModalWindow close.

2007-01-03 Thread Carfield Yim
If I have a form inside a ModalWindow, submit the form will cause the
ModalWindow close. Can I prevent this behaviour?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Writing byte[] to a WebResponse

2007-01-03 Thread Philip A. Chapman
The reason you're getting errors in MS Word is that you're converting a
byte array into a String using ByteArrayOutputStream's toString()
method.  A Java String and a byte array are not always the same thing
due to unicode.

Subclass wicket.markup.html.DynamicWebResource so that it returns the
correct instance of ResourceState (also your own implementation).  Among
other things, ResourceState is supposed to provide a byte array that is
the content of the download.  This would be the byte array from your
database.

On Wed, 2007-01-03 at 11:37 +0100, Thullner, Robert wrote:

> Hello
> 
> I store a lot of MS Word and Excel files as a byte[] into my
> database. 
> I want to add a feature to download these files from the database
> again, but I did not find a way to do this in Wicket, without writing
> the byte[] to a File again.
> 
> Is there a way to write a byte[] to a WebResponse? I tried the same
> Code, which is available at the Export Example from Wicket
> 
> I got my byte[] from the database and then wrote it to a
> ByteArrayOutputStream.Then I used the toString() method. But if I
> download the file then I get a lot of conversion errors from MS Word,
> so I would like to write the byte[] directly. 
> 
> So I tried this method: response.getOutputStream().write(file); 
> But using this I get this error:
> java.lang.UnsupportedOperationException: Cannot get output stream on
> BufferedResponse
> 
> Thanks for any help 
> Robert
> 
> 
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___ Wicket-user mailing list 
> Wicket-user@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/wicket-user

-- 
Philip A. Chapman

Desktop and Web Application Development:
Java, .NET, PostgreSQL, MySQL, MSSQL
Linux, Windows 2000, Windows XP


signature.asc
Description: This is a digitally signed message part
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Writing byte[] to a WebResponse

2007-01-03 Thread Martijn Dashorst
Take a look at DynamicWebResource

If you need an example, look at the wicket-contrib-jasperreports code
in wicket-stuff svn.

Martijn

On 1/3/07, Thullner, Robert <[EMAIL PROTECTED]> wrote:
>
>
>
> Hello
>
> I store a lot of MS Word and Excel files as a byte[] into my database.
> I want to add a feature to download these files from the database again, but
> I did not find a way to do this in Wicket, without writing the byte[] to a
> File again.
>
> Is there a way to write a byte[] to a WebResponse? I tried the same Code,
> which is available at the Export Example from Wicket
>
> I got my byte[] from the database and then wrote it to a
> ByteArrayOutputStream.Then I used the toString() method. But if I download
> the file then I get a lot of conversion errors from MS Word, so I would like
> to write the byte[] directly.
>
> So I tried this method: response.getOutputStream().write(file);
> But using this I get this error:
> java.lang.UnsupportedOperationException: Cannot get output
> stream on BufferedResponse
>
> Thanks for any help
> Robert
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>


-- 
Vote for Wicket at the http://www.thebeststuffintheworld.com/vote_for/wicket
Wicket 1.2.4 is as easy as 1-2-4. Download Wicket now!
http://wicketframework.org

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Writing byte[] to a WebResponse

2007-01-03 Thread Thullner, Robert
Hello

I store a lot of MS Word and Excel files as a byte[] into my database.
I want to add a feature to download these files from the database again,
but I did not find a way to do this in Wicket, without writing the
byte[] to a File again.

Is there a way to write a byte[] to a WebResponse? I tried the same
Code, which is available at the Export Example from Wicket
I got my byte[] from the database and then wrote it to a
ByteArrayOutputStream.Then I used the toString() method. But if I
download the file then I get a lot of conversion errors from MS Word, so
I would like to write the byte[] directly. 
So I tried this method: response.getOutputStream().write(file);
But using this I get this error:
java.lang.UnsupportedOperationException: Cannot get output stream on
BufferedResponse

Thanks for any help
Robert


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Palette removes values from WizardStep

2007-01-03 Thread Nino Wael
It's the recorder component that needs to be updated... and overide 
onModelchanged on palette to update the recorder component.


-Original Message-
From: [EMAIL PROTECTED] on behalf of Igor Vaynberg
Sent: Wed 03-01-2007 07:12
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Palette removes values from WizardStep
 
looks like a problem with the palette caching some model values, please add
a bug report and we will look into it asap

-igor


On 1/2/07, De Soca <[EMAIL PROTECTED]> wrote:
>
>
> Hello Happy New Year to all,
>
> I have come across a curious problem when using the Palette component.
> Attached is a quickstart sample of what I am experiencing.
>
> I have 2 palettes, one on the input wizardStep and one on the confirmation
> wizardStep.
> The values are set properly, and are verified so, in the input wizardStep.
>
> When I go to the confirm step the values set in the palette in the
> previous
> step are gone. The other form values are still available.
>
> Hopefully I am missing something obvious.
>
> Thanks for all input.
> http://www.nabble.com/file/5188/quickstart-palette.zip
> quickstart-palette.zip
> --
> View this message in context:
> http://www.nabble.com/Palette-removes-values-from-WizardStep-tf2908589.html#a8125921
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Palette removes values from WizardStep

2007-01-03 Thread Nino Wael
My guess is that you have run into an issue with the palette, as I remember it 
you cant contstruct a palette that already haves values in the selected model 
or something like that, I replied in a post earlier with a solution...


-regards Nino

-Original Message-
From: [EMAIL PROTECTED] on behalf of De Soca
Sent: Tue 02-01-2007 16:51
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] Palette removes values from WizardStep
 

Hello Happy New Year to all,

I have come across a curious problem when using the Palette component.
Attached is a quickstart sample of what I am experiencing.

I have 2 palettes, one on the input wizardStep and one on the confirmation
wizardStep.
The values are set properly, and are verified so, in the input wizardStep.

When I go to the confirm step the values set in the palette in the previous
step are gone. The other form values are still available.

Hopefully I am missing something obvious.

Thanks for all input. http://www.nabble.com/file/5188/quickstart-palette.zip
quickstart-palette.zip 
-- 
View this message in context: 
http://www.nabble.com/Palette-removes-values-from-WizardStep-tf2908589.html#a8125921
Sent from the Wicket - User mailing list archive at Nabble.com.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user