Re: Overriding Text No Records Found

2008-12-16 Thread Nino Saturnino Martinez Vazquez Wael

You can also do it on page level or component level..

regards

Adriano dos Santos Fernandes wrote:

HITECH79 escreveu:

Hallo,

how can i override/modify the text No Records Found
If you are talking about the DataTable component, write a 
YourApplication.properties on the same package as YourApplication 
class, and put:

datatable.no-records-found=Nenhum registro encontrado


Adriano


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



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



Re: Setting a relevant value for radio buttons without using RadioChoice

2008-12-15 Thread Nino Saturnino Martinez Vazquez Wael

Hmmm but why not just do it with a LDM? Im a bit puzzled, heres what I do:

RadioGroupEventType eventTypeRadioGroup = new RadioGroupEventType(
   eventType);
   eventTypeRadioGroup.setLabel(new ModelString(Type of 
Event));


   ListViewEventType eventTypesListView = new 
ListViewEventType(

   eventTypeRadios, Arrays.asList(EventType.values())) {

   @Override
   protected void populateItem(ListItemEventType item) {

   item
   .add(new RadioEventType(eventType, item
   .getModel()));
   item.add(new Label(label, new ModelString(item
   .getModel().getObject().getName(;
   item.add(new IconPanel(icons, item.getModelObject()
   .getIconTypes()));

   }
   };
   eventTypesListView.setReuseItems(true);
   eventTypeRadioGroup.setRequired(true);
   eventTypeRadioGroup.add(eventTypesListView);
   add(eventTypeRadioGroup);


Hmm this might be a bad example as I don't use LDM ../ But the important 
line are :
   item.add(new RadioEventType(eventType, item.getModel()));


if you select a certain radio within a group the group will return the 
radios objectmodel...



Michael O'Cleirigh wrote:

Hi Nino,



I believe that this is not what Archie asked about, he wanted to 
place database id's in the value of the radios.. Dont know why he 
wanted to though... I might have gotten it wrongly though..


You're right that he wanted to use the database id but from his 
example there didn't seem to be any client side use of this 
information.   My thinking is that he renders a list of users denoted 
by radio buttons and he want to encode the user id (for a LDM?) as the 
value for use on the form submission processing (i.e. which user to 
work with in the next stage).


Because there is no requirement for the user id on the client side 
there is no reason to care about the value used by the Radio as it is 
just used internally by RadioGroup to know which model object to use 
when the form is submitted.


There is no need for an IChoiceRenderer in this case because the Model 
object of each Radio is never rendered.


He should just encode what he needs in the Model of each Radio and 
expect to find it in the model of the RadioGroup when the form submits.


In his example:

RadioGroup group=new RadioGroup(group, new Model(id));
   final ArrayList SelectOptionLevel selectOptionLevel =
getDdcChoices();
   ListView persons=new ListView(persons, selectOptionLevel) {
   /**
*  */
private static final long serialVersionUID = 1L;
protected void populateItem(ListItem item) {
   SelectOptionLevel option = (SelectOptionLevel)
item.getModelObject();
   //Exampe of Icon  setting
   item.add(new Label(levelImage,  img
src='images/icons/icon1.gif'/).setEscapeModelStrings(false));
Radio radio = new Radio(
   radio, new 
Model(option.getValue())  // -- this is how to wire the Radio Model

   item.add(radio);
   item.add(new Label(name, option.getLabel()));
   }
   };
   group.add(persons);
   add(group);


This will make group.getModelObject() return the option.getValue() 
(i.e the user id) for the selected view item and allow him to proceed 
to the next step.


Regards,

Mike



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Semigenerating Selenium case's with wicketTester?

2008-12-15 Thread Nino Saturnino Martinez Vazquez Wael

Hi Guys

I were wondering if any of you have tried todo some semi auto generation 
with wicketTester for selenium?


I mean create a wicket tester that runs a scenario and at the same time 
it runs a selenium rc and check's if the result are the same somehow?
Im not sure if it gives any advantage over just a plain selenium test, 
but are just wondering..


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Remove bulletpoints from messagetext in feedbackpanel

2008-12-15 Thread Nino Saturnino Martinez Vazquez Wael
Yeah, and if you want you can also put on a special icon[1], like 
warning triangle etc for the separate states a feedback message can be..


[1] http://jacorre.com/design/cssnavmenus.htm



Adriano dos Santos Fernandes wrote:

HITECH79 escreveu:

Hallo,

how can i remove the bulletpoints from messagetext in the 
feedbackpanel??
  

With CSS stylesheet:

li.feedbackPanelINFO
{
   list-style-type: none;
}

li.feedbackPanelERROR
{
   list-style-type: none;
}


Adriano


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



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Ajax response not completed

2008-12-15 Thread Nino Saturnino Martinez Vazquez Wael
Beats me, seems like somethings wrong,maybe a bug..? I'd create a 
quickstart (really easy with maven,  
http://wicket.apache.org/quickstart.html ) and attach it to a jira issue..


If the code are somewhat working, and the only annoying thing are the 
mouse icon you could try to set the mouse icon manually..


Emanuele Gesuato wrote:

Emanuele Gesuato wrote:

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



Here the code of the html and java part:

**html**
?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
titleJStore/title
/head
body

a href=# wicket:id=mylinkClick me/a

/body
/html





*** java ***
add(new AjaxFallbackLink(link){
@Override
public void onClick(AjaxRequestTarget target) {
PageParameters params = new PageParameters();
params.add(file, /home/eg/test.pdf);
params.add(type, application/pdf);

setResponsePage(FakePageForAjaxPrint.class, params);

}   
});



The other source code are available in the previous email.

I forgot to mention that i don't have any error on my browser (Firefox 
3.0.4). Javascript works fine but the mouse pointer still kepy busy.


I've just tried with firefox 2.0.0.18 but i've got the same problem.

The page i'm accessing is a bookmarkable page: could it be related ?



Thanks for any help,
Emanuele






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



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Autocomplete text concatenation

2008-12-15 Thread Nino Saturnino Martinez Vazquez Wael

This is also something you can do with object autocomplete from Wicketstuff

francisco treacy wrote:

if i understand correctly you need a multi autocompleter.

do you mean something like this?
http://digitarald.de/project/autocompleter/1-1/showcase/delicious-tags/
(i have integrated it with wicket, it's indeed used when you edit
topics of a module in wickethub).

francisco


On Mon, Dec 15, 2008 at 8:36 PM, Graeme Knight graeme1...@gmail.com wrote:
  

Hi.

Couldn't find an answer but perhaps this is a common thing to want to do:

Using an AutoCompleteTextField I want to allow the user to select choices as
he types, then update the text area by appending the selected choice.
Similar to the way a web mail application would allow a user to type email
address after email address and see them appended to the text field.

Is there an easy way to achieve this?

Many thanks, Graeme.
--
View this message in context: 
http://www.nabble.com/Autocomplete-text-concatenation-tp21020322p21020322.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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





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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: How to donate to Wicket Project

2008-12-14 Thread Nino Saturnino Martinez Vazquez Wael



James Carman wrote:

Of course, the ASF would always love donations:

http://www.apache.org/foundation/contributing.html

Also, you can buy from the Wicket store and part of the proceeds will
help the ASF (I believe that's how it's set up):

http://www.cafepress.com/apachewicket

The coffee mug is very nice and I also have the golf shirt!  Wish I
had a chance to play golf.
  
Yup the idea for the store are that I donate 5% of the proceeds to ASF 
and the rest to the WICKET core team somehow, im up for ideas. However 
we are talking very small amounts, for each product sold the shop earns 
something like a buck, so it'll be a while before I can buy them a new 
car :) However the the store sort of manages itself so thats nice.




On Sat, Dec 13, 2008 at 8:23 AM, Bruno Borges bruno.bor...@gmail.com wrote:
  

I don't think the project would accept money that way. If you really wanna
do that, just buy the book Wicket in Action and Eelco and Martijn will be
more than happy. =D

But, the best way to really contribute to the project is
- submitting bugs
- fixing them
- helping writing documentation
- spreading the word (blogging)

=) Good luck with that! And thanks for showing us your willing to
contribute.

Best regards,
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

The glory of great men should always be
measured by the means they have used to
acquire it.
- Francois de La Rochefoucauld


On Sat, Dec 13, 2008 at 8:14 AM, Ayodeji Aladejebi aladej...@gmail.comwrote:



Hi,
I am really grateful for the Wicket Project and really feel like buying
beer
for the wicket team but when i checked sponsorship under the Wicket Site,

it saw too much information except paying methods

I don't use PayPal as I am not transferring money from US or europe, i
rather require an international Wire transfer account.

Thank you for the Wicket Project


--
Aladejebi Ayodeji A.,
DabarObjects Solutions
Phone: +234 9 481 7 156
Mobile: +234 803 589 1780
Email: d...@dabarobjects.com
Web: www.dabarobjects.com
Blog: blog.dabarobjects.com

Participate, Collaborate, Innovate
Join Community:
http://www.cowblock.net/

Get A Free Blog:
http://blogs.cowblock.net/

  


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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Setting a relevant value for radio buttons without using RadioChoice

2008-12-12 Thread Nino Saturnino Martinez Vazquez Wael

Does'nt it use a choice renderer?

ArchieC wrote:

Hi All

Im fairly new to wicket and Im going insane with an issue Im having. Ive
been doing a trawl of many forums, Wicket in action, Pro wicket, nabble,
asking questions of friendly people and trying every option I can think of
to work this out for myself using RadioChoice, RadioGroup and odd
combinations of both.

I promise Ive been trying to avoid asking this question on the forum cause
Im expecting someone to call me an idiot. So here is my question.

RadioChoice has the ability to set a value thats not the standard radio7
type value. As far as we (myself and the java developer I am working with)
can see, we cannot seem to do the same for a Radio component in a
RadioGroup. Are we barking up the wrong tree completely or is there a way to
set a value to an ID from our database (for example).

EG.
Instead of input type=radio name=group value=radio7 /

I get input type=radio name=group value=353 /  (353 being the
user_id of one of the accounts, set in option.getValue() - please see code
snippet below). 



Here is the reason we cant just use a RadioChoice. The list we are making
contains about 1000 User account names, each with a user level denoted by an
icon next to each name and radio button. RadioChoice doesnt give the option
of doing different icons (Label with IMG html in it for Icons) for each name
as setPrefix just sets one for the whole list. The list is basically acting
like a drop down box so that I can select one of the accounts for editing on
the next page.

Im really stumped by this as I cant seem to find any reference to setting
this value on a Radio component and I cant believe the creators of Wicket
would make a pointless component.

Here is my code if that helps

RadioGroup group=new RadioGroup(group, new Model(id));
final ArrayList SelectOptionLevel selectOptionLevel =
getDdcChoices();
ListView persons=new ListView(persons, selectOptionLevel) {
/**
 * 
 */

 private static final long serialVersionUID = 1L;
  


protected void populateItem(ListItem item) {
SelectOptionLevel option = (SelectOptionLevel)
item.getModelObject();

//Exampe of Icon  setting

item.add(new Label(levelImage,  img
src='images/icons/icon1.gif'/).setEscapeModelStrings(false));
 
Radio radio = new Radio(
radio, 
new PropertyModel(modelObject, user)  
~~ Need to set the value of the radio to

my option.getValue() value.

);
item.add(radio);
item.add(new Label(name, option.getLabel()));
}
};
group.add(persons);
add(group);

Apart from not getting a value it all looks great just as I want.
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Setting a relevant value for radio buttons without using RadioChoice

2008-12-12 Thread Nino Saturnino Martinez Vazquez Wael
Hmm it does'nt.. And you cant even overrride getValue() on radio since 
it's final... :( Come it, I posted something about the fact that radio 
uses autoIndex once regarding jmeter..


But you can override onComponentTag, I guess I'd probably roll my own 
and rip most from Radio, but let it take the optional choicerenderer..


Nino Saturnino Martinez Vazquez Wael wrote:

Does'nt it use a choice renderer?

ArchieC wrote:

Hi All

Im fairly new to wicket and Im going insane with an issue Im having. Ive
been doing a trawl of many forums, Wicket in action, Pro wicket, nabble,
asking questions of friendly people and trying every option I can 
think of

to work this out for myself using RadioChoice, RadioGroup and odd
combinations of both.

I promise Ive been trying to avoid asking this question on the forum 
cause

Im expecting someone to call me an idiot. So here is my question.

RadioChoice has the ability to set a value thats not the standard 
radio7
type value. As far as we (myself and the java developer I am working 
with)

can see, we cannot seem to do the same for a Radio component in a
RadioGroup. Are we barking up the wrong tree completely or is there a 
way to

set a value to an ID from our database (for example).

EG.
Instead of input type=radio name=group value=radio7 /

I get input type=radio name=group value=353 /  (353 being the
user_id of one of the accounts, set in option.getValue() - please see 
code

snippet below).

Here is the reason we cant just use a RadioChoice. The list we are 
making
contains about 1000 User account names, each with a user level 
denoted by an
icon next to each name and radio button. RadioChoice doesnt give the 
option
of doing different icons (Label with IMG html in it for Icons) for 
each name
as setPrefix just sets one for the whole list. The list is basically 
acting
like a drop down box so that I can select one of the accounts for 
editing on

the next page.

Im really stumped by this as I cant seem to find any reference to 
setting
this value on a Radio component and I cant believe the creators of 
Wicket

would make a pointless component.

Here is my code if that helps

RadioGroup group=new RadioGroup(group, new Model(id));
final ArrayList SelectOptionLevel selectOptionLevel =
getDdcChoices();
ListView persons=new ListView(persons, 
selectOptionLevel) {

/**
 *  */
 private static final long serialVersionUID = 1L;
 
protected void populateItem(ListItem item) {

SelectOptionLevel option = (SelectOptionLevel)
item.getModelObject();
//Exampe of Icon  setting
item.add(new Label(levelImage,  img
src='images/icons/icon1.gif'/).setEscapeModelStrings(false));
 Radio radio = new Radio(
radio, new 
PropertyModel(modelObject, user)  ~~ Need 
to set the value of the radio to

my option.getValue() value.

);
item.add(radio);
item.add(new Label(name, option.getLabel()));
}
};
group.add(persons);
add(group);

Apart from not getting a value it all looks great just as I want.
  




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Setting a relevant value for radio buttons without using RadioChoice

2008-12-12 Thread Nino Saturnino Martinez Vazquez Wael

Hi Michael

I believe that this is not what Archie asked about, he wanted to place 
database id's in the value of the radios.. Dont know why he wanted to 
though... I might have gotten it wrongly though..


regards Nino

Michael O'Cleirigh wrote:

Hi ArchieC,

The way RadioGroup works is that it renders to a hidden field and 
stores the selected value of the selected Radio.


i.e. the rendered markup is not that relevant and the model object for 
the selected radio will be placed into the model for the RadioGroup 
when the form submits.


This is how I've used it:

RadioGroup group = new RadioGroup (group, new Model());


Radio apple = new Radio (apple, new Model (Fruit.APPLE));

Radio orange = new Radio (orange, new Model (Fruit.ORANGE));


group.setModelObject (Fruit.APPLE);

Here by default the first radio is selected.

When the form submits group.getModelObject() will return either 
Fruit.APPLE or Fruit.ORANGE depending on the selected radio button


In your case the RadioGroup will have as its model Object the value of 
the selected radio.getModelObject() so whatever the value of user is 
coming from the PropertyModel() for the selected option.


Regards,

Mike




RadioGroup group=new RadioGroup(group, new Model(id));
final ArrayList SelectOptionLevel selectOptionLevel =
getDdcChoices();
ListView persons=new ListView(persons, 
selectOptionLevel) {

/**
 *  */
 private static final long serialVersionUID = 1L;
 
protected void populateItem(ListItem item) {

SelectOptionLevel option = (SelectOptionLevel)
item.getModelObject();
//Exampe of Icon  setting
item.add(new Label(levelImage,  img
src='images/icons/icon1.gif'/).setEscapeModelStrings(false));
 Radio radio = new Radio(
radio, new 
PropertyModel(modelObject, user)  ~~ Need 
to set the value of the radio to

my option.getValue() value.

);
item.add(radio);
item.add(new Label(name, option.getLabel()));
}
};
group.add(persons);
add(group);

Apart from not getting a value it all looks great just as I want.
  



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



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Openid integration?

2008-12-11 Thread Nino Saturnino Martinez Vazquez Wael



David Leangen wrote:
  
Hmm, I do actually have something working, which seems to be really 
simple.



Ok, good for you!
  
Yup, I plan to push it back to wicketstuff once I've figured out the 
last problems...


  
Using openid4java, my only problem are that I cant seem to get 
any openid providers to give me the requested attributes, like 
email and name. How did you solve this?



Are you sure it's an openid4java problem?
  

No Im not, in fact im much in doubt..

If the OP does not support extensions, then there's just nothing you can
do!
  

Yeah thats my conclusion as well, it sux somewhat..

Normally (again from my porous memory, sorry!) there should be some
parameter in which the OP declares which extensions it supports.

Ahh thanks for the hint. Really useful.

 For
example, Yahoo supports only pape, nothing else. That means that try as
you might, you'll never get any registration info from them.
  

PAPE?

But in any case, this should be on the openid4java list, not here...
  
True, they are just so slow there :) I've started a blog entry on this ( 
http://ninomartinez.wordpress.com/2008/12/11/openid-the-challenge-attributes/ 
) please comment if you have something to add, and written the 
openid4java list as well.. But gotten no answers..


Cheers,
Dave




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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Want a simple way to put in conditional css for IE..?

2008-12-11 Thread Nino Saturnino Martinez Vazquez Wael

Then check this approach out :

http://ninomartinez.wordpress.com/2008/12/11/wicket-never-stops-to-impress-me/

Easy and simple - The Wicket way :)

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Want a simple way to put in conditional css for IE..?

2008-12-11 Thread Nino Saturnino Martinez Vazquez Wael
Hehe, I just got too lazy to fill in two medias for the knowledge (mail 
and blog).. Also doing blog's about wicket is good PR to get interested 
in Wicket.. And it would be a shame if someone wanted to keep track of 
this and only checked the list..


Cool post btw :) I'll be watching your blog:)

Michael Sparer wrote:

Now that you started a thread containing only a link to your blogpost, I feel
less spammy when I point out that I've written a wicket-related blogpost
too: 


http://talk-on-tech.blogspot.com/2008/12/wicket-neat-url-encoding-strategy-and.html

;-)


Nino.Martinez wrote:
  

Then check this approach out :

http://ninomartinez.wordpress.com/2008/12/11/wicket-never-stops-to-impress-me/

Easy and simple - The Wicket way :)

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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







-
Michael Sparer
http://talk-on-tech.blogspot.com
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: [OT] wicket users around the world

2008-12-11 Thread Nino Saturnino Martinez Vazquez Wael
Work in Denmark pimping wicket at every opportunity i get, lived all my 
life in Denmark, so half from Denmark and half from Spain :)


francisco treacy wrote:

to know a little bit more of our great (and vast) community, i was
just wondering if you're keen on sharing where you come from and/or
where you work with wicket...

for instance, here argentinian/belgian working with wicket in antibes, france

francisco

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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Openid integration?

2008-12-10 Thread Nino Saturnino Martinez Vazquez Wael



David Leangen wrote:

Hi, Nino,

Sorry, I haven't been following this list daily lately. I probably should,
since I just sifted through 500 messags. Wow, this list is really active!
  
Yeah, it's really knocking away :) So much that it really feels silent 
on other forums..

Anyway, I did say I'd get back to you once I completed my OpenID
integration, and I just completed it recently.
  

Ahh great.


However, I'm not sure I can really be of much use to you. The fact is that I
had to pretty much redo everything in a custom way. As you know, I am
running Wicket in OSGi using pax-wicket. This really changes a lot of
things, especially the way I'm using Wicket. My solution will certainly not
be generally applicable, so I won't even bother trying.
  

no problem.

