Re: [Wicket-user] there is no way to preprocess raw markup in wicket 1.1?

2007-02-19 Thread Juergen Donnerstag
search for IMarkupFilter

Juergen

On 2/19/07, wouvlfe <[EMAIL PROTECTED]> wrote:
>
> oops, should have been more clear about what i want to do
> i want to be able to preprocess some of the tags (that do not have wicket
> ids) in the markup and modify them if necessary
>
> example:
> modify the original tag:
> /a/b/c
>
> to the tag:
> /e/f
>
> that is, change the static paths in certain scenarios
>
> is there a way this can be done through wicket?
> (i dont want to add a 50 different wicket tags for 50 different static
> resources in my markup file. So I would need to do this without wicket tags)
>
> i think Igor pointed me to IMarkupFilter but that didnt help me accomplish
> what I want.
> The filters dont seem to allow me to modify raw markup.
> dont know why but wicket LOVES to make classes and methods final.
> so there is no way i can use polymorphism to extend functionalities of
> wicket's base classes
>
> vk
>
>
>
> Timo Rantalaiho wrote:
> >
> > On Mon, 19 Feb 2007, wouvlfe wrote:
> >> I simply want to be able to modify the values of some static paths in the
> >> raw html markup
> >>
> >> it seems that there is no way to do it in wicket 1.1 ??
> >> i started by looking into markup filters
> >> when i wrote my own markup parser, i couldnt find a way to replace
> >> portions
> >> of the raw html
> >
> > It would help to know more specifically what you are trying
> > to achieve.
> >
> > But if you want to change URLs to static resources, you
> > might be better off providing a custom resource locator
> >
> >
> > http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html
> >
> > or if paths are produced by wicket components, tweaking your
> > own versions of the components.
> >
> > - Timo
> >
> > --
> > Timo Rantalaiho
> > Reaktor Innovations Oyhttp://www.ri.fi/ >
> >
> > -
> > 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/there-is-no-way-to-preprocess-raw-markup-in-wicket-1.1--tf3251667.html#a9040495
> 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] grouping of components with repeaters

2007-02-19 Thread Dmitry Kandalov


alexei.sokolov wrote:
> 
> Hello,
> 
> I'm sorry if this subject was discussed before... if so please point me in
> the right direction. Here is my problem:
> 
> I'm using IDataProvider interface from wicket extensions package to load
> set
> of data from database. The data has the following format:
> 
> group1, field11, field12, field13, field14
> group1, field21, field22, field23, field24
> group1, field31, field32, field33, field34
> ...
> groupN, fieldN1, fieldN2, fieldN3, fieldN4
> 
> Now, what I want to show is this:
> 
> group1 header
> group1 row1
> group1 row2
> ...
> group1 rowM
> group1 footer
> ...
> groupN header
> groupN row1
> ...
> groupN rowK
> groupN footer
> 
> How do I do this if markup for group header and group footer is different
> from each row's markup?
> 
> Thank you,
> Alex
> 
> 

I had similar problem (also with optional indexing and pagination). I end up
making custom component extending ListView. Though what Igor says looks much
better than what I did.
-- 
View this message in context: 
http://www.nabble.com/grouping-of-components-with-repeaters-tf3256216.html#a9054740
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] grouping of components with repeaters

2007-02-19 Thread Igor Vaynberg

thats easy. you have a list of rows that is primarily sorted on the group.
so just do something like this (rough pseudocode)

class groupsiterator implements iterator {
 private final list rows;
 private string group;
 private int idx;

 public groupsiterator(list rows) {
   this.rows=rows;
   findnext();
  }

  public boolean hasnext() { return group!=null; }

 public void next() {
  string curr=group;
  findnext();
  return curr;
 }

 private void findnext() {
String nextgroup=null;
for (int idx;idx wrote:


Igor,

In this case outer repeater will have to iterate over groups, and I don't
know how to iterate over groups. I can iterate over every record and I can
detect when there is a group boundary.

Alex

On 2/19/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> you would use two repeaters, one inside the other
>
> one for outputting group header and footer
> and the other one inside that one to output the rows in between.
>
> -igor
>
>
>  On 2/19/07, Alexei Sokolov <[EMAIL PROTECTED]> wrote:
>
> > Hello,
> >
> > I'm sorry if this subject was discussed before... if so please point
> > me in the right direction. Here is my problem:
> >
> > I'm using IDataProvider interface from wicket extensions package to
> > load set of data from database. The data has the following format:
> >
> > group1, field11, field12, field13, field14
> > group1, field21, field22, field23, field24
> > group1, field31, field32, field33, field34
> > ...
> > groupN, fieldN1, fieldN2, fieldN3, fieldN4
> >
> > Now, what I want to show is this:
> >
> > group1 header
> > group1 row1
> > group1 row2
> > ...
> > group1 rowM
> > group1 footer
> > ...
> > groupN header
> > groupN row1
> > ...
> > groupN rowK
> > groupN footer
> >
> > How do I do this if markup for group header and group footer is
> > different from each row's markup?
> >
> > Thank you,
> > Alex
> >
> >
> > -
> > 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


-
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] Adding component markup to javadoc output

2007-02-19 Thread Igor Vaynberg

why not just attach the wicket source to your ide? for me all i have to do
is ctrl+click on a component class and i am taken to its source code.

-igor


On 2/19/07, Aaron Hiniker <[EMAIL PROTECTED]> wrote:


I am always running into problems where I need to replace a components
functionality somehow, which requires me to know the parent's component
hierarchy.  I then need to go to the wicket SVN or look at my local copy
of the source code to view the component's source.

Do you guys think it would be helpful to modify the javadoc output for
all wicket components which adds a link to view the component's markup
from within the javadocs?

I've never really hacked the javadoc generation before, but I'm fairly
sure there might be hooks available to customize the output to
accomplish this.

Aaron

-
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] grouping of components with repeaters

2007-02-19 Thread Alexei Sokolov

Igor,

In this case outer repeater will have to iterate over groups, and I don't
know how to iterate over groups. I can iterate over every record and I can
detect when there is a group boundary.

Alex

On 2/19/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


you would use two repeaters, one inside the other

one for outputting group header and footer
and the other one inside that one to output the rows in between.

-igor


On 2/19/07, Alexei Sokolov <[EMAIL PROTECTED]> wrote:

> Hello,
>
> I'm sorry if this subject was discussed before... if so please point me
> in the right direction. Here is my problem:
>
> I'm using IDataProvider interface from wicket extensions package to load
> set of data from database. The data has the following format:
>
> group1, field11, field12, field13, field14
> group1, field21, field22, field23, field24
> group1, field31, field32, field33, field34
> ...
> groupN, fieldN1, fieldN2, fieldN3, fieldN4
>
> Now, what I want to show is this:
>
> group1 header
> group1 row1
> group1 row2
> ...
> group1 rowM
> group1 footer
> ...
> groupN header
> groupN row1
> ...
> groupN rowK
> groupN footer
>
> How do I do this if markup for group header and group footer is
> different from each row's markup?
>
> Thank you,
> Alex
>
>
> -
> 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


[Wicket-user] Adding component markup to javadoc output

2007-02-19 Thread Aaron Hiniker
I am always running into problems where I need to replace a components
functionality somehow, which requires me to know the parent's component
hierarchy.  I then need to go to the wicket SVN or look at my local copy
of the source code to view the component's source.

Do you guys think it would be helpful to modify the javadoc output for
all wicket components which adds a link to view the component's markup
from within the javadocs?

I've never really hacked the javadoc generation before, but I'm fairly
sure there might be hooks available to customize the output to
accomplish this.

Aaron

-
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] grouping of components with repeaters