In any case, the login process using OpenID is a little different from the
traditional process. I used a few tricks in Wicket to get this to work.
(I'm writing from [my bad] memory, so please bear with me...) If you recall,
when a user logs in, there is some exception thrown like
UnauthorizedInstantiationException or something. There is a handler that can
be registered for this.

The default flow looks something like this:

  Is the user authenticated?
 No: -- throw new RestartAtSomethingException( LoginPage.class )
 Yes: -- throw new SecurityExceptionOrSomethingLikeThat

What I did was add an extra step for OpenID:

  Is the user authenticated?
 No: -- throw new RestartAtSomethingException( LoginPage.class )

  Is the user registered?
 No: -- throw new RestartAtSomethingException( RegistrationPage.class )
 Yes: -- throw new SecurityExceptionOrSomethingLikeThat

This seems to work well. Sorry I don't remember the actual names. ;-)
  

No problem, I have this part working.

As for the authentication stuff (I think you were posing a question about
this, too), I used my own custom implementation based on the UserAdmin
service. It works very well and is very flexible, but it did take a while to
build correctly.

There was a lot more to it, but I would say those were the main aspects. Oh,
forgot to mention that I used openid4java. It seems to work ok, except for
the fact that is depends on openxri, which does some crappy dynamic
instantiation of xml parsers (I say crappy because it's a hassle in an
OSGi environment).
  

Yeah I saw your post on openid4java list.


If you think there is something general we could make out of this, I'd be
happy to work with you, but I think it would only apply for pax-wicket
users. I just don't see how this solution could work for general Wicket
users.
  
Hmm, I do actually have something working, which seems to be really 
simple. Using openid4java, my only problem are that I cant seem to get 
any openid providers to give me the requested attributes, like email and 
name. How did you solve this?


Cheers,
Dave




  

-Original Message-
From: Nino Saturnino Martinez Vazquez Wael
[mailto:[EMAIL PROTECTED]
Sent: 2 December 2008 04:31
To: users@wicket.apache.org
Subject: Openid integration?


Hi Guys

Have any of you tried to do a openid integration ?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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






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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: junit testing wicket with spring and hibernate

2008-12-10 Thread Nino Saturnino Martinez Vazquez Wael

Hi Per-Olof

You should checkout Wicket 
Iolite(http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite), 
or WicketTopia(http://wicketopia.sourceforge.net/). Both uses this 
technique and has a snappy archetype for a swift start. The latter has 
builtin profiles for misc conf-files using maven. And if you grab the 
testing part from Wicket Iolite, you'll have what you want with 
WicketTopia.. The heres the idea, although below are very rough and it's 
much nicer in Wicket Iolite:



package zeuzgroup.application.test;

import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
import 
org.apache.wicket.spring.injection.annot.test.AnnotApplicationContextMock;

import org.apache.wicket.util.tester.WicketTester;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.jpa.AbstractJpaTests;

import zeuzgroup.application.ZeuzGroupApplication;
import zeuzgroup.core.localization.ITranslationService;
import zeuzgroup.core.provider.IDBDao;
import zeuzgroup.core.provider.TestFixtureProvider;

public abstract class BaseTest extends AbstractJpaTests {

   protected WicketTester wicketTester;

   protected IDBDao dbProvider;

   protected TestFixtureProvider testFixtureProvider = new 
TestFixtureProvider();


   protected ITranslationService translations;

   @Override
   protected String[] getConfigLocations() {
   return new String[] { classpath:applicationContext.xml };
   }

   protected BaseTest() {
   super();

   setDependencyCheck(false);

   // To make inherited properties (like
   // DataSource) not required.
   }

   @Override
   protected void onSetUpBeforeTransaction() throws Exception {

   super.onSetUpBeforeTransaction();
   readyStuff();

   }

   @Override
   protected boolean shouldUseShadowLoader() {
   return false;
   }

   private void readyStuff() {
   ApplicationContext appcxt = new ClassPathXmlApplicationContext(
   applicationContext.xml);
   dbProvider = (IDBDao) appcxt.getBean(dBDao);
   // 2. setup mock injection environment
   AnnotApplicationContextMock appctx = new 
AnnotApplicationContextMock();

   appctx.putBean(dBDao, dbProvider);
   appctx.putBean(translations, translations);

   ZeuzGroupApplication zeuzGroupApplication = new 
ZeuzGroupApplication();

   zeuzGroupApplication
   .setSpringComponentInjector(new SpringComponentInjector(
   zeuzGroupApplication, appctx));
   wicketTester = new WicketTester(zeuzGroupApplication);

   }

   protected IDBDao getAllInOneDao() {

   return dbProvider;

   }

   public IDBDao getDbDao() {
   return dbProvider;
   }

   @Required
   public void setDbProvider(IDBDao dbProvider) {
   this.dbProvider = dbProvider;
   testFixtureProvider.setDbProvider(dbProvider);
   }


}




Per-Olof Wallin wrote:

Hi

I am using Wicket with Spring and Hibernate. I am using Eclipse as IDE and
Maven 2 as build tool.
This is working fine.

Now, I want to use JUnit for unit testing. This is where I have some
problems.

1. I have set up a test specific spring context file in src/test/resources.
This should be copied to target/test-classes/.
If I do a build in Eclipse, this is done. However, when I do a Maven install
the resource files are not copied to the test-classes directory.
As I understand this should be done by default by maven.
Any suggestions?

2. Even if I get 1 above working (such as by just having Eclipse build
first) I still get an error with spring:
java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?
I might have set things up wrong, I've used a Struts 2 project as template
and this might have something to do with it.
What I basically want is a setup where I can test (using junit) an
application with wicket, spring, hibernate (and a hibernate's in-memory
database, hsqldb).
The spring context for the tests should be different from the real spring
context.
Some help on this would be greatly appreciated.

Best regards,

Per-Olof Vallin

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: JRPdfResource File not found error when using IE6

2008-12-10 Thread Nino Saturnino Martinez Vazquez Wael
I've had huge problems with this aswell, but it's long time since.. I 
think it where on wicket 1.2, where firefox would pop a dl and IE would 
open the doc/xls inline.. I guess it's not exactly the same...


Ernesto Reinaldo Barreiro wrote:

I have found myself some weird behaviors with PDFs and IE... E.g. when
trying to show a PDF in an iframe it would work for some versions of
IE 6 and not with others (same IE6 but not exactly the same release).
I never discovered why. Did you tried tricking it to  think it is 
downloading a  real PDF file? For instance, if you mounted a resource 
try doing it like  yyy/myfile.pdf. That  trick fixed my problem 
with iframes. Also on [1] there are some recommendations for writing

servlets for servicing PDF, maybe you could find there some useful info.

Best,

Ernesto

[1] http://itextdocs.lowagie.com/tutorial/general/webapp/


lizz wrote:
  

I am creating a (jasper) pdf file using JRPdfResource in a JasperLink. This
works fine in Firefox and Internet Explorer 7, but when I use Internet
Explorer 6 I get an error message saying There was an error opening the
document. The file cannot be found..

I also have an Excel link using JRXlsResource but this one works fine for
all 3 browsers. 


Doesn anyone know why this happens?

Thanks :-)
  




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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Child page with no html

2008-12-10 Thread Nino Saturnino Martinez Vazquez Wael

Scott,

Think inheritance :)

Just write a super which has abstract methods that returns components 
for c1..c4() and thats it.. no need for trickery with 
IMarkupResourceStreamProvider ...


Should I elaborate more?

You could also take a look at the wicketstuff accordion thing, it does 
something along these lines[1]...



1=http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-accordion

regards

smackie604 wrote:

Hi,

My team has adopted wicket as it's web framework and we have been busy
creating a lot of interesting Panels to build pages for our product.  It is
turning out that most of the time all the components on the page are Panels
and we end up with a situation like this:

MyPage.java
--
public class MyPage extends BasePage
{
  MyPage()
  {
add(SomePanel(c1));
add(SomePanel(c2));
add(SomePanel(c3));
add(SomePanel(c4));
  }
}

MyPage.html
---
wicket:extend
  wicket:container wicket:id=c1/
  wicket:container wicket:id=c2/
  wicket:container wicket:id=c3/
  wicket:container wicket:id=c4/
/wicket:extend

It would be nice if we didn't have to write html files for pages in these
situations and instead just do something like this:

MyPage.java
--
public class MyPage extends BasePage
{
  MyPage()
  {
addToRepeater(SomePanel(c1));
addToRepeater(SomePanel(c2));
addToRepeater(SomePanel(c3));
addToRepeater(SomePanel(c4));
  }
}

Where BasePage will have a method called addToRepeater which just adds the
component to the repeater. 


I see we could do some trickery by implementing
IMarkupResourceStreamProvider on the BasePage to force the template of it's
child classes to always use BasePage.html.  I'm not sure this is the best
way of doing this, does anyone have any comments on using this approach?

Thanks,

Scott
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Child page with no html

2008-12-10 Thread Nino Saturnino Martinez Vazquez Wael
Yeah, but the other way are a bit cleaner java code wise... And  I Scott 
where heading into modifying a lot of stuff that would bring an over 
complicated solution to work..


So the trickery would be to edit  and a whole bunch of other 
stuff(probably)IMarkupResourceStreamProvider, instead of facilitating 
the simple features of wicket.. :)


Jeremy Thomerson wrote:

You can also do exactly as you mentioned

In your base page, have a repeating view (i.e. ListView) that simply loops
over a ListComponent childPanels. Then your method
addToRepeater(Component component) will add to that list.

Should work exactly as you described.  What trickery is needed?  I guess I
miss that part.

On Wed, Dec 10, 2008 at 5:20 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

Scott,

Think inheritance :)

Just write a super which has abstract methods that returns components for
c1..c4() and thats it.. no need for trickery with
IMarkupResourceStreamProvider ...

Should I elaborate more?

You could also take a look at the wicketstuff accordion thing, it does
something along these lines[1]...


1=
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-accordion

regards


smackie604 wrote:



Hi,

My team has adopted wicket as it's web framework and we have been busy
creating a lot of interesting Panels to build pages for our product.  It
is
turning out that most of the time all the components on the page are
Panels
and we end up with a situation like this:

MyPage.java
--
public class MyPage extends BasePage
{
 MyPage()
 {
   add(SomePanel(c1));
   add(SomePanel(c2));
   add(SomePanel(c3));
   add(SomePanel(c4));
 }
}

MyPage.html
---
wicket:extend
 wicket:container wicket:id=c1/
 wicket:container wicket:id=c2/
 wicket:container wicket:id=c3/
 wicket:container wicket:id=c4/
/wicket:extend

It would be nice if we didn't have to write html files for pages in these
situations and instead just do something like this:

MyPage.java
--
public class MyPage extends BasePage
{
 MyPage()
 {
   addToRepeater(SomePanel(c1));
   addToRepeater(SomePanel(c2));
   addToRepeater(SomePanel(c3));
   addToRepeater(SomePanel(c4));
 }
}

Where BasePage will have a method called addToRepeater which just adds the
component to the repeater.
I see we could do some trickery by implementing
IMarkupResourceStreamProvider on the BasePage to force the template of
it's
child classes to always use BasePage.html.  I'm not sure this is the best
way of doing this, does anyone have any comments on using this approach?

Thanks,

Scott


  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684



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






  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Child page with no html

2008-12-10 Thread Nino Saturnino Martinez Vazquez Wael

Ahh, yeah there is something there..

And yes it's a very good idea to expose the id to the method like

getComponents(String id)

I think this is also the way I did with the accordion in stuff.


John Krasnay wrote:

Careful!  ChildPage.getComponents() is invoked before ChildPage's
constructor. This will trip you up sooner or later.

You can easily fix this with a model:

IModel componentsModel = new AbstractReadOnlyModel() {
public Object getObject() { return getComponents(); }
}

add(new ListView(listview, componentsModel) { ... });

Personally, I prefer to use a RepeatingView in this sort of situation.
Just create the RepeatingView in the base class, then provide an add
method for subclasses to call to add components directly to the
RepeatingView. (I also provide a method that wraps
RepeatingView.newChildId.) This approach avoids the intermediate list,
the anonymous inner ListView subclass, and the problem described above.

jk


On Wed, Dec 10, 2008 at 04:16:31PM -0800, smackie604 wrote:
  

Thank you Nino!

The solution could not have been any easier:)  Here is how I did this incase
anyone else starts thinking of complicated solutions like myself:

ParentPage.java

public abstract class ParentPage extends WebPage
{
public static String COMPONENT_ID = component;

public ParentPage()
{
add( new ListViewComponent( listview, getComponents() )
{
protected void populateItem( ListItemComponent item )
{
item.add( item.getModel().getObject() );
}
} );
}

protected abstract ListComponent getComponents();
}

ParentPage.html
---
html
head
title/title
/head
body

div wicket:id=componentThis is a component/div

/body
/html

ChildPage.java
--
public class ChildPage extends ParentPage
{
protected ListComponent getComponents()
{
List Component l = new ArrayListComponent();
l.add( new Label(COMPONENT_ID, Component 1) );
l.add( new Label(COMPONENT_ID, Component 2) );
l.add( new Label(COMPONENT_ID, Component 3) );
return l;
}
}


Nino.Martinez wrote:


Scott,

Think inheritance :)

Just write a super which has abstract methods that returns components 
for c1..c4() and thats it.. no need for trickery with 
IMarkupResourceStreamProvider ...


Should I elaborate more?

You could also take a look at the wicketstuff accordion thing, it does 
something along these lines[1]...



1=http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-accordion

regards

smackie604 wrote:
  

Hi,

My team has adopted wicket as it's web framework and we have been busy
creating a lot of interesting Panels to build pages for our product.  It
is
turning out that most of the time all the components on the page are
Panels
and we end up with a situation like this:

MyPage.java
--
public class MyPage extends BasePage
{
  MyPage()
  {
add(SomePanel(c1));
add(SomePanel(c2));
add(SomePanel(c3));
add(SomePanel(c4));
  }
}

MyPage.html
---
wicket:extend
  wicket:container wicket:id=c1/
  wicket:container wicket:id=c2/
  wicket:container wicket:id=c3/
  wicket:container wicket:id=c4/
/wicket:extend

It would be nice if we didn't have to write html files for pages in these
situations and instead just do something like this:

MyPage.java
--
public class MyPage extends BasePage
{
  MyPage()
  {
addToRepeater(SomePanel(c1));
addToRepeater(SomePanel(c2));
addToRepeater(SomePanel(c3));
addToRepeater(SomePanel(c4));
  }
}

Where BasePage will have a method called addToRepeater which just adds
the
component to the repeater. 


I see we could do some trickery by implementing
IMarkupResourceStreamProvider on the BasePage to force the template of
it's
child classes to always use BasePage.html.  I'm not sure this is the best
way of doing this, does anyone have any comments on using this approach?

Thanks,

Scott
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



  

--
View this message in context: 
http://www.nabble.com/Child-page-with-no-html-tp20945577p20947047.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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




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

Re: Wicket integration with good charts api

2008-12-09 Thread Nino Saturnino Martinez Vazquez Wael

I think it's small enough for minis.. But it's Igors baby, try to ask him?

Maarten Bosteels wrote:

Hello Ryan,

I have just added some more code to the wiki page, and a working quickstart
project.

http://cwiki.apache.org/WICKET/open-flash-chart-and-wicket.html

My OpenFlashChart implementation is almost exactly the same as yours.

Only differences I found:
* You use an *ofc4j.model.Chart* as model, and I use a plain String.
   Using the Chart itself as model is cool, because then you could change
the chart on-the-fly.
   Unfortunately Chart is not serializable and I get
WicketNotSerializableException's.
   I will update my code and the quickstart as soon as I get rid of these
exceptions.

* Your constructor takes width and height but they're not used :-)

* I don't call  swf.setParam( allowScriptAccess, sameDomain );
  It doesn't seem to be necessary ?

It's only two classes, so I am not sure it's 'big' enough to add to
wicket-stuff ?
Perhaps it could be added to minis ?

Maarten

On Fri, Dec 5, 2008 at 6:38 PM, Maarten Bosteels [EMAIL PROTECTED]wrote:

  

Oops, just started working on it :-)
Will see if I can add somet more info to the wiki page.

Maarten



On Fri, Dec 5, 2008 at 5:57 PM, Ryan McKinley [EMAIL PROTECTED] wrote:



I just started one with the implementation I have  we can make it
better, or perhaps add it to wicketstuff...

http://cwiki.apache.org/WICKET/open-flash-chart-and-wicket.html



On Nov 5, 2008, at 3:59 PM, Thies Edeling wrote:

 Maarten Bosteels wrote:
  

I have a similar requirement and played a bit with Open Flash Charts.
[1]
It took little effort to integrate wicket + ofc4j [2] + swfobject [3]

[1] http://teethgrinder.co.uk/open-flash-chart-2/glass-bar-chart.php
[2] http://code.google.com/p/ofcj/
[3] http://code.google.com/p/swfobject/

Another requirement was that the user could drag and drop charts around
on
the page (à la iGoogle) so I tried something like
http://interface.eyecon.ro/demos/sort.html  but that failed miserably:
half
the time the charts wouldn't show up correctly after dragging them
around.
I still have to find out if I can solve this somehow. All pointers are
welcome.

Anyway, if you're interested, I can create a wiki page showing the
wicket +
ofc4j + swfobject integration.

 Wiki page would be nice, those open flash charts look a lot better than
  

the jfreechart images.

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




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


  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



[Announce] new stuff in wicketstuff openlayers..

2008-12-09 Thread Nino Saturnino Martinez Vazquez Wael

Hi Guys

I've updated the wicketstuff openlayers and put in a few new things. You 
can read more about it in my blog :


http://ninomartinez.wordpress.com/2008/12/09/new-stuff-in-wicketstuff-openlayers-integration/

And btw, please say if theres some feature you'd like in it. I might be 
able to put it in.


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: authorization and wicket:link

2008-12-09 Thread Nino Saturnino Martinez Vazquez Wael
No.. I had the same question some weeks ago.. Just create some markup 
containers for it instead..


miro wrote:

I am using wicket:link ,can I   tell wicket   to authorize the user if he
has  permissions to that page   in wicket:link tag ?
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: SpringOne America 2008 in Hollywood, FL

2008-12-05 Thread Nino Saturnino Martinez Vazquez Wael
Hehe cool, I wonder if Martijn ever got around to post the picture he 
took of me, wearing my wicket merchandise. The Cap and T-shirt at his 
presentation :)


shetc wrote:
http://www.nabble.com/file/p20846846/spring.jpg 


Well, here I am at the SpringOne Conference, where the theme is Weapons for
the War on Java Complexity.

I felt like a Wicket partisan as I was surrounded by Spring MVC loyalists.
At meals, I did my best to
convince my fellow diners that they should give Wicket a try, and I think
they were really intrigued
especially as I believe Wicket definitely attacks Java complexity at the
presentation level.
By the way, it turns out that I wasn't the lone Wicketeer as I was spotted
by Peter Thomas (hey Peter!).
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Clearing Cache after Logout

2008-12-04 Thread Nino Saturnino Martinez Vazquez Wael
Hmm I'd do what you do and set a custom expired page, with perhaps a 
login form on it.. Voila :)



vishy_sb wrote:

Hi all,

I have a logout link that takes me to the login (Home) page. However when I
click the back button it brings me back  to the same page that I was on
(Although I am not able to do anything on this page as whenever I press some
button I get the error Page Expired) A better option would be to display
the Log in page itself even if the back button is pressed.  I am trying to
clear the cache so that the back button becomes disabled whenever the log
out button is pressed. The code for my logout button is below:

Link logout = new Link(logout){
private static final long serialVersionUID = 1L;

@Override
public void onClick() {
session.invalidate();   

getRequestCycle().setRedirect(true);
setResponsePage(Index.class);
}
};

Any ideas how this could be resolved.

Thanks in advance,
vishy
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



pimping Openlayers in wicket stuff core...

2008-12-04 Thread Nino Saturnino Martinez Vazquez Wael

Hi Guys

I'll be putting in direct JTS 
(http://www.vividsolutions.com/jts/main.htm) support in Openlayers 
contrib. Any objections to this? This means that the API will break, 
since I'll be using JTS points instead of the homegrown classes as 
currently. Also I plan to support drawing shapes on screen.


If have any input on this please say so..

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Openid integration?

2008-12-03 Thread Nino Saturnino Martinez Vazquez Wael
Looks simple enough.. I guess my only fear are that I then will have it 
converted into something that still wont let me pull the two required 
values from the openid provider...


Jan Kriesten wrote:

Hi Nino,

  

Hmm Im using auth roles now.. Are there an way to integrate the two..?



that shouldn't be a too big deal, you just have to convert the spring-security
granted authorities into 'roles'.

To get the AuthenticationManager into your Application you could use the Spring
factory (Scala code):

---8---
class AuthTestApplication extends WebApplication {
  import org.springframework.security.AuthenticationManager
  import scala.reflect.BeanProperty

  // injected/set by Spring context
  @BeanProperty var authenticationManager: AuthenticationManager = null
  ...
}
---8---

web.xml:

---8---
  !-- Setting up Spring Context Listener --
  listener

listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
  /listener

  !-- Setting up Acegi Security --
  context-param
param-namecontextConfigLocation/param-name
param-value
  /WEB-INF/spring-security.xml
/param-value
  /context-param
  filter
filter-nameAcegi Filter Chain Proxy/filter-name

filter-classorg.springframework.security.util.FilterToBeanProxy/filter-class
init-param
  param-nametargetClass/param-name
  
param-valueorg.springframework.security.util.FilterChainProxy/param-value
/init-param
  /filter
  filter-mapping
filter-nameAcegi Filter Chain Proxy/filter-name
url-pattern/*/url-pattern
  /filter-mapping

  !-- AuthTestApplication --
  filter
filter-nameAuthTestApplication/filter-name

filter-classde.footprint.wicket.application.locale.LocaleFilter/filter-class
init-param
param-nameapplicationFactoryClassName/param-name

param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
/init-param
init-param
  param-nameapplicationClassName/param-name
  param-valueapplication.TestApp/param-value
/init-param
init-param
  param-namebeanName/param-name
  param-valueauthTestApplication/param-value
/init-param
init-param
  param-nameconfiguration/param-name
  param-valuedevelopment/param-value
/init-param
  /filter
  filter-mapping
filter-nameAuthTestApplication/filter-name
url-pattern/*/url-pattern
  /filter-mapping
---8---

And the spring-security.xml as an example:

---8---
?xml version='1.0' encoding='UTF-8'?
!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN'
'http://www.springframework.org/dtd/spring-beans.dtd'

beans
  bean id=filterChainProxy
class=org.springframework.security.util.FilterChainProxy
property name=filterInvocationDefinitionSource
  value
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT

/**=httpSessionContextIntegrationFilter,logoutFilter,anonymousProcessingFilter
  /value
/property
  /bean

  !-- Filter --
  bean id=httpSessionContextIntegrationFilter
class=org.springframework.security.context.HttpSessionContextIntegrationFilter
property name=forceEagerSessionCreation value=true/
  /bean

  bean id=logoutFilter
class=org.springframework.security.ui.logout.LogoutFilter
constructor-arg value=//
constructor-arg
  list
bean
class=org.springframework.security.ui.logout.SecurityContextLogoutHandler/
  /list
/constructor-arg
property name=filterProcessesUrl value=/auth/logout/
  /bean

  bean id=anonymousProcessingFilter
class=org.springframework.security.providers.anonymous.AnonymousProcessingFilter
property name=key value=guestKey/
property name=userAttribute value=GUEST,ROLE_GUEST/
  /bean

  bean id=anonymousAuthenticationProvider

class=org.springframework.security.providers.anonymous.AnonymousAuthenticationProvider
property name=key value=guestKey/
  /bean

  bean id='authenticationManager'
class='org.springframework.security.providers.ProviderManager'
property name='providers'
  list
ref local='testAuthenticationProvider'/
ref local=anonymousAuthenticationProvider/
  /list
/property
  /bean

  bean id='testAuthenticationProvider'
class='org.springframework.security.providers.dao.DaoAuthenticationProvider'
property name='userDetailsService' ref='testUserDetailsService' /
  /bean

  bean id='testUserDetailsService'
class='org.springframework.security.userdetails.memory.InMemoryDaoImpl'
property name='userMap'
  value
testadmin=testadmin,ROLE_ADMIN
testuser=testuser,ROLE_USER
  /value
/property
  /bean

  !-- Inject Wicket Application --
  bean id=authTestApplication class=application.TestApp
property name=authenticationManager ref=authenticationManager/
  /bean

/beans
---8---

Best regards, --- Jan.

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

  


--
-Wicket for love

Nino Martinez 

Re: Openid integration?

2008-12-03 Thread Nino Saturnino Martinez Vazquez Wael

Yup I remember the page..

Michael Sparer wrote:

Hmm Im using auth roles now.. Are there an way to integrate the two..?



hey nino, take a look at
http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html - it's a bit
older but I think it might still work. as acegi is now called spring
security. 


regards,
Michael

Nino.Martinez wrote:
  

Hmm Im using auth roles now.. Are there an way to integrate the two..?

Another thing though, I need to either use sreg or AX to pull some 
values (only email and name) to my system is that possible with the 
spring security thing( I know this should probably go to the spring

forum)?

Jan Kriesten wrote:


Hi Nino,

  
  

I have something working only partially though, cant get email and name
attribute back from the openid provider properly.. Seems to work with
openid.org, but not claimid.com or myopenid.com



why not using spring-security and don't have any more hassle at all?

Best regards, --- Jan.



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

  
  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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







-
Michael Sparer
http://talk-on-tech.blogspot.com
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Openid integration?

2008-12-02 Thread Nino Saturnino Martinez Vazquez Wael
);
   // authReq.addExtension(sregReq);
   if (!discovered.isVersion2()) {
   // Option 1: GET HTTP-redirect to the OpenID Provider 
endpoint

   // The only method supported in OpenID 1.x
   // redirect-URL usually limited ~2048 bytes
   httpResp.sendRedirect(authReq.getDestinationUrl(true));
   return null;

   } else {
   httpResp.sendRedirect(authReq.getDestinationUrl(true));
   return null;
   // // Option 2: HTML FORM Redirection (Allows payloads 2048
   // bytes)
   // RequestDispatcher dispatcher =
   // httpReq.getRequestDispatcher(OpenIdSignInPage.MOUNTPATH);
   // httpReq.setAttribute(parameterMap,
   // authReq.getParameterMap());
   // httpReq.setAttribute(destinationUrl,
   // authReq.getDestinationUrl(false));
   // dispatcher.forward(httpReq, httpResp);
   }
   } catch (OpenIDException e) {
   // present error to the user
   }

   return null;
   }

   // --- processing the authentication response ---
   public User verifyResponse(HttpServletRequest httpReq) {
   try {
   // extract the parameters from the authentication response
   // (which comes in as a HTTP request from the OpenID provider)
   ParameterList response = new ParameterList(httpReq
   .getParameterMap());

   // retrieve the previously stored discovery information
   DiscoveryInformation discovered = (DiscoveryInformation) httpReq
   .getSession().getAttribute(openid-disc);

   // extract the receiving URL from the HTTP request
   StringBuffer receivingURL = httpReq.getRequestURL();
   String queryString = httpReq.getQueryString();
   if (queryString != null  queryString.length()  0)
   receivingURL.append(?).append(httpReq.getQueryString());

   // verify the response; ConsumerManager needs to be the same
   // (static) instance used to place the authentication request
   VerificationResult verification = manager.verify(receivingURL
   .toString(), response, discovered);

   // examine the verification result and extract the verified
   // identifier
   Identifier verified = verification.getVerifiedId();
   if (verified != null) {
   AuthSuccess authSuccess = (AuthSuccess) verification
   .getAuthResponse();
   if (authSuccess.hasExtension(AxMessage.OPENID_NS_AX)) {
   FetchResponse fetchResp = (FetchResponse) authSuccess
   .getExtension(AxMessage.OPENID_NS_AX);
   return filluser(fetchResp);
   }

   if (authSuccess.hasExtension(OPENID_NS_SREG1_1)) {
   log.info(got 
info:+authSuccess.getParameterValue(openid.sreg.email));
   log.info(got 
info:+authSuccess.getParameterValue(openid.sreg.fullname));
  
   User user = new User();
   
user.setEmail(authSuccess.getParameterValue(openid.sreg.email));
   
user.setName(authSuccess.getParameterValue(openid.sreg.fullname));

   return user;


   }

   // return verified; // success
   }
   } catch (OpenIDException e) {
   // present error to the user
   }

   return null;
   }

   private User filluser(FetchResponse fetchResp) {

   ListString emails = fetchResp.getAttributeValues(email);
   String email = emails.get(0);
   ListString names = fetchResp.getAttributeValues(name);
   String name = names.get(0);

   User user = new User();
   user.setEmail(email);
   user.setName(name);
   return user;

   }
}




Michael Sparer wrote:

Looks pretty empty, doesn't it? :-)


Nino.Martinez wrote:
  

Hmm just saw this :

http://code.google.com/p/wicket-auth-openid/

Nino Saturnino Martinez Vazquez Wael wrote:


Hi Guys

Have any of you tried to do a openid integration ?

  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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







-
Michael Sparer
http://talk-on-tech.blogspot.com
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Openid integration?

2008-12-02 Thread Nino Saturnino Martinez Vazquez Wael

Hmm, i'll dig into it.. Thanks..

Jan Kriesten wrote:

Hi Nino,

  

I have something working only partially though, cant get email and name
attribute back from the openid provider properly.. Seems to work with
openid.org, but not claimid.com or myopenid.com



why not using spring-security and don't have any more hassle at all?

Best regards, --- Jan.



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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Openid integration?

2008-12-02 Thread Nino Saturnino Martinez Vazquez Wael

Hmm Im using auth roles now.. Are there an way to integrate the two..?

Another thing though, I need to either use sreg or AX to pull some 
values (only email and name) to my system is that possible with the 
spring security thing( I know this should probably go to the spring forum)?


Jan Kriesten wrote:

Hi Nino,

  

I have something working only partially though, cant get email and name
attribute back from the openid provider properly.. Seems to work with
openid.org, but not claimid.com or myopenid.com



why not using spring-security and don't have any more hassle at all?

Best regards, --- Jan.



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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Openid integration?

2008-12-01 Thread Nino Saturnino Martinez Vazquez Wael

Hmm just saw this :

http://code.google.com/p/wicket-auth-openid/

Nino Saturnino Martinez Vazquez Wael wrote:

Hi Guys

Have any of you tried to do a openid integration ?



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



my new site :)

2008-11-29 Thread Nino Saturnino Martinez Vazquez Wael

Hi guys

I've been puzzling with a new site of mine. It's a community site, still 
a bit in development. It evolves around events, it has a nice overview 
map of events, but also more traditional search for events. The idea are 
that the users enter their public events like user groups etc, so all 
events are to be made public available. And it's easy to search for 
events as well (something that I believe the sites are missing).


I am aware that theres css issues with IE ( 
http://browsershots.org/http://wheresmyevent.com/home ). But please any 
feedback are welcome..



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: ImageButton picture.x and picture.y

2008-11-29 Thread Nino Saturnino Martinez Vazquez Wael

Hi Tim

inline reply

Tim Squires wrote:

Thanks Nino,

The model is just a quick hack to show where the imageresource is 
coming from, i.e. it's dynamic.

ahh...


The ClientSideImageMap and the older ImageMap don't give an x and y of 
the click and I don't fancy creating a map/ for every pixel in the 
image.

I surely understand...


The ImageButton does return where the user clicked on the image as 
part of the form submit.  I was hoping that the x and y could be 
mapped to a model somehow.

It should be possible I think..


How I managed to get the coords is like this

   FormObject form = new FormObject(form) {
   @Override
   protected void onSubmit() {
   info(x =  + getRequest().getParameter(picture.x));
   info(y =  + getRequest().getParameter(picture.y));
   }
   };

It would be nice to attach these values to a property, can you see a 
way of doing that?

It reminds me of something. IF you combine this technique:

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-openlayers/src/main/java/org/wicketstuff/openlayers/event/EventListenerBehavior.java

im thinking of this method :  protected abstract void 
onEvent(AjaxRequestTarget target);


So combine above with how an ordinary link or button works you should be 
able to pass on parameters either as a model or as nice parameter eg : 
protected abstract void onClick(Double x, Double y);


If you have questions just ask..


Tim

Nino Saturnino Martinez Vazquez Wael wrote:
maybe james patch can help you : 
http://www.nabble.com/Client-Side-Image-Map...-td20516107.html#a20516107 
?


Otherwise it should be  ImageMap already there..
Nino Saturnino Martinez Vazquez Wael wrote:

Hi Tim

You should get a grasp on models. But isnt it an imagearea (cant 
remember the exact name) or something you want? Image button is just 
a button which has a image...


Tim Squires wrote:

Hi,

I'm trying to retrieve the x and y coords from a user click on an 
ImageButton.  Can anyone tell me how to get these parameters in an 
onSubmit method?


Currently I'm doing

   final IModelPicture picture = new 
AbstractReadOnlyModelPicture() {


   @Override
   public Picture getObject() {
   return pictureService.findRandom();
   }
   };

   FormObject form = new FormObject(form) {
   @Override
   protected void onSubmit() {
 // picture.x and picture.y 
parameters, where are they?

   }
   };

   form.add(new ImageButton(picture, new 
ImageResource(defaults

   .getPicturesLocation(), picture)));

   add(form);

but cannot find any way of retrieving the page parameters in the 
onSubmit() - getPageParameters() returns null.


I'm using 1.4-rc1.

Thanks for any help,
Tim

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








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



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Wicket and CoC

2008-11-27 Thread Nino Saturnino Martinez Vazquez Wael

COOL!!! :)

Jeremy Thomerson wrote:

You can do exactly what you asked in less than 40 lines of code - and not be
bound to the class name in the HTML (which you shouldn't do).  Here's how:

IN YOUR APPLICATION CLASS:

@Override
protected void init() {
super.init();
registerConventionalComponent(feedbackPanel, FeedbackPanel.class);
registerConventionalComponent(submitLink, SubmitLink.class);
registerConventionalComponent(submitButton, Button.class);
}
private void registerConventionalComponent(String id, Class? extends
Component clazz) {
getPageSettings().addComponentResolver(new
ConventionalComponentResolver(id, clazz));
}
private static final class ConventionalComponentResolver implements
IComponentResolver {
private static final long serialVersionUID = 1L;
private final String mID;
private final Class? extends Component mComponentClass;

public ConventionalComponentResolver(String id, Class? extends
Component clazz) {
mID = id;
mComponentClass = clazz;
}
public boolean resolve(MarkupContainer container, MarkupStream
markupStream, ComponentTag tag) {
CharSequence wicketId = tag.getString(wicket:id);
if (mID.equals(wicketId)) {
container.autoAdd(createInstance(), markupStream);
// Yes, we handled the tag
return true;
}
// We were not able to handle the tag
return false;
}
private Component createInstance() {
try {
return
mComponentClass.getConstructor(String.class).newInstance(mID);
} catch (Exception ex) {
throw new WicketRuntimeException(Error creating component
instance of class:  + mComponentClass.getName(), ex);
}
}
}
NIFTY!!  I hadn't written any IComponentResolver's before - but wanted to
try it.  Wicket is AWESOME!!  It makes it so easy to customize the framework
to YOUR needs without imposing one person's ideas on another person.
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Why does org.apache.wicket.authorization revolve around string tokens?

2008-11-27 Thread Nino Saturnino Martinez Vazquez Wael
A really good question. I've heard that it's because that it is a demo 
of how you could implement it.


I share the exact same thoughts as you do about this.

Casper Bang wrote:
What attracts me to Wicket is how it tries to do as much in type-safe 
Java code as possible, so I was a bit surprised with the finding that 
the org.apache.wicket.authorization stuff is not based upon Enum and 
EnumSet but rather type-unsafe string tokens.


Are there good reasons for this design that outweighs the benefits of 
having code completion and static verification? (Extendability, 
decoupling, transitive relationships, runs on Java 1.4 etc.)


Also, before I delve deeper into it, would it be a trivial matter to 
write a type safe version?



Thanks in advance,
Casper

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



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: [VOTE] End of Life wicket-contrib-gmap?

2008-11-27 Thread Nino Saturnino Martinez Vazquez Wael

HI Jeremy

[ X ] - YES, please create a branch in the Wicket Stuff repo just for

I were handed over the code some time ago as I've participated on the 
project, but I think gmap2 are more developed and stable.. And I have no 
intention of having the two projects compete im thinking of gmap2, so 
lets put gmap in the attic.


Jeremy Thomerson wrote:

I am starting to work on the WicketStuff reorg as the community voted to
do.  In doing so, I noticed that wicket-contrib-gmap is still set up to
compile against 1.3.0-incubating-snapshot.  Also, we know that Iulian has
said he is no longer maintaining it.  In light of this, I propose the
following vote:

[ ] - YES, please create a branch in the Wicket Stuff repo just for
abandoned projects and move wicket-contrib-gmap into that branch.
[ ] - NO (please provide convincing reason).

For those who say I'm still using it - you'll still be able to - from the
abandoned branch, you can build your own release, just like you must be
doing now.  But it helps new users not be as confused with the multiple
projects, and trying to use one that's dead.

PS - I will probably be sending more votes along like this as I go through
the repo trying to organize it.  If you have suggestions, please let us
know.

Thanks,

Jeremy Thomerson
http://www.wickettraining.com

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: [VOTE] Consistent naming for Wicket Stuff projects

2008-11-27 Thread Nino Saturnino Martinez Vazquez Wael

[ X ] - YES - I would like consistent naming



Jeremy Thomerson wrote:

I am beginning the WS reorg as noted in previous emails.  You can monitor
progress here:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/

As we move projects into the wicketstuff-core, I would like to see us rename
them consistently, getting rid of the prepended wicket-contrib- or
wicketstuff-.  This would mean that when we release WicketStuff 1.4 (when
Wicket 1.4 is released) that if you are using that project, you would need
to update your POM to the new name.  Please vote:

[ ] - YES - I would like consistent naming
[ ] - NO (convincing reason)

PS - I feel like I'm starting a lot of vote threads - should I not be?  Any
suggestions?  I would like to efficiently get this reorg done, but I am
leery of just moving other people's projects around and making changes
without permission.  Feelings / thoughts?

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: ImageButton picture.x and picture.y

2008-11-27 Thread Nino Saturnino Martinez Vazquez Wael

Hi Tim

You should get a grasp on models. But isnt it an imagearea (cant 
remember the exact name) or something you want? Image button is just a 
button which has a image...


Tim Squires wrote:

Hi,

I'm trying to retrieve the x and y coords from a user click on an 
ImageButton.  Can anyone tell me how to get these parameters in an 
onSubmit method?


Currently I'm doing

   final IModelPicture picture = new 
AbstractReadOnlyModelPicture() {


   @Override
   public Picture getObject() {
   return pictureService.findRandom();
   }
   };

   FormObject form = new FormObject(form) {
   @Override
   protected void onSubmit() {
 // picture.x and picture.y 
parameters, where are they?

   }
   };

   form.add(new ImageButton(picture, new ImageResource(defaults
   .getPicturesLocation(), picture)));

   add(form);

but cannot find any way of retrieving the page parameters in the 
onSubmit() - getPageParameters() returns null.


I'm using 1.4-rc1.

Thanks for any help,
Tim

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



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: ImageButton picture.x and picture.y

2008-11-27 Thread Nino Saturnino Martinez Vazquez Wael
maybe james patch can help you : 
http://www.nabble.com/Client-Side-Image-Map...-td20516107.html#a20516107 ?


Otherwise it should be  ImageMap already there..
Nino Saturnino Martinez Vazquez Wael wrote:

Hi Tim

You should get a grasp on models. But isnt it an imagearea (cant 
remember the exact name) or something you want? Image button is just a 
button which has a image...


Tim Squires wrote:

Hi,

I'm trying to retrieve the x and y coords from a user click on an 
ImageButton.  Can anyone tell me how to get these parameters in an 
onSubmit method?


Currently I'm doing

   final IModelPicture picture = new 
AbstractReadOnlyModelPicture() {


   @Override
   public Picture getObject() {
   return pictureService.findRandom();
   }
   };

   FormObject form = new FormObject(form) {
   @Override
   protected void onSubmit() {
 // picture.x and picture.y 
parameters, where are they?

   }
   };

   form.add(new ImageButton(picture, new 
ImageResource(defaults

   .getPicturesLocation(), picture)));

   add(form);

but cannot find any way of retrieving the page parameters in the 
onSubmit() - getPageParameters() returns null.


I'm using 1.4-rc1.

Thanks for any help,
Tim

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





--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Using CompoundPropertyModel with FormComponentPanel

2008-11-26 Thread Nino Saturnino Martinez Vazquez Wael

Hi Ned

you can call bind on the compound property model..

labelText = new Label(labelText, CPM.bind(propertyname));

You can also do this for your property models btw...

Ned Collyer wrote:

I'm trying to throw together some components for easily creating accessible
forms.

I'm a fair bit along - just need some assistance with how to structure the
class for use with CompoundPropertyModels.

I want to be able to do the following:

Form form = new Form(form, new CompoundPropertyModel(new User());
form.add(new LabelledTextField(name))

But I'm having difficulty setting the property model against the textfield
inside my LabelledTextField.

I can retrieve the values just fine, and they are set on the object from the
forms CPM.

I am using a fragment so that markup can be edited in a single place for all
labelled form fields.  And different markup providers or variants can be
used if any edge cases occur for any projects.

The form fields can also used as easily as any other form fields in wicket -
this is a different approach from wicketopia - which I've had a good dig
through.

I've gotta be close!


/* the class itself */

private final FormComponentLabel label;
private final Label labelText;
private final TextFieldT editor;
private Fragment componentFragment;

public class LabelledTextFieldT extends FormComponentPanelT {

public LabelledTextField(String id) {
super(id);

componentFragment = new Fragment(COMPONENT_ID, textField, this);
editor = new TextFieldT(editor, new PropertyModel(this,
String.format(model.%s, id)));
label = new FormComponentLabel(label, editor);
labelText = new Label(labelText, TBA);
label.add(labelText);

componentFragment.add(editor);
componentFragment.add(label);

add(componentFragment);

setRenderBodyOnly(true);
}

protected void convertInput() {
setConvertedInput(editor.getConvertedInput());
}

public String getInput() {
return editor.getInput();
}
}
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Using CompoundPropertyModel with FormComponentPanel

2008-11-26 Thread Nino Saturnino Martinez Vazquez Wael

ahhh, didnt catch that you were doing that..

Ned Collyer wrote:

I'm going to be sourcing the labelText from a properties file relatve to the
class of the modelObject (in this case it will be the User - eg,
user.properties).

If I use the binding, then I need to have scope to the CPM in java world...
within the LabelledTextField - which is a shame, because it just makes it
less convenient to use like other regular form components where you do not
have to pass in the model if the form has CPM (eg, standard TextField) 



Nino.Martinez wrote:
  

Hi Ned

you can call bind on the compound property model..

labelText = new Label(labelText, CPM.bind(propertyname));

You can also do this for your property models btw...




  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Wicket and CoC

2008-11-26 Thread Nino Saturnino Martinez Vazquez Wael

Theres also wickettopia...

http://sourceforge.net/projects/wicketopia/

jWeekend wrote:

Richardo,

If you are serious about looking into RADifying extension to Wicket, here
are a couple of resources that may be interesting:

http://herebebeasties.com Al Maw' s excellent 
http://londonwicket.org/content/LondonWicket-FormsWithFlair.pdf Forms with

Flair  presentation
http://faler.wordpress.com/ Wille Faler 's neat 
http://sites.google.com/site/wicketrad/ Wicket RAD  project 
http://wicketwebbeans.sourceforge.net/ Wicket Web Beans  (haven't met the

author of this one)

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 