2007-02-19 Thread Igor Vaynberg

you would use two repeaters, one inside the other

one for outputting group header and footer
and the other one inside that one to output the rows in between.

-igor


On 2/19/07, Alexei Sokolov <[EMAIL PROTECTED]> wrote:


Hello,

I'm sorry if this subject was discussed before... if so please point me in
the right direction. Here is my problem:

I'm using IDataProvider interface from wicket extensions package to load
set of data from database. The data has the following format:

group1, field11, field12, field13, field14
group1, field21, field22, field23, field24
group1, field31, field32, field33, field34
...
groupN, fieldN1, fieldN2, fieldN3, fieldN4

Now, what I want to show is this:

group1 header
group1 row1
group1 row2
...
group1 rowM
group1 footer
...
groupN header
groupN row1
...
groupN rowK
groupN footer

How do I do this if markup for group header and group footer is different
from each row's markup?

Thank you,
Alex

-
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] grouping of components with repeaters

2007-02-19 Thread Alexei Sokolov

Hello,

I'm sorry if this subject was discussed before... if so please point me in
the right direction. Here is my problem:

I'm using IDataProvider interface from wicket extensions package to load set
of data from database. The data has the following format:

group1, field11, field12, field13, field14
group1, field21, field22, field23, field24
group1, field31, field32, field33, field34
...
groupN, fieldN1, fieldN2, fieldN3, fieldN4

Now, what I want to show is this:

group1 header
group1 row1
group1 row2
...
group1 rowM
group1 footer
...
groupN header
groupN row1
...
groupN rowK
groupN footer

How do I do this if markup for group header and group footer is different
from each row's markup?

Thank you,
Alex
-
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] Pass popup parameters from parent page

2007-02-19 Thread Marc-Andre Houle

here is the way I have done it :
popupSettings.setTarget ("href" + " + '&searchfield=' + document." +
searchForm.getId () + "." + textField.getId () + ".value");

On 2/19/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


there is a lot of javascript out there that shows you how to read the
currently selected item out of a select box

-igor


On 2/19/07, serban.balamaci <[EMAIL PROTECTED]> wrote:
>
>
> Hi.
>
> I need to open a popup page that displays information that is related to
> parameters in the parent page. For example, a popuppage with a list of
> streets, and in the parent i would have a combo with counties ids, name
> and
> only the street in that county would be shown in the popup. The problem
> is
> that i would not want to make an unnecesary trip back to the server, but
> by
> not doing so the model behind the combo of counties is not updated, and
> an
> invocation on the onClick method of the link and calling
> combo.getModelObject does not return what was selected, since no data is
> passed to the server.
>
> I guess that the problem could be solved by using javascript, but i
> tried
> and found no solutions to how i could pass the parameters without
> forcing
> the user to first submit the form and then open the popup.
>
> Can it even be done?
>
> Thanks.
> --
> View this message in context:
> 
http://www.nabble.com/Pass-popup-parameters-from-parent-page-tf3252580.html#a9041563
> 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] Vertical Tabs

2007-02-19 Thread Igor Vaynberg

you can style tabbedpanel in extensions

the tabs are just a 

-igor


On 2/19/07, burnayev <[EMAIL PROTECTED]> wrote:



How do I create vertically stacked tabs? Is it possible to style and/or
extend the extensions tab component or do I have to create my own?
--
View this message in context:
http://www.nabble.com/Vertical-Tabs-tf3254943.html#a9048798
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


[Wicket-user] Vertical Tabs

2007-02-19 Thread burnayev

How do I create vertically stacked tabs? Is it possible to style and/or
extend the extensions tab component or do I have to create my own?
-- 
View this message in context: 
http://www.nabble.com/Vertical-Tabs-tf3254943.html#a9048798
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] Why does setResponse sometimes does notResponse?

2007-02-19 Thread Eelco Hillenius
On 2/19/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> at least if in devel mode you should log a warning if you detect this. or do
> you not detect its in a constructor...you just push a new target?

Why? If users want to do that, let them. Though it's probably not the
smartest thing to do, there's nothing wrong with it either. If you
want to log, you should log when a request target is pushed on top of
an existing one. If you're worried about efficiency or something,
that's a thing you probably never really need, though throwing
exceptions around isn't the most elegant thing either.