Ricardo Mayerhofer wrote:
  
Perhaps the name could be userFeedBackPanel :) 
One Word per Concept (Clean Code, Bob Martin, p. 26)


I'm just talking about code duplication, add( new SubmitLink( submitLink
) ) and similars many times in a code doenst makes a programmer happier.
OOP (object oriented programming) isn't always the best tools to solve
code duplication. So sometimes AOP (aspect oriented programming) comes to
mind, other times CoC (convention over configuration). (I hope Martijn is
happy by the acronyms explanations :)).

I'm not saying that it should be in wicket core (as you guys keep it thin
as you can) and I'm glad wicket core makes me able to extend it, in a way
I can implement this (thats a huge plus)

I'm just saying that this is not a bad idea, mainly when you care about
saving programming efforts and clean code. 



igor.vaynberg wrote:


in our app components with id feedbackPanel are often used to present
a user with a user-feedback panel they can use to submit
suggestions...

-igor

On Wed, Nov 26, 2008 at 12:51 PM, Ricardo Mayerhofer
[EMAIL PROTECTED] wrote:
  

Hi Martijin,
First of all thank you for your response.
I guess automation != magic. Automation means that computers or
frameworks
helps humans accomplishing repetitive tasks, so developers can better
focus
on the problem being solved, rather than having to copy and paste same
code
over and over (boilerplate).
If one add a markup named feedbackPanel, what is he intent, to make a
combo
box? Or he have to tell it again, in a different way? IMO it's better to
tell one time what I'm willing to do rather than 2, 3, 5...


Martijn Dashorst wrote:


-1000,000,000,000

First please don't assume someone understands your acronym du jour. I
had to think really hard to understand that CoC means convention over
configuration instead of the Dutch meaning gay rights group.

Second this is not a task for wicket. You can  think up any CoCamania
you want in your own addon framework and publish it on 'stuff or
google code, but I won't be using it ever nor including it in core.

The biggest plus point of wicket is that it doesn't perform magic. I
don't need nor want to have to wave a dead chicken in front of my
monitor and spend the bigger part of the day wondering which
incantation I did wrong.

Martijn
On 11/26/08, Ricardo Mayerhofer [EMAIL PROTECTED] wrote:
  

I started to use wicket some time ago, and I'm really enjoying it.
Best
framework ever.
But I've some suggestions.
I think wicket could be better if it had less boiler plate code. This
could
be reduced by using CoC.
Take the FeedBackPanel for example, you always have to add the
component
on
the web page, even if no special handling is requires (which is almost
the
case).
Wicket could have some reserved ids, so if I add a markup with id
feedbackPanel, a feedbackpanel component is automatically added to
that
page.
Another example is SubmitLink component. No special handling required,
but
for wicket sake the developer must add it on the java the page.
--
View this message in context:
http://www.nabble.com/Wicket-and-CoC-tp20706881p20706881.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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




--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



  

--
View this message in context:
http://www.nabble.com/Wicket-and-CoC-tp20706881p20708778.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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




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



  



  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 

Re: SOLUTION:Hibernate Lazy initialazation issues and multi page wizard!

2008-11-25 Thread Nino Saturnino Martinez Vazquez Wael
I guess not much if you do the initialize, but it has some issues with 
collections (like you need to add to collections instead of setting them 
I think). And you will end up doing initialize anyhow so using clone and 
a simple compound property model are just as fine plus more simple..


James Carman wrote:

So, what's wrong with using shadow models and letting them
eventually write into the real model (which is a LDM) at the very end?

On Tue, Nov 25, 2008 at 2:25 AM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  

Hi Guys

I've been having a little trouble with hibernate and a multipage wizard, I
finally cracked the nut. And heres my solution:

In the link that refers to the wizard use a loadable detachable model..
Onclick you initialize all proper collections and CLONE the object, after
the wizard are done you merge the clone..

codesniplet:

  LinkEvent linkEdit = new LinkEvent(edit,
item.getModel()) {
  @Override
  public void onClick() {
  LoadableDetachableEventModel model=new
LoadableDetachableEventModel(eventRepository,this.getModelObject());

Hibernate.initialize(((Event)model.getObject())
  .getLinks());
  Hibernate.initialize(((Event)model.getObject())
  .getDateStart());
  Hibernate.initialize(((Event)model.getObject())
  .getDateEnd());
  Hibernate.initialize(((Event)model.getObject())
  .getTags());

  ModelEvent eventModel = new ModelEvent(
  (Event) SerializationHelper.clone((Event)
model.getObject()));
  CompoundPropertyModelEvent e = new
CompoundPropertyModelEvent(
  eventModel);
  EventWizard newWizard = new EventWizard(eventWizard
  .getId(), e) {
  @Override
  public void onFinish() {

eventRepository.update(eventModel.getObject());
  eventWizard.setVisible(false);
  }
  };
  newWizard.setVisible(true);
  eventWizard.getPage().addOrReplace(newWizard);
  eventWizard = newWizard;

  }
  };


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: SOLUTION:Hibernate Lazy initialazation issues and multi page wizard!

2008-11-25 Thread Nino Saturnino Martinez Vazquez Wael
Yup, two angles on the same stuff. It does not change the clone / 
initialize technique.


I guess I could put in a wiki tip on this?

James Carman wrote:

I don't typically use CompoundPropertyModel (we've discussed this
offline before) because it's too magicy.  I find that explicitly
creating my models helps me keep track of what's going on better.  I
do use PropertyModels, though.  I just like to explicitly know the
base that I'm dealing with when I'm using property models.

On Tue, Nov 25, 2008 at 6:50 AM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  

I guess not much if you do the initialize, but it has some issues with
collections (like you need to add to collections instead of setting them I
think). And you will end up doing initialize anyhow so using clone and a
simple compound property model are just as fine plus more simple..

James Carman wrote:


So, what's wrong with using shadow models and letting them
eventually write into the real model (which is a LDM) at the very end?

On Tue, Nov 25, 2008 at 2:25 AM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:

  

Hi Guys

I've been having a little trouble with hibernate and a multipage wizard,
I
finally cracked the nut. And heres my solution:

In the link that refers to the wizard use a loadable detachable model..
Onclick you initialize all proper collections and CLONE the object, after
the wizard are done you merge the clone..

codesniplet:

 LinkEvent linkEdit = new LinkEvent(edit,
item.getModel()) {
 @Override
 public void onClick() {
 LoadableDetachableEventModel model=new
LoadableDetachableEventModel(eventRepository,this.getModelObject());

Hibernate.initialize(((Event)model.getObject())
 .getLinks());
 Hibernate.initialize(((Event)model.getObject())
 .getDateStart());
 Hibernate.initialize(((Event)model.getObject())
 .getDateEnd());
 Hibernate.initialize(((Event)model.getObject())
 .getTags());

 ModelEvent eventModel = new ModelEvent(
 (Event) SerializationHelper.clone((Event)
model.getObject()));
 CompoundPropertyModelEvent e = new
CompoundPropertyModelEvent(
 eventModel);
 EventWizard newWizard = new EventWizard(eventWizard
 .getId(), e) {
 @Override
 public void onFinish() {

eventRepository.update(eventModel.getObject());
 eventWizard.setVisible(false);
 }
 };
 newWizard.setVisible(true);
 eventWizard.getPage().addOrReplace(newWizard);
 eventWizard = newWizard;

 }
 };


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





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


  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Running wicketstuff examples

2008-11-24 Thread Nino Saturnino Martinez Vazquez Wael

yup, I believe that most of the projects are setup like this..

Jeremy Thomerson wrote:

You can just do mvn jetty:run from that folder and it will run (just
verified).  You will need to do a mvn clean install in the
wicket-contrib-accordians folder first.

On Sun, Nov 23, 2008 at 1:06 PM, Eyal Golan [EMAIL PROTECTED] wrote:

  

Hi,
I've checked out wicket-stuff trunk.
I want to run examples but can't.
For example, I want to run Start in the accordion sub project.
Right click on the mouse gives doesn't give me the Run option.

Should I check out again differently?

Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary






  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: [VOTE] Organizing Wicket Stuff / Regular Release Schedule?

2008-11-24 Thread Nino Saturnino Martinez Vazquez Wael
Argh that should have been  = igor did a release prior to the 1.4 
initial release, called 1.3 or something..


Nino Saturnino Martinez Vazquez Wael wrote:
[ X ] - YES - I would like to see at least the most used Wicket Stuff 
projects

structured so that they mirror Wicket, and a release is produced for each

But I also believe this is how it are today sort of anyway not so 
strict, but cool with me.. Igor did a branch when the initial release 
of 1-4 were created...


Jeremy Thomerson wrote:

Hello everyone,
  I would like to get your opinion on an idea regarding the Wicket Stuff
project(s).  As you are familiar with, Wicket Stuff is where anyone can
create anything related to Wicket, small or large.  One problem that new
users of Wicket (and us old users) come across is that there is a 
lot of

stuff in there, and not all of it is well maintained, and there aren't
specific releases of many of the projects.  So, you have to build it
yourself and figure out which version matches which Wicket version, 
etc...


  What I would like to know is if everyone thinks it would be good to 
have a
subset of WS projects that are structured in a way that they are 
always in
sync with the Wicket versions.  IOW, there would be two branches - 
1.3.X and
1.4 (trunk), just like Wicket has.  There would be a parent module 
and all

of the modules that wanted to participate would be structured under it.
They would all release in sync with Wicket.  For instance, when Wicket
releases 1.4-RC2, we would cut a release of this wicket-stuff-structured
(bad name) and all of the projects under it at 1.4-RC2.  I haven't yet
figured out how interim releases would work (new features are added 
to a WS
project and it wants to cut a release between wicket releases) or if 
that

matters.

  This would not have to effect all WS projects - someone could 
continue to

add projects to WS just like they do today.  This would simply create a
sub-tree of projects that are in the structured / scheduled release 
area.
For those that don't want to be part of that structure, they could 
continue

operating as they do today.

So, here's the vote:

[ ] - NO!  We should leave Wicket Stuff like it is - a free-for-all 
with no

structure
[ ] - YES - I would like to see at least the most used Wicket Stuff 
projects
structured so that they mirror Wicket, and a release is produced for 
each

Wicket release.
[ ] - Maybe - I have a better idea (perfect!)

Also - please add the following:
1 - Would you be interested in helping to maintain such a thing. (If 
we had
two or three of the owners of the larger projects on board, I don't 
think it
would be too hard to keep the codebase of this in sync with Wicket 
core.)
2 - What projects do you own (and by your vote we'll see if you want 
those

projects to be included in this restructuring).

  




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: [VOTE] Organizing Wicket Stuff / Regular Release Schedule?

2008-11-24 Thread Nino Saturnino Martinez Vazquez Wael

[ X ] - YES - I would like to see at least the most used Wicket Stuff projects
structured so that they mirror Wicket, and a release is produced for each

But I also believe this is how it are today sort of anyway not so 
strict, but cool with me.. Igor did a branch when the initial release of 
1-4 were created...


Jeremy Thomerson wrote:

Hello everyone,
  I would like to get your opinion on an idea regarding the Wicket Stuff
project(s).  As you are familiar with, Wicket Stuff is where anyone can
create anything related to Wicket, small or large.  One problem that new
users of Wicket (and us old users) come across is that there is a lot of
stuff in there, and not all of it is well maintained, and there aren't
specific releases of many of the projects.  So, you have to build it
yourself and figure out which version matches which Wicket version, etc...

  What I would like to know is if everyone thinks it would be good to have a
subset of WS projects that are structured in a way that they are always in
sync with the Wicket versions.  IOW, there would be two branches - 1.3.X and
1.4 (trunk), just like Wicket has.  There would be a parent module and all
of the modules that wanted to participate would be structured under it.
They would all release in sync with Wicket.  For instance, when Wicket
releases 1.4-RC2, we would cut a release of this wicket-stuff-structured
(bad name) and all of the projects under it at 1.4-RC2.  I haven't yet
figured out how interim releases would work (new features are added to a WS
project and it wants to cut a release between wicket releases) or if that
matters.

  This would not have to effect all WS projects - someone could continue to
add projects to WS just like they do today.  This would simply create a
sub-tree of projects that are in the structured / scheduled release area.
For those that don't want to be part of that structure, they could continue
operating as they do today.

So, here's the vote:

[ ] - NO!  We should leave Wicket Stuff like it is - a free-for-all with no
structure
[ ] - YES - I would like to see at least the most used Wicket Stuff projects
structured so that they mirror Wicket, and a release is produced for each
Wicket release.
[ ] - Maybe - I have a better idea (perfect!)

Also - please add the following:
1 - Would you be interested in helping to maintain such a thing. (If we had
two or three of the owners of the larger projects on board, I don't think it
would be too hard to keep the codebase of this in sync with Wicket core.)
2 - What projects do you own (and by your vote we'll see if you want those
projects to be included in this restructuring).

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: wicket, mootips and a NoSuchMethodError

2008-11-24 Thread Nino Saturnino Martinez Vazquez Wael

Hi Ricard

As is now, mootips are compiled against wicket 1.4 and thus incompatible 
with the 1.3 branch. So you are completely correct. But it should be 
somewhat easy to make it compile against 1.3..


regards Nino

rvieregge wrote:

A newbie needs some help here...

I've an existing application that uses wicket 1.3.5, and I've tried to add a
simple (non-ajax) tooltip using mootips from wicketstuff-minis-1.4-SNAPSHOT.

Here's my code:
Label projectLabel = new Label(projectName,
projectStatus.getProjectAssignment().getProject().getName());
projectLabel.add(new MootipBehaviour(Tooltip Title, Tooltip contents.));

Debugging this in eclipse, the label gets added, a MootipBehaviour gets
created and added to the label component. The component add calls the
MootipBehaviour's bind, which does an add of an AttributeModifer to change
the title. That's where it blows up:

java.lang.NoSuchMethodError:
org.apache.wicket.Component.add([Lorg/apache/wicket/behavior/IBehavior;)Lorg/apache/wicket/Component;

org.wicketstuff.minis.mootipbehavior.MootipBehaviour.bind(MootipBehaviour.java:138)
org.apache.wicket.Component.add(Component.java:929)

net.rrm.ehour.ui.panel.overview.projectoverview.ProjectOverviewPanel$1.populateItem(ProjectOverviewPanel.java:242)

org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:573)

org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:127)
org.apache.wicket.Component.internalBeforeRender(Component.java:1002)
org.apache.wicket.Component.beforeRender(Component.java:1034)
...

I don't see how I'm missing the Component.add(IBehavoiur) method. Is it
because I'm using wicketstuff-minis.1.4-SNAPSHOT? I don't see an older
version of mootips. Do I need to recompile mootips or all of
wicketstuff-minis? 


Or am I completely on the wrong track?

Thanks...
Richard
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



SOLUTION:Hibernate Lazy initialazation issues and multi page wizard!

2008-11-24 Thread Nino Saturnino Martinez Vazquez Wael

Hi Guys

I've been having a little trouble with hibernate and a multipage wizard, 
I finally cracked the nut. And heres my solution:


In the link that refers to the wizard use a loadable detachable model.. 
Onclick you initialize all proper collections and CLONE the object, 
after the wizard are done you merge the clone..


codesniplet:

   LinkEvent linkEdit = new LinkEvent(edit, 
item.getModel()) {

   @Override
   public void onClick() {
   LoadableDetachableEventModel model=new 
LoadableDetachableEventModel(eventRepository,this.getModelObject());
  
   Hibernate.initialize(((Event)model.getObject())

   .getLinks());
   Hibernate.initialize(((Event)model.getObject())
   .getDateStart());
   Hibernate.initialize(((Event)model.getObject())
   .getDateEnd());
   Hibernate.initialize(((Event)model.getObject())
   .getTags());

   ModelEvent eventModel = new ModelEvent(
   (Event) 
SerializationHelper.clone((Event) model.getObject()));
   CompoundPropertyModelEvent e = new 
CompoundPropertyModelEvent(

   eventModel);
   EventWizard newWizard = new EventWizard(eventWizard
   .getId(), e) {
   @Override
   public void onFinish() {
   
eventRepository.update(eventModel.getObject());

   eventWizard.setVisible(false);
   }
   };
   newWizard.setVisible(true);
   eventWizard.getPage().addOrReplace(newWizard);
   eventWizard = newWizard;

   }
   };


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: mount outside init

2008-11-22 Thread Nino Saturnino Martinez Vazquez Wael
You need another of the mounting strategies.. Theres a overview in WIA, 
or probablly on the wiki.. Or perhaps you are already trying with the 
other strategies?


Mathias P.W Nilsson wrote:

I can't get this to work.

IF I do /customer1 then wicket tries to find a mount with this. 
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Compoundpropertymodel with shadow map?

2008-11-21 Thread Nino Saturnino Martinez Vazquez Wael

True, this is also what I am thinking about doing...

Johan Compagner wrote:

If you dont want to use an original object why not just clone/create a
copy of the original end use that and then copy the values over again?
(i think beanutils or something van do that for you)

On 11/18/08, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  

Hi

Im trying todo a compoundpropertymodel which does not change original
values in the original model. I need this since I am updating some
stuff in a wizard but I first want to commit when the user confirms in
the end of the wizard, and if the model are changed directly the
transaction are automatically committed to the database

So my idea were to todo a shadowCompoundPropertyModel something like this:

class EditorModel extends CompoundPropertyModel {


private Map newValues=new HashMapString, Object();

public EditorModel(CompoundPropertyModel underlyingModel,
String propertyName) {
super(underlyingModel);
}

public getObject (String property){
check if there are something in the map if so return it, otherwise fall
back to the underlying model

}
public setObject (String prop, Value){
put changes in the map...
}

public UpdateOriginal(){
 iterate over the map and use reflection to set values on the original
model..

}

}

Does anybody have something similar floating around, in a more complete
state..? Or could it be done in a easier way?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Compoundpropertymodel with shadow map?

2008-11-21 Thread Nino Saturnino Martinez Vazquez Wael
Ok great.. Seems like SerializationHelper.clone and just a normal 
compound model could work..


Francisco Diaz Trepat - gmail wrote:

Don't know, but LOL.
This might be an instancing issue in which special handling is good for this
scenario but seems to be fine for most cases. And in a lazy TDD programming
way it might be good enough.

Although I know from blog and other threads that you look for greatness :-)
and not just code that works. Which is very inspiring now a days, in this
business hour of programming history.

I'll ask arround though, I think I might know someone who might know, and
also is not my mother...

f(t)

On Thu, Nov 20, 2008 at 6:26 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

I love simple and simple is good. But this approach has issues with
hibernate if your hibernate sessions are per request and your shadowmodel
lives in multiple requests and your entities has references to other
entities for example 1..* etc ...  In simple use cases, and possibly also
when not using hibernate this might be fine. This is what I am exploring
currently. When not attending seminars or talking with people..

Im wondering how eclipselink  openJPA handles the hibernate lazy load
problem, according to a oracle guy theres not a problem when using Toplink
(which now are eclipselink?)

Input on these things are very welcome...

regards Nino


Francisco Diaz Trepat - gmail wrote:



why?
simple is good. doesn't need to be complex.

what part you dislike the most?

f(t)

On Thu, Nov 20, 2008 at 2:29 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:



  

BTW this is a flawed approch.. We need something a little more
intelligent.. I'll return on the subject..


Nino Saturnino Martinez Vazquez Wael wrote:





heres the raw and completely untested version of it. probably with a
whole
bunch of issues...:

 package zeuzgroup.web.model;
   import java.lang.reflect.Field;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
   import org.apache.wicket.Component;
 import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.model.AbstractPropertyModel;
 import org.apache.wicket.model.CompoundPropertyModel;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.IWrapModel;
   public class EditorModelT extends CompoundPropertyModelT {
   private final MapString, Object newValues = new HashMapString,
Object();
   public EditorModel(IModelT underlyingModel) {
 super(underlyingModel);
 }
   public void fillOriginal() {
   Class? c = this.getObject().getClass();
   for (EntryString, Object entry : newValues.entrySet()) {
 try {
 Field t = c.getDeclaredField(entry.getKey());
 t.set(this.getObject(), entry.getValue());
 } catch (Exception e) {
 throw new WicketRuntimeException(Could not set 
 + entry.getKey(), e);
 }
   }
 }
   public C IWrapModelC wrapOnInheritance(Component component) {
 return new AttachedCompoundPropertyModelC(component,
newValues);
 }
   private class AttachedCompoundPropertyModelC extends
 AbstractPropertyModelC implements IWrapModelC {
 private static final long serialVersionUID = 1L;
   private final Component owner;
   private final MapString, Object newValues;
   /**
  * Constructor
  *
  * @param owner
  *component that this model has been attached to
  */
 public AttachedCompoundPropertyModel(Component owner,
MapString,Object map) {
 super(EditorModel.this);
 this.owner = owner;
 this.newValues = map;
 }
   @Override
 public C getObject() {
 if (EditorModel.this.newValues.containsKey(owner.getId()))
{
 return (C) newValues.get(owner.getId());
 } else {
 return super.getObject();
 }
 }
   @Override
 public void setObject(C object) {
 newValues.put(owner.getId(), object);
 }
   /**
  * @see
org.apache.wicket.model.AbstractPropertyModel#propertyExpression()
  */
 @Override
 protected String propertyExpression() {
 return EditorModel.this.propertyExpression(owner);
 }
   /**
  * @see org.apache.wicket.model.IWrapModel#getWrappedModel()
  */
 public IModelT getWrappedModel() {
 return EditorModel.this;
 }
   /**
  * @see org.apache.wicket.model.AbstractPropertyModel#detach()
  */
 @Override
 public void detach() {
 super.detach();
 EditorModel.this.detach();
 }
 }
   }
   // IComponentAssignedModel / IWrapModel

Francisco Diaz Trepat - gmail wrote

Re: Compoundpropertymodel with shadow map?

2008-11-20 Thread Nino Saturnino Martinez Vazquez Wael
I love simple and simple is good. But this approach has issues with 
hibernate if your hibernate sessions are per request and your 
shadowmodel lives in multiple requests and your entities has references 
to other entities for example 1..* etc ...  In simple use cases, and 
possibly also when not using hibernate this might be fine. This is what 
I am exploring currently. When not attending seminars or talking with 
people..


Im wondering how eclipselink  openJPA handles the hibernate lazy load 
problem, according to a oracle guy theres not a problem when using 
Toplink (which now are eclipselink?)


Input on these things are very welcome...

regards Nino

Francisco Diaz Trepat - gmail wrote:

why?
simple is good. doesn't need to be complex.

what part you dislike the most?

f(t)

On Thu, Nov 20, 2008 at 2:29 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

BTW this is a flawed approch.. We need something a little more
intelligent.. I'll return on the subject..


Nino Saturnino Martinez Vazquez Wael wrote:



heres the raw and completely untested version of it. probably with a whole
bunch of issues...:

  package zeuzgroup.web.model;
import java.lang.reflect.Field;
  import java.util.HashMap;
  import java.util.Map;
  import java.util.Map.Entry;
import org.apache.wicket.Component;
  import org.apache.wicket.WicketRuntimeException;
  import org.apache.wicket.model.AbstractPropertyModel;
  import org.apache.wicket.model.CompoundPropertyModel;
  import org.apache.wicket.model.IModel;
  import org.apache.wicket.model.IWrapModel;
public class EditorModelT extends CompoundPropertyModelT {
private final MapString, Object newValues = new HashMapString,
Object();
public EditorModel(IModelT underlyingModel) {
  super(underlyingModel);
  }
public void fillOriginal() {
Class? c = this.getObject().getClass();
for (EntryString, Object entry : newValues.entrySet()) {
  try {
  Field t = c.getDeclaredField(entry.getKey());
  t.set(this.getObject(), entry.getValue());
  } catch (Exception e) {
  throw new WicketRuntimeException(Could not set 
  + entry.getKey(), e);
  }
}
  }
public C IWrapModelC wrapOnInheritance(Component component) {
  return new AttachedCompoundPropertyModelC(component,
newValues);
  }
private class AttachedCompoundPropertyModelC extends
  AbstractPropertyModelC implements IWrapModelC {
  private static final long serialVersionUID = 1L;
private final Component owner;
private final MapString, Object newValues;
/**
   * Constructor
   *
   * @param owner
   *component that this model has been attached to
   */
  public AttachedCompoundPropertyModel(Component owner,
MapString,Object map) {
  super(EditorModel.this);
  this.owner = owner;
  this.newValues = map;
  }
@Override
  public C getObject() {
  if (EditorModel.this.newValues.containsKey(owner.getId())) {
  return (C) newValues.get(owner.getId());
  } else {
  return super.getObject();
  }
  }
@Override
  public void setObject(C object) {
  newValues.put(owner.getId(), object);
  }
/**
   * @see
org.apache.wicket.model.AbstractPropertyModel#propertyExpression()
   */
  @Override
  protected String propertyExpression() {
  return EditorModel.this.propertyExpression(owner);
  }
/**
   * @see org.apache.wicket.model.IWrapModel#getWrappedModel()
   */
  public IModelT getWrappedModel() {
  return EditorModel.this;
  }
/**
   * @see org.apache.wicket.model.AbstractPropertyModel#detach()
   */
  @Override
  public void detach() {
  super.detach();
  EditorModel.this.detach();
  }
  }
}
// IComponentAssignedModel / IWrapModel

Francisco Diaz Trepat - gmail wrote:

  

Nice, I was up to something similar.

On Tue, Nov 18, 2008 at 9:43 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:





Hi

Im trying todo a compoundpropertymodel which does not change original
values in the original model. I need this since I am updating some
stuff
in a wizard but I first want to commit when the user confirms in the end
of
the wizard, and if the model are changed directly the transaction are
automatically committed to the database

So my idea were to todo a shadowCompoundPropertyModel something like
this:

class EditorModel extends CompoundPropertyModel {

 private Map newValues=new HashMapString

Re: Compoundpropertymodel with shadow map?

2008-11-19 Thread Nino Saturnino Martinez Vazquez Wael
BTW this is a flawed approch.. We need something a little more 
intelligent.. I'll return on the subject..


Nino Saturnino Martinez Vazquez Wael wrote:
heres the raw and completely untested version of it. probably with a 
whole bunch of issues...:


   package zeuzgroup.web.model;
 import java.lang.reflect.Field;
   import java.util.HashMap;
   import java.util.Map;
   import java.util.Map.Entry;
 import org.apache.wicket.Component;
   import org.apache.wicket.WicketRuntimeException;
   import org.apache.wicket.model.AbstractPropertyModel;
   import org.apache.wicket.model.CompoundPropertyModel;
   import org.apache.wicket.model.IModel;
   import org.apache.wicket.model.IWrapModel;
 public class EditorModelT extends CompoundPropertyModelT {
 private final MapString, Object newValues = new 
HashMapString, Object();

 public EditorModel(IModelT underlyingModel) {
   super(underlyingModel);
   }
 public void fillOriginal() {
 Class? c = this.getObject().getClass();
 for (EntryString, Object entry : newValues.entrySet()) {
   try {
   Field t = c.getDeclaredField(entry.getKey());
   t.set(this.getObject(), entry.getValue());
   } catch (Exception e) {
   throw new WicketRuntimeException(Could not set 
   + entry.getKey(), e);
   }
 }
   }
 public C IWrapModelC wrapOnInheritance(Component 
component) {
   return new AttachedCompoundPropertyModelC(component, 
newValues);

   }
 private class AttachedCompoundPropertyModelC extends
   AbstractPropertyModelC implements IWrapModelC {
   private static final long serialVersionUID = 1L;
 private final Component owner;
 private final MapString, Object newValues;
 /**
* Constructor
*
* @param owner
*component that this model has been attached to
*/
   public AttachedCompoundPropertyModel(Component owner, 
MapString,Object map) {

   super(EditorModel.this);
   this.owner = owner;
   this.newValues = map;
   }
 @Override
   public C getObject() {
   if 
(EditorModel.this.newValues.containsKey(owner.getId())) {

   return (C) newValues.get(owner.getId());
   } else {
   return super.getObject();
   }
   }
 @Override
   public void setObject(C object) {
   newValues.put(owner.getId(), object);
   }
 /**
* @see 
org.apache.wicket.model.AbstractPropertyModel#propertyExpression()

*/
   @Override
   protected String propertyExpression() {
   return EditorModel.this.propertyExpression(owner);
   }
 /**
* @see org.apache.wicket.model.IWrapModel#getWrappedModel()
*/
   public IModelT getWrappedModel() {
   return EditorModel.this;
   }
 /**
* @see org.apache.wicket.model.AbstractPropertyModel#detach()
*/
   @Override
   public void detach() {
   super.detach();
   EditorModel.this.detach();
   }
   }
 }
 // IComponentAssignedModel / IWrapModel

Francisco Diaz Trepat - gmail wrote:

Nice, I was up to something similar.

On Tue, Nov 18, 2008 at 9:43 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 

Hi

Im trying todo a compoundpropertymodel which does not change original
values in the original model. I need this since I am updating some 
stuff
in a wizard but I first want to commit when the user confirms in the 
end of

the wizard, and if the model are changed directly the transaction are
automatically committed to the database

So my idea were to todo a shadowCompoundPropertyModel something like 
this:


class EditorModel extends CompoundPropertyModel {

  private Map newValues=new HashMapString, Object();
public EditorModel(CompoundPropertyModel underlyingModel,
  String propertyName) {
  super(underlyingModel);
  }
 public getObject (String property){
check if there are something in the map if so return it, otherwise fall
back to the underlying model

}  public setObject (String prop, Value){
  put changes in the map...
}

public UpdateOriginal(){
iterate over the map and use reflection to set values on the original
model..

}

}

Does anybody have something similar floating around, in a more complete
state..? Or could it be done in a easier way?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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

Re: overLIB Integration...

2008-11-18 Thread Nino Saturnino Martinez Vazquez Wael
Hmm, we do actually have both prototip and mootip integration as stuff 
projects, and mootip supports ajax retrival of tips.. But the more the 
merrier I guess?


Swinsburg, Stephen wrote:

I used overLIB years ago and its pretty basic. What about something like 
jQuery's cluetip (http://plugins.learningjquery.com/cluetip/demo/) - far more 
extensible and configurable.

Personal preference I guess.

Steve


-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Tue 11/18/2008 1:25 AM
To: users@wicket.apache.org
Subject: Re: overLIB Integration...
 
On Mon, Nov 17, 2008 at 4:58 PM, Marc Ende [EMAIL PROTECTED] wrote:
  

Hi,

imho this would be a nice feature.

What about the mentioned constructor is it still
OverlibBehavior(String) or do you plan also
a OverlibBehavior(IModel)? It would be nice to
have such a constructor when the contents should
be loaded from a model.



Great idea!  In our application (where I need it right now), we didn't
need to use models, but I can see how this would be a wickety way to
do it.  I'll incorporate it.  I'll try to get something up on
wicketstuff soon.  Glad to hear that it would be useful to other
folks.

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



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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Usage of getString with parameters (model?)

2008-11-18 Thread Nino Saturnino Martinez Vazquez Wael
Igor wrote something about it in a thread with validators.. But heres my 
cut:


   add(new Label(confirmation.content, new StringResourceModel(
   confirmation.content, this, eventModel)));
and in property file:

confirmation.content=You are about to create event '${name}', in city 
'${location.nearestCityName}', see preview of event below, please press 
finish to complete. Notice that tags will be populated when confirmed.


Eyal Golan wrote:

Hi,
I have a key in the property file:
Reports.ReportTitle.SuspectedConnectionsUserRes = Suspected User-Resource
Connections by {0} Pattern Report

I want to use getString(Reports.ReportTitle.SuspectedConnectionsUserRes,
SOMETHING);
to get the value with the {0} substituted. I'm not sure how to do this.

Please advise,

thanks


Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Compoundpropertymodel with shadow map?

2008-11-18 Thread Nino Saturnino Martinez Vazquez Wael

Hi

Im trying todo a compoundpropertymodel which does not change original 
values in the original model. I need this since I am updating some 
stuff in a wizard but I first want to commit when the user confirms in 
the end of the wizard, and if the model are changed directly the 
transaction are automatically committed to the database


So my idea were to todo a shadowCompoundPropertyModel something like this:

class EditorModel extends CompoundPropertyModel {
  


   private Map newValues=new HashMapString, Object();
  
   public EditorModel(CompoundPropertyModel underlyingModel,

   String propertyName) {
   super(underlyingModel);
   }
  
public getObject (String property){
check if there are something in the map if so return it, otherwise fall 
back to the underlying model


}  
public setObject (String prop, Value){

   put changes in the map...
}

public UpdateOriginal(){
iterate over the map and use reflection to set values on the original 
model..


}

}

Does anybody have something similar floating around, in a more complete 
state..? Or could it be done in a easier way?


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Compoundpropertymodel with shadow map?

2008-11-18 Thread Nino Saturnino Martinez Vazquez Wael
I do.. But if I use it with a detachable model the idea goes a bit 
away.. Plus I'd like it to be a bit more transparent... Could be me that 
just not know enough


James Carman wrote:

You didn't like the ProxyModelManager?

https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/model/proxy/ProxyModelManager.java



On Tue, Nov 18, 2008 at 7:43 AM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  

Hi

Im trying todo a compoundpropertymodel which does not change original values
in the original model. I need this since I am updating some stuff in a
wizard but I first want to commit when the user confirms in the end of the
wizard, and if the model are changed directly the transaction are
automatically committed to the database

So my idea were to todo a shadowCompoundPropertyModel something like this:

class EditorModel extends CompoundPropertyModel {

  private Map newValues=new HashMapString, Object();
public EditorModel(CompoundPropertyModel underlyingModel,
  String propertyName) {
  super(underlyingModel);
  }
 public getObject (String property){
check if there are something in the map if so return it, otherwise fall back
to the underlying model

}  public setObject (String prop, Value){
  put changes in the map...
}

public UpdateOriginal(){
iterate over the map and use reflection to set values on the original
model..

}

}

Does anybody have something similar floating around, in a more complete
state..? Or could it be done in a easier way?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Compoundpropertymodel with shadow map?

2008-11-18 Thread Nino Saturnino Martinez Vazquez Wael
heres the raw and completely untested version of it. probably with a 
whole bunch of issues...:


   package zeuzgroup.web.model;
  
   import java.lang.reflect.Field;

   import java.util.HashMap;
   import java.util.Map;
   import java.util.Map.Entry;
  
   import org.apache.wicket.Component;

   import org.apache.wicket.WicketRuntimeException;
   import org.apache.wicket.model.AbstractPropertyModel;
   import org.apache.wicket.model.CompoundPropertyModel;
   import org.apache.wicket.model.IModel;
   import org.apache.wicket.model.IWrapModel;
  
   public class EditorModelT extends CompoundPropertyModelT {
  
   private final MapString, Object newValues = new 
HashMapString, Object();
  
   public EditorModel(IModelT underlyingModel) {

   super(underlyingModel);
   }
  
   public void fillOriginal() {
  
   Class? c = this.getObject().getClass();
  
   for (EntryString, Object entry : newValues.entrySet()) {

   try {
   Field t = c.getDeclaredField(entry.getKey());
   t.set(this.getObject(), entry.getValue());
   } catch (Exception e) {
   throw new WicketRuntimeException(Could not set 
   + entry.getKey(), e);
   }
  
   }

   }
  
   public C IWrapModelC wrapOnInheritance(Component component) {
   return new AttachedCompoundPropertyModelC(component, 
newValues);

   }
  
   private class AttachedCompoundPropertyModelC extends

   AbstractPropertyModelC implements IWrapModelC {
   private static final long serialVersionUID = 1L;
  
   private final Component owner;
  
   private final MapString, Object newValues;
  
   /**

* Constructor
*
* @param owner
*component that this model has been attached to
*/
   public AttachedCompoundPropertyModel(Component owner, 
MapString,Object map) {

   super(EditorModel.this);
   this.owner = owner;
   this.newValues = map;
   }
  
   @Override

   public C getObject() {
   if (EditorModel.this.newValues.containsKey(owner.getId())) {
   return (C) newValues.get(owner.getId());
   } else {
   return super.getObject();
   }
   }
  
   @Override

   public void setObject(C object) {
   newValues.put(owner.getId(), object);
   }
  
   /**
* @see 
org.apache.wicket.model.AbstractPropertyModel#propertyExpression()

*/
   @Override
   protected String propertyExpression() {
   return EditorModel.this.propertyExpression(owner);
   }
  
   /**

* @see org.apache.wicket.model.IWrapModel#getWrappedModel()
*/
   public IModelT getWrappedModel() {
   return EditorModel.this;
   }
  
   /**

* @see org.apache.wicket.model.AbstractPropertyModel#detach()
*/
   @Override
   public void detach() {
   super.detach();
   EditorModel.this.detach();
   }
   }
  
   }
  
   // IComponentAssignedModel / IWrapModel


Francisco Diaz Trepat - gmail wrote:

Nice, I was up to something similar.

On Tue, Nov 18, 2008 at 9:43 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

Hi

Im trying todo a compoundpropertymodel which does not change original
values in the original model. I need this since I am updating some stuff
in a wizard but I first want to commit when the user confirms in the end of
the wizard, and if the model are changed directly the transaction are
automatically committed to the database

So my idea were to todo a shadowCompoundPropertyModel something like this:

class EditorModel extends CompoundPropertyModel {