I don't see the problem anyway. I don't really see a good use case for
it, but like I said, there is absolutely no reason why calling
setResponsePage in the constructor is 'wrong' from an end user's
perspective.

Go ahead making improvements if you feel like it. I'm ok with how it is now.

Eelco

-
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] Why does setResponse sometimes does notResponse?

2007-02-19 Thread Igor Vaynberg

at least if in devel mode you should log a warning if you detect this. or do
you not detect its in a constructor...you just push a new target?

-igor


On 2/19/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:


On 2/19/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> sure, but does it abort the page or do you end up with an extra page in
the
> pagemap?

No, it doesn't abort the request. If you want to do that you need to
use that exception. So while it typically doesn't make sense to call
setResponsePage in a constructor, it is not *wrong* nor should Wicket
- like we did - ignore it altogether.

Eelco

-
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] Pass popup parameters from parent page

2007-02-19 Thread Igor Vaynberg

there is a lot of javascript out there that shows you how to read the
currently selected item out of a select box

-igor


On 2/19/07, serban.balamaci <[EMAIL PROTECTED]> wrote:



Hi.

I need to open a popup page that displays information that is related to
parameters in the parent page. For example, a popuppage with a list of
streets, and in the parent i would have a combo with counties ids, name
and
only the street in that county would be shown in the popup. The problem is
that i would not want to make an unnecesary trip back to the server, but
by
not doing so the model behind the combo of counties is not updated, and an
invocation on the onClick method of the link and calling
combo.getModelObject does not return what was selected, since no data is
passed to the server.

I guess that the problem could be solved by using javascript, but i tried
and found no solutions to how i could pass the parameters without forcing
the user to first submit the form and then open the popup.

Can it even be done?

Thanks.
--
View this message in context:
http://www.nabble.com/Pass-popup-parameters-from-parent-page-tf3252580.html#a9041563
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] Why does setResponse sometimes does notResponse?

2007-02-19 Thread Eelco Hillenius
On 2/19/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> sure, but does it abort the page or do you end up with an extra page in the
> pagemap?

No, it doesn't abort the request. If you want to do that you need to
use that exception. So while it typically doesn't make sense to call
setResponsePage in a constructor, it is not *wrong* nor should Wicket
- like we did - ignore it altogether.

Eelco

-
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] Why does setResponse sometimes does notResponse?

2007-02-19 Thread Igor Vaynberg

sure, but does it abort the page or do you end up with an extra page in the
pagemap?

-igor


On 2/19/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:


Guys, guys, did you read my reply? I fixed this and you can now use
setResponsePage in your constructor or anywhere you want!. I just made
this issue http://issues.apache.org/jira/browse/WICKET-298 so that the
change will be in the change log.

Eelco


On 2/19/07, manu <[EMAIL PROTECTED]> wrote:
> > > > available, and I cannot think of a good end-user reason why this
> > > > couldn't be called. The getMarkupId method can in fact be called
in
> > > if it is possible to make every method work at constructor, of
course
> > > this is not necessary.
> > It's a good idea to shield people from errors that aren't immediately
> > clear until runtime.
>
> Instead of that, wouldnt it be easier to make "setResponse" work
> forcibly in construction time similar as "RestartResponseException"
> does when explicity called? cancelling current page creation (& its
> component-tree) and force flow to the new page before responding...
>
>
-
> 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


[Wicket-user] PageParameter Parsing Primer

2007-02-19 Thread spencer.c

Can someone give me a quick overview of what is safe to pass in as a page
parameter?  I was under the impression that if I had a page parameter that
was a string, it would be encoded correctly in the URL, and decoded back to
its original form in the page constructor.  What I am finding, is that this
is not the case.  

As a quick example:
In some random page's onSubmit:
PageParameters pp = new PageParameters();
pp.add("test", "a+++a");
setResponsePage(Retrieve.class, pp);


In Retrieve.java:
private void parseParameters(PageParameters parameters)
{
m_log.info((String) parameters.get("test"));
}


Results in the output: "a   a"

The addition signs are stripped out.

In my case, I am sending an encrypted string as a key, and that string may
contain +, /, or other characters.  Shouldn't these be encoded and decoded
automatically somewhere along the line?  What am I missing?

Thanks,

-spencer


-- 
View this message in context: 
http://www.nabble.com/PageParameter-Parsing-Primer-tf3254414.html#a9047037
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] [datetime] DateConverter

2007-02-19 Thread Eelco Hillenius
> I don't remember where I was going with that, but I hope you get the idea.

I did, and I agree :). I'll have something new later today or this week.

Eelco

-
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] Why does setResponse sometimes does notResponse?

2007-02-19 Thread Eelco Hillenius
Guys, guys, did you read my reply? I fixed this and you can now use
setResponsePage in your constructor or anywhere you want!. I just made
this issue http://issues.apache.org/jira/browse/WICKET-298 so that the
change will be in the change log.

Eelco


On 2/19/07, manu <[EMAIL PROTECTED]> wrote:
> > > > available, and I cannot think of a good end-user reason why this
> > > > couldn't be called. The getMarkupId method can in fact be called in
> > > if it is possible to make every method work at constructor, of course
> > > this is not necessary.
> > It's a good idea to shield people from errors that aren't immediately
> > clear until runtime.
>
> Instead of that, wouldnt it be easier to make "setResponse" work
> forcibly in construction time similar as "RestartResponseException"
> does when explicity called? cancelling current page creation (& its
> component-tree) and force flow to the new page before responding...
>
> -
> 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] Help wanted for testing custom serialization (Wicket 1.3)

2007-02-19 Thread Johan Compagner

i think that is an old one yes that should be fixed



On 2/19/07, Andrew Klochkov <[EMAIL PROTECTED]> wrote:


It doesn't work. Maybe I should update? I have a week old version I guess.

ERROR - Objects- Error serializing object class
com.webalta.context.ad.web.stat.mock.MockStatPage [object=[Page class =
com.webalta.context.ad.web.stat.mock.MockStatPage, id = 0, version = 0]]
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(
ClassStreamHandler.java:423)
at
wicket.util.io.WicketObjectOutputStream.writeObjectOverride(
WicketObjectOutputStream.java:134)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at
wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(
ClassStreamHandler.java:766)
at
wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:342)
at
wicket.util.io.WicketObjectOutputStream.writeObjectOverride(
WicketObjectOutputStream.java:136)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at
wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(
ClassStreamHandler.java:766)
at
wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:342)
at
wicket.util.io.WicketObjectOutputStream.writeObjectOverride(
WicketObjectOutputStream.java:136)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at wicket.util.lang.Objects.objectToByteArray(Objects.java:1043)
at
wicket.protocol.http.FilePageStore.serializePage(FilePageStore.java:412)
at wicket.protocol.http.FilePageStore.access$4(FilePageStore.java:409)
at
wicket.protocol.http.FilePageStore$PageSavingThread.run(FilePageStore.java
:599)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(
ClassStreamHandler.java:411)
... 15 more
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(
ClassStreamHandler.java:423)
at
wicket.util.io.WicketObjectOutputStream.writeObjectOverride(
WicketObjectOutputStream.java:134)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.ArrayList.writeObject(Unknown Source)
... 20 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(
ClassStreamHandler.java:411)
... 23 more
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(
ClassStreamHandler.java:423)
at
wicket.util.io.WicketObjectOutputStream.writeObjectOverride(
WicketObjectOutputStream.java:134)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at
wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(
ClassStreamHandler.java:766)
at
wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:342)
at
wicket.util.io.WicketObjectOutputStream.defaultWriteObject(
WicketObjectOutputStream.java:155)
at javax.swing.tree.DefaultMutableTreeNode.writeObject(Unknown Source)
... 28 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(
ClassStreamHandler.java:411)
... 34 more
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(
ClassStreamHandler.java:423)
at
wicket.util.io.WicketObjectOutputStream.writeObjectOverride(
WicketObjectOutputStream.java:134)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at
wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(
ClassStreamHandler.java:766)
at
wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:342)
at
wicket.util.io.WicketObjectOutputStream.defaultWriteObject(
WicketObjectOutputStream.java:155)
at javax.swing.tree.DefaultMutableTreeNode.writeObject(Unknown Source)
... 39 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Re: [Wicket-user] Help wanted for testing custom serialization (Wicket 1.3)

2007-02-19 Thread Andrew Klochkov
It doesn't work. Maybe I should update? I have a week old version I guess.

ERROR - Objects- Error serializing object class
com.webalta.context.ad.web.stat.mock.MockStatPage [object=[Page class =
com.webalta.context.ad.web.stat.mock.MockStatPage, id = 0, version = 0]]
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(ClassStreamHandler.java:423)
at
wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:134)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at
wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(ClassStreamHandler.java:766)
at
wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:342)
at
wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:136)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at
wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(ClassStreamHandler.java:766)
at
wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:342)
at
wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:136)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at wicket.util.lang.Objects.objectToByteArray(Objects.java:1043)
at
wicket.protocol.http.FilePageStore.serializePage(FilePageStore.java:412)
at wicket.protocol.http.FilePageStore.access$4(FilePageStore.java:409)
at
wicket.protocol.http.FilePageStore$PageSavingThread.run(FilePageStore.java:599)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(ClassStreamHandler.java:411)
... 15 more
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(ClassStreamHandler.java:423)
at
wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:134)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.ArrayList.writeObject(Unknown Source)
... 20 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(ClassStreamHandler.java:411)
... 23 more
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(ClassStreamHandler.java:423)
at
wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:134)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at
wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(ClassStreamHandler.java:766)
at
wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:342)
at
wicket.util.io.WicketObjectOutputStream.defaultWriteObject(WicketObjectOutputStream.java:155)
at javax.swing.tree.DefaultMutableTreeNode.writeObject(Unknown Source)
... 28 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(ClassStreamHandler.java:411)
... 34 more
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at
wicket.util.io.ClassStreamHandler.invokeWriteMethod(ClassStreamHandler.java:423)
at
wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:134)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at
wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(ClassStreamHandler.java:766)
at
wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:342)
at
wicket.util.io.WicketObjectOutputStream.defaultWriteObject(WicketObjectOutputStream.java:155)
at javax.swing.tree.DefaultMutableTreeNode.writeObject(Unknown Source)
... 39 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown So

Re: [Wicket-user] How to include *.htc files in css files?

2007-02-19 Thread Frank Bille

Yes I noticed that so the only thing we can do is to create a wiki page
about it. I'll do that if I find out something "useful".

Frank


On 2/19/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:


// This is licensed under the CC-GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/

cant, its lgpl

-igor


On 2/19/07, Zágoni Elemér <[EMAIL PROTECTED]> wrote:

> Hi Igor, It's a good idea to include the InternetExplorer png fix as a
> Behavior in Wicket. But I would suggest to use the pngfix I attached,
> because this supports also background images (more frecvently used nowadays
> in pages than regular img) One drawback is that background-repeat and
> background-position cannot be honored by Microsoft's AlphaImage Loader in
> case of background images. 
IEPngFixBest.zip
> --
> View this message in context: Re: How to include *.htc files in css
> files?
> 

> Sent from the Wicket - 
Usermailing 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] [datetime] DateConverter

2007-02-19 Thread ChuckDeal