  private Map newValues=new HashMapString, Object();
public EditorModel(CompoundPropertyModel underlyingModel,
  String propertyName) {
  super(underlyingModel);
  }
 public getObject (String property){
check if there are something in the map if so return it, otherwise fall
back to the underlying model

}  public setObject (String prop, Value){
  put changes in the map...
}

public UpdateOriginal(){
iterate over the map and use reflection to set values on the original
model..

}

}

Does anybody have something similar floating around, in a more complete
state..? Or could it be done in a easier way?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http

Re: ajax busy indicator never stops in IE

2008-11-18 Thread Nino Saturnino Martinez Vazquez Wael

Miro

Putting the system out print will only confirm that the ajax call are 
made from server side, your problem are clientside on IE, somethings not 
right with ie.. Could you prepend and append alert('before') and after 
alert('before') to the ajax target..? and tell if both calls are made..?


Probablly

miro wrote:
did a simple test of this problem 




java code for adding a   link

add(new IndicatingAjaxLink(test_link){
public void onClick(AjaxRequestTarget target) {
System.out.println(link clicked);
target.addComponent(this);
}
}.add(new Label(test,click here)));
}

here is the html

html
head/head
body

label wicket:id=test/


/body
/html



ajax debug console

INFO: Using ActiveX transport
INFO: 
INFO: Initiating Ajax GET request on

?wicket:interface=:1:test_link::IBehaviorListener:0:random=0.018303795903651054
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (1584 characters)
INFO: 
?xml version=1.0 encoding=UTF-8?ajax-responseheader-contribution

encoding=wicket1 ![CDATA[head
xmlns:wicket=http://wicket.apache.org;script type=text/javascript
src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script 
script type=text/javascript
src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js/script 
script type=text/javascript
src=resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js/script 
script type=text/javascript

id=wicket-ajax-debug-enable!--/*--![CDATA[/*!--*/
wicketAjaxDebugEnable=true;
/*--]^]^*//script

script type=text/javascript !--/*--![CDATA[/*!--*/
var e = Wicket.$('test__link2--ajax-indicator'); if (e != null 
typeof(e.parentNode) != 'undefined') e.parentNode.removeChild(e);
/*--]^]^*//script

/head]]/header-contributioncomponent id=test__link2 ![CDATA[ 
labelclick here/label 

resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/indicator.gif

]]/component/ajax-response
INFO: Response parsed. Now invoking steps...
ERROR: [object Error]
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: last focus id was not set

please help me understand what is going wrong .



Nino.Martinez wrote:
  
Hi Xhelas, you could try installing firefox lite, or the microsoft 
script debugger.. That should help you pickup whats wrong...


You could also try the good old alert debug technique:)

Xhelas wrote:


Thank you for the clue on the clue! There are indeed some likely usefull
information (with errors on IE7) in the ajax console, but it is not easy
to
understand it. I will compare it with firefox generated logs... 



igor.vaynberg wrote:
  
  

why dont you check *why* it is not hiding. ajax console should give you
a
clue.

-igor

On Fri, Nov 14, 2008 at 6:43 AM, miro [EMAIL PROTECTED] wrote:



did nobody faced this problem whats the solution for this ?

miro wrote:
  
  
My  page has IndicatingAjaxLinkWhen user clicks on this  link  
the

busy indicator never stops , it works fine in firefox

here some html

  tbody
wicket:id=auditInfoContainer
style=width:100%;height:556;overflow:auto;
 
wicket:container

wicket:id=auditInfos
  tr
wicket:id=auditInfo  height=10 
 
td


 
/td
 
td


 
/td
 
td


 
/td
 
td


 
/td
 
td


 
/td
 
td


 
/td
 
td


 
/td
 
td


 
/td
 
td


 

Re: Unable to load Wicket app in hosting provider

2008-11-16 Thread Nino Saturnino Martinez Vazquez Wael

Hi '

If I were you I would pick up the wicket in action book, or follow a 
tutorial... These are very basic questions...


Wicket has a application class which specify the home folder with a 
method, you would override that and return your index.class wicket will 
then use that to display as root..


moraleslos wrote:

Hi,

Thanks for the reply.  I'm a bit confused on how to write the index.html. 
So, let's say my godaddy directory structure looks like this:


/
/xyz
/xyz/WEB-INF
/xyz/WEB-INF/web.xml
/xyz/WEB-INF/classes/com/xyz/Index.html
/xyz/WEB-INF/classes/com/xyz/Index.class
...

In my web.xml looks like this:

web-app 
	version=2.4 
	xmlns=http://java.sun.com/xml/ns/j2ee;

xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;

display-namexyz/display-name
context-param
param-nameconfiguration/param-name
param-valuedeployment/param-value
/context-param
filter
filter-namewicket.xyz/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationClassName/param-name
param-valuecom.xyz.XyzApplication/param-value
/init-param
/filter
filter-mapping
filter-namewicket.xyz/filter-name
url-pattern/*/url-pattern
/filter-mapping
/web-app


So how do I write the index.html that's going to be in the root directory to
invoke Wicket's Index.html under /xyz/WEB-INF/classes/com/xyz/Index.html? 
Thanks!


-los


Martijn Dashorst wrote:
  

so your wicket filter would service all requests going to:

http://godaddy.com/myapplication/app

or, you could still keep the filter mapping to /* but redirect to your
mounted homepage with mount name home or something similar.

Martijn

On Mon, Nov 17, 2008 at 1:40 AM, Martijn Dashorst
[EMAIL PROTECTED] wrote:


mount the wicket filter under context root app and tell the index.html
to redirect to that url with a pragma header.

Martijn

On Mon, Nov 17, 2008 at 1:10 AM, moraleslos [EMAIL PROTECTED]
wrote:
  

Ok,

Finally talked to someone at GoDaddy who gave me some advice.  With
their
Java hosting, it seems that they force Tomcat to look for a default file
(e.g. index.html) at the root directory.  Since I don't have one (all of
my
files are under WEB-INF/classes/...), I get the 403 error.

Now here's the question.  How do I write up a default index.html file
and
place this in the root directory such that it will start up the Wicket
filter in the web.xml file and run the Wicket application appropriately?
Again, my actual Index.html, and hence it's Index.class, is packaged
under
the WEB-INF/classes/... directory.  Thanks!

-los



Erik van Oosten wrote:


Maybe this helps. I've found that you need to start Tomcat from a
directory that is writable for the user you are using (no idea why
though). Besides the application log, you should also check Tomcat's
log
files.

Good luck,
Erik.

moraleslos wrote:
  

Hi,

I'm running into an issue where my Wicket-based application will
absolutely
not load in the shared hosting environment.  I'm trying out GoDaddy's
Java
Web hosting that uses Java 1.5 and Tomcat 5.0.27.  I have this same
setup
on
my box and deploying my Wicket 1.3.4-based application works


--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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



  

--
View this message in context:
http://www.nabble.com/Unable-to-load-Wicket-app-in-hosting-provider-tp20526412p20531825.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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





--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

  


--
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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






  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: What is best practice for overriding settings in ModalWindow modal.css file?

2008-11-13 Thread Nino Saturnino Martinez Vazquez Wael
It's not something wicket related, you can override all css classes by 
providing a more specific one...


Like if you have this:

.wicketmodalwindowstyle {
width:5em;
}

then you can override it by doing so in your css:

.myhappystyle .wicketmodalwindowstyle{
width:4em;
}

So above will override whenever it's within the class.. Or at least 
something like above...





shetc wrote:

Hi Nino,

Thanks for responding! I'm still going through the newbie stage so I'm not
quite sure what
your are suggesting. Further hints would be most appreciated.

Steve

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: gmap2 and helper classes / methods?

2008-11-13 Thread Nino Saturnino Martinez Vazquez Wael

Hmmm, I got so far:

   public boolean isWithInBounds(GLatLngBounds bounds, GLatLng point) {

//if (pointlat  maxY  pointlat  minY  pointlng  minX  
pointlng  maxX) { //execute script }
  
  
   if (bounds.getSW().getLat()  point.getLat()

bounds.getSW().getLng()  point.getLng()
bounds.getNE().getLat()  point.getLat()
bounds.getNE().getLng()  point.getLng()) {
   return true;
   }

   return false;
   }

But im pretty sure that it's faulty. When I discovered spartial 
hibernate, which can be used with JPA. And in my case it's just what I 
need. And JTS( http://www.vividsolutions.com/jts/main.htm ) that 
provides more than enough for me... So if anything should be done it 
should be either direct integration between JTS and gmap or helper 
classes that will translate from gmap to JTS... I will think on if this 
could be something that the openlayers integration should support..


Martin Funk wrote:

2008/11/12 Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]

  

Hi

I seem to be lacking some helper methods for finding out if a glatlng are
in a gbounds etc.. Are there someone out there who has implemented anything
or do I need to roll my own, and if the latter I guess I should provide a
patch?



go ahead and commit something,
I'll be happy to unclutter.

mf

  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Progress Bar

2008-11-13 Thread Nino Saturnino Martinez Vazquez Wael

hehe yes why?

Francisco Diaz Trepat - gmail wrote:

your voice in the video?

On Thu, Nov 13, 2008 at 3:29 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

You could also just do the js with an texttemplate, that way it should be
somewhat the same:)

I wrote something on it on my blog...


http://ninomartinez.wordpress.com/2008/09/09/apache-wicket-javascript-integration/

If you have any questions just ask...

Francisco Diaz Trepat - gmail wrote:



Hi nino, I'm on it. Very simple at first, English default text and
javascript function parameters for other values.
But I think latter on it could bring all text from server, although it
could
increase traffic unnecessarily.

f(t)

On Wed, Nov 12, 2008 at 4:43 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:



  

Francisco, feel free to provide a patch :)

Francisco Diaz Trepat - gmail wrote:





Could you be more specific?
You send me the Wicket internationalization link.

The word progress, of Progress Bar, doesn't even exist in the page.

And finally I found that it is not possible through regular (framework)
means to i18n the Progress Bar due to the fact that the text I referred
to
is inside (hardcoded) the JavaScript file profress.js

f(t)

On Wed, Nov 12, 2008 at 3:00 PM, Pointbreak
[EMAIL PROTECTED] [EMAIL PROTECTED] 
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] [EMAIL PROTECTED] 
[EMAIL PROTECTED][EMAIL PROTECTED]
  




  

wrote:







  

http://cwiki.apache.org/WICKET/everything-about-wicket-internationalization.html

On Wed, 12 Nov 2008 12:37:07 -0300, Francisco Diaz Trepat - gmail
[EMAIL PROTECTED] said:






Hi all, I am using the progress bar found at extensions.
Is it possible to translate the words of the message that appear at
the
status (Upload Starting... and 34% finished, 71.3M of 209.7M at
5.9M/s;
23
seconds) ??

Or put my own version of messages?

f(t)




  

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









  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684



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







  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Per-user, event-aware page/component caching

2008-11-13 Thread Nino Saturnino Martinez Vazquez Wael
And if you are using spring it's really easy to inject caching using the 
spring module cache sub project, when using your approach.


Igor Vaynberg wrote:

oh, and of course, if you do this you are on your own as far as
threading goes inside your components.

i still think that instead of doing this implementing a general cache
is a much better approach.

instead of doing
tvdata tv=tvsource.getdata();
musicdata music=musicsource.getdata();

restructure your business logic to work like this:

tvdata tv=((tvresponse)datasource.getdata(new tvrequest(params)).tvdata();
musicdata music=((musicresponse)datasource.getdata(new
musicrequest(params)).musicdata();

this gives you a single point of access from higher tiers (ui,
webservices, foo) and also gives you one place to cache.
architecturally this is much more sound, of course i dont know your
exact situation.

-igor

On Thu, Nov 13, 2008 at 9:40 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
  

you can simply stick a panel or page into session. alternatively you
can override ipagefactory and implement a cache infront of that for
bookmarkable pages.

as far as events, etc, you would have to visit all cached things in
cache and do whatever it is you need to do. wicket cant help you here
because the cache implementation is purely your own.

-igor

On Thu, Nov 13, 2008 at 8:28 AM, Tremelune [EMAIL PROTECTED] wrote:


We have many components that require heavy operations to gather the necessary
data, and I was wondering if there was a way to cache the Wicket objects
that have pulled the data.

I have seen similar questions come up before, and the common answer was to
simply cache the data being pulled, and not the Wicket objects. Because we
have components pulling data from different places in different ways, this
would be like putting a padlock on my TV and guitar instead of locking the
door to my apartment. It also means that, if I got a new stereo, I'd have to
remember to handle that new case as well, instead of it being handled by the
door lock automagically. My last example in this unusual metaphor would be
my iPod: It's too cheap to explicitly handle, but it's nice to have the lock
on the front door take care of it anyway.

My particular app would benefit from a per-user cache based on the way data
is pulled. Pages are different for each user, but once they view the page,
data rarely changes. I imagine this would be as easy as stuffing something
in the Wicket session. It would stagnate with the HTTP session naturally.

My app would also need a few hooks or event listeners to trigger a clear.
For instance, if a user deletes a Horse from his Barn, I would want the
BarnPanel to know it needs to refresh on the next rendering.

Is there anything like this that exists in Wicket? Or pieces I could use to
build it? I think it would be very handy.
--
View this message in context: 
http://www.nabble.com/Per-user%2C-event-aware-page-component-caching-tp20481886p20481886.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


  


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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: What is best practice for overriding settings in ModalWindow modal.css file?

2008-11-13 Thread Nino Saturnino Martinez Vazquez Wael

:)

shetc wrote:
Thanks Nino -- the solution was even easier than what you suggested but you 
pointed me in the right direction. I was so focused on Wicket that I forgot

the plain
ole CSS solution :wistle:
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Progress Bar

2008-11-13 Thread Nino Saturnino Martinez Vazquez Wael



Francisco Diaz Trepat - gmail wrote:

I kind of felt curious to knowing a little bit more about you, so hearing
the video made me wonder...
  

So now you know :)

I got knock down by management on modifying progress.js with templates.
Solution was mandate to remove Status Messages all together.
  
so css visibility: hidden added to the status class.


wupb-uploadStatus {
visibility: hidden;
}

Sad, but true.
  

Yeah but also simple..

On another topic I'm currently working on perfecting a Modeless Window
extension of the current Modal window.
  

Okay interesting..

f(t)

On Thu, Nov 13, 2008 at 3:39 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

hehe yes why?


Francisco Diaz Trepat - gmail wrote:



your voice in the video?

On Thu, Nov 13, 2008 at 3:29 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:



  

You could also just do the js with an texttemplate, that way it should be
somewhat the same:)

I wrote something on it on my blog...



http://ninomartinez.wordpress.com/2008/09/09/apache-wicket-javascript-integration/

If you have any questions just ask...

Francisco Diaz Trepat - gmail wrote:





Hi nino, I'm on it. Very simple at first, English default text and
javascript function parameters for other values.
But I think latter on it could bring all text from server, although it
could
increase traffic unnecessarily.

f(t)

On Wed, Nov 12, 2008 at 4:43 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:





  

Francisco, feel free to provide a patch :)

Francisco Diaz Trepat - gmail wrote:







Could you be more specific?
You send me the Wicket internationalization link.

The word progress, of Progress Bar, doesn't even exist in the page.

And finally I found that it is not possible through regular
(framework)
means to i18n the Progress Bar due to the fact that the text I
referred
to
is inside (hardcoded) the JavaScript file profress.js

f(t)

On Wed, Nov 12, 2008 at 3:00 PM, Pointbreak
[EMAIL PROTECTED] [EMAIL PROTECTED] 
[EMAIL PROTECTED] [EMAIL PROTECTED]

[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED][EMAIL PROTECTED]
  


  

[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED][EMAIL PROTECTED]

[EMAIL PROTECTED][EMAIL PROTECTED]
[EMAIL PROTECTED][EMAIL PROTECTED]
  





  

wrote:









  

http://cwiki.apache.org/WICKET/everything-about-wicket-internationalization.html

On Wed, 12 Nov 2008 12:37:07 -0300, Francisco Diaz Trepat - gmail
[EMAIL PROTECTED] said:








Hi all, I am using the progress bar found at extensions.
Is it possible to translate the words of the message that appear at
the
status (Upload Starting... and 34% finished, 71.3M of 209.7M at
5.9M/s;
23
seconds) ??

Or put my own version of messages?

f(t)






  

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











  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684



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









  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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







  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: What is best practice for overriding settings in ModalWindow modal.css file?

2008-11-12 Thread Nino Saturnino Martinez Vazquez Wael

hi Steve

Wrap it in a class that overrides the property.

shetc wrote:

Hi All,

What is best practice for overriding the properties in the ModalWindow
modal.css file?
For example, I would like to change the font of the text used for the title.

Thanks,

Steve
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



gmap2 and helper classes / methods?

2008-11-12 Thread Nino Saturnino Martinez Vazquez Wael

Hi

I seem to be lacking some helper methods for finding out if a glatlng 
are in a gbounds etc.. Are there someone out there who has implemented 
anything or do I need to roll my own, and if the latter I guess I should 
provide a patch?


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Progress Bar

2008-11-12 Thread Nino Saturnino Martinez Vazquez Wael

Francisco, feel free to provide a patch :)

Francisco Diaz Trepat - gmail wrote:

Could you be more specific?
You send me the Wicket internationalization link.

The word progress, of Progress Bar, doesn't even exist in the page.

And finally I found that it is not possible through regular (framework)
means to i18n the Progress Bar due to the fact that the text I referred to
is inside (hardcoded) the JavaScript file profress.js

f(t)

On Wed, Nov 12, 2008 at 3:00 PM, Pointbreak
[EMAIL PROTECTED][EMAIL PROTECTED]
  

wrote:



  

http://cwiki.apache.org/WICKET/everything-about-wicket-internationalization.html

On Wed, 12 Nov 2008 12:37:07 -0300, Francisco Diaz Trepat - gmail
[EMAIL PROTECTED] said:


Hi all, I am using the progress bar found at extensions.
Is it possible to translate the words of the message that appear at the
status (Upload Starting... and 34% finished, 71.3M of 209.7M at 5.9M/s;
23
seconds) ??

Or put my own version of messages?

f(t)
  

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





  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Progress Bar

2008-11-12 Thread Nino Saturnino Martinez Vazquez Wael
You could also just do the js with an texttemplate, that way it should 
be somewhat the same:)


I wrote something on it on my blog...

http://ninomartinez.wordpress.com/2008/09/09/apache-wicket-javascript-integration/

If you have any questions just ask...

Francisco Diaz Trepat - gmail wrote:

Hi nino, I'm on it. Very simple at first, English default text and
javascript function parameters for other values.
But I think latter on it could bring all text from server, although it could
increase traffic unnecessarily.

f(t)

On Wed, Nov 12, 2008 at 4:43 PM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

Francisco, feel free to provide a patch :)

Francisco Diaz Trepat - gmail wrote:



Could you be more specific?
You send me the Wicket internationalization link.

The word progress, of Progress Bar, doesn't even exist in the page.

And finally I found that it is not possible through regular (framework)
means to i18n the Progress Bar due to the fact that the text I referred to
is inside (hardcoded) the JavaScript file profress.js

f(t)

On Wed, Nov 12, 2008 at 3:00 PM, Pointbreak
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] [EMAIL PROTECTED]


  

wrote:





  

http://cwiki.apache.org/WICKET/everything-about-wicket-internationalization.html

On Wed, 12 Nov 2008 12:37:07 -0300, Francisco Diaz Trepat - gmail
[EMAIL PROTECTED] said:




Hi all, I am using the progress bar found at extensions.
Is it possible to translate the words of the message that appear at the
status (Upload Starting... and 34% finished, 71.3M of 209.7M at 5.9M/s;
23
seconds) ??

Or put my own version of messages?

f(t)


  

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







  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684



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





  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Wicket portlet

2008-11-10 Thread Nino Saturnino Martinez Vazquez Wael
Could people who use wicket in some portal container create a wiki page 
and report if it's working, working with problems or just not working?


maybe a sub page to this: http://cwiki.apache.org/WICKET/portal-howto.html


regards Nino

Serkan Camurcuoglu wrote:
though I've only used it in Jetspeed portal, I strongly recommend 
Wicket instead of Struts2 for portlet development..




Danny van Bruggen wrote:

Hi Pierre,

As far as I know (and I'm not an authority,) the status is as follows:

- portlet 1.0 support is OK
- portlet 2.0 support should be implemented soon (maybe it has
already been done?)
- Websphere is broken and does not accept Wicket portlets. Neither WS
or Wicket want to fix it.

Hopefully someone can give you more inside information ;)

Danny

On Thu, Nov 6, 2008 at 8:25 PM, Pierre Goupil 
[EMAIL PROTECTED] wrote:
 

Hello all,

I'm currently evaluating Struts2 Vs. Wicket 1.3.5 as a Web framework 
in a

portlet environment. I'm using eXo WebOS as a portal.

My question is : what's the status of portlet support in Wicket ? I 
don't
really care about portlet 1.0 or 2.0 but I'm looking for a fairly 
robust and

easy-to-go integration of my Web framework and my portal.

Hope to be clear !

Cheers,

Pierre



--
Parce que c'est la nuit qu'il est beau de croire en la lumière.




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


  



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



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Basic print.css question

2008-11-07 Thread Nino Saturnino Martinez Vazquez Wael
You should really install firebug and web developer on firefox. Both 
will help you figure out what wrong when you hit problems like this..


Jim Pinkham wrote:

Sorry this isn't so wicket specific, but I think I'm doing this media type
thing correctly - what am I missing?  Here's the view-source of my wicket
page:

head
  titleFirst Unitarian Universalist Church of Columbus Auction 2009/title
  link href=app.css rel=stylesheet type=text/css media=all/
  link href=print.css rel=stylesheet type=text/css media=print/
/head
body
  div id=navcontainer
h2 align=centerFirstUU Auction span wicket:id=year22009/span/h2

ul id=navlist
  wicket:link
lia href=./Home Page/a/li
lia 
href=?wicket:bookmarkablePage=:org.firstuucolumbus.auction.page.CatalogPageAuction
Catalog/a/li
lia href=CalendarPage.htmlEvent Calendar/a/li
lia 
href=?wicket:bookmarkablePage=:org.firstuucolumbus.auction.page.StatementPageMy
Statement/a/li
  /wicket:link
/ul
span class=noprint wicket:id=helloWelcome Jim Pinkham/span

yadda yadda yadda.

For some reason, when I do print-preview, I'm still seeing the ul
id=navlist element and the last line span class=noprint ... Welcome
...

app.css and print.css are in the same folder, and print.css starts with:

div#footer ul#navlist, #noprint
{
display: none;
}

All the app.css styles are applied properly, but the display:none doesn't
seem to be taking effect on the class=noprint or the ul#navlist.

Thanks,
-- Jim.

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: wicket terracotta integration is out

2008-11-07 Thread Nino Saturnino Martinez Vazquez Wael

Okay great, and thanks :)

richardwilko wrote:

Well the module also includes an terracotta xml config file so that
terracotta knows which internal wicket classes could be clustered, but apart
from that there is nothing else.

I don't have any example applications but an normal application can be
turned to a clustered one quite easily.  I will have a look at modifying one
of the wicket sample applications to use it as an example.

If you are unfamiliar with terracotta then i recommend reading up on it on
their website first, but its not that hard to get started.  If you are using
eclipse then they have a good eclipse plugin which can help you get started.

Richard



Nino.Martinez wrote:
  
Interesting, are it really that simple as using the terracotta page map? 
And are there any example web applications using it?


Are there any recommended settings for the tim-wicket with terracotta.. 
Im pretty unfamiliar with terracotta so im asking a bit in blind here.



regards nino

richardwilko wrote:


Hi,

Just a quick announcement that the long awaited updated wicket terracotta
integration module (tim) is out.

You can find it here: 
http://forge.terracotta.org/releases/projects/tim-wicket/

http://forge.terracotta.org/releases/projects/tim-wicket/  and further
instructions on my blog here: 
http://richard-wilkinson.co.uk/2008/11/05/terracotta-and-wicket-the-next-generation/

http://richard-wilkinson.co.uk/2008/11/05/terracotta-and-wicket-the-next-generation/
.

Feedback and bug reports would be appreciated, as i haven't had chance to
test the code on a large scale system for a while now.

Richard

-
http://www.richard-wilkinson.co.uk My blog:
http://www.richard-wilkinson.co.uk 
  
  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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







-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: TextField inside a ModalWindow problems

2008-11-07 Thread Nino Saturnino Martinez Vazquez Wael
As I can remember you have to turn the confirmation message off (the 
modal one) or something in order to make it work with ajax.


richardwilko wrote:

It still seems as though the form is trying to submit in a non-ajax way, as
this is the same as navigating to a different url, which is why your modal
window is asking for confirmation.

You still need prototype for the wicket version, as that is just the js code
wrapped up in a wicket behavior.

try something like this:
$('formId').observe('submit', function(e){ Event.stop(e);}); in your modal
window html, where formId is the dom id of the form causing the trouble.

That should stop any non-ajax submits from the form, however a possibility
is that the wicket code detects the submit before the other code has a
chance to stop it, so this method may not work.

I also found this which may help you 
http://www.arraystudio.com/as-workshop/disable-form-submit-on-enter-keypress.html
http://www.arraystudio.com/as-workshop/disable-form-submit-on-enter-keypress.html 

Richard 



ulrik wrote:
  

Hmm, it did not work for me..
I tried the wicket version, but it still askes me if I want to navigate
away from the page when I hit enter in the TextField







-
http://richard-wilkinson.co.uk My blog: http://richard-wilkinson.co.uk 
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: ajax request and hibernate lazy loading

2008-11-07 Thread Nino Saturnino Martinez Vazquez Wael

Yep that was also what I were thinking.

Martijn Dashorst wrote:

I would actually keep using OSIV.

To answer the question: probably you are using models wrong. If OSIV
works for your normal requests, it works for Ajax requests. There is
nothing different between these requests.

Martijn

On Fri, Nov 7, 2008 at 1:33 PM, Bruno Borges [EMAIL PROTECTED] wrote:
  

With Ajax request I would probably avoid that pattern.
That could lead to serious problems.

How about having a different method to load the object with the required
data for that specific ajax request?

cheers,
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

The glory of great men should always be
measured by the means they have used to
acquire it.
- Francois de La Rochefoucauld


On Fri, Nov 7, 2008 at 1:27 PM, miro [EMAIL PROTECTED] wrote:



I am using hibernate and all my collections are lazy  , they get loaded
only
when called . I am also using ajax to get collection property on click ,
but
i am getting Lazy loading exception  for ajax  request where I load the
collection ,  I am using
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter  ,Please
help mehow to use OpenSessionInViewFilterwith ajax calls ?
--
View this message in context:
http://www.nabble.com/ajax-request-and-hibernate-lazy-loading-tp20387124p20387124.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


  




  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: avoid ajax response evaluate javascript

2008-11-06 Thread Nino Saturnino Martinez Vazquez Wael

theres a prepend / append js on ajaxRequestTarget, that should work...

francisco treacy wrote:

hi,

we're using a home-grown wrapper for integrating jquery into wicket -
specifically for jquery effects.

and i'm having some trouble with ajax updates. i'll explain with an example:


final WebMarkupContainer listOfCommentsContainer = new
WebMarkupContainer(listOfCommentsContainer);
listOfCommentsContainer.setOutputMarkupId(true);
add(listOfCommentsContainer);

AjaxLinkVoid numberOfCommentsLink = new
AjaxLinkVoid(numberOfCommentsLink) {
@Override
public void onClick(AjaxRequestTarget target) {
target.addComponent(listOfCommentsContainer);
}
};

listOfCommentsContainer.add(new JQueryEffectBehavior(new
SlideToggleEffect(), numberOfCommentsLink));

add(numberOfCommentsLink);

this code is basically outputting something like:

script type=text/javascript !--/*--![CDATA[/*!--*/
Wicket.Event.add(window, domready, function() {
$('#numberOfCommentsLink24').click(function() {
$('#listOfCommentsContainer25').slideToggle(450); }) ;});
/*--]]*//script