Eelco Hillenius wrote:
> 
> On 2/15/07, ChuckDeal <[EMAIL PROTECTED]> wrote:
>>
>> I was trying to use the datetime.DateTextField and it was giving me a
>> little
>> grief when I was trying to use DateTime objects with it.  It was my
>> understanding that that datetime project was to be built around the joda
>> package.  Here is a patch the removes the java.util.Date "stuff" in an
>> attempt to be a pure DateTime converter.
>>
>> With the following patch in place, my code works properly (ie, no errors
>> parsing or returning dates).  Let me know if I'm on the wrong track here,
>> please.
> 
> H. Yeah, I can see your point. My - original - idea was to use
> Joda-time internally and have this thing work for normal
> java.util.Dates transparently.
> 
> I think the best way to do here is to create another converter, the
> other one being fully based on joda time and build a separate text
> field for it etc. I definitively want to support normal dates, but I
> realize it's quite logical to expect wicket-datetime to work with
> joda-time all the way as well.
> 
> What do you think?
> 
> Eelco
> 


I suppose that if the current DateConverter became DateTimeConverter and a
new DateConverter used DateTimeConverter to get a DateTime object then
return toDate() from that it should be fine.  Did you get all that?

Anyway, I do see where you were going. Let's assume that the datetime
package was to be as close to pure jodatime as possible.  Supporting
util.Date shouldn't be that hard or complicated because joda pretty
seamlessly wraps that utl.Date.  But for clarity, where would we actually
need to support util.Date?  In the setting of an object and in the getting
of the object (for persistence, etc).  The model/converter should take care
of most of the work "under the hood", right?

Setting should be no problem because DateTime can easily wrap the util.Date,
so no extra code needed in the Converter.  It's the getting that could be
problematic because if the underlying Model wants a Date, we would need to
use the toDate() method, but when would it be called? 

So, as an end user, what could I do to use the "better" datetime package
while still utilizing my legacy data structures (util.Date) without the
wicket devs adding a bunch of crap into the datetime package?  



I don't remember where I was going with that, but I hope you get the idea.

Chuck 
-- 
View this message in context: 
http://www.nabble.com/-datetime--DateConverter-tf3233793.html#a9041780
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


[Wicket-user] Pass popup parameters from parent page

2007-02-19 Thread serban.balamaci

Hi.

I need to open a popup page that displays information that is related to
parameters in the parent page. For example, a popuppage with a list of
streets, and in the parent i would have a combo with counties ids, name and
only the street in that county would be shown in the popup. The problem is
that i would not want to make an unnecesary trip back to the server, but by
not doing so the model behind the combo of counties is not updated, and an
invocation on the onClick method of the link and calling
combo.getModelObject does not return what was selected, since no data is
passed to the server. 

I guess that the problem could be solved by using javascript, but i tried
and found no solutions to how i could pass the parameters without forcing
the user to first submit the form and then open the popup.

Can it even be done?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Pass-popup-parameters-from-parent-page-tf3252580.html#a9041563
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] Why does setResponse sometimes does notResponse?

2007-02-19 Thread Igor Vaynberg

i tried to do that, but the sentiment at that time was that throwing an
exception internally was not explicit enough. maybe times have changed.

-igor


On 2/19/07, manu <[EMAIL PROTECTED]> wrote:


> > > available, and I cannot think of a good end-user reason why this
> > > couldn't be called. The getMarkupId method can in fact be called in
> > if it is possible to make every method work at constructor, of course
> > this is not necessary.
> It's a good idea to shield people from errors that aren't immediately
> clear until runtime.

Instead of that, wouldnt it be easier to make "setResponse" work
forcibly in construction time similar as "RestartResponseException"
does when explicity called? cancelling current page creation (& its
component-tree) and force flow to the new page before responding...

-
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] Why does setResponse sometimes does notResponse?

2007-02-19 Thread manu
> > > available, and I cannot think of a good end-user reason why this
> > > couldn't be called. The getMarkupId method can in fact be called in
> > if it is possible to make every method work at constructor, of course
> > this is not necessary.
> It's a good idea to shield people from errors that aren't immediately
> clear until runtime.

Instead of that, wouldnt it be easier to make "setResponse" work
forcibly in construction time similar as "RestartResponseException"
does when explicity called? cancelling current page creation (& its
component-tree) and force flow to the new page before responding...

-
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] there is no way to preprocess raw markup in wicket 1.1?

2007-02-19 Thread wouvlfe

oops, should have been more clear about what i want to do
i want to be able to preprocess some of the tags (that do not have wicket
ids) in the markup and modify them if necessary

example:
modify the original tag:
/a/b/c 

to the tag:
/e/f 

that is, change the static paths in certain scenarios

is there a way this can be done through wicket?
(i dont want to add a 50 different wicket tags for 50 different static
resources in my markup file. So I would need to do this without wicket tags)

i think Igor pointed me to IMarkupFilter but that didnt help me accomplish
what I want.
The filters dont seem to allow me to modify raw markup.
dont know why but wicket LOVES to make classes and methods final.
so there is no way i can use polymorphism to extend functionalities of
wicket's base classes

vk



Timo Rantalaiho wrote:
> 
> On Mon, 19 Feb 2007, wouvlfe wrote:
>> I simply want to be able to modify the values of some static paths in the
>> raw html markup
>> 
>> it seems that there is no way to do it in wicket 1.1 ??
>> i started by looking into markup filters 
>> when i wrote my own markup parser, i couldnt find a way to replace
>> portions
>> of the raw html
> 
> It would help to know more specifically what you are trying
> to achieve.
> 
> But if you want to change URLs to static resources, you
> might be better off providing a custom resource locator
> 
>  
> http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html
> 
> or if paths are produced by wicket components, tweaking your
> own versions of the components.
> 
> - Timo
> 
> -- 
> Timo Rantalaiho
> Reaktor Innovations Oyhttp://www.ri.fi/ >
> 
> -
> 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/there-is-no-way-to-preprocess-raw-markup-in-wicket-1.1--tf3251667.html#a9040495
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


[Wicket-user] Why does setResponse sometimes does notResponse?

2007-02-19 Thread manu
> you shouldnt be calling setresponsepage inside constructors
> try RestartResponseException

Yes, RestartResponseException forced it to response fine.

Anyway, it's a shame "setResponse" sometimes fails in constructors, I
already have other web-flows working fine with it. That's because I
have some flow-decision-logic concentrated in constructors
(logic-convergence reasons)
 instead of previous page's end-points (links, buttons, etc). May
should I extract that constructors logic-convergence to be processed
appart in a "Switch" class that may accept a WebPage parameter to then
internally call its "setResponse", so avoid logic in constructors and
then call this "Switch" class at the end-points. I guess that maybe
this will not be applicable in all cases, but could try.

-
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] LoadableDetachableModel in form processing

2007-02-19 Thread Iman Rahmatizadeh

Matthew, the line where you create a palette object, I see you're using
Model instead of a Loadable model, what does the getDataStoreRoles() do ?
Does it load the DataStoreUser object ? Models are normally dangerous to use
with persistent objects, as they usually hold on to the instance during
sessions instead of loading them again. Maybe that's causing the
DataStoreUser object to live outside the previous session and cause the
problem. Replace the Model with a LoadableDetachableModel and see if the
problem goes away.
And karthik, I create and release the hibernate session in the request
cycle, which is just some variant of OpenSessionInViewFilter pattern, and
haven't had any problems with it. You just have to remember to always get
the object from the underlying model, and pass around the model. However the
only problem is the code gets really ugly with all the casts and getObject()
methods. I cant wait to move on to wicket 2.0 !

Iman

On 2/19/07, karthik Guru <[EMAIL PROTECTED]> wrote:



Personally I have have run into lot of issues with OpenSessionInViewFilter
pattern, so much so that I decided to take it off - At least the app now
works as 'I expect'.
But then am not an hibernate expert.

>> The standard solution is to use Session.merge()

Doesn't merge recreate the entity if its say deleted by another
user-session?. May be one can do a load before doing a merge just to make
sure that the entry actually exists in the DB  at that point in time.