listOfCommentsContainer25 being the target container to slide,
numberOfCommentsLink24 the trigger.

this works fine per se. now when i click on numberOfCommentsLink24 ,
my list is refreshed (added it to the ajaxrequesttarget) and the
effect behaviour outputting javascript code again...

ajax-responseheader-contribution![CDATA[head
xmlns:wicket=http://wicket.apache.org;script type=text/javascript
src=resources/hub.app.wicket.components.jquery.JQueryResourceReference/jquery-1.2.6.js/script
script type=text/javascript
src=resources/hub.app.wicket.components.jquery.JQueryEffectCoreResourceReference/jquery-1.2.6.effects.core.js/script
/head]]/header-contribution
(...)
evaluate![CDATA[$('#numberOfCommentsLink24').click(function() {
$('#listOfCommentsContainer25').slideToggle(450); })
]]/evaluate/ajax-response

which means that i can visually perceive a very quick slideDown
followed by a slideUp (this is the normal slideToggle functionality).

is there a way not to include the evaluate part?  or detect if the
component has already been rendered in markup to check whether to
execute the behaviour again?
perhaps i'm missing some basic point here... any suggestions?

thanks in advance,

francisco

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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: avoid ajax response evaluate javascript

2008-11-06 Thread Nino Saturnino Martinez Vazquez Wael

Hi Francisco

It did.. You could try the isTemporary (return true) on the behavior, it 
could mean that it will only add the behavior for that request, but I am 
not sure.. Or you could try creating a new markupcontainer 
(listOfCommentsContainer), it'll give it a new id..


Or you could stuff in some logic as a ajaxcalldecorator on your link, 
that will clean it up in pure js...


I had some difficulties with exactly this when I did the wicket reaction 
game.


I hope this helpes..

francisco treacy wrote:

want to not output the list with wicket's ordinary ajax replace method?



hmmm... wicket's ordinary ajax replace method?

the basic problem here is:
-when the page is first rendered, the following is added to the dom
(it's the behaviour responsible for this):

$('#numberOfCommentsLink24').click(function() {
$('#listOfCommentsContainer25').slideToggle(450); })

-when i click on the trigger link (numberOfCommentsLink24) i fire an
ajax request, and add a webmarkupcontainer (listOfCommentsContainer25)
i want to refresh:

target.addComponent(listOfCommentsContainer);

-the ajax response is: *not only* the updated
listOfCommentsContainer25, but *also* an evaluate section in the
ajax response, that includes:

$('#numberOfCommentsLink24').click(function() {
$('#listOfCommentsContainer25').slideToggle(450); })

(of course, because the behaviour has been added to the
listOfCommentsContainer).


-... that means, i now have loaded in the dom *twice* :

$('#numberOfCommentsLink24').click(function() {
$('#listOfCommentsContainer25').slideToggle(450); })

so with *one* click on the numberOfCommentsLink24 , i get *two* calls
to  $('#listOfCommentsContainer25').slideToggle(450);

which basically slides up, and immediately down. that is, slide toggle
means it goes up (hides) if it was down (visible), it goes down
(shows) if it was up (hidden).

i want to avoid this behaviour by stopping the ajax response from
spitting back the javascript code for a second time. perhaps do
something inside the behaviour class?

hope it clarifies! thanks,

francisco



On Thu, Nov 6, 2008 at 1:53 PM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  

Im not sure I understand then..? Could you explain another way? You would
want to not output the list with wicket's ordinary ajax replace method?

francisco treacy wrote:


yes, i'm aware of those. but i'd want to 'remove' things from the
ajaxRequestTarget rather than append...

or, some way of attaching/executing behaviours only once?


On Thu, Nov 6, 2008 at 12:58 PM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:

  

theres a prepend / append js on ajaxRequestTarget, that should work...

francisco treacy wrote:



hi,

we're using a home-grown wrapper for integrating jquery into wicket -
specifically for jquery effects.

and i'm having some trouble with ajax updates. i'll explain with an
example:


final WebMarkupContainer listOfCommentsContainer = new
WebMarkupContainer(listOfCommentsContainer);
listOfCommentsContainer.setOutputMarkupId(true);
add(listOfCommentsContainer);

AjaxLinkVoid numberOfCommentsLink = new
AjaxLinkVoid(numberOfCommentsLink) {
  @Override
  public void onClick(AjaxRequestTarget target) {

 target.addComponent(listOfCommentsContainer);
  }
  };

listOfCommentsContainer.add(new JQueryEffectBehavior(new
SlideToggleEffect(), numberOfCommentsLink));

add(numberOfCommentsLink);

this code is basically outputting something like:

script type=text/javascript !--/*--![CDATA[/*!--*/
Wicket.Event.add(window, domready, function() {
$('#numberOfCommentsLink24').click(function() {
$('#listOfCommentsContainer25').slideToggle(450); }) ;});
/*--]]*//script

listOfCommentsContainer25 being the target container to slide,
numberOfCommentsLink24 the trigger.

this works fine per se. now when i click on numberOfCommentsLink24 ,
my list is refreshed (added it to the ajaxrequesttarget) and the
effect behaviour outputting javascript code again...

ajax-responseheader-contribution![CDATA[head
xmlns:wicket=http://wicket.apache.org;script type=text/javascript


src=resources/hub.app.wicket.components.jquery.JQueryResourceReference/jquery-1.2.6.js/script
script type=text/javascript


src=resources/hub.app.wicket.components.jquery.JQueryEffectCoreResourceReference/jquery-1.2.6.effects.core.js/script
/head]]/header-contribution
(...)
evaluate![CDATA[$('#numberOfCommentsLink24').click(function() {
$('#listOfCommentsContainer25').slideToggle(450); })
]]/evaluate/ajax-response

which means that i can visually perceive a very quick slideDown
followed by a slideUp (this is the normal slideToggle functionality).

is there a way not to include the evaluate part?  or detect if the
component has already been rendered in markup to check whether to
execute the behaviour again?
perhaps i'm missing some basic point here... any suggestions?

thanks in advance,

francisco

Re: avoid ajax response evaluate javascript

2008-11-06 Thread Nino Saturnino Martinez Vazquez Wael
Im not sure I understand then..? Could you explain another way? You 
would want to not output the list with wicket's ordinary ajax replace 
method?


francisco treacy wrote:

yes, i'm aware of those. but i'd want to 'remove' things from the
ajaxRequestTarget rather than append...

or, some way of attaching/executing behaviours only once?


On Thu, Nov 6, 2008 at 12:58 PM, Nino Saturnino Martinez Vazquez Wael
[EMAIL PROTECTED] wrote:
  

theres a prepend / append js on ajaxRequestTarget, that should work...

francisco treacy wrote:


hi,

we're using a home-grown wrapper for integrating jquery into wicket -
specifically for jquery effects.

and i'm having some trouble with ajax updates. i'll explain with an
example:


final WebMarkupContainer listOfCommentsContainer = new
WebMarkupContainer(listOfCommentsContainer);
listOfCommentsContainer.setOutputMarkupId(true);
add(listOfCommentsContainer);

AjaxLinkVoid numberOfCommentsLink = new
AjaxLinkVoid(numberOfCommentsLink) {
   @Override
   public void onClick(AjaxRequestTarget target) {

 target.addComponent(listOfCommentsContainer);
   }
   };

listOfCommentsContainer.add(new JQueryEffectBehavior(new
SlideToggleEffect(), numberOfCommentsLink));

add(numberOfCommentsLink);

this code is basically outputting something like:

script type=text/javascript !--/*--![CDATA[/*!--*/
Wicket.Event.add(window, domready, function() {
$('#numberOfCommentsLink24').click(function() {
$('#listOfCommentsContainer25').slideToggle(450); }) ;});
/*--]]*//script

listOfCommentsContainer25 being the target container to slide,
numberOfCommentsLink24 the trigger.

this works fine per se. now when i click on numberOfCommentsLink24 ,
my list is refreshed (added it to the ajaxrequesttarget) and the
effect behaviour outputting javascript code again...

ajax-responseheader-contribution![CDATA[head
xmlns:wicket=http://wicket.apache.org;script type=text/javascript

src=resources/hub.app.wicket.components.jquery.JQueryResourceReference/jquery-1.2.6.js/script
script type=text/javascript

src=resources/hub.app.wicket.components.jquery.JQueryEffectCoreResourceReference/jquery-1.2.6.effects.core.js/script
/head]]/header-contribution
(...)
evaluate![CDATA[$('#numberOfCommentsLink24').click(function() {
$('#listOfCommentsContainer25').slideToggle(450); })
]]/evaluate/ajax-response

which means that i can visually perceive a very quick slideDown
followed by a slideUp (this is the normal slideToggle functionality).

is there a way not to include the evaluate part?  or detect if the
component has already been rendered in markup to check whether to
execute the behaviour again?
perhaps i'm missing some basic point here... any suggestions?

thanks in advance,

francisco

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


  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: wicket terracotta integration is out

2008-11-06 Thread Nino Saturnino Martinez Vazquez Wael
Interesting, are it really that simple as using the terracotta page map? 
And are there any example web applications using it?


Are there any recommended settings for the tim-wicket with terracotta.. 
Im pretty unfamiliar with terracotta so im asking a bit in blind here.



regards nino

richardwilko wrote:

Hi,

Just a quick announcement that the long awaited updated wicket terracotta
integration module (tim) is out.

You can find it here: 
http://forge.terracotta.org/releases/projects/tim-wicket/

http://forge.terracotta.org/releases/projects/tim-wicket/  and further
instructions on my blog here: 
http://richard-wilkinson.co.uk/2008/11/05/terracotta-and-wicket-the-next-generation/

http://richard-wilkinson.co.uk/2008/11/05/terracotta-and-wicket-the-next-generation/
.

Feedback and bug reports would be appreciated, as i haven't had chance to
test the code on a large scale system for a while now.

Richard

-
http://www.richard-wilkinson.co.uk My blog:
http://www.richard-wilkinson.co.uk 
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: adding favicon using behavior

2008-11-05 Thread Nino Saturnino Martinez Vazquez Wael

Yup like so, just change it to link instead of meta:

public class SiteAHeader extends AbstractBehavior implements
   IHeaderContributor {

   public void renderHead(IHeaderResponse response) {

   response
   .renderString(meta name=\description\ 
content=\description\ /);

   }

}


Igor Vaynberg wrote:

use iheadercontributor

-igor

On Tue, Nov 4, 2008 at 11:43 PM, Eyal Golan [EMAIL PROTECTED] wrote:
  

Hi,
We have a behavior that is added to our main page (we use markup
inheritance).
In the behavior we add CSS links (and JS).
We want to add a favicon as well.
Here's what we did:
response.getResponse().write(link rel=\SHORTCUT ICON\
href=\/resources/favicon.ico\/\n);

Is this the best way?

Thanks

--
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary




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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: PageExpiredException on production

2008-11-05 Thread Nino Saturnino Martinez Vazquez Wael
It's on as default.. But checking the log for serializing errors will 
help you find out what the problem are..


rivkash1 wrote:

How do i check if the serializer is on/off? What's the defualt?


Nino.Martinez wrote:
  

Did you actively turn serializer check off?

rivkash1 wrote:


we set Wicket's logging level on production to DEBUG
I don't see any non-serializable errors.
How do i turn on the serializer check?

thanks
Rebecca


Martijn Dashorst wrote:
  
  

Check your logs for non-serializable errors (or test your application
locally with development mode on, and make sure the serializer check
is not turned off). This is the most common case for page expired
errors.

Martijn

On Wed, Sep 3, 2008 at 10:45 AM, rivkash1 [EMAIL PROTECTED] wrote:



Hi Martijn

NiteWebRequestCycleProcessor is a Class we added to the application 2
days
ago. It extends Wicket's WebRequestCycleProcessor and adds some
messages
to
the log to get more information about the problem.

The PageExpiredException is a problem that we have on production for a
couple of weeks - long before the NiteWebRequestCycleProcessor class
was
created in the application.

thanks
Rebecca


Martijn Dashorst wrote:
  
  

Sounds like a bug in your NiteWebRequestCycleProcessor

Martijn

On Wed, Sep 3, 2008 at 10:29 AM, rivkash1 [EMAIL PROTECTED] wrote:



Hello again,

does someone have any more ideas about our problem?
It is very problematic to work in production when the users are
thrown
out
with exception each hour...

thanks
Rebecca


rivkash1 wrote:
  
  

hello all,

We are working with Wicket (1.3.4) on production for a couple of
months.
It runs within jetty 6.1.7.
For some weeks, we are experiencing a strange PageExpiredException
which
happens only on production env.

It mostly happens on 2 main Pages in which the users submit the same
form
in a rolling manner (i.e. fill the form fields, submit the form, the
user
is redirected to the same page with a clean form and fills the form
with
new data and so on repeatedly).

It isn't a problem of session expiration because our session timeout
is
set to 10 hours, this is the setting in our web.xml file:

session-config
session-timeout600/session-timeout
/session-config

We changed the logging level of Wicket to DEBUG, I'm attaching only
a
little fraction from our log file,
you can see the whole exception in the file attached to this post:

This message is printed in level of warning, yet it is just for
tracing:
invoked resolve! RequestParameters:
[RequestParameters  componentPath=4:registrationManagementForm
pageMapName=null versionNumber=0 interfaceName=IActivePageBehav
iorListener componentId=null behaviorId=1 urlDepth=-1
parameters={random=0.14328683405517095,amp;wicket:ignoreIfNotActive=true
} onlyProcessIfPathActive=false]
-

2008-09-01 15:18:47,372 [WARN ]
security.authentication.NiteWebRequestCycleProcessor  -
= ENTER ==
==
This message is printed in level of warning, yet it is just for
tracing:
invoked resolveRenderedPage! RequestParameters:
[RequestParameters  componentPath=4:registrationManagementForm
pageMapName=null versionNumber=0 interfaceName=IActivePageBehav
iorListener componentId=null behaviorId=1 urlDepth=-1
parameters={random=0.14328683405517095,amp;wicket:ignoreIfNotActive=true
} onlyProcessIfPathActive=false]
-

2008-09-01 15:18:47,372 [DEBUG] apache.wicket.Session  - Getting
page
[path = 4:registrationManagementForm, versionNumber = 0]
2008-09-01 15:18:47,376 [WARN ]
security.authentication.NiteWebRequestCycleProcessor  -
-
completed resolveRenderedPage! EXIT
=
2008-09-01 15:18:47,377 [WARN ]
security.authentication.NiteWebRequestCycleProcessor  -
= ENTER ==
==
This message is printed in level of warning, yet it is just for
tracing:
invoked respond(RuntimeException e, RequestCycle requestCycle)!
-

2008-09-01 15:18:47,377 [WARN ]
security.authentication.NiteWebRequestCycleProcessor  -
= ENTER ==
==
This message is printed in level of warning, yet it is just for
tracing:
invoked onRuntimeException!
-

2008-09-01 15:18:47,377 [ERROR]
security.authentication.NiteWebRequestCycleProcessor  -
onRuntimeException
stack:
org.apache.wicket.protocol.http.PageExpiredException: Cannot find
the
rendered page in session [pagemap=null,componentPath=4:r
egistrationManagementForm,versionNumber=0]
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:181)
at

Re: How to terminate the session on not bookmarkable page?

2008-11-05 Thread Nino Saturnino Martinez Vazquez Wael
Okay so onfinish redirect to a page which tells the message and 
invalidates and are bookmarkable.  Or just clear the pagemap...


Matthias Keller wrote:

Hi

Would be another possibility, but it doesn't change nothing at all - I 
still get the page expired thingy, which I also really would expect in 
this case...
It works if I use a bookmarkable page, but I dont want a fixed URL on 
the confirmation page which displays dynamic data from the wizard


Thanks

Matt

Nino Saturnino Martinez Vazquez Wael wrote:
Hmm why not to it 
org.apache.wicket.extensions.wizard.Wizard#onFinish()  .. ?


Matthias Keller wrote:

Hi

I've got a wizard letting the user enter some information.
In the onFinish() method, I redirect him to my ConfirmationPage:
setResponsePage(new ConfirmationPage());
(I chose the instance method instead of the class method as I don't 
want to have a bookmarkable page there)


On the ConfirmationPage I need access to the session a last time to 
display a message like:

Thank you Mr XXX, you'll hear from us soon

After that I want to invalidate my session so that all the wizard 
pages are becoming inaccessible (I have to set them to versioned as 
the customer wants back button support inside the wizard...).
Unfortunately, when I call  getSession().invalidate();  anywhere in 
my ConfirmationPage (be it the constructor, onAfterRender() or even 
onDetach()), I'll never see the ConfirmationPage as I get the Page 
Expired message instead
How can I achieve the destruction of the session (and thus the 
pages) but still display this one last page? Reloading this 
confirmation page may give the  Page Expired  message, I dont care.


Thanks

Matt








--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: How to terminate the session on not bookmarkable page?

2008-11-05 Thread Nino Saturnino Martinez Vazquez Wael
Hmm why not to it org.apache.wicket.extensions.wizard.Wizard#onFinish()  
.. ?


Matthias Keller wrote:

Hi

I've got a wizard letting the user enter some information.
In the onFinish() method, I redirect him to my ConfirmationPage:
setResponsePage(new ConfirmationPage());
(I chose the instance method instead of the class method as I don't 
want to have a bookmarkable page there)


On the ConfirmationPage I need access to the session a last time to 
display a message like:

Thank you Mr XXX, you'll hear from us soon

After that I want to invalidate my session so that all the wizard 
pages are becoming inaccessible (I have to set them to versioned as 
the customer wants back button support inside the wizard...).
Unfortunately, when I call  getSession().invalidate();  anywhere in my 
ConfirmationPage (be it the constructor, onAfterRender() or even 
onDetach()), I'll never see the ConfirmationPage as I get the Page 
Expired message instead
How can I achieve the destruction of the session (and thus the pages) 
but still display this one last page? Reloading this confirmation page 
may give the  Page Expired  message, I dont care.


Thanks

Matt



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: WASP/SWARM status

2008-11-04 Thread Nino Saturnino Martinez Vazquez Wael
Hehe, I can understand... I figure that Maurice where playing around 
with wicket 1.4 and wicket security, and created a branch for it.. So my 
bet are that it probably need a lot of updates, to get it going.. If 
it's still unmaintained. And I actually wrote an mail to the dev list 
about the continuation of swarm, but thats a while ago..


http://www.nabble.com/In-memoriam%3A-Maurice-Marrink-td18813738.html#a18932415

I might have been asking too quickly. But the question still remains to 
be answered. And it would be a real shame if nobody continued it.


Wayne Pope wrote:

hi Nino,

no I was looking at :
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security/

let me checkout the other and have a look

I never know where I'm ment to find things with Wicket!

On Tue, Nov 4, 2008 at 10:10 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

I've been wondering the same thing...

Where this what you looked at?


https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-security-1.4-earlyaccess/


Wayne Pope wrote:



Hi,

After the staggering loss of Maurice I was wondering if anyone had picked
up
the baton with WASP/SWARM?
I look at svn and the last update was from mrmean so I presume not.

I just wanted to check

Thanks
Wayne



  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Advice for a YUI Button Component

2008-11-04 Thread Nino Saturnino Martinez Vazquez Wael
Sure.. Just make the javascript call what ever the link calls.. You can 
see the input events contrib on wicketstuff on howto do this..


Adriano dos Santos Fernandes wrote:

Hi!

I didn't found any project integrating YUI Button with Wicket, and I'd 
want it. The problem that I'm seen is that onclick should not be on 
the button tag, but specified from javascript.


Would be possible to have *Link classes working (inheriting, or with 
behaviors) this way without need to reimplement all them?


Thanks,


Adriano


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



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Wicket integration with good charts api

2008-11-04 Thread Nino Saturnino Martinez Vazquez Wael
You do know there are an abundance of jfreecharts right, they are highly 
customizable.. And theres even a javaweb start thing where they demo 
it... But you probably did show them this...


http://www.jfree.org/jfreechart/jfreechart-1.0.11-demo.jnlp

Tomasz Dziurko wrote:

My client needs in his application very good looking charts (simple
bars with some gradienst and 3D effects). Unfortunately he didn't like
what JFreeChart library offers so I must find and implement another
solution.
Questions are:
1. Is there any other chart library easy to integrate with Wicket?
2.off-topicWhich chart api (could be me commercial, client is
paying) could you suggest?/off-topic

Thank you for your help

Regards
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: No behavior listener found

2008-11-04 Thread Nino Saturnino Martinez Vazquez Wael

Hi Martin

I got them a lot when creating the wicket reaction game.. For me the 
problem where that I added new components all the time and if in the 
mean time the component disappared (we are talking miliseconds) and the 
user managed to click the cells then they would get the problem..


Martin Makundi wrote:

Hi!

What does this error mean?

No behavior listener found with behaviorId 0

What is being done wrong? Normally, the site works ok but the error
log shows this kind of error.

Am I manifesting some known Wicket antipattern which causes this
error? Or is it just a result of another illegal state?

   at 
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:95)
   at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
   at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1174)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1251)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1352)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
   at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:375)
   at 
org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:145)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at wicket.quickstart.TakpServlet.service(TakpServlet.java:58)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
   at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
   at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
   at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
   at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:285)
   at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
   at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:203)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
   at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:217)
   at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)


**
Martin

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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: WASP/SWARM status

2008-11-04 Thread Nino Saturnino Martinez Vazquez Wael

I've been wondering the same thing...

Where this what you looked at?

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-security-1.4-earlyaccess/

Wayne Pope wrote:

Hi,

After the staggering loss of Maurice I was wondering if anyone had picked up
the baton with WASP/SWARM?
I look at svn and the last update was from mrmean so I presume not.

I just wanted to check

Thanks
Wayne

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: WASP/SWARM status

2008-11-04 Thread Nino Saturnino Martinez Vazquez Wael

Great :)

And please ask if you run into troubles..And if no one comes back on 
this say that they have something that they just need to checkin (which 
are unlikely to happen). You can check it in, do you have svn rights?


Wayne Pope wrote:

I'm going to see if I can get it working against 1.4 m3

On Tue, Nov 4, 2008 at 10:25 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

Hehe, I can understand... I figure that Maurice where playing around with
wicket 1.4 and wicket security, and created a branch for it.. So my bet are
that it probably need a lot of updates, to get it going.. If it's still
unmaintained. And I actually wrote an mail to the dev list about the
continuation of swarm, but thats a while ago..


http://www.nabble.com/In-memoriam%3A-Maurice-Marrink-td18813738.html#a18932415

I might have been asking too quickly. But the question still remains to be
answered. And it would be a real shame if nobody continued it.


Wayne Pope wrote:



hi Nino,

no I was looking at :

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-security/

let me checkout the other and have a look

I never know where I'm ment to find things with Wicket!

On Tue, Nov 4, 2008 at 10:10 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:



  

I've been wondering the same thing...

Where this what you looked at?



https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-security-1.4-earlyaccess/


Wayne Pope wrote:





Hi,

After the staggering loss of Maurice I was wondering if anyone had
picked
up
the baton with WASP/SWARM?
I look at svn and the last update was from mrmean so I presume not.

I just wanted to check

Thanks
Wayne





  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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







  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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





  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: JavaScript Framework Dependencies / Wicket Stuff commit access

2008-11-03 Thread Nino Saturnino Martinez Vazquez Wael
Yup, just give an project name and I can setup jira and teamcity if you 
want?


Igor Vaynberg wrote:

you have svn. nino can set you up with the rest soon.

-igor

On Sun, Nov 2, 2008 at 1:33 PM, Uwe Schäfer [EMAIL PROTECTED] wrote:
  

Igor Vaynberg schrieb:



i´m just wondering why there isn´t a project like
org.wicketstuff.javascript.mootools/jquery/extjs/whatever


why? because you havent built it yet. wicketstuff is open for
participation, feel free.
  

the answer i was hoping for ;)

i´d like to ask for permission to commit org.wicketstuff.js.mootools project
then and maybe some simple behaviours using it afterwards.

sourceforge/teamcity/jira acount: uweschaefer

cu uwe

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





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

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: DropDownChoices where Model is different from Data

2008-11-03 Thread Nino Saturnino Martinez Vazquez Wael

Hi

since it's java development, the only limit are your mind (now all your 
ruby guys dont hit me).. As you write yourself just create a 
choicerenderer, then choicerenderer itself can decide howto display data..


And yes if you chain stuff and implement your own model etc you can do 
it all your own way..


jensiator wrote:
Hi. 
I have a form model containing a idKey that is supposed to be selected from

a dropdownchoice. Does anyone know if its possible have a complex data type
in the dropdownchoice when the model is only a idKey? The dropdownchoice
wants to set the complex data type in the form model. 
For example in a dropdownconstructor:

public MyDropDown(String pId,PropertyModelUUID pModel){
super(pId,new LoadableDetachableModelMyClass(){

   protected ListMyClass load() 
   {

   return requestClasses();
   }

})
setChoiceRenderer(new ChoiceRendererMyclass(displayName, idKey));

would It be possible to link the pModel in another model (SpecialModel) to
accomplish this? Like: setModel(new SpecialModel(pModel));

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: PageParameters in wicket 1.2.7 problem

2008-11-03 Thread Nino Saturnino Martinez Vazquez Wael

Hi Rik

Im not sure about this, it's been some months(if not years) since i've 
touched 1.2.x.  How are you linking to verification page when logged in, 
for me it looks like you are not using pageparameters at all but instead 
just instantiate the page with an other constructor..


Rik Overvelde wrote:

Hey everyone,

I'm having a problem with page parameters in wicket 1.2.7 when 
multiple tabs are opened. I'm working on a verification system for 
email adresses, which sends a mail with an url containing a guid to a 
user. I've mounted the page using a queryStringUrlCodingStrategy which 
results in an address like: 
http://page.com/verificatie?code=0572f18d-a9b1-4b92-bb89-7243b9e35d24.
When the link is opened while you're already logged in though, wicket 
changes the url while loading in something like this: 
http://page.com/verificatie?code=%5BLjava.lang.String%3B%4087bf0bwicket:pageMapName=wicket-0 

From what I understand, this is a known issue with wicket 1.2 and is 
solved in wicket 1.3. The application I'm working on however is 
already fairly large and because of time constraints it is impossible 
right now to migrate to 1.3 so I'm looking for a workaround for this.


One thing that I've been thinking about is to have the verification 
link point you to a non wicket servlet, which writes the guid to its 
session, then forwards you to a wicket page that retrieves the guid 
from the other servlets session. Is there a way to get the other 
servlets session in wicket?


If anyone has another suggestions for getting around this problem I'd 
love to hear it.


With regards,

Rik Overvelde


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



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Testing + IFrame

2008-11-03 Thread Nino Saturnino Martinez Vazquez Wael

So in pseudo code you would:

tester.getForm.add(IVisitorImplementation) ???


Timo Rantalaiho wrote:

On Fri, 31 Oct 2008, Bert van Heukelom wrote:
  

I want to test an ajax upload component that uses an IFrame. I have
difficulties when trying to access Components via their path that are
contained in the IFrame. I manage to a reference of the Iframe but can not
find a path-string that accesses a component (namly a form) within the
Iframe.



Try doing wicketTester.debugComponentTrees() (or debugging 
the exact hierarchy by yourself).


  

FormTester f =
wicketTester.newFormTester(path:to:my:iframe:and:to:its:inner:form);



Long component paths like this are a bit problematic anyway.
You could try digging your Form up with a visitor to make it
less dependent on the path.

Best wishes,
Timo

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: example application for spring wicket hibernate

2008-11-03 Thread Nino Saturnino Martinez Vazquez Wael

no need for that unless you want to commit

miro wrote:

whats the username password for svn repositorty  ?

Tomasz Dziurko wrote:
  

Phonebook:
http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook .

If you need NetBeans project for it just tell me, I have it somewhere
on the disc

Regards
--
Tomasz Dziurko

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






  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: PageParameters in wicket 1.2.7 problem

2008-11-03 Thread Nino Saturnino Martinez Vazquez Wael
Strange, but as you said you had the idea that it could be a bug. But it 
still strikes me a bit strange that the page are redirected, and results 
in an modifified link.. Could you provide a cut out of the code?


Otherwise the idea with the servlet should be fine, I think you can 
enable shared sessions somewhere in tomcat at least... Otherwise you 
could do it with an encrypted session cookie..


Rik Overvelde wrote:

Hi Nino,

I don't link to the verification page from inside the application 
itself. Instead, the link is send in an email to the user when he 
changes his email adress. When they click the link, the page is 
opened. In a lot of cases the users are still logged in on the 
application, meaning that a second tab is opened. If that is the case, 
the url changes in the way that I described. If there is no other tab 
with the application open when the user clicks the link, the page 
works fine (meaning that the page parameters are being read). Also, 
when the bug occurs it triggers an error message which tells that the 
given code is incorrect, which means that the page parameters are read 
at that point as well.




Nino Saturnino Martinez Vazquez Wael wrote:

Hi Rik

Im not sure about this, it's been some months(if not years) since 
i've touched 1.2.x.  How are you linking to verification page when 
logged in, for me it looks like you are not using pageparameters at 
all but instead just instantiate the page with an other constructor..


Rik Overvelde wrote:

Hey everyone,

I'm having a problem with page parameters in wicket 1.2.7 when 
multiple tabs are opened. I'm working on a verification system for 
email adresses, which sends a mail with an url containing a guid to 
a user. I've mounted the page using a queryStringUrlCodingStrategy 
which results in an address like: 
http://page.com/verificatie?code=0572f18d-a9b1-4b92-bb89-7243b9e35d24.
When the link is opened while you're already logged in though, 
wicket changes the url while loading in something like this: 
http://page.com/verificatie?code=%5BLjava.lang.String%3B%4087bf0bwicket:pageMapName=wicket-0 

From what I understand, this is a known issue with wicket 1.2 and is 
solved in wicket 1.3. The application I'm working on however is 
already fairly large and because of time constraints it is 
impossible right now to migrate to 1.3 so I'm looking for a 
workaround for this.


One thing that I've been thinking about is to have the verification 
link point you to a non wicket servlet, which writes the guid to its 
session, then forwards you to a wicket page that retrieves the guid 
from the other servlets session. Is there a way to get the other 
servlets session in wicket?


If anyone has another suggestions for getting around this problem 
I'd love to hear it.


With regards,

Rik Overvelde


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






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



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Testing + IFrame

2008-11-03 Thread Nino Saturnino Martinez Vazquez Wael

Argh really bad example, heres a better one:

tester.getComponent(basepath).getIframe().addvisitor or something?

And then visitor would have to sort out if the component probed were a 
form etc?


Nino Saturnino Martinez Vazquez Wael wrote:

So in pseudo code you would:

tester.getForm.add(IVisitorImplementation) ???


Timo Rantalaiho wrote:

On Fri, 31 Oct 2008, Bert van Heukelom wrote:
 

I want to test an ajax upload component that uses an IFrame. I have
difficulties when trying to access Components via their path that are
contained in the IFrame. I manage to a reference of the Iframe but 
can not

find a path-string that accesses a component (namly a form) within the
Iframe.



Try doing wicketTester.debugComponentTrees() (or debugging the exact 
hierarchy by yourself).


 

FormTester f =
wicketTester.newFormTester(path:to:my:iframe:and:to:its:inner:form);



Long component paths like this are a bit problematic anyway.
You could try digging your Form up with a visitor to make it
less dependent on the path.

Best wishes,
Timo

  




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: onclick event in a listview

2008-11-03 Thread Nino Saturnino Martinez Vazquez Wael

Add a link to the list item and override onclick

miro wrote:
I have  two tables side by side  in my page .   
Table 1  has two columns name, age


Table 2 has  details columnlike sex, address etc

when user selects  a name in table 1 i want  to update table two with
details of selected  name, is this possible , I was looking   for onClick on
listView but did not find , I want the event onlick on a list item 



if it is not there how can I achieve this functionality?
  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



Re: Testing + IFrame

2008-11-03 Thread Nino Saturnino Martinez Vazquez Wael

Ahh ok..

Timo now that you've mentioned jdave... Are there any way jdave supports 
plain text scenarios like jBehave?


Timo Rantalaiho wrote:

On Mon, 03 Nov 2008, Nino Saturnino Martinez Vazquez Wael wrote:
  

Argh really bad example, heres a better one:

tester.getComponent(basepath).getIframe().addvisitor or something?

And then visitor would have to sort out if the component probed were a 
form etc?



Something like 


Form form = (Form) tester.getLastRenderedPage().visitChildren(Form.class, new 
Component.IVisitorComponent() {
public Object component(Component component) {
return component;
});
FormTester = tester.newFormTester(form);

In jdave-wicket you have this bundled in and can do just

Form form = selectFirst(Form.class).from(context);

If there are more than one Form visible on the page, you have
to differentiate a bit more in the visitor and it gets more 
messy.


Best wishes,
Timo

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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



  1   2   3   4   5   6   7   8   9   10   >