On 2/18/07, Ryan Holmes <[EMAIL PROTECTED]> wrote:
>
> org.hibernate.NonUniqueObjectException is a really common problem. My
> guess is that the DataStoreUser is being loaded once to pass it into
> the page constructor and again by the LoadableDetachableModel within
> the same Hibernate session. Same persistent object loaded into two
> separate instance variables in the same (Hibernate) session -- boom,
> NonUniqueObjectException.
>
> There are a couple of ways to fix this. The "correct" solution is to
> avd'oid loading the object more than once in the first place. For
> instance, maybe you could take a user id instead of a user object
> into your page constructor to remove one of the load operations. The
> standard solution is to use Session.merge() instead of, say,
> Session.saveOrUpdate () (I assume you're getting this exception when
> the Hibernate session flushes).
>
> In any event, this is happening because LoadableDetachableModel is
> working as intended and thereby revealing one of Hibernate's many
> "quirks" -- not because of a problem in Wicket.
>
>
> -Ryan
> On Feb 10, 2007, at 2:31 AM, Matthew Kwong wrote:
>
> >
> > Hi fellows,
> >
> > Last time I asked how to use chain in CompoundPropertyModel with
> > LoadableDetachableModel, it worked since my page has no form (no
> > submit).
> > This time, I make another page and try to use the chain again, and
> > hibernate
> > throws org.hibernate.NonUniqueObjectException when I submit the form.
> >
> > Caused by: org.hibernate.NonUniqueObjectException: a different
> > object with
> > the same identifier value was already associated with the session:
> > [datastore2.model.DataStoreRole#1 ]
> >
> > My Panel:
> >
> > public UserDetail(String id, DataStoreUser user, final Panel
> > prevPanel) {
> > super(id);
> > add(new FeedbackPanel("feedback"));
> >
> > add(new Link("back") {
> > public void onClick() {
> > getParent().replaceWith(prevPanel);
> > }
> > });
> >
> > Form form = new Form("form") {
> > protected void onSubmit() {
> > DataStoreUser user = (DataStoreUser)
> > this.getModelObject();
> > try {
> > getDelegate().saveUser(user);
> > info("You have saved the user profile: " +
> > user.getFullname() + ".");
> > } catch (Exception e) {
> > e.printStackTrace();
> > error("Your user profile state is stale
> > (someone has
> > updated the same user profile while you are on this page). Please
> > press BACK
> > and come back.");
> > }
> > }
> > };
> >
> > form.setModel(new CompoundPropertyModel(new
> > LoadableDataStoreUserModel(getDelegate().getDataStoreUser(user.getId
> > ();
> > form.add(new Label("id"));
> > form.add(new Label("username"));
> > form.add(new RequiredTextField("firstname"));
> > form.add(new
> > TextField("lastname").setConvertEmptyInputStringToNull(false));
> > form.add(new Label("email"));
> > form.add(new Palette("roles", new
> > Model((Serializable)getDelegate().getDataStoreRoles()), new
> > RoleChoiceRenderer(), 10, true));
> > add(form);
> > }
> >
> > Is LoadableDetachableModel working for form processing? Because it is
> > working if I only have
> > form.setModel(new
> > CompoundPropertyModel(getDelegate().getDataStoreUser( user.getId(;
> >
> > The reaso

Re: [Wicket-user] there is no way to preprocess raw markup in wicket 1.1?

2007-02-19 Thread Timo Rantalaiho
On Mon, 19 Feb 2007, wouvlfe wrote:
> I simply want to be able to modify the values of some static paths in the
> raw html markup
> 
> it seems that there is no way to do it in wicket 1.1 ??
> i started by looking into markup filters 
> when i wrote my own markup parser, i couldnt find a way to replace portions
> of the raw html

It would help to know more specifically what you are trying
to achieve.

But if you want to change URLs to static resources, you
might be better off providing a custom resource locator

  http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html

or if paths are produced by wicket components, tweaking your
own versions of the components.

- Timo

-- 
Timo Rantalaiho
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
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] How to include *.htc files in css files?

2007-02-19 Thread Igor Vaynberg

// This is licensed under the CC-GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/

cant, its lgpl

-igor


On 2/19/07, Zágoni Elemér <[EMAIL PROTECTED]> wrote:


Hi Igor, It's a good idea to include the InternetExplorer png fix as a
Behavior in Wicket. But I would suggest to use the pngfix I attached,
because this supports also background images (more frecvently used nowadays
in pages than regular img) One drawback is that background-repeat and
background-position cannot be honored by Microsoft's AlphaImage Loader in
case of background 
images.IEPngFixBest.zip
--
View this message in context: Re: How to include *.htc files in css 
files?
Sent from the Wicket - 
Usermailing 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] How to include *.htc files in css files?

2007-02-19 Thread Zágoni Elemér

Hi Igor,

It's a good idea to include the InternetExplorer png fix as a Behavior in
Wicket. But I would suggest to use the pngfix I attached, because this
supports also background images (more frecvently used nowadays in pages than
regular img)

One drawback is that background-repeat and background-position cannot be
honored by Microsoft's AlphaImage Loader in case of background images.
http://www.nabble.com/file/6628/IEPngFixBest.zip IEPngFixBest.zip 
-- 
View this message in context: 
http://www.nabble.com/How-to-include-*.htc-files-in-css-files--tf3238484.html#a9039119
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


[Wicket-user] there is no way to preprocess raw markup in wicket 1.1?

2007-02-19 Thread wouvlfe


I simply want to be able to modify the values of some static paths in the
raw html markup

it seems that there is no way to do it in wicket 1.1 ??
i started by looking into markup filters 
when i wrote my own markup parser, i couldnt find a way to replace portions
of the raw html

(I would modify XmlTag objects and they would have no effect on the rendered
html)


help!
-- 
View this message in context: 
http://www.nabble.com/there-is-no-way-to-preprocess-raw-markup-in-wicket-1.1--tf3251667.html#a9039085
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] How to include *.htc files in css files?

2007-02-19 Thread Alex Objelean

(LOL) Unfortunately more than 70% of users are using retarded browsers :))
(not like - it's IE!). 

Alex.


Any ideas on how this might be fixed (accept for telling people not to
use a retarded browsers like IE)? Can we open an issue for it to track
it?

Eelco

-- 
View this message in context: 
http://www.nabble.com/How-to-include-*.htc-files-in-css-files--tf3238484.html#a9038996
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] Wicket 1.2.4 bug (?!?) - changing visibility of a button using ajax

2007-02-19 Thread Alex Objelean


Sorry guys, my fault! I indeed forgot to setOutputMarkupId to true
Working late have a great impact on my attention :)... Anyway, thank you for
your answers!!


igor.vaynberg wrote:
> 
> you cannot add button directly to the ajax target to change visibility,
> you
> have to add some enclosing component
> 
> lets say you start out with a visible button
> you hide it
> and add it directly
> so now what wicket will try to do is to go find
> 
>  and replace that tags outer html with "" - which may
> or
> may not work depending on the browser. btw do you have
> button.setoutputmarkupid(true) ???
> 
> even if that does work lets say later you want to make the button visible
> again, so you add it again to the target
> 
> wicket tries to go out and find a tag with id "button" but cant because it
> is no longer in the domtree of the body - so you get an error.
> 
> the proper way to do this is to add button's parent, that way the parent
> will repaint itself without the button's tag in it, and later when you
> make
> it visible the parent will repaint itself with button's tags so everything
> works nicely.
> 
> -igor
> 
> 
> On 2/16/07, Alex Objelean <[EMAIL PROTECTED]> wrote:
>>
>>
>> The bug is about setVisible() method which does not work on button (and
>> not
>> only) components when using ajax updates.
>>
>> Detailed description:
>> I have a DataView. Each line contains a description (Label component), a
>> configuration select (DropDownChoice component) and a download button
>> (Button component). When user changes the configuration from the
>> DropDownChoice component, depending on the selected configuration - the
>> download button visibility must be changed. Here is the snippet of code:
>>
>> protected void onUpdate(final AjaxRequestTarget target) {
>>   //find somehow my button using relative path
>>   Button button = ...;
>>   button.setVisible(false);
>>   target.addComponent(button);
>> }
>>
>> This code does not perform the expected result. Interesting is that if
>> instead of button, I try to change the visibility of a DropDownChoice
>> component - it works!
>>
>> I cannot understand why it behave so different. Can you explain me? Is it
>> a
>> bug? Am I using a wrong approach?
>>
>> Thank you!
>> --
>> View this message in context:
>> http://www.nabble.com/Wicket-1.2.4-bug-%28-%21-%29---changing-visibility-of-a-button-using-ajax-tf3242268.html#a9013073
>> 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
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-1.2.4-bug-%28-%21-%29---changing-visibility-of-a-button-using-ajax-tf3242268.html#a9038948
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


[Wicket-user] PropertyModel misbehavior

2007-02-19 Thread Alex Objelean

First of all, the functional description:
I have a screen with the table which contains on each line a column with
description, a dropDownChoice (DDC) with a list of configurations and
another column with DDC with a list of years. When user changes a
configuration , the list of years updates depending on selected
configuration (using ajax). 

Below you can find the code. 

/**
 * @see RefreshingView#populateItem(Item)
 */
protected void populateItem(final Item item) {
  //get the configuration list
  List configurationList = ...//call a service to get the list
  DropDownChoice selConfig = new DropDownChoice("configuration",
 new PropertyModel(item.getModel(), "configuration"),
 configurationList, new ChoiceRenderer(
"description", "id"));
  item.add(selConfig);

  IModel modelChoices = new Model() {
public Object getObject(final Component component) {
  List rValue = Collections.EMPTY_LIST;
  ReportTemplateUI report = (ReportTemplateUI) item.getModelObject();
  Configuration config = report.getConfiguration();
  if (config == null) {
return rValue;
  }
  rValue = getExtractionResultService().getAvailableYears(
  config.getId());
  return rValue;
}
  };
  DropDownChoice selYear = new DropDownChoice("year",
  new PropertyModel(item.getModel(), "year"), modelChoices);
  item.add(selYear);
  //...
}  


The modelObject of the Item looks like this:

ReportTemplateUI implements Serializable{
  private Integer year;
  private Configuration configuration;  
  //other properties + getters & setters
}

As you can see, the DDC is constructed this way: it uses a PropertyModel for
setting the "year" property on the item model; the modelChoices (used to
populate the DDC component) based on the Item current configuration, calls a
service and returns a list of years associated with the selected
configuration.

Now the problem is that the PropertyModel does not set the year property on
the Item objectModel - the year property always have the NULL value. Somehow
I found that the problem is caused by calling item.getModelObject, but it
does not make sens for me (!?!)..   If instead of this I return a static
list, everything seems to work fine... (@see below)

  IModel modelChoices = new Model() {
public Object getObject(final Component component) {
  List rValue = Collections.EMPTY_LIST;

  // THE PROBLEM IS HERE - CALLING Item.getModleObject() method. !!!
  ReportTemplateUI report = (ReportTemplateUI) item.getModelObject();

  Configuration config = report.getConfiguration();
  if (config == null) {
return rValue;
  }
  rValue = getExtractionResultService().getAvailableYears(
  config.getId());
 
  //IF INSTEAD OF ABOVE CODE I RETURN A STATIC LIST - EVERYTHING WORKS
FINE

  return rValue;
}
  };
  DropDownChoice selYear = new DropDownChoice("year",
  new PropertyModel(item.getModel(), "year"), modelChoices);

I found a workaround for this but it is a temporary solution until I find
the answer to this mysterious issue.
Is it a known issue, a bug, or this is not a correct approach to solve the
problem? Can you help me? 

Thank you!

PS: if you have any question regarding the code or anything else is not
clear, please don't hesitate to ask! Thank you again!
-- 
View this message in context: 
http://www.nabble.com/PropertyModel-misbehavior-tf3251590.html#a9038875
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] LoadableDetachableModel in form processing

2007-02-19 Thread karthik Guru

Personally I have have run into lot of issues with OpenSessionInViewFilter
pattern, so much so that I decided to take it off - At least the app now
works as 'I expect'.
But then am not an hibernate expert.


The standard solution is to use Session.merge()


Doesn't merge recreate the entity if its say deleted by another
user-session?. May be one can do a load before doing a merge just to make
sure that the entry actually exists in the DB  at that point in time.



On 2/18/07, Ryan Holmes <[EMAIL PROTECTED]> wrote:


org.hibernate.NonUniqueObjectException is a really common problem. My
guess is that the DataStoreUser is being loaded once to pass it into
the page constructor and again by the LoadableDetachableModel within
the same Hibernate session. Same persistent object loaded into two
separate instance variables in the same (Hibernate) session -- boom,
NonUniqueObjectException.

There are a couple of ways to fix this. The "correct" solution is to
avd'oid loading the object more than once in the first place. For
instance, maybe you could take a user id instead of a user object
into your page constructor to remove one of the load operations. The
standard solution is to use Session.merge() instead of, say,
Session.saveOrUpdate() (I assume you're getting this exception when
the Hibernate session flushes).

In any event, this is happening because LoadableDetachableModel is
working as intended and thereby revealing one of Hibernate's many
"quirks" -- not because of a problem in Wicket.


-Ryan
On Feb 10, 2007, at 2:31 AM, Matthew Kwong wrote:

>
> Hi fellows,
>
> Last time I asked how to use chain in CompoundPropertyModel with
> LoadableDetachableModel, it worked since my page has no form (no
> submit).
> This time, I make another page and try to use the chain again, and
> hibernate
> throws org.hibernate.NonUniqueObjectException when I submit the form.
>
> Caused by: org.hibernate.NonUniqueObjectException: a different
> object with
> the same identifier value was already associated with the session:
> [datastore2.model.DataStoreRole#1]
>
> My Panel:
>
> public UserDetail(String id, DataStoreUser user, final Panel
> prevPanel) {
> super(id);
> add(new FeedbackPanel("feedback"));
>
> add(new Link("back") {
> public void onClick() {
> getParent().replaceWith(prevPanel);
> }
> });
>
> Form form = new Form("form") {
> protected void onSubmit() {
> DataStoreUser user = (DataStoreUser)
> this.getModelObject();
> try {
> getDelegate().saveUser(user);
> info("You have saved the user profile: " +
> user.getFullname() + ".");
> } catch (Exception e) {
> e.printStackTrace();
> error("Your user profile state is stale
> (someone has
> updated the same user profile while you are on this page). Please
> press BACK
> and come back.");
> }
> }
> };
>
> form.setModel(new CompoundPropertyModel(new
> LoadableDataStoreUserModel(getDelegate().getDataStoreUser(user.getId
> ();
> form.add(new Label("id"));
> form.add(new Label("username"));
> form.add(new RequiredTextField("firstname"));
> form.add(new
> TextField("lastname").setConvertEmptyInputStringToNull(false));
> form.add(new Label("email"));
> form.add(new Palette("roles", new
> Model((Serializable)getDelegate().getDataStoreRoles()), new
> RoleChoiceRenderer(), 10, true));
> add(form);
> }
>
> Is LoadableDetachableModel working for form processing? Because it is
> working if I only have
> form.setModel(new
> CompoundPropertyModel(getDelegate().getDataStoreUser(user.getId(;
>
> The reason why i want this loadable since I want to update the page
> with
> "F5" refresh button again if someone has changed the same user in
> another
> computer.
>
> Thank you :)
> Matthew Kwong
> --
> View this message in context: http://www.nabble.com/
> LoadableDetachableModel-in-form-processing-tf3204839.html#a8899449
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> --
> ---
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?
> cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> 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