Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Erik van Oosten
Johan Compagner wrote:
> So then we should give a Page a locale field.
I am in favour of doing this, even if Sebastiaan's problem is solved
differently. I have a part of my site that is multilingual (the public
pages), and another part is not (the admin screens, in English).
Unfortunately when the locale is say Dutch, a lot of default Wicket
texts are in Dutch while the rest of the page is in English.

Regards,
 Erik.



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



Re: CheckGroup in a DataView with another CheckGroup

2008-04-14 Thread Dreamltf

#AllowModel.class
import java.io.Serializable;
import java.util.ArrayList;

public class AllowModel implements Serializable {

private static final long serialVersionUID = 1L;

private Long id = null;

private ArrayList list = new ArrayList();

public AllowModel() {
super();
}

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public ArrayList getList() {
return list;
}

public void setList(ArrayList list) {
this.list = list;
}

}

#init model
AllowModel tempmodule = new AllowModel();
tempmodule.setId(tempdbmap.getRole());
allowmap.put(tempdbmap.getSerialID(), tempmodule);

#role Label
Label role = new Label("role", new PropertyModel((AllowModel)
allowmap.get(tempdbmap.getSerialID()),"id"));
arg0.add(role);

#othergroup
CheckGroup othergroup = new CheckGroup("othergroup",new
PropertyModel((AllowModel) allowmap.get(tempdbmap.getSerialID()), "list"));
othercontainer.add(othergroup);
-- 
View this message in context: 
http://www.nabble.com/CheckGroup-in-a-DataView-with-another-CheckGroup-tp16323358p16696200.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]



Re: CheckGroup in a DataView with another CheckGroup

2008-04-14 Thread Dreamltf

I found the better way

#AllowModel.class

import java.io.Serializable;
import java.util.ArrayList;

public class AllowModel implements Serializable {

private static final long serialVersionUID = 1L;

private Long id = null;

private ArrayList list = new ArrayList();

public AllowModel() {
super();
}

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public ArrayList getList() {
return list;
}

public void setList(ArrayList list) {
this.list = list;
}

}

#init model
AllowModel tempmodule = new AllowModel();
tempmodule.setId(tempdbmap.getRole());
allowmap.put(tempdbmap.getSerialID(), tempmodule);

#role Label
Label role = new Label("role", new PropertyModel((AllowModel)
allowmap.get(tempdbmap.getSerialID()),"id"));
arg0.add(role);

#othergroup
CheckGroup othergroup = new CheckGroup("othergroup",new
PropertyModel((AllowModel) allowmap.get(tempdbmap.getSerialID()), "list"));
othercontainer.add(othergroup);



Dreamltf wrote:
> 
> Thanks for your reply.
> 
> I upgraded to version 1.3.2, but still no help.
> 
> So, I changed a way to get the value
> 
> private HashMap allowmap = new HashMap();
> 
> #allowgroup
> CheckGroup allowgroup = new CheckGroup("allowgroup", new ArrayList());
> 
> #othergroup
> allowmap.put(item.getIndex(), new ArrayList());
> CheckGroup othergroup = new CheckGroup("othergroup", (List)
> allowmap.get(item.getIndex()));
> item.add(othergroup);
> 
> But I don't know is this a good way
> 
> 
> igor.vaynberg wrote:
>> 
>> we have just released 1.2.7 which is the last 1.2.x release we will make.
>> 
>> there is a patch on how to make this work in jira assigned to 1.3, you
>> can take that and roll your own checkgroup/check variants.
>> 
>> -igor
>> 
>> 
>> On Thu, Mar 27, 2008 at 1:41 AM, Dreamltf <[EMAIL PROTECTED]> wrote:
>>>
>>>  Hi all,
>>>
>>>  I want to use a CheckGroup (allowgroup) with a DataView, and there is
>>>  another CheckGroup (othergroup) in the inside of the DataView.
>>>  I can get the allowgroup's value,
>>>  but I can't get the othergroup's value.
>>>
>>>  submitform
>>>  allowgroup
>>> allowselector
>>> sortuid
>>> sortrole
>>> comments
>>> allowcheck
>>> uid
>>> role
>>> othergroup
>>> otheradd
>>> otherdelete
>>> otherquery
>>> otheredit
>>> otherselector
>>> navigator
>>>
>>>  I use a HashMap to be a Model Like this.
>>>
>>>  CheckGroup allowgroup = new CheckGroup("allowgroup", new
>>>  Model((Serializable) othermap.keySet()));
>>>  submitform.add(allowgroup);
>>>
>>>  CheckGroup othergroup = new CheckGroup("othergroup",
>>> new
>>> ArrayList());
>>> arg0.add(othergroup);
>>>
>>>  http://www.nabble.com/file/p16323358/checkbox_with_dataview.jpg
>>>
>>>  Wicket1.2.6
>>>  Thanks for help!!
>>>  --
>>>  View this message in context:
>>> http://www.nabble.com/CheckGroup-in-a-DataView-with-another-CheckGroup-tp16323358p16323358.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]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/CheckGroup-in-a-DataView-with-another-CheckGroup-tp16323358p16696197.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]



Re: CheckGroup in a DataView with another CheckGroup

2008-04-14 Thread Dreamltf

I found the better way

#AllowModel.class

import java.io.Serializable;
import java.util.ArrayList;

public class AllowModel implements Serializable {

private static final long serialVersionUID = 1L;

private Long id = null;

private ArrayList list = new ArrayList();

public AllowModel() {
super();
}

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public ArrayList getList() {
return list;
}

public void setList(ArrayList list) {
this.list = list;
}

}

#init model
AllowModel tempmodule = new AllowModel();
tempmodule.setId(tempdbmap.getRole());
allowmap.put(tempdbmap.getSerialID(), tempmodule);

#role Label
Label role = new Label("role", new PropertyModel((AllowModel)
allowmap.get(tempdbmap.getSerialID()),"id"));
arg0.add(role);

#othergroup
CheckGroup othergroup = new CheckGroup("othergroup",new
PropertyModel((AllowModel) allowmap.get(tempdbmap.getSerialID()), "list"));
othercontainer.add(othergroup);


Dreamltf wrote:
> 
> Thanks for your reply.
> 
> I upgraded to version 1.3.2, but still no help.
> 
> So, I changed a way to get the value
> 
> private HashMap allowmap = new HashMap();
> 
> #allowgroup
> CheckGroup allowgroup = new CheckGroup("allowgroup", new ArrayList());
> 
> #othergroup
> allowmap.put(item.getIndex(), new ArrayList());
> CheckGroup othergroup = new CheckGroup("othergroup", (List)
> allowmap.get(item.getIndex()));
> item.add(othergroup);
> 
> But I don't know is this a good way
> 
> 
> igor.vaynberg wrote:
>> 
>> we have just released 1.2.7 which is the last 1.2.x release we will make.
>> 
>> there is a patch on how to make this work in jira assigned to 1.3, you
>> can take that and roll your own checkgroup/check variants.
>> 
>> -igor
>> 
>> 
>> On Thu, Mar 27, 2008 at 1:41 AM, Dreamltf <[EMAIL PROTECTED]> wrote:
>>>
>>>  Hi all,
>>>
>>>  I want to use a CheckGroup (allowgroup) with a DataView, and there is
>>>  another CheckGroup (othergroup) in the inside of the DataView.
>>>  I can get the allowgroup's value,
>>>  but I can't get the othergroup's value.
>>>
>>>  submitform
>>>  allowgroup
>>> allowselector
>>> sortuid
>>> sortrole
>>> comments
>>> allowcheck
>>> uid
>>> role
>>> othergroup
>>> otheradd
>>> otherdelete
>>> otherquery
>>> otheredit
>>> otherselector
>>> navigator
>>>
>>>  I use a HashMap to be a Model Like this.
>>>
>>>  CheckGroup allowgroup = new CheckGroup("allowgroup", new
>>>  Model((Serializable) othermap.keySet()));
>>>  submitform.add(allowgroup);
>>>
>>>  CheckGroup othergroup = new CheckGroup("othergroup",
>>> new
>>> ArrayList());
>>> arg0.add(othergroup);
>>>
>>>  http://www.nabble.com/file/p16323358/checkbox_with_dataview.jpg
>>>
>>>  Wicket1.2.6
>>>  Thanks for help!!
>>>  --
>>>  View this message in context:
>>> http://www.nabble.com/CheckGroup-in-a-DataView-with-another-CheckGroup-tp16323358p16323358.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]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/CheckGroup-in-a-DataView-with-another-CheckGroup-tp16323358p16696196.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]



WicketTester not respecting required textfields

2008-04-14 Thread Java Programmer
Hello,
I'm using 1.3.2 version, I have form with several required elements:
private TextField getSubjectTF(final Form form) {
TextField subject = new TextField(SUBJECT);
subject.setRequired(true);
return subject;
}

private DropDownChoice getConditionDDC(Form form) {
DropDownChoice _conditionDDC = new DropDownChoice(CONDITION,
Arrays.asList(Condition.values()));
_conditionDDC.setChoiceRenderer(new IChoiceRenderer() {
public Object getDisplayValue(Object o) {
Condition condition = (Condition) o;
return getString(Condition.getKey(condition));
}

public String getIdValue(Object o, int i) {
Condition condition = (Condition) o;
return condition.toString();
}
});
_conditionDDC.setRequired(true);
return _conditionDDC;
}

I have tests for this page:
@Test public void testRequiredFieldsSubmit() {
PageParameters parameters = new PageParameters();
parameters.put("category", "1000");
getTester().startPage(AddAdvertisement.class, parameters);
FormTester form = 
getTester().newFormTester(AddAdvertisement.ADD_ADVERT);
form.submit();
getTester().assertNoInfoMessage();
getTester().assertErrorMessages( new String[] {

getComponentErrorMessage(AddAdvertisement.ADD_ADVERT + ":subject",
"add_advert.subject.Required", "add_advert.subject"),

getComponentErrorMessage(AddAdvertisement.ADD_ADVERT +
":condition", "add_advert.condition.Required", "add_advert.condition")
});
}

When launching this test I got all message errors for DropDownChoice
elements which are required, but not for any element which is
TextField. Strange because on live page the errors are also for
TextField as it should be done.
Anybody can explain this?

Best regards,
Adr

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



Re: Accesing Wicket Session from a non-wicket filter - Suggestions

2008-04-14 Thread Igor Vaynberg
use session.exists() to test if the session is there or not

-igor


On Mon, Apr 14, 2008 at 11:34 PM, mfs <[EMAIL PROTECTED]> wrote:
>
>  Guys,
>
>  Re-posting this with un-necessory info taken out..
>
>  I have a non-wicket Filter which is intercepting all request to my
>  wicket-app. In the filter i would want to set some attributes to my wicket
>  WebSession.
>
>  Now the problem is that for the first request to the application
>  (intercepted by the filter), the wicket session is yet not created, and
>  hence i get this error "you can only locate or create sessions in the
>  context of a request cycle" on doing a Session.get(). Let me add that am
>  already using WicketSessionFilter which is exposing the WebSession to my
>  non-wicket Filter. The problem would be just for the first request, whereas
>  all subsequent request should work.
>
>  Any suggestion/work-arounds ?
>
>  Thanks in advance
>
>  --
>  View this message in context: 
> http://www.nabble.com/Accesing-Wicket-Session-from-a-non-wicket-filter---Suggestions-tp16695949p16695949.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]



Re: Messages with labels

2008-04-14 Thread Java Programmer
I have solved it with maybe not elegant way but working:
private String getComponentErrorMessage(String componentPath, String
keyWithLabel, String label) {
Component component =
getTester().getComponentFromLastRenderedPage(componentPath);
String labeledMessage = component.getString(keyWithLabel);
if(label != null) {
labeledMessage = labeledMessage.replaceAll("\\$\\{label\\}",
component.getString(label));
}
return labeledMessage;
}

On Mon, Apr 14, 2008 at 3:32 PM, Java Programmer <[EMAIL PROTECTED]> wrote:
> Hello,
>  How can I in unit tests check if the messages with $label are
>  displayed on page eg.:
>  add_advert.street=Street
>  add_advert.street.Required=Field '${label}' is required.
>
>  in unit tests:
>  getWicketTester().assertErrorMessages( new String[] {
> 
> getWicketTester().getComponentFromLastRenderedPage("add_advert:subject").getString("add_advert.street.Required")
>  });
>
>  That has not resolve message for component but expected still is Field
>  '${label}' is required. not Field 'Street' is required.
>  How can I change this?
>
>  Best regards,
>  Adr
>

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



Accesing Wicket Session from a non-wicket filter - Suggestions

2008-04-14 Thread mfs

Guys, 

Re-posting this with un-necessory info taken out..

I have a non-wicket Filter which is intercepting all request to my
wicket-app. In the filter i would want to set some attributes to my wicket
WebSession.

Now the problem is that for the first request to the application
(intercepted by the filter), the wicket session is yet not created, and
hence i get this error "you can only locate or create sessions in the
context of a request cycle" on doing a Session.get(). Let me add that am
already using WicketSessionFilter which is exposing the WebSession to my
non-wicket Filter. The problem would be just for the first request, whereas
all subsequent request should work.

Any suggestion/work-arounds ?

Thanks in advance 

-- 
View this message in context: 
http://www.nabble.com/Accesing-Wicket-Session-from-a-non-wicket-filter---Suggestions-tp16695949p16695949.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]



Re: DataTable with row indexes?

2008-04-14 Thread Matthew Young
IColumn[] columns = {
//
// Make a column to show the row number
//
new AbstractColumn(new Model("No.")) {
@Override
public void populateItem(Item cellItem, String componentId,
IModel rowModel) {

Item parentRow = (Item)
cellItem.getParent().getParent();
cellItem.add(new Label(componentId,
Integer.toString(parentRow.getIndex() + 1)));
}

@Override
public String getCssClass() {
return "rowNo";
}
},

  ...  [other columns etc]  ...

  }
On Mon, Apr 14, 2008 at 5:46 PM, Ritz123 <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> Has anyone implemented DataTable with row indexes showing the
> corresponding
> row number as the first column?
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/DataTable-with-row-indexes--tp16692909p16692909.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]
>
>


Re: Good example for FormComponentPanel?

2008-04-14 Thread Igor Vaynberg
hmm, kinda weird to use the tab metaphor for this then. maybe a
dropdown or radios that switch the panel would work better. but thats
just me.

-igor


On Mon, Apr 14, 2008 at 6:49 PM, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> Alright, got it. Actually, for my purposes losing the tab info is
>  actually what I need, so this should work.
>
>  Michael
>
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>
>
> Sent: Monday, April 14, 2008 5:48 PM
>  To: users@wicket.apache.org
>  Subject: Re: Good example for FormComponentPanel?
>
>  On Mon, Apr 14, 2008 at 3:52 PM, Michael Mehrle <[EMAIL PROTECTED]>
>  wrote:
>  > Oh, I think you misunderstood
>
>  no, i didnt. instead of all this theorizing why dont you try to
>  implement this and see what the problems with it are. you will find
>  that since tabbed panel uses are regular links any information you
>  type into fields inside the tabbed panel will not be submitted and
>  therefore be lost since when you switch from tab to tab. what you need
>  to do is submit the fields when users switch tabs, the way to do that
>  is what i have outlined in my previous email.
>
>  -igor
>
>
>  > - it's just a matter of having one of
>  >  three panels visible, and all of them are part of one form. The
>  submit
>  >  button is outside the tabbed panel.
>  >
>  >  
>  > 
>  > 
>  >  
>  >
>  >  It's something like the above. Assuming that the panels are simply
>  >  placeholders for a set of form components, this is going to work?
>  >  (meaning the panel's form components will be recognized as being part
>  of
>  >  the parent form?)
>  >
>  >
>  >  Michael
>  >
>  >  -Original Message-
>  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >
>  >
>  > Sent: Monday, April 14, 2008 3:33 PM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Good example for FormComponentPanel?
>  >
>  >  yes, those links. by default they are regular a href links, so they
>  >  wont submit the values of components that are inside the tab. you can
>  >  override tabbedpanel.newlink and return a submitlink instead.
>  >
>  >  -igor
>  >
>  >
>  >  On Mon, Apr 14, 2008 at 3:28 PM, Michael Mehrle
>  <[EMAIL PROTECTED]>
>  >  wrote:
>  >  > You mean the links that select/toggle each panel? Not sure what you
>  >  mean
>  >  >  though - can you please elaborate?
>  >  >
>  >  >  Michael
>  >  >
>  >  >
>  >  >
>  >  >  -Original Message-
>  >  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  >  Sent: Monday, April 14, 2008 1:37 PM
>  >  >  To: users@wicket.apache.org
>  >  >  Subject: Re: Good example for FormComponentPanel?
>  >  >
>  >  >  if you replace tabbedpanel links to submitlink it will
>  >  >
>  >  >  -igor
>  >  >
>  >  >
>  >  >  On Mon, Apr 14, 2008 at 12:51 PM, Michael Mehrle
>  >  >  <[EMAIL PROTECTED]> wrote:
>  >  >  > So, a form CAN contain a panel? Meaning, I am able to add a
>  >  >  tabbedpanel
>  >  >  >  to a form and it'll work?
>  >  >  >
>  >  >  >  Michael
>  >  >  >
>  >  >  >
>  >  >  >
>  >  >  >  -Original Message-
>  >  >  >  From: Nick Heudecker [mailto:[EMAIL PROTECTED]
>  >  >  >  Sent: Monday, April 14, 2008 10:29 AM
>  >  >  >  To: users@wicket.apache.org
>  >  >  >  Subject: Re: Good example for FormComponentPanel?
>  >  >  >
>  >  >  >  A FormComponentPanel is used to combine several individual form
>  >  >  >  components
>  >  >  >  into a single object, like if you had year/month/day
>  >  DropDownChoices
>  >  >  in
>  >  >  >  a
>  >  >  >  single component.
>  >  >  >
>  >  >  >  AFAIK, forms can contain anything except pages.
>  >  >  >
>  >  >  >
>  >  >  >  On Mon, Apr 14, 2008 at 12:26 PM, Michael Mehrle
>  >  >  >  <[EMAIL PROTECTED]>
>  >  >  >  wrote:
>  >  >  >
>  >  >  >  > I am pretty sure that a tabbed panel can't be part of one
>  form.
>  >  If
>  >  >  it
>  >  >  >  can,
>  >  >  >  > that would be lovely. But I was under the impression that you
>  >  can't
>  >  >  >  add
>  >  >  >  > panels to a form.
>  >  >  >  >
>  >  >  >  > Could someone clarify this for me? BTW, one of the things I
>  >  tried
>  >  >  was
>  >  >  >  to
>  >  >  >  > make each panel into a FormComponentPanel and then add it to
>  the
>  >  >  >  tabbed
>  >  >  >  > panel. Well, turns out that FormComponentPanel is NOT a
>  *panel*
>  >  >  after
>  >  >  >  all
>  >  >  >  > (bad naming IMHO).
>  >  >  >  >
>  >  >  >  > At this point I'm thinking of simply building it as a
>  straight
>  >  form
>  >  >  >  and
>  >  >  >  > then turn some of it into tabs via divs and CSS.
>  >  >  >  >
>  >  >  >  > Again, if there's a way to use a tabbed panel inside a form,
>  >  please
>  >  >  >  let me
>  >  >  >  > know.
>  >  >  >  >
>  >  >  >  > Michael
>  >  >  >  >
>  >  >  >  > -Original Message-
>  >  >  >  > From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
>  >  >  >  > Sent: Friday, April 11, 2008 5:23 PM
>  >  >  >  > To: users@wicket.apache.org
>  >  >  >  > Subject: Re: Good 

Question about Modal Window

2008-04-14 Thread freak182

Hello,
I have a question about modal window. When I click the [x] button in the 
modal window, two methods were called namely CloseButtonCallback and
WindowClosedCallback and when I called window.close(target) only
WindowClosedCallback clled.I think this is default behavior. But I want to
call CloseButtonCallback only when i click the [x] button. Is there a way
for this???

Thanks a lot...Cheers
-- 
View this message in context: 
http://www.nabble.com/Question-about-Modal-Window-tp16693875p16693875.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]



RE: Good example for FormComponentPanel?

2008-04-14 Thread Michael Mehrle
Alright, got it. Actually, for my purposes losing the tab info is
actually what I need, so this should work.

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 14, 2008 5:48 PM
To: users@wicket.apache.org
Subject: Re: Good example for FormComponentPanel?

On Mon, Apr 14, 2008 at 3:52 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Oh, I think you misunderstood

no, i didnt. instead of all this theorizing why dont you try to
implement this and see what the problems with it are. you will find
that since tabbed panel uses are regular links any information you
type into fields inside the tabbed panel will not be submitted and
therefore be lost since when you switch from tab to tab. what you need
to do is submit the fields when users switch tabs, the way to do that
is what i have outlined in my previous email.

-igor


> - it's just a matter of having one of
>  three panels visible, and all of them are part of one form. The
submit
>  button is outside the tabbed panel.
>
>  
> 
> 
>  
>
>  It's something like the above. Assuming that the panels are simply
>  placeholders for a set of form components, this is going to work?
>  (meaning the panel's form components will be recognized as being part
of
>  the parent form?)
>
>
>  Michael
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>
>
> Sent: Monday, April 14, 2008 3:33 PM
>  To: users@wicket.apache.org
>  Subject: Re: Good example for FormComponentPanel?
>
>  yes, those links. by default they are regular a href links, so they
>  wont submit the values of components that are inside the tab. you can
>  override tabbedpanel.newlink and return a submitlink instead.
>
>  -igor
>
>
>  On Mon, Apr 14, 2008 at 3:28 PM, Michael Mehrle
<[EMAIL PROTECTED]>
>  wrote:
>  > You mean the links that select/toggle each panel? Not sure what you
>  mean
>  >  though - can you please elaborate?
>  >
>  >  Michael
>  >
>  >
>  >
>  >  -Original Message-
>  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  Sent: Monday, April 14, 2008 1:37 PM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Good example for FormComponentPanel?
>  >
>  >  if you replace tabbedpanel links to submitlink it will
>  >
>  >  -igor
>  >
>  >
>  >  On Mon, Apr 14, 2008 at 12:51 PM, Michael Mehrle
>  >  <[EMAIL PROTECTED]> wrote:
>  >  > So, a form CAN contain a panel? Meaning, I am able to add a
>  >  tabbedpanel
>  >  >  to a form and it'll work?
>  >  >
>  >  >  Michael
>  >  >
>  >  >
>  >  >
>  >  >  -Original Message-
>  >  >  From: Nick Heudecker [mailto:[EMAIL PROTECTED]
>  >  >  Sent: Monday, April 14, 2008 10:29 AM
>  >  >  To: users@wicket.apache.org
>  >  >  Subject: Re: Good example for FormComponentPanel?
>  >  >
>  >  >  A FormComponentPanel is used to combine several individual form
>  >  >  components
>  >  >  into a single object, like if you had year/month/day
>  DropDownChoices
>  >  in
>  >  >  a
>  >  >  single component.
>  >  >
>  >  >  AFAIK, forms can contain anything except pages.
>  >  >
>  >  >
>  >  >  On Mon, Apr 14, 2008 at 12:26 PM, Michael Mehrle
>  >  >  <[EMAIL PROTECTED]>
>  >  >  wrote:
>  >  >
>  >  >  > I am pretty sure that a tabbed panel can't be part of one
form.
>  If
>  >  it
>  >  >  can,
>  >  >  > that would be lovely. But I was under the impression that you
>  can't
>  >  >  add
>  >  >  > panels to a form.
>  >  >  >
>  >  >  > Could someone clarify this for me? BTW, one of the things I
>  tried
>  >  was
>  >  >  to
>  >  >  > make each panel into a FormComponentPanel and then add it to
the
>  >  >  tabbed
>  >  >  > panel. Well, turns out that FormComponentPanel is NOT a
*panel*
>  >  after
>  >  >  all
>  >  >  > (bad naming IMHO).
>  >  >  >
>  >  >  > At this point I'm thinking of simply building it as a
straight
>  form
>  >  >  and
>  >  >  > then turn some of it into tabs via divs and CSS.
>  >  >  >
>  >  >  > Again, if there's a way to use a tabbed panel inside a form,
>  please
>  >  >  let me
>  >  >  > know.
>  >  >  >
>  >  >  > Michael
>  >  >  >
>  >  >  > -Original Message-
>  >  >  > From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
>  >  >  > Sent: Friday, April 11, 2008 5:23 PM
>  >  >  > To: users@wicket.apache.org
>  >  >  > Subject: Re: Good example for FormComponentPanel?
>  >  >  >
>  >  >  >
>  >  >  >   package org.apache.wicket.extensions.markup.html.tabs;
>  >  >  >
>  >  >  >   public class TabbedPanel extends Panel  <--- it extends the
>  panel
>  >  >  >   { ... }
>  >  >  >
>  >  >  >   Am I wrong? :)
>  >  >  >
>  >  >  > On Sat, Apr 12, 2008 at 2:11 AM, Michael Mehrle
>  >  >  <[EMAIL PROTECTED]>
>  >  >  > wrote:
>  >  >  > > Yes, I agree, Vitaly - but unfortunately the design
decision
>  is
>  >  out
>  >  >  of
>  >  >  > my hand. It's got to have tabs. Of course it is possible to
do
>  the
>  >  >  tabbing
>  >  >  > by CSS styling, but I wanted to see if FormComponentPanel is
a
>  way
>  > 

Re: Facebook Wicket Integration

2008-04-14 Thread TH Lim

Yes, you can use mountBookmarkablePage method of WebApplication.


itai wrote:
> 
> 
> Hi!
> Thanks a lot - this works...
> 
> Ill have to put the validation on the BasePage class to authenticate every
> page because in many cases (like in links that are used on facebook
> notifications) the first accessed page is an internal one.
> 
> Another question, my application runs as an iframe inside facebook. I want
> all URLs in the application to point to
> http://apps.facebook.com//. 
> 
> Can this be done using Wicket?
> 
> Thanks!
> itai.
> 

-- 
View this message in context: 
http://www.nabble.com/Facebook-Wicket-Integration-tp16558748p16693220.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]



Can only locate or create session in the context of a request cycle.

2008-04-14 Thread mfs

Guys,

Please comment..

I have a non-wicket AuthenticationFilter which is intercepting all request
to my wicket-app and checking if the request is coming in from a valid user.
Basically in the url am passed over an authenticationToken (by another
application where the user has signed in already). Now in my
AuthenticationFilter i check if that is a valid token and if yes i want to
set some attribute (isAuthenticated etc) in wicket-session, . 

The problem is that the wicket session has yet not been created (because
this is the first request to the wicket app, intercepted by the filter), and
hence i get this error "you can only locate or create sessions in the
context of a request cycle", when i try do a Session.get().

I am already using WicketSessionFilter which would expose my wicket session
to my non-wicket filter. The problem is just for the first request, where a
wicket session yet doesnt exist. 

I am thinking of using HttpSession directly in my filter and store all the
session data there, but before i do so, i thought to check if anyone has a
better work around, ideally i would want to avoid using it.

Thanks in advance

Farhan
-- 
View this message in context: 
http://www.nabble.com/Can-only-locate-or-create-session-in-the-context-of-a-request-cycle.-tp16693084p16693084.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]



Re: How to change the html folder?

2008-04-14 Thread liny



Jeremy Thomerson-3 wrote:
> 
> http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html
> 
> On Mon, Apr 14, 2008 at 10:09 AM, liny <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi~
>>
>> In default, for example, your html and web page class must be together.
>> Can I move my html files to a single folder?
>> And how?
>>
>> Thanks
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-change-the-html-folder--tp16678545p16678545.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]
>>
>>
> 
> 

Thank you, sir!
-- 
View this message in context: 
http://www.nabble.com/How-to-change-the-html-folder--tp16678545p16692974.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]



Re: Good example for FormComponentPanel?

2008-04-14 Thread Igor Vaynberg
On Mon, Apr 14, 2008 at 3:52 PM, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> Oh, I think you misunderstood

no, i didnt. instead of all this theorizing why dont you try to
implement this and see what the problems with it are. you will find
that since tabbed panel uses are regular links any information you
type into fields inside the tabbed panel will not be submitted and
therefore be lost since when you switch from tab to tab. what you need
to do is submit the fields when users switch tabs, the way to do that
is what i have outlined in my previous email.

-igor


> - it's just a matter of having one of
>  three panels visible, and all of them are part of one form. The submit
>  button is outside the tabbed panel.
>
>  
> 
> 
>  
>
>  It's something like the above. Assuming that the panels are simply
>  placeholders for a set of form components, this is going to work?
>  (meaning the panel's form components will be recognized as being part of
>  the parent form?)
>
>
>  Michael
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>
>
> Sent: Monday, April 14, 2008 3:33 PM
>  To: users@wicket.apache.org
>  Subject: Re: Good example for FormComponentPanel?
>
>  yes, those links. by default they are regular a href links, so they
>  wont submit the values of components that are inside the tab. you can
>  override tabbedpanel.newlink and return a submitlink instead.
>
>  -igor
>
>
>  On Mon, Apr 14, 2008 at 3:28 PM, Michael Mehrle <[EMAIL PROTECTED]>
>  wrote:
>  > You mean the links that select/toggle each panel? Not sure what you
>  mean
>  >  though - can you please elaborate?
>  >
>  >  Michael
>  >
>  >
>  >
>  >  -Original Message-
>  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  Sent: Monday, April 14, 2008 1:37 PM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Good example for FormComponentPanel?
>  >
>  >  if you replace tabbedpanel links to submitlink it will
>  >
>  >  -igor
>  >
>  >
>  >  On Mon, Apr 14, 2008 at 12:51 PM, Michael Mehrle
>  >  <[EMAIL PROTECTED]> wrote:
>  >  > So, a form CAN contain a panel? Meaning, I am able to add a
>  >  tabbedpanel
>  >  >  to a form and it'll work?
>  >  >
>  >  >  Michael
>  >  >
>  >  >
>  >  >
>  >  >  -Original Message-
>  >  >  From: Nick Heudecker [mailto:[EMAIL PROTECTED]
>  >  >  Sent: Monday, April 14, 2008 10:29 AM
>  >  >  To: users@wicket.apache.org
>  >  >  Subject: Re: Good example for FormComponentPanel?
>  >  >
>  >  >  A FormComponentPanel is used to combine several individual form
>  >  >  components
>  >  >  into a single object, like if you had year/month/day
>  DropDownChoices
>  >  in
>  >  >  a
>  >  >  single component.
>  >  >
>  >  >  AFAIK, forms can contain anything except pages.
>  >  >
>  >  >
>  >  >  On Mon, Apr 14, 2008 at 12:26 PM, Michael Mehrle
>  >  >  <[EMAIL PROTECTED]>
>  >  >  wrote:
>  >  >
>  >  >  > I am pretty sure that a tabbed panel can't be part of one form.
>  If
>  >  it
>  >  >  can,
>  >  >  > that would be lovely. But I was under the impression that you
>  can't
>  >  >  add
>  >  >  > panels to a form.
>  >  >  >
>  >  >  > Could someone clarify this for me? BTW, one of the things I
>  tried
>  >  was
>  >  >  to
>  >  >  > make each panel into a FormComponentPanel and then add it to the
>  >  >  tabbed
>  >  >  > panel. Well, turns out that FormComponentPanel is NOT a *panel*
>  >  after
>  >  >  all
>  >  >  > (bad naming IMHO).
>  >  >  >
>  >  >  > At this point I'm thinking of simply building it as a straight
>  form
>  >  >  and
>  >  >  > then turn some of it into tabs via divs and CSS.
>  >  >  >
>  >  >  > Again, if there's a way to use a tabbed panel inside a form,
>  please
>  >  >  let me
>  >  >  > know.
>  >  >  >
>  >  >  > Michael
>  >  >  >
>  >  >  > -Original Message-
>  >  >  > From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
>  >  >  > Sent: Friday, April 11, 2008 5:23 PM
>  >  >  > To: users@wicket.apache.org
>  >  >  > Subject: Re: Good example for FormComponentPanel?
>  >  >  >
>  >  >  >
>  >  >  >   package org.apache.wicket.extensions.markup.html.tabs;
>  >  >  >
>  >  >  >   public class TabbedPanel extends Panel  <--- it extends the
>  panel
>  >  >  >   { ... }
>  >  >  >
>  >  >  >   Am I wrong? :)
>  >  >  >
>  >  >  > On Sat, Apr 12, 2008 at 2:11 AM, Michael Mehrle
>  >  >  <[EMAIL PROTECTED]>
>  >  >  > wrote:
>  >  >  > > Yes, I agree, Vitaly - but unfortunately the design decision
>  is
>  >  out
>  >  >  of
>  >  >  > my hand. It's got to have tabs. Of course it is possible to do
>  the
>  >  >  tabbing
>  >  >  > by CSS styling, but I wanted to see if FormComponentPanel is a
>  way
>  >  to
>  >  >  go
>  >  >  > since the complexity of managing the tabbed panel would then be
>  >  >  shifted to
>  >  >  > the CSS/JS side.
>  >  >  > >
>  >  >  > >  I just looked at the Multiply example and it seems to make
>  >  sense.
>  >  >  > Again, if anyone wants to share any tips/input regarding thi

DataTable with row indexes?

2008-04-14 Thread Ritz123

Hi,

Has anyone implemented DataTable with row indexes showing the corresponding
row number as the first column?

Thanks
-- 
View this message in context: 
http://www.nabble.com/DataTable-with-row-indexes--tp16692909p16692909.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]



Re: onBeforeSubmit

2008-04-14 Thread Igor Vaynberg
add javascript to button markup's onclick event

-igor


On Mon, Apr 14, 2008 at 5:38 PM, Karen Schaper
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I would like to do something after the user clicks a submit button but
>  before the fields are actually submitted.
>
>  Is there a way to do this in wicket?
>
>
>  Thanks
>
>  Karen
>
>
>  -
>  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]



onBeforeSubmit

2008-04-14 Thread Karen Schaper
Hi,

I would like to do something after the user clicks a submit button but
before the fields are actually submitted.

Is there a way to do this in wicket?


Thanks

Karen


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



RE: Good example for FormComponentPanel?

2008-04-14 Thread Michael Mehrle
Oh, I think you misunderstood - it's just a matter of having one of
three panels visible, and all of them are part of one form. The submit
button is outside the tabbed panel.






It's something like the above. Assuming that the panels are simply
placeholders for a set of form components, this is going to work?
(meaning the panel's form components will be recognized as being part of
the parent form?)

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 14, 2008 3:33 PM
To: users@wicket.apache.org
Subject: Re: Good example for FormComponentPanel?

yes, those links. by default they are regular a href links, so they
wont submit the values of components that are inside the tab. you can
override tabbedpanel.newlink and return a submitlink instead.

-igor


On Mon, Apr 14, 2008 at 3:28 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> You mean the links that select/toggle each panel? Not sure what you
mean
>  though - can you please elaborate?
>
>  Michael
>
>
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  Sent: Monday, April 14, 2008 1:37 PM
>  To: users@wicket.apache.org
>  Subject: Re: Good example for FormComponentPanel?
>
>  if you replace tabbedpanel links to submitlink it will
>
>  -igor
>
>
>  On Mon, Apr 14, 2008 at 12:51 PM, Michael Mehrle
>  <[EMAIL PROTECTED]> wrote:
>  > So, a form CAN contain a panel? Meaning, I am able to add a
>  tabbedpanel
>  >  to a form and it'll work?
>  >
>  >  Michael
>  >
>  >
>  >
>  >  -Original Message-
>  >  From: Nick Heudecker [mailto:[EMAIL PROTECTED]
>  >  Sent: Monday, April 14, 2008 10:29 AM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Good example for FormComponentPanel?
>  >
>  >  A FormComponentPanel is used to combine several individual form
>  >  components
>  >  into a single object, like if you had year/month/day
DropDownChoices
>  in
>  >  a
>  >  single component.
>  >
>  >  AFAIK, forms can contain anything except pages.
>  >
>  >
>  >  On Mon, Apr 14, 2008 at 12:26 PM, Michael Mehrle
>  >  <[EMAIL PROTECTED]>
>  >  wrote:
>  >
>  >  > I am pretty sure that a tabbed panel can't be part of one form.
If
>  it
>  >  can,
>  >  > that would be lovely. But I was under the impression that you
can't
>  >  add
>  >  > panels to a form.
>  >  >
>  >  > Could someone clarify this for me? BTW, one of the things I
tried
>  was
>  >  to
>  >  > make each panel into a FormComponentPanel and then add it to the
>  >  tabbed
>  >  > panel. Well, turns out that FormComponentPanel is NOT a *panel*
>  after
>  >  all
>  >  > (bad naming IMHO).
>  >  >
>  >  > At this point I'm thinking of simply building it as a straight
form
>  >  and
>  >  > then turn some of it into tabs via divs and CSS.
>  >  >
>  >  > Again, if there's a way to use a tabbed panel inside a form,
please
>  >  let me
>  >  > know.
>  >  >
>  >  > Michael
>  >  >
>  >  > -Original Message-
>  >  > From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
>  >  > Sent: Friday, April 11, 2008 5:23 PM
>  >  > To: users@wicket.apache.org
>  >  > Subject: Re: Good example for FormComponentPanel?
>  >  >
>  >  >
>  >  >   package org.apache.wicket.extensions.markup.html.tabs;
>  >  >
>  >  >   public class TabbedPanel extends Panel  <--- it extends the
panel
>  >  >   { ... }
>  >  >
>  >  >   Am I wrong? :)
>  >  >
>  >  > On Sat, Apr 12, 2008 at 2:11 AM, Michael Mehrle
>  >  <[EMAIL PROTECTED]>
>  >  > wrote:
>  >  > > Yes, I agree, Vitaly - but unfortunately the design decision
is
>  out
>  >  of
>  >  > my hand. It's got to have tabs. Of course it is possible to do
the
>  >  tabbing
>  >  > by CSS styling, but I wanted to see if FormComponentPanel is a
way
>  to
>  >  go
>  >  > since the complexity of managing the tabbed panel would then be
>  >  shifted to
>  >  > the CSS/JS side.
>  >  > >
>  >  > >  I just looked at the Multiply example and it seems to make
>  sense.
>  >  > Again, if anyone wants to share any tips/input regarding this
(or
>  how
>  >  to
>  >  > avoid traps), please don't be shy ;-)
>  >  > >
>  >  > >  Michael
>  >  > >
>  >  > >
>  >  > >
>  >  > >  -Original Message-
>  >  > >  From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
>  >  > >  Sent: Friday, April 11, 2008 4:52 PM
>  >  > >  To: users@wicket.apache.org
>  >  > >  Subject: Re: Good example for FormComponentPanel?
>  >  > >
>  >  > >
>  >  > >It seems that a simple panel would be the best approach.
>  >  > >
>  >  > >  On Sat, Apr 12, 2008 at 1:37 AM, Michael Mehrle
>  >  <[EMAIL PROTECTED]>
>  >  > wrote:
>  >  > >  > I need to build a TabbedPanel with three tabs which are
part
>  of
>  >  one
>  >  > form
>  >  > >  >  - the selected tab will contain form components which need
to
>  be
>  >  > >  >  submitted by that one form. It seems FormComponentPanel is
>  the
>  >  way
>  >  > to
>  >  > >  >  go: are there any good examples of this?
>  >  > >  >
>  >  > >  >
>  >  > >  >
>  >  > >  >  Also, w

Re: Performance question

2008-04-14 Thread Ritz123

Havent used a profiler in a while - is there any opensource one which can
work with tomcat?


igor.vaynberg wrote:
> 
> profile it and see where the time goes, or paste some code from those
> pages
> 
> -igor
> 
> 
> On Mon, Apr 14, 2008 at 2:57 PM, Ritz123 <[EMAIL PROTECTED]> wrote:
>>
>>  Hi,
>>
>>  I have created first couple of pages of my wicket application but have
>> some
>>  performance concerns.
>>
>>  The pages (even the refresh alone takes 6-7 secs on Dual Core 2.2GHz
>> Pentium
>>  with 4GB of RAM). DB is located on the remote host, but has caching at
>> the
>>  application server - so thats not adding to the latency for the refresh.
>>  Here is the requestlogger information for the home page refresh couple
>> of
>>  times
>>
>>  Can someone point me to the direction on going about finding out what is
>>  taking this long other than (and may be simpler than) running a profiler
>> on
>>  the application - atleast initially.
>>
>>  My application is running in deployment mode and is running in tomcat.
>>
>>  =
>>
>>  ! before getting top nav menuitems 1208209856242
>>  ! after getting top nav menuitems 1208209860972 time
>> taken
>>  4730
>>  2008-04-14 14:51:07,677 (http-0.0.0.0-8080-Processor12) [
>>  RequestLogger.jav
>>  a:320:INFO ]
>>  time=11567,event=BookmarkablePage[com.neobits.web.pages.Index],resp
>> 
>> onse=BookmarkablePage[com.neobits.web.pages.Index],sessionid=729B1C0D58665D15518
>>  044E5C8A63088.jvm1,sessionsize=1177,sessionstart=Mon Apr 14 14:38:51 PDT
>>  2008,re
>> 
>> quests=4,totaltime=28472,activerequests=3,maxmem=532M,total=266M,used=56M
>>
>>  ! before getting top nav menuitems 1208209878458
>>  ! after getting top nav menuitems 1208209878696 time
>> taken
>>  238
>>  2008-04-14 14:51:25,266 (http-0.0.0.0-8080-Processor4) [
>>  RequestLogger.java
>>  :320:INFO ]
>>  time=6888,event=BookmarkablePage[com.neobits.web.pages.Index],respon
>> 
>> se=BookmarkablePage[com.neobits.web.pages.Index],sessionid=729B1C0D58665D1551804
>>  4E5C8A63088.jvm1,sessionsize=1177,sessionstart=Mon Apr 14 14:38:51 PDT
>>  2008,requ
>>  ests=5,totaltime=35360,activerequests=3,maxmem=532M,total=266M,used=55M
>>
>>  ! before getting top nav menuitems 1208209893292
>>  ! after getting top nav menuitems 1208209893526 time
>> taken
>>  234
>>  2008-04-14 14:51:40,514 (http-0.0.0.0-8080-Processor6) [
>>  RequestLogger.java
>>  :320:INFO ]
>>  time=7309,event=BookmarkablePage[com.neobits.web.pages.Index],respon
>> 
>> se=BookmarkablePage[com.neobits.web.pages.Index],sessionid=729B1C0D58665D1551804
>>  4E5C8A63088.jvm1,sessionsize=1177,sessionstart=Mon Apr 14 14:38:51 PDT
>>  2008,requ
>>  ests=6,totaltime=42669,activerequests=4,maxmem=532M,total=266M,used=46M
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/Performance-question-tp16690935p16690935.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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Performance-question-tp16690935p16691538.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]



Re: Good example for FormComponentPanel?

2008-04-14 Thread Igor Vaynberg
yes, those links. by default they are regular a href links, so they
wont submit the values of components that are inside the tab. you can
override tabbedpanel.newlink and return a submitlink instead.

-igor


On Mon, Apr 14, 2008 at 3:28 PM, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> You mean the links that select/toggle each panel? Not sure what you mean
>  though - can you please elaborate?
>
>  Michael
>
>
>
>  -Original Message-
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  Sent: Monday, April 14, 2008 1:37 PM
>  To: users@wicket.apache.org
>  Subject: Re: Good example for FormComponentPanel?
>
>  if you replace tabbedpanel links to submitlink it will
>
>  -igor
>
>
>  On Mon, Apr 14, 2008 at 12:51 PM, Michael Mehrle
>  <[EMAIL PROTECTED]> wrote:
>  > So, a form CAN contain a panel? Meaning, I am able to add a
>  tabbedpanel
>  >  to a form and it'll work?
>  >
>  >  Michael
>  >
>  >
>  >
>  >  -Original Message-
>  >  From: Nick Heudecker [mailto:[EMAIL PROTECTED]
>  >  Sent: Monday, April 14, 2008 10:29 AM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: Good example for FormComponentPanel?
>  >
>  >  A FormComponentPanel is used to combine several individual form
>  >  components
>  >  into a single object, like if you had year/month/day DropDownChoices
>  in
>  >  a
>  >  single component.
>  >
>  >  AFAIK, forms can contain anything except pages.
>  >
>  >
>  >  On Mon, Apr 14, 2008 at 12:26 PM, Michael Mehrle
>  >  <[EMAIL PROTECTED]>
>  >  wrote:
>  >
>  >  > I am pretty sure that a tabbed panel can't be part of one form. If
>  it
>  >  can,
>  >  > that would be lovely. But I was under the impression that you can't
>  >  add
>  >  > panels to a form.
>  >  >
>  >  > Could someone clarify this for me? BTW, one of the things I tried
>  was
>  >  to
>  >  > make each panel into a FormComponentPanel and then add it to the
>  >  tabbed
>  >  > panel. Well, turns out that FormComponentPanel is NOT a *panel*
>  after
>  >  all
>  >  > (bad naming IMHO).
>  >  >
>  >  > At this point I'm thinking of simply building it as a straight form
>  >  and
>  >  > then turn some of it into tabs via divs and CSS.
>  >  >
>  >  > Again, if there's a way to use a tabbed panel inside a form, please
>  >  let me
>  >  > know.
>  >  >
>  >  > Michael
>  >  >
>  >  > -Original Message-
>  >  > From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
>  >  > Sent: Friday, April 11, 2008 5:23 PM
>  >  > To: users@wicket.apache.org
>  >  > Subject: Re: Good example for FormComponentPanel?
>  >  >
>  >  >
>  >  >   package org.apache.wicket.extensions.markup.html.tabs;
>  >  >
>  >  >   public class TabbedPanel extends Panel  <--- it extends the panel
>  >  >   { ... }
>  >  >
>  >  >   Am I wrong? :)
>  >  >
>  >  > On Sat, Apr 12, 2008 at 2:11 AM, Michael Mehrle
>  >  <[EMAIL PROTECTED]>
>  >  > wrote:
>  >  > > Yes, I agree, Vitaly - but unfortunately the design decision is
>  out
>  >  of
>  >  > my hand. It's got to have tabs. Of course it is possible to do the
>  >  tabbing
>  >  > by CSS styling, but I wanted to see if FormComponentPanel is a way
>  to
>  >  go
>  >  > since the complexity of managing the tabbed panel would then be
>  >  shifted to
>  >  > the CSS/JS side.
>  >  > >
>  >  > >  I just looked at the Multiply example and it seems to make
>  sense.
>  >  > Again, if anyone wants to share any tips/input regarding this (or
>  how
>  >  to
>  >  > avoid traps), please don't be shy ;-)
>  >  > >
>  >  > >  Michael
>  >  > >
>  >  > >
>  >  > >
>  >  > >  -Original Message-
>  >  > >  From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
>  >  > >  Sent: Friday, April 11, 2008 4:52 PM
>  >  > >  To: users@wicket.apache.org
>  >  > >  Subject: Re: Good example for FormComponentPanel?
>  >  > >
>  >  > >
>  >  > >It seems that a simple panel would be the best approach.
>  >  > >
>  >  > >  On Sat, Apr 12, 2008 at 1:37 AM, Michael Mehrle
>  >  <[EMAIL PROTECTED]>
>  >  > wrote:
>  >  > >  > I need to build a TabbedPanel with three tabs which are part
>  of
>  >  one
>  >  > form
>  >  > >  >  - the selected tab will contain form components which need to
>  be
>  >  > >  >  submitted by that one form. It seems FormComponentPanel is
>  the
>  >  way
>  >  > to
>  >  > >  >  go: are there any good examples of this?
>  >  > >  >
>  >  > >  >
>  >  > >  >
>  >  > >  >  Also, would this be the recommended approach?
>  >  > >  >
>  >  > >  >
>  >  > >  >
>  >  > >  >  Thanks,
>  >  > >  >
>  >  > >  >
>  >  > >  >
>  >  > >  >  Michael
>  >  > >  >
>  >  > >  >
>  >  > >
>  >  > >
>  >  -
>  >  > >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  > >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >  > >
>  >  > >
>  >  >
>  >  >
>  -
>  >  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  > For additional commands, e-mail: [EMAIL PROTECTED]
>  > 

RE: Good example for FormComponentPanel?

2008-04-14 Thread Michael Mehrle
You mean the links that select/toggle each panel? Not sure what you mean
though - can you please elaborate?

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 14, 2008 1:37 PM
To: users@wicket.apache.org
Subject: Re: Good example for FormComponentPanel?

if you replace tabbedpanel links to submitlink it will

-igor


On Mon, Apr 14, 2008 at 12:51 PM, Michael Mehrle
<[EMAIL PROTECTED]> wrote:
> So, a form CAN contain a panel? Meaning, I am able to add a
tabbedpanel
>  to a form and it'll work?
>
>  Michael
>
>
>
>  -Original Message-
>  From: Nick Heudecker [mailto:[EMAIL PROTECTED]
>  Sent: Monday, April 14, 2008 10:29 AM
>  To: users@wicket.apache.org
>  Subject: Re: Good example for FormComponentPanel?
>
>  A FormComponentPanel is used to combine several individual form
>  components
>  into a single object, like if you had year/month/day DropDownChoices
in
>  a
>  single component.
>
>  AFAIK, forms can contain anything except pages.
>
>
>  On Mon, Apr 14, 2008 at 12:26 PM, Michael Mehrle
>  <[EMAIL PROTECTED]>
>  wrote:
>
>  > I am pretty sure that a tabbed panel can't be part of one form. If
it
>  can,
>  > that would be lovely. But I was under the impression that you can't
>  add
>  > panels to a form.
>  >
>  > Could someone clarify this for me? BTW, one of the things I tried
was
>  to
>  > make each panel into a FormComponentPanel and then add it to the
>  tabbed
>  > panel. Well, turns out that FormComponentPanel is NOT a *panel*
after
>  all
>  > (bad naming IMHO).
>  >
>  > At this point I'm thinking of simply building it as a straight form
>  and
>  > then turn some of it into tabs via divs and CSS.
>  >
>  > Again, if there's a way to use a tabbed panel inside a form, please
>  let me
>  > know.
>  >
>  > Michael
>  >
>  > -Original Message-
>  > From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
>  > Sent: Friday, April 11, 2008 5:23 PM
>  > To: users@wicket.apache.org
>  > Subject: Re: Good example for FormComponentPanel?
>  >
>  >
>  >   package org.apache.wicket.extensions.markup.html.tabs;
>  >
>  >   public class TabbedPanel extends Panel  <--- it extends the panel
>  >   { ... }
>  >
>  >   Am I wrong? :)
>  >
>  > On Sat, Apr 12, 2008 at 2:11 AM, Michael Mehrle
>  <[EMAIL PROTECTED]>
>  > wrote:
>  > > Yes, I agree, Vitaly - but unfortunately the design decision is
out
>  of
>  > my hand. It's got to have tabs. Of course it is possible to do the
>  tabbing
>  > by CSS styling, but I wanted to see if FormComponentPanel is a way
to
>  go
>  > since the complexity of managing the tabbed panel would then be
>  shifted to
>  > the CSS/JS side.
>  > >
>  > >  I just looked at the Multiply example and it seems to make
sense.
>  > Again, if anyone wants to share any tips/input regarding this (or
how
>  to
>  > avoid traps), please don't be shy ;-)
>  > >
>  > >  Michael
>  > >
>  > >
>  > >
>  > >  -Original Message-
>  > >  From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
>  > >  Sent: Friday, April 11, 2008 4:52 PM
>  > >  To: users@wicket.apache.org
>  > >  Subject: Re: Good example for FormComponentPanel?
>  > >
>  > >
>  > >It seems that a simple panel would be the best approach.
>  > >
>  > >  On Sat, Apr 12, 2008 at 1:37 AM, Michael Mehrle
>  <[EMAIL PROTECTED]>
>  > wrote:
>  > >  > I need to build a TabbedPanel with three tabs which are part
of
>  one
>  > form
>  > >  >  - the selected tab will contain form components which need to
be
>  > >  >  submitted by that one form. It seems FormComponentPanel is
the
>  way
>  > to
>  > >  >  go: are there any good examples of this?
>  > >  >
>  > >  >
>  > >  >
>  > >  >  Also, would this be the recommended approach?
>  > >  >
>  > >  >
>  > >  >
>  > >  >  Thanks,
>  > >  >
>  > >  >
>  > >  >
>  > >  >  Michael
>  > >  >
>  > >  >
>  > >
>  > >
>  -
>  > >  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]
>  >
>  >
>
>
>  --
>  Nick Heudecker
>  Professional Wicket Training & Consulting
>  http://www.systemmobile.com
>
>  Eventful - Intelligent Event Management
>  http://www.eventfulhq.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]


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



Re: Performance question

2008-04-14 Thread Igor Vaynberg
profile it and see where the time goes, or paste some code from those pages

-igor


On Mon, Apr 14, 2008 at 2:57 PM, Ritz123 <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I have created first couple of pages of my wicket application but have some
>  performance concerns.
>
>  The pages (even the refresh alone takes 6-7 secs on Dual Core 2.2GHz Pentium
>  with 4GB of RAM). DB is located on the remote host, but has caching at the
>  application server - so thats not adding to the latency for the refresh.
>  Here is the requestlogger information for the home page refresh couple of
>  times
>
>  Can someone point me to the direction on going about finding out what is
>  taking this long other than (and may be simpler than) running a profiler on
>  the application - atleast initially.
>
>  My application is running in deployment mode and is running in tomcat.
>
>  =
>
>  ! before getting top nav menuitems 1208209856242
>  ! after getting top nav menuitems 1208209860972 time taken
>  4730
>  2008-04-14 14:51:07,677 (http-0.0.0.0-8080-Processor12) [
>  RequestLogger.jav
>  a:320:INFO ]
>  time=11567,event=BookmarkablePage[com.neobits.web.pages.Index],resp
>  
> onse=BookmarkablePage[com.neobits.web.pages.Index],sessionid=729B1C0D58665D15518
>  044E5C8A63088.jvm1,sessionsize=1177,sessionstart=Mon Apr 14 14:38:51 PDT
>  2008,re
>  quests=4,totaltime=28472,activerequests=3,maxmem=532M,total=266M,used=56M
>
>  ! before getting top nav menuitems 1208209878458
>  ! after getting top nav menuitems 1208209878696 time taken
>  238
>  2008-04-14 14:51:25,266 (http-0.0.0.0-8080-Processor4) [
>  RequestLogger.java
>  :320:INFO ]
>  time=6888,event=BookmarkablePage[com.neobits.web.pages.Index],respon
>  
> se=BookmarkablePage[com.neobits.web.pages.Index],sessionid=729B1C0D58665D1551804
>  4E5C8A63088.jvm1,sessionsize=1177,sessionstart=Mon Apr 14 14:38:51 PDT
>  2008,requ
>  ests=5,totaltime=35360,activerequests=3,maxmem=532M,total=266M,used=55M
>
>  ! before getting top nav menuitems 1208209893292
>  ! after getting top nav menuitems 1208209893526 time taken
>  234
>  2008-04-14 14:51:40,514 (http-0.0.0.0-8080-Processor6) [
>  RequestLogger.java
>  :320:INFO ]
>  time=7309,event=BookmarkablePage[com.neobits.web.pages.Index],respon
>  
> se=BookmarkablePage[com.neobits.web.pages.Index],sessionid=729B1C0D58665D1551804
>  4E5C8A63088.jvm1,sessionsize=1177,sessionstart=Mon Apr 14 14:38:51 PDT
>  2008,requ
>  ests=6,totaltime=42669,activerequests=4,maxmem=532M,total=266M,used=46M
>
>  --
>  View this message in context: 
> http://www.nabble.com/Performance-question-tp16690935p16690935.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]



Performance question

2008-04-14 Thread Ritz123

Hi,

I have created first couple of pages of my wicket application but have some
performance concerns.

The pages (even the refresh alone takes 6-7 secs on Dual Core 2.2GHz Pentium
with 4GB of RAM). DB is located on the remote host, but has caching at the
application server - so thats not adding to the latency for the refresh.
Here is the requestlogger information for the home page refresh couple of
times

Can someone point me to the direction on going about finding out what is
taking this long other than (and may be simpler than) running a profiler on
the application - atleast initially.

My application is running in deployment mode and is running in tomcat.

=

! before getting top nav menuitems 1208209856242
! after getting top nav menuitems 1208209860972 time taken
4730
2008-04-14 14:51:07,677 (http-0.0.0.0-8080-Processor12) [ 
RequestLogger.jav
a:320:INFO ]
time=11567,event=BookmarkablePage[com.neobits.web.pages.Index],resp
onse=BookmarkablePage[com.neobits.web.pages.Index],sessionid=729B1C0D58665D15518
044E5C8A63088.jvm1,sessionsize=1177,sessionstart=Mon Apr 14 14:38:51 PDT
2008,re
quests=4,totaltime=28472,activerequests=3,maxmem=532M,total=266M,used=56M

! before getting top nav menuitems 1208209878458
! after getting top nav menuitems 1208209878696 time taken
238
2008-04-14 14:51:25,266 (http-0.0.0.0-8080-Processor4) [ 
RequestLogger.java
:320:INFO ]
time=6888,event=BookmarkablePage[com.neobits.web.pages.Index],respon
se=BookmarkablePage[com.neobits.web.pages.Index],sessionid=729B1C0D58665D1551804
4E5C8A63088.jvm1,sessionsize=1177,sessionstart=Mon Apr 14 14:38:51 PDT
2008,requ
ests=5,totaltime=35360,activerequests=3,maxmem=532M,total=266M,used=55M

! before getting top nav menuitems 1208209893292
! after getting top nav menuitems 1208209893526 time taken
234
2008-04-14 14:51:40,514 (http-0.0.0.0-8080-Processor6) [ 
RequestLogger.java
:320:INFO ]
time=7309,event=BookmarkablePage[com.neobits.web.pages.Index],respon
se=BookmarkablePage[com.neobits.web.pages.Index],sessionid=729B1C0D58665D1551804
4E5C8A63088.jvm1,sessionsize=1177,sessionstart=Mon Apr 14 14:38:51 PDT
2008,requ
ests=6,totaltime=42669,activerequests=4,maxmem=532M,total=266M,used=46M

-- 
View this message in context: 
http://www.nabble.com/Performance-question-tp16690935p16690935.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]



Re: IE/XP FileUpload Problem

2008-04-14 Thread JulianS

I ended up using workaround 2, which was the easiest to implement, namely
preventing keystrokes in the text field and requiring the user to click the
Browse button:

FileUploadField fuf = new FileUploadField(FIELD_ID);
fuf.add(new SimpleAttributeModifier("onkeydown",
"if(event.keyCode==8){return false;}return true;"));
fuf.add(new SimpleAttributeModifier("onbeforeeditfocus", "return false;"));

Julian

-- 
View this message in context: 
http://www.nabble.com/IE-XP-FileUpload-Problem-tp16630175p16690684.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]



Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk

Johan Compagner wrote:

The problem is that a component has not a locale by default
So then we should give a Page a locale field.
and then that will be set..

But the problem is

if you do setResponsePage(Page.class)

what should then be taken? The session locale mount?


The most logical thing to me seems to be the result of getLocale(), because:

1) if the locale in the page is explicitly set, that means you're 
browsing the site explicitly in the selected locale... This seems 
logical to me: if you reqeuest the english version of a page through a 
bookmarkable link, then it would be weird if the next page you go to is 
suddenly in German, even if your session locale is German...


2) if it is not explicitly the session locale should be used...

Regards,
Sebastiaan


johan


On Mon, Apr 14, 2008 at 6:14 PM, Sebastiaan van Erk <[EMAIL PROTECTED]>
wrote:


Johan Compagner wrote:


So when you do this:

mount(new WhateverUrlCodingStrategy("/mypage", MyPage.class,
Locale.NL));

then when i hit

/mypage

we have to set the sessions locale to NL then?


I don't think so. The *resource* has the specified locale, i.e., the Page,
but I think it's bad to have as side effect that the session's locale is
suddenly changed.

I realize this introduces other issues... what happens with a Link to
another page class? It should use the Page locale, not the session locale...
So a component uses its locale, or its parent locale, or its parent's
parent, etc, and if Page doesn't have a locale, THEN the session locale...

But I don't know the inner workings of Wicket's localization, nor have I
thought long and hard about this yet, so I don't know if any of this make
sense...

I just think it's weird that I cannot mount 2 locales of a page on two
different paths... leading to the crawler and reference issues I mentioned
before... What the best solution is, is probably something that needs to be
discussed further. :-)

Regards,
Sebastiaan



Regards,
Sebastiaan


 johan


On Mon, Apr 14, 2008 at 12:40 PM, Sebastiaan van Erk <
[EMAIL PROTECTED]>
wrote:

 Hi,

I have localized my Wicket site, but I have a problem with
localization +
(mounted) bookmarkable pages.

When mounting a bookmarkable page:

  mount(new WhateverUrlCodingStrategy("/mypage", MyPage.class));

there is no locale parameter...

This means:

1) I cannot give my stateless pages of different locales different
URLs,
which means that nobody can link directly to a non-default locale
version of
the page.

2) My stateless pages are impossible to index in different locales.
Google
either finds only the default locale pages, or must follow a stateful
"change locale" link, which will cause it to index pages which will be
expired by the time they're in Google's search results.

I know that I can make my own workaround, i.e., write my own url
coding
strategy with the locale in the root, /en/mypage to the english
version,
/mypage to the default locale, etc.. Or I could use
IndexedParameterCodingStrategy to make the first parameter the locale
(although this does not work if I want to use another coding
strategy).

However they're still workarounds for something that I think is
conceptually not quite right in Wicket currently: the fact that it
should be
possible to mount different locales of a page on different urls, for
*whatever* coding strategy I choose to use.

Any ideas on this? Anybody already implemented the coding strategy for
the
locale in the root? Anybody got another easier workaround?

Regards,
Sebastiaan







smime.p7s
Description: S/MIME Cryptographic Signature


Re: Good example for FormComponentPanel?

2008-04-14 Thread Igor Vaynberg
if you replace tabbedpanel links to submitlink it will

-igor


On Mon, Apr 14, 2008 at 12:51 PM, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> So, a form CAN contain a panel? Meaning, I am able to add a tabbedpanel
>  to a form and it'll work?
>
>  Michael
>
>
>
>  -Original Message-
>  From: Nick Heudecker [mailto:[EMAIL PROTECTED]
>  Sent: Monday, April 14, 2008 10:29 AM
>  To: users@wicket.apache.org
>  Subject: Re: Good example for FormComponentPanel?
>
>  A FormComponentPanel is used to combine several individual form
>  components
>  into a single object, like if you had year/month/day DropDownChoices in
>  a
>  single component.
>
>  AFAIK, forms can contain anything except pages.
>
>
>  On Mon, Apr 14, 2008 at 12:26 PM, Michael Mehrle
>  <[EMAIL PROTECTED]>
>  wrote:
>
>  > I am pretty sure that a tabbed panel can't be part of one form. If it
>  can,
>  > that would be lovely. But I was under the impression that you can't
>  add
>  > panels to a form.
>  >
>  > Could someone clarify this for me? BTW, one of the things I tried was
>  to
>  > make each panel into a FormComponentPanel and then add it to the
>  tabbed
>  > panel. Well, turns out that FormComponentPanel is NOT a *panel* after
>  all
>  > (bad naming IMHO).
>  >
>  > At this point I'm thinking of simply building it as a straight form
>  and
>  > then turn some of it into tabs via divs and CSS.
>  >
>  > Again, if there's a way to use a tabbed panel inside a form, please
>  let me
>  > know.
>  >
>  > Michael
>  >
>  > -Original Message-
>  > From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
>  > Sent: Friday, April 11, 2008 5:23 PM
>  > To: users@wicket.apache.org
>  > Subject: Re: Good example for FormComponentPanel?
>  >
>  >
>  >   package org.apache.wicket.extensions.markup.html.tabs;
>  >
>  >   public class TabbedPanel extends Panel  <--- it extends the panel
>  >   { ... }
>  >
>  >   Am I wrong? :)
>  >
>  > On Sat, Apr 12, 2008 at 2:11 AM, Michael Mehrle
>  <[EMAIL PROTECTED]>
>  > wrote:
>  > > Yes, I agree, Vitaly - but unfortunately the design decision is out
>  of
>  > my hand. It's got to have tabs. Of course it is possible to do the
>  tabbing
>  > by CSS styling, but I wanted to see if FormComponentPanel is a way to
>  go
>  > since the complexity of managing the tabbed panel would then be
>  shifted to
>  > the CSS/JS side.
>  > >
>  > >  I just looked at the Multiply example and it seems to make sense.
>  > Again, if anyone wants to share any tips/input regarding this (or how
>  to
>  > avoid traps), please don't be shy ;-)
>  > >
>  > >  Michael
>  > >
>  > >
>  > >
>  > >  -Original Message-
>  > >  From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
>  > >  Sent: Friday, April 11, 2008 4:52 PM
>  > >  To: users@wicket.apache.org
>  > >  Subject: Re: Good example for FormComponentPanel?
>  > >
>  > >
>  > >It seems that a simple panel would be the best approach.
>  > >
>  > >  On Sat, Apr 12, 2008 at 1:37 AM, Michael Mehrle
>  <[EMAIL PROTECTED]>
>  > wrote:
>  > >  > I need to build a TabbedPanel with three tabs which are part of
>  one
>  > form
>  > >  >  - the selected tab will contain form components which need to be
>  > >  >  submitted by that one form. It seems FormComponentPanel is the
>  way
>  > to
>  > >  >  go: are there any good examples of this?
>  > >  >
>  > >  >
>  > >  >
>  > >  >  Also, would this be the recommended approach?
>  > >  >
>  > >  >
>  > >  >
>  > >  >  Thanks,
>  > >  >
>  > >  >
>  > >  >
>  > >  >  Michael
>  > >  >
>  > >  >
>  > >
>  > >
>  -
>  > >  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]
>  >
>  >
>
>
>  --
>  Nick Heudecker
>  Professional Wicket Training & Consulting
>  http://www.systemmobile.com
>
>  Eventful - Intelligent Event Management
>  http://www.eventfulhq.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]



RE: CompoundPropertyModel need to track changes

2008-04-14 Thread Karen Schaper
Thanks.  

My class variables for example are _name with the underscore.

and the getter and setter would be setName and getName.

In my form for this page I had included the underscore _name so I think wicket 
was looking for set_Name.  Once I changed the wicket:id to be just name the 
setter setName was called.

Thank you for the clues.



> -Original Message-
> From: Gerolf Seitz [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 14, 2008 7:18 AM
> To: users@wicket.apache.org
> Subject: Re: CompoundPropertyModel need to track changes
> 
> 
> On Mon, Apr 14, 2008 at 1:05 PM, Maurice Marrink 
> <[EMAIL PROTECTED]> wrote:
> 
> > Hmm, it should try to use bean methods before trying the field directly.
> > you could try changing the wicket id of your formcomponent to the full
> > method name, e.g. setLastname() if your property is lastname.
> > If that does not work, it might indicate a problem with your getters
> > and setters.
> >
> 
> it could also be that he only provided a getter or a setter and not both.
> in this case, the field is accessed directly.
> 
>   Gerolf
> 
> 
> >
> > An alternative way to intercept changes (only those coming through the
> > compoundmodel) is to override
> > CompoundPropertyModel#wrapOnInheritance(Component) and return a model
> > similar to AttachedCompoundPropertyModel where you overwrite the
> > setObject method to listen for changes. Unfortunately you cannot
> > extend it because it is private so you have to copy paste it.
> >
> > Maurice
> >
> > On Mon, Apr 14, 2008 at 5:37 AM, Karen Schaper
> > <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > >  I am using a CompoundPropertyModel.
> > >
> > >  CompoundPropertyModel personModel  = new CompoundPropertyModel(
> > >  person );
> > >  Form_editForm= new 
> EditPersonForm(
> > "editForm",
> > >  personModel ) ;
> > >
> > >  Upon submitting the form, I thought that the setter methods would be
> > called
> > >  on the person object. How is the person object updated?  The code in
> > the
> > >  setter methods of person are not called.
> > >
> > >  Am I missing something?
> > >
> > >  I want to track changes in my object and I wanted to check for the
> > change in
> > >  the setter methods of the person object.
> > >
> > >  Thanks for any help.  It is greatly appreciated!
> > >
> > >  Karen
> > >
> > >
> > >
> > >
> > >  -
> > >  To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >  For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 


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



RE: ReCaptcha Panel

2008-04-14 Thread Michael Laccetti

ReCaptcha = Google?  Well then.  That'd be a particular problem.  If they
update their stuff, perhaps it'll be handy; I do know that it is popular.


Michael Mehrle wrote:
> 
> Not sure if anyone cares about this - but I hear that ALL captchas out
> there have been broken. Not really much of a hurdle anymore.
> 


-
--
Michael Laccetti (416)558-9718
S2G Limited   http://www.s2g.ca/
-- 
View this message in context: 
http://www.nabble.com/ReCaptcha-Panel-tp16685718p16689102.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]



Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Johan Compagner
The problem is that a component has not a locale by default
So then we should give a Page a locale field.
and then that will be set..

But the problem is

if you do setResponsePage(Page.class)

what should then be taken? The session locale mount?

johan


On Mon, Apr 14, 2008 at 6:14 PM, Sebastiaan van Erk <[EMAIL PROTECTED]>
wrote:

> Johan Compagner wrote:
>
> > So when you do this:
> >
> > mount(new WhateverUrlCodingStrategy("/mypage", MyPage.class,
> > Locale.NL));
> >
> > then when i hit
> >
> > /mypage
> >
> > we have to set the sessions locale to NL then?
> >
>
> I don't think so. The *resource* has the specified locale, i.e., the Page,
> but I think it's bad to have as side effect that the session's locale is
> suddenly changed.
>
> I realize this introduces other issues... what happens with a Link to
> another page class? It should use the Page locale, not the session locale...
> So a component uses its locale, or its parent locale, or its parent's
> parent, etc, and if Page doesn't have a locale, THEN the session locale...
>
> But I don't know the inner workings of Wicket's localization, nor have I
> thought long and hard about this yet, so I don't know if any of this make
> sense...
>
> I just think it's weird that I cannot mount 2 locales of a page on two
> different paths... leading to the crawler and reference issues I mentioned
> before... What the best solution is, is probably something that needs to be
> discussed further. :-)
>
> Regards,
> Sebastiaan
>
>
>
> Regards,
> Sebastiaan
>
>
>  johan
> >
> >
> > On Mon, Apr 14, 2008 at 12:40 PM, Sebastiaan van Erk <
> > [EMAIL PROTECTED]>
> > wrote:
> >
> >  Hi,
> > >
> > > I have localized my Wicket site, but I have a problem with
> > > localization +
> > > (mounted) bookmarkable pages.
> > >
> > > When mounting a bookmarkable page:
> > >
> > >   mount(new WhateverUrlCodingStrategy("/mypage", MyPage.class));
> > >
> > > there is no locale parameter...
> > >
> > > This means:
> > >
> > > 1) I cannot give my stateless pages of different locales different
> > > URLs,
> > > which means that nobody can link directly to a non-default locale
> > > version of
> > > the page.
> > >
> > > 2) My stateless pages are impossible to index in different locales.
> > > Google
> > > either finds only the default locale pages, or must follow a stateful
> > > "change locale" link, which will cause it to index pages which will be
> > > expired by the time they're in Google's search results.
> > >
> > > I know that I can make my own workaround, i.e., write my own url
> > > coding
> > > strategy with the locale in the root, /en/mypage to the english
> > > version,
> > > /mypage to the default locale, etc.. Or I could use
> > > IndexedParameterCodingStrategy to make the first parameter the locale
> > > (although this does not work if I want to use another coding
> > > strategy).
> > >
> > > However they're still workarounds for something that I think is
> > > conceptually not quite right in Wicket currently: the fact that it
> > > should be
> > > possible to mount different locales of a page on different urls, for
> > > *whatever* coding strategy I choose to use.
> > >
> > > Any ideas on this? Anybody already implemented the coding strategy for
> > > the
> > > locale in the root? Anybody got another easier workaround?
> > >
> > > Regards,
> > > Sebastiaan
> > >
> > >
> > >
> >


Consuming a portlet in Wicket?

2008-04-14 Thread Andrew Broderick
Hi,

I am trying to seamlessly integrate JForum into my Wicket application. Problem 
is, JForum is an entirely separate web application (running under the same 
domain however).

JForum has a JSR-168 portlet bridge available, to allow it to run as a portlet. 
However, can a portlet be consumed by Wicket? Or, are there any other ways 
anyone can think of to achieve this (preferably without using an iframe).

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


RE: ReCaptcha Panel

2008-04-14 Thread Michael Mehrle
Not sure if anyone cares about this - but I hear that ALL captchas out
there have been broken. Not really much of a hurdle anymore.



-Original Message-
From: Dan Kaplan [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 14, 2008 11:08 AM
To: users@wicket.apache.org
Subject: ReCaptcha Panel

Here is the code for the recaptcha panel.  I don't feel like creating a
project for this but others have expressed interest in it. 

Panel: http://pastebin.org/29726

SRC: http://pastebin.org/29725

 

NOTE: this library has a dependency lib.  You can download it here:
http://code.google.com/p/recaptcha/downloads/list

 

Obviously, you just need the lib for java.

 

 

 


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



RE: Good example for FormComponentPanel?

2008-04-14 Thread Michael Mehrle
So, a form CAN contain a panel? Meaning, I am able to add a tabbedpanel
to a form and it'll work?

Michael

-Original Message-
From: Nick Heudecker [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 14, 2008 10:29 AM
To: users@wicket.apache.org
Subject: Re: Good example for FormComponentPanel?

A FormComponentPanel is used to combine several individual form
components
into a single object, like if you had year/month/day DropDownChoices in
a
single component.

AFAIK, forms can contain anything except pages.


On Mon, Apr 14, 2008 at 12:26 PM, Michael Mehrle
<[EMAIL PROTECTED]>
wrote:

> I am pretty sure that a tabbed panel can't be part of one form. If it
can,
> that would be lovely. But I was under the impression that you can't
add
> panels to a form.
>
> Could someone clarify this for me? BTW, one of the things I tried was
to
> make each panel into a FormComponentPanel and then add it to the
tabbed
> panel. Well, turns out that FormComponentPanel is NOT a *panel* after
all
> (bad naming IMHO).
>
> At this point I'm thinking of simply building it as a straight form
and
> then turn some of it into tabs via divs and CSS.
>
> Again, if there's a way to use a tabbed panel inside a form, please
let me
> know.
>
> Michael
>
> -Original Message-
> From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 11, 2008 5:23 PM
> To: users@wicket.apache.org
> Subject: Re: Good example for FormComponentPanel?
>
>
>   package org.apache.wicket.extensions.markup.html.tabs;
>
>   public class TabbedPanel extends Panel  <--- it extends the panel
>   { ... }
>
>   Am I wrong? :)
>
> On Sat, Apr 12, 2008 at 2:11 AM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
> > Yes, I agree, Vitaly - but unfortunately the design decision is out
of
> my hand. It's got to have tabs. Of course it is possible to do the
tabbing
> by CSS styling, but I wanted to see if FormComponentPanel is a way to
go
> since the complexity of managing the tabbed panel would then be
shifted to
> the CSS/JS side.
> >
> >  I just looked at the Multiply example and it seems to make sense.
> Again, if anyone wants to share any tips/input regarding this (or how
to
> avoid traps), please don't be shy ;-)
> >
> >  Michael
> >
> >
> >
> >  -Original Message-
> >  From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
> >  Sent: Friday, April 11, 2008 4:52 PM
> >  To: users@wicket.apache.org
> >  Subject: Re: Good example for FormComponentPanel?
> >
> >
> >It seems that a simple panel would be the best approach.
> >
> >  On Sat, Apr 12, 2008 at 1:37 AM, Michael Mehrle
<[EMAIL PROTECTED]>
> wrote:
> >  > I need to build a TabbedPanel with three tabs which are part of
one
> form
> >  >  - the selected tab will contain form components which need to be
> >  >  submitted by that one form. It seems FormComponentPanel is the
way
> to
> >  >  go: are there any good examples of this?
> >  >
> >  >
> >  >
> >  >  Also, would this be the recommended approach?
> >  >
> >  >
> >  >
> >  >  Thanks,
> >  >
> >  >
> >  >
> >  >  Michael
> >  >
> >  >
> >
> >
-
> >  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]
>
>


-- 
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com

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



Re: Check validator existence

2008-04-14 Thread Paolo Di Tommaso
I've done so .. thanks.

// Paolo

On Mon, Apr 14, 2008 at 9:17 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> just have a boolean that marks the fact that you have added the
> validator to the form...
>
> -igor
>
>
>


RE: ReCaptcha Panel

2008-04-14 Thread Dan Kaplan
Probably, IMO it's way easier to use this than following the captcha
example.  This example has a problem though: it displays a warning every
time you visit the page with the panel (can't remember what the warning
says, something about not being able to bind a text field).  But it still
works exactly how it should.

> -Original Message-
> From: Michael Laccetti [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 14, 2008 12:08 PM
> To: users@wicket.apache.org
> Subject: Re: ReCaptcha Panel
> 
> 
> Perhaps this would do well as an addition to wicketstuff contribs?
> 
> 
> Dan Kaplan-3 wrote:
> >
> > Here is the code for the recaptcha panel.  I don't feel like creating a
> > project for this but others have expressed interest in it.
> >
> > Panel: http://pastebin.org/29726
> >
> > SRC: http://pastebin.org/29725
> >
> >
> >
> > NOTE: this library has a dependency lib.  You can download it here:
> > http://code.google.com/p/recaptcha/downloads/list
> >
> >
> >
> > Obviously, you just need the lib for java.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> 
> 
> -
> --
> Michael Laccetti (416)558-9718
> S2G Limited   http://www.s2g.ca/
> --
> View this message in context: http://www.nabble.com/ReCaptcha-Panel-
> tp16685718p16687650.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]



Re: Check validator existence

2008-04-14 Thread Igor Vaynberg
just have a boolean that marks the fact that you have added the
validator to the form...

-igor


On Mon, Apr 14, 2008 at 12:05 PM, Paolo Di Tommaso
<[EMAIL PROTECTED]> wrote:
> Take in consideration the following use case:
>
>  1) There is a panel instancing a IFormValidator
>
>  2) To make the panel self contained it does not have an explicit reference
>  to the containing form but it is found invoking Component#findParent(
>  Form.class ) method
>
>  3) Doing so, findParent cannot be invoked in the panel constructor but in
>  the onBeforeRender() method, so I was trying to do something like:
>
>
>  public void onBeforeRender() {
>   IFormValidator myValidator = ... ;
>   Form form = (Form) findParent( Form.class );
>   if( !form.contains( myValidator ) ) {
>  form.add( myValidator );
>   }
>  }
>
>  Thanks
>
>  // Paolo
>
>  On Mon, Apr 14, 2008 at 5:42 PM, Igor Vaynberg <[EMAIL PROTECTED]>
>  wrote:
>
>
>
>  > no, i dont think we do. what is your usecase?
>  >
>  > -igor
>  >
>  >
>  > On Mon, Apr 14, 2008 at 2:45 AM, Paolo Di Tommaso
>  > <[EMAIL PROTECTED]> wrote:
>  > > Guys,
>  > >
>  > >  is there an API in wicket to know if a Validator instance has been
>  > added to
>  > >  a form?
>  > >
>  > >  Something like Form#contains( IValidator ) or any workaround to know
>  > it?
>  > >
>  > >
>  > >  Thanks,
>  > >
>  > >
>  > >  // Paolo
>  > >
>  >
>
>
> > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>

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



Re: ReCaptcha Panel

2008-04-14 Thread Michael Laccetti

Perhaps this would do well as an addition to wicketstuff contribs?


Dan Kaplan-3 wrote:
> 
> Here is the code for the recaptcha panel.  I don't feel like creating a
> project for this but others have expressed interest in it. 
> 
> Panel: http://pastebin.org/29726
> 
> SRC: http://pastebin.org/29725
> 
>  
> 
> NOTE: this library has a dependency lib.  You can download it here:
> http://code.google.com/p/recaptcha/downloads/list
> 
>  
> 
> Obviously, you just need the lib for java.
> 
>  
> 
>  
> 
>  
> 
> 
> 


-
--
Michael Laccetti (416)558-9718
S2G Limited   http://www.s2g.ca/
-- 
View this message in context: 
http://www.nabble.com/ReCaptcha-Panel-tp16685718p16687650.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]



Re: Check validator existence

2008-04-14 Thread Paolo Di Tommaso
Take in consideration the following use case:

1) There is a panel instancing a IFormValidator

2) To make the panel self contained it does not have an explicit reference
to the containing form but it is found invoking Component#findParent(
Form.class ) method

3) Doing so, findParent cannot be invoked in the panel constructor but in
the onBeforeRender() method, so I was trying to do something like:


public void onBeforeRender() {
  IFormValidator myValidator = ... ;
  Form form = (Form) findParent( Form.class );
  if( !form.contains( myValidator ) ) {
 form.add( myValidator );
  }
}

Thanks

// Paolo

On Mon, Apr 14, 2008 at 5:42 PM, Igor Vaynberg <[EMAIL PROTECTED]>
wrote:

> no, i dont think we do. what is your usecase?
>
> -igor
>
>
> On Mon, Apr 14, 2008 at 2:45 AM, Paolo Di Tommaso
> <[EMAIL PROTECTED]> wrote:
> > Guys,
> >
> >  is there an API in wicket to know if a Validator instance has been
> added to
> >  a form?
> >
> >  Something like Form#contains( IValidator ) or any workaround to know
> it?
> >
> >
> >  Thanks,
> >
> >
> >  // Paolo
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


ReCaptcha Panel

2008-04-14 Thread Dan Kaplan
Here is the code for the recaptcha panel.  I don't feel like creating a
project for this but others have expressed interest in it. 

Panel: http://pastebin.org/29726

SRC: http://pastebin.org/29725

 

NOTE: this library has a dependency lib.  You can download it here:
http://code.google.com/p/recaptcha/downloads/list

 

Obviously, you just need the lib for java.

 

 

 



Re: Good example for FormComponentPanel?

2008-04-14 Thread Ryan Gravener
DateTimeField extends FormComponentPanel

On Fri, Apr 11, 2008 at 7:37 PM, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> I need to build a TabbedPanel with three tabs which are part of one form
>  - the selected tab will contain form components which need to be
>  submitted by that one form. It seems FormComponentPanel is the way to
>  go: are there any good examples of this?
>
>
>
>  Also, would this be the recommended approach?
>
>
>
>  Thanks,
>
>
>
>  Michael
>
>



-- 
Ryan Gravener
http://ryangravener.com

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



Re: Good example for FormComponentPanel?

2008-04-14 Thread Nick Heudecker
A FormComponentPanel is used to combine several individual form components
into a single object, like if you had year/month/day DropDownChoices in a
single component.

AFAIK, forms can contain anything except pages.


On Mon, Apr 14, 2008 at 12:26 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:

> I am pretty sure that a tabbed panel can't be part of one form. If it can,
> that would be lovely. But I was under the impression that you can't add
> panels to a form.
>
> Could someone clarify this for me? BTW, one of the things I tried was to
> make each panel into a FormComponentPanel and then add it to the tabbed
> panel. Well, turns out that FormComponentPanel is NOT a *panel* after all
> (bad naming IMHO).
>
> At this point I'm thinking of simply building it as a straight form and
> then turn some of it into tabs via divs and CSS.
>
> Again, if there's a way to use a tabbed panel inside a form, please let me
> know.
>
> Michael
>
> -Original Message-
> From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 11, 2008 5:23 PM
> To: users@wicket.apache.org
> Subject: Re: Good example for FormComponentPanel?
>
>
>   package org.apache.wicket.extensions.markup.html.tabs;
>
>   public class TabbedPanel extends Panel  <--- it extends the panel
>   { ... }
>
>   Am I wrong? :)
>
> On Sat, Apr 12, 2008 at 2:11 AM, Michael Mehrle <[EMAIL PROTECTED]>
> wrote:
> > Yes, I agree, Vitaly - but unfortunately the design decision is out of
> my hand. It's got to have tabs. Of course it is possible to do the tabbing
> by CSS styling, but I wanted to see if FormComponentPanel is a way to go
> since the complexity of managing the tabbed panel would then be shifted to
> the CSS/JS side.
> >
> >  I just looked at the Multiply example and it seems to make sense.
> Again, if anyone wants to share any tips/input regarding this (or how to
> avoid traps), please don't be shy ;-)
> >
> >  Michael
> >
> >
> >
> >  -Original Message-
> >  From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
> >  Sent: Friday, April 11, 2008 4:52 PM
> >  To: users@wicket.apache.org
> >  Subject: Re: Good example for FormComponentPanel?
> >
> >
> >It seems that a simple panel would be the best approach.
> >
> >  On Sat, Apr 12, 2008 at 1:37 AM, Michael Mehrle <[EMAIL PROTECTED]>
> wrote:
> >  > I need to build a TabbedPanel with three tabs which are part of one
> form
> >  >  - the selected tab will contain form components which need to be
> >  >  submitted by that one form. It seems FormComponentPanel is the way
> to
> >  >  go: are there any good examples of this?
> >  >
> >  >
> >  >
> >  >  Also, would this be the recommended approach?
> >  >
> >  >
> >  >
> >  >  Thanks,
> >  >
> >  >
> >  >
> >  >  Michael
> >  >
> >  >
> >
> >  -
> >  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]
>
>


-- 
Nick Heudecker
Professional Wicket Training & Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


RE: Good example for FormComponentPanel?

2008-04-14 Thread Michael Mehrle
I am pretty sure that a tabbed panel can't be part of one form. If it can, that 
would be lovely. But I was under the impression that you can't add panels to a 
form.

Could someone clarify this for me? BTW, one of the things I tried was to make 
each panel into a FormComponentPanel and then add it to the tabbed panel. Well, 
turns out that FormComponentPanel is NOT a *panel* after all (bad naming IMHO).

At this point I'm thinking of simply building it as a straight form and then 
turn some of it into tabs via divs and CSS.

Again, if there's a way to use a tabbed panel inside a form, please let me know.

Michael

-Original Message-
From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 11, 2008 5:23 PM
To: users@wicket.apache.org
Subject: Re: Good example for FormComponentPanel?


   package org.apache.wicket.extensions.markup.html.tabs;

   public class TabbedPanel extends Panel  <--- it extends the panel
   { ... }

   Am I wrong? :)

On Sat, Apr 12, 2008 at 2:11 AM, Michael Mehrle <[EMAIL PROTECTED]> wrote:
> Yes, I agree, Vitaly - but unfortunately the design decision is out of my 
> hand. It's got to have tabs. Of course it is possible to do the tabbing by 
> CSS styling, but I wanted to see if FormComponentPanel is a way to go since 
> the complexity of managing the tabbed panel would then be shifted to the 
> CSS/JS side.
>
>  I just looked at the Multiply example and it seems to make sense. Again, if 
> anyone wants to share any tips/input regarding this (or how to avoid traps), 
> please don't be shy ;-)
>
>  Michael
>
>
>
>  -Original Message-
>  From: Vitaly Tsaplin [mailto:[EMAIL PROTECTED]
>  Sent: Friday, April 11, 2008 4:52 PM
>  To: users@wicket.apache.org
>  Subject: Re: Good example for FormComponentPanel?
>
>
>It seems that a simple panel would be the best approach.
>
>  On Sat, Apr 12, 2008 at 1:37 AM, Michael Mehrle <[EMAIL PROTECTED]> wrote:
>  > I need to build a TabbedPanel with three tabs which are part of one form
>  >  - the selected tab will contain form components which need to be
>  >  submitted by that one form. It seems FormComponentPanel is the way to
>  >  go: are there any good examples of this?
>  >
>  >
>  >
>  >  Also, would this be the recommended approach?
>  >
>  >
>  >
>  >  Thanks,
>  >
>  >
>  >
>  >  Michael
>  >
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: DynamicWebResource filename

2008-04-14 Thread Frank Bille
I can't see any good reason. If you create an issue for it (preferable
with a patch), then I'll take a look at it.

Frank

On Mon, Apr 14, 2008 at 12:56 PM, Sebastiaan van Erk
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>  Any reason why the filename field in DynamicWebResource does not at least
> have a protected getter so you can use it in subclasses without having to
> add the field again?
>
>  Regards,
>  Sebastiaan
>

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



Re: How to change the html folder?

2008-04-14 Thread Jeremy Thomerson
http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html

On Mon, Apr 14, 2008 at 10:09 AM, liny <[EMAIL PROTECTED]> wrote:

>
> Hi~
>
> In default, for example, your html and web page class must be together.
> Can I move my html files to a single folder?
> And how?
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/How-to-change-the-html-folder--tp16678545p16678545.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]
>
>


Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Jan Kriesten


hi sebastiaan,

Btw: do you have a change locale link? How do you make sure it plays 
nice with bookmarkable urls?


actually, since the locale is filtered out from the actual url - you don't have 
to worry about this at all. just link the user to the /de/xy or /en/xy-pages and 
you get called the xy-mount with the right locale...


best regards, --- jan.



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



Re: Removing the jsessionid for SEO

2008-04-14 Thread Rüdiger Schulz
I'll wrap something up in the course of this week, and post it on my blog.
(so little time a.t.m.)

greetings,


Rüdiger

2008/4/14, Erik van Oosten <[EMAIL PROTECTED]>:
>
> Hi Rüdiger,
>
> I would be very interested in the code.
> If you can not find a suitable repository, could you just do something
> simple like linking to a  zip from a blog post?
>
> Regards,
>
> Erik.
>
>
>
>
> Rüdiger Schulz wrote:
> > Hello everybody,
> >
> > I just want to add my 2 cents to this discussion.
> >
> > At IndyPhone we too wanted to get rid of jesessionid-URLs in google's
> index.
> > Yeah, it would be nice if the google bot would be as clever as the one
> from
> > yahoo, and just remove them himself. But he doesn't.
> >
> > So I implemented a Servlet-Filter which checks the user agent header for
> > google bot, and skips the url rewriting just for those clients. As this
> will
> > generate lots of new sessions, the filter invalidates the session right
> > after the request. Also, if a crawler is doing a request containing a
> > jsessionid (which he stored before the filter was implemented), he
> redirects
> > the crawler to the same URL, just without the jsessionid parameter. That
> > way, the index will be updated for those old URLs.
> >
> > Now we have almost none of those URLs in google's index.
> >
> > If anyone is interested in the code, I'd be willing to publish this. As
> it
> > is not wicket specific, I could share it with some generic servlet tools
> OS
> > project - is there something like that on apache or elsewhere?
> >
> > But maybe Google is smarter by now, and it is not required anymore?
> >
> >
>
>
> -
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
greetings from Berlin,

Rüdiger Schulz

www.2rue.de
www.indyphone.de - Coole Handy Logos einfach selber bauen


Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk
Nope, no questions, readable enough. I'll give it a shot in my 
application Thanks a lot!


Btw: do you have a change locale link? How do you make sure it plays 
nice with bookmarkable urls? I was thinking of using a redirect if the 
page is bookmarkable, but haven't worked it out yet...


Thanks again,
Sebastiaan

Jan Kriesten wrote:


hi sebastiaan,

i just snip the things out and comment (as far as necessary):

use this filter instead of the default wicket filter:

---8<---
object LocaleFilter
{
  final val REQUEST_LOCALE_ATTRIBUTE = "_request_locale_"
}

class LocaleFilter extends WicketFilter
{
  import de.footprint.utils.lang.LocaleUtils
  import javax.servlet.http.HttpServletRequest

  /**
   * Extracts an optional locale attribute from the request path and 
sets the
   * requests locale as an request attribute. The part of the request 
path before

   * the first '/' is checked against available java system locales.
   *
   * @param request
   * incoming request
   * @return relative request paths w/o locale attribute
   */
  override def getRelativePath( request: HttpServletRequest ) =
  {
val relPath = super.getRelativePath( request )
val len = relPath.length
val idx = if( len>2 ) relPath.indexOf( '/' ) else -1

if( idx >= 0 )
{
  val lang = relPath.substring( 0, idx )

  LocaleUtils.getLocale( lang ) match
  {
case Some(locale) =>
  request.setAttribute( LocaleFilter.REQUEST_LOCALE_ATTRIBUTE, 
locale )

  if( len > lang.length ) relPath.substring( lang.length + 1 )
  else ""
case _ => relPath
  }
}
else relPath
  }
}
---8<---

i think that's self explanatory.

second, you have to alter application, session + request a bit.


Application:

---8<---
abstract class LocaleApplication extends WebApplication
{
  /**
   * Evaluate the current Locale to use.
   *
   * Based on the Locale provided by the LocaleFilter, the current 
Locale is selected as:

   *
   * - if none is set and no Locale is passed in, the Application 
default Locale is returned

   * - if none is set but a Locale is passed in, this is returned
   * - if a Locale is set by the filter and this is supported by the 
Application, its returned

   * - if a Locale is set but unsupported, the default Locale is returned
   *
   * @param currentLocale
   * current Locale in use or null
   * @return Locale to use
   */
  protected[application] def getLocale( currentLocale: Locale ) : Locale =
  {
val request = 
RequestCycle.get.getRequest.asInstanceOf[WebRequest].getHttpServletRequest.asInstanceOf[HttpServletRequest]; 

val requestLocale = request.getAttribute( 
LocaleFilter.REQUEST_LOCALE_ATTRIBUTE ).asInstanceOf[Locale];


if( requestLocale == null )
{
  if( currentLocale == null ) getDefaultLocale
  else currentLocale
}
else
if( currentLocale == null || currentLocale != requestLocale )
{
  getSupportedLocales.find( x => x == requestLocale || x.getLanguage 
== requestLocale.getLanguage ).getOrElse( getDefaultLocale )

}
else currentLocale
  }

  /**
   * Sets the Locale to use in newly created sessions.
   *
   * @param session
   * newly created session
   */
  protected def sessionCreateListener( session: WebSession ) = 
session.setLocale( getLocale( null ) )


  /**
   * Overridden to use the unified Locale selection
   *
   * @param servletRequest
   * Current request to generate Request instance for.
   * @return new LocaleRequest instance
   */
  override protected def newWebRequest( servletRequest: 
HttpServletRequest ) = new LocaleRequest( servletRequest )


}
---8<---


Request:

---8<---
class LocaleRequest( req: HttpServletRequest ) extends UploadWebRequest( 
req )

{
  override def getLocale = LocaleApplication.get.getLocale( null )
}
---8<---


Session:

---8<---
class LocaleSession( req: Request ) extends WebSession( req )
{
  override def getLocale =
  {
val sessionLocale = super.getLocale
val requestLocale = LocaleApplication.get.getLocale( sessionLocale )

if( sessionLocale!=requestLocale )
  setLocale( requestLocale )

requestLocale
  }
}
---8<---


any questions? :D

best regards, --- jan.


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



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [WUG] Copenhagen

2008-04-14 Thread Nino Saturnino Martinez Vazquez Wael



Frank Bille wrote:

We could also have an informal "ask-a-question" session for 30-45 min
in the beginning?

  

Sounds great.

Which expectations does people have for this meeting?

  
Exactly my words. It's up to the crow to decide on the content. This 
should actually be very appreciated, it's like ask a consultant for free:)


regards Nino

Frank

On Mon, Apr 14, 2008 at 2:49 PM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
  

Hi

 This is a reminder, and callout as it would be really nice to be some more
people in order to get discussions going.

 Heres the proposed content:

 *Wicket-Spring-JPA-Hibernate (Could also be a discussion of the upcomming
archetype wicket Iolith)
 *Wicket Testsing experiences
 *Creating behaviors
 *Selling Wicket (to your company, and customers)
 * Integrating javascript libraries with wicket

 Please sign up here:
 23 april 16 hrs is date and time.

 http://cwiki.apache.org/confluence/display/WICKET/Community+meetups

 If you have any suggestions on content, etc please write. This also goes
for requests on content.



 --
 -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: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Jan Kriesten


hi sebastiaan,

i just snip the things out and comment (as far as necessary):

use this filter instead of the default wicket filter:

---8<---
object LocaleFilter
{
  final val REQUEST_LOCALE_ATTRIBUTE = "_request_locale_"
}

class LocaleFilter extends WicketFilter
{
  import de.footprint.utils.lang.LocaleUtils
  import javax.servlet.http.HttpServletRequest

  /**
   * Extracts an optional locale attribute from the request path and sets the
   * requests locale as an request attribute. The part of the request path 
before
   * the first '/' is checked against available java system locales.
   *
   * @param request
   * incoming request
   * @return relative request paths w/o locale attribute
   */
  override def getRelativePath( request: HttpServletRequest ) =
  {
val relPath = super.getRelativePath( request )
val len = relPath.length
val idx = if( len>2 ) relPath.indexOf( '/' ) else -1

if( idx >= 0 )
{
  val lang = relPath.substring( 0, idx )

  LocaleUtils.getLocale( lang ) match
  {
case Some(locale) =>
  request.setAttribute( LocaleFilter.REQUEST_LOCALE_ATTRIBUTE, locale )
  if( len > lang.length ) relPath.substring( lang.length + 1 )
  else ""
case _ => relPath
  }
}
else relPath
  }
}
---8<---

i think that's self explanatory.

second, you have to alter application, session + request a bit.


Application:

---8<---
abstract class LocaleApplication extends WebApplication
{
  /**
   * Evaluate the current Locale to use.
   *
   * Based on the Locale provided by the LocaleFilter, the current Locale is 
selected as:

   *
   * - if none is set and no Locale is passed in, the Application default 
Locale is returned

   * - if none is set but a Locale is passed in, this is returned
   * - if a Locale is set by the filter and this is supported by the 
Application, its returned

   * - if a Locale is set but unsupported, the default Locale is returned
   *
   * @param currentLocale
   * current Locale in use or null
   * @return Locale to use
   */
  protected[application] def getLocale( currentLocale: Locale ) : Locale =
  {
val request = 
RequestCycle.get.getRequest.asInstanceOf[WebRequest].getHttpServletRequest.asInstanceOf[HttpServletRequest];
val requestLocale = request.getAttribute( 
LocaleFilter.REQUEST_LOCALE_ATTRIBUTE ).asInstanceOf[Locale];


if( requestLocale == null )
{
  if( currentLocale == null ) getDefaultLocale
  else currentLocale
}
else
if( currentLocale == null || currentLocale != requestLocale )
{
  getSupportedLocales.find( x => x == requestLocale || x.getLanguage == 
requestLocale.getLanguage ).getOrElse( getDefaultLocale )

}
else currentLocale
  }

  /**
   * Sets the Locale to use in newly created sessions.
   *
   * @param session
   * newly created session
   */
  protected def sessionCreateListener( session: WebSession ) = 
session.setLocale( getLocale( null ) )


  /**
   * Overridden to use the unified Locale selection
   *
   * @param servletRequest
   * Current request to generate Request instance for.
   * @return new LocaleRequest instance
   */
  override protected def newWebRequest( servletRequest: HttpServletRequest ) = 
new LocaleRequest( servletRequest )


}
---8<---


Request:

---8<---
class LocaleRequest( req: HttpServletRequest ) extends UploadWebRequest( req )
{
  override def getLocale = LocaleApplication.get.getLocale( null )
}
---8<---


Session:

---8<---
class LocaleSession( req: Request ) extends WebSession( req )
{
  override def getLocale =
  {
val sessionLocale = super.getLocale
val requestLocale = LocaleApplication.get.getLocale( sessionLocale )

if( sessionLocale!=requestLocale )
  setLocale( requestLocale )

requestLocale
  }
}
---8<---


any questions? :D

best regards, --- jan.


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



Re: DateTimeField and zero padding hours

2008-04-14 Thread Federico Fanton
On Sat, 12 Apr 2008 18:25:56 +0200
"Johan Compagner" <[EMAIL PROTECTED]> wrote:

> I guess this has something to do with the format string that is used
> for your locale, just look int what dateformat is used in your case

I'm sorry, but I cannot understand how the "blank hours" is related to a locale 
issue.. I'm looking at DateTimeField source right now, and while minutesField 
has a MINUTES_CONVERTER that does the zero-padding, hoursField has nothing like 
that.. Am I missing something? Many thanks for your attention.


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



Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk

Hmm.. Scala :-)

I guess I'll opt for English then :-)

I don't quite understand what you do... taking it out of the filter is 
easy enough I guess, but then? When you set a property on the 
application how does this work with different threads? Do you use thread 
local? Then you do you render the selected page in the specified locale?


Regards,
Sebastiaan

Jan Kriesten wrote:


hi sebastiaan,

Would you be willing to share that code? Because in the short term I 
think it's the best solution.


it's all Scala - if you want that... ;-)

best regards, --- jan.




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



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk

Johan Compagner wrote:

So when you do this:

mount(new WhateverUrlCodingStrategy("/mypage", MyPage.class, Locale.NL));

then when i hit

/mypage

we have to set the sessions locale to NL then?


I don't think so. The *resource* has the specified locale, i.e., the 
Page, but I think it's bad to have as side effect that the session's 
locale is suddenly changed.


I realize this introduces other issues... what happens with a Link to 
another page class? It should use the Page locale, not the session 
locale... So a component uses its locale, or its parent locale, or its 
parent's parent, etc, and if Page doesn't have a locale, THEN the 
session locale...


But I don't know the inner workings of Wicket's localization, nor have I 
thought long and hard about this yet, so I don't know if any of this 
make sense...


I just think it's weird that I cannot mount 2 locales of a page on two 
different paths... leading to the crawler and reference issues I 
mentioned before... What the best solution is, is probably something 
that needs to be discussed further. :-)


Regards,
Sebastiaan



Regards,
Sebastiaan


johan


On Mon, Apr 14, 2008 at 12:40 PM, Sebastiaan van Erk <[EMAIL PROTECTED]>
wrote:


Hi,

I have localized my Wicket site, but I have a problem with localization +
(mounted) bookmarkable pages.

When mounting a bookmarkable page:

   mount(new WhateverUrlCodingStrategy("/mypage", MyPage.class));

there is no locale parameter...

This means:

1) I cannot give my stateless pages of different locales different URLs,
which means that nobody can link directly to a non-default locale version of
the page.

2) My stateless pages are impossible to index in different locales. Google
either finds only the default locale pages, or must follow a stateful
"change locale" link, which will cause it to index pages which will be
expired by the time they're in Google's search results.

I know that I can make my own workaround, i.e., write my own url coding
strategy with the locale in the root, /en/mypage to the english version,
/mypage to the default locale, etc.. Or I could use
IndexedParameterCodingStrategy to make the first parameter the locale
(although this does not work if I want to use another coding strategy).

However they're still workarounds for something that I think is
conceptually not quite right in Wicket currently: the fact that it should be
possible to mount different locales of a page on different urls, for
*whatever* coding strategy I choose to use.

Any ideas on this? Anybody already implemented the coding strategy for the
locale in the root? Anybody got another easier workaround?

Regards,
Sebastiaan






smime.p7s
Description: S/MIME Cryptographic Signature


Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Jan Kriesten


hi sebastiaan,

Would you be willing to share that code? Because in the short term I 
think it's the best solution.


it's all Scala - if you want that... ;-)

best regards, --- jan.




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



Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk

Hi Jan,

Would you be willing to share that code? Because in the short term I 
think it's the best solution.


Regards,
Sebastiaan

Jan Kriesten wrote:


hi sebastiaan,

Any ideas on this? Anybody already implemented the coding strategy for 
the locale in the root? Anybody got another easier workaround?


i don't use a coding strategy for this but an extension to wicket filter 
that parses the 'relative path' of the url for locale definitions, 
strips them and sets a locale-attribute to the application.


e.g.:

http://my.host.de/app/en/mymount/ --> /mymount/ with locale 'en'
http://my.host.de/app/pt/mymount/ --> /mymount/ with locale 'pt'

best regards, --- jan.



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



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Jan Kriesten


hi sebastiaan,

Any ideas on this? Anybody already implemented the coding strategy for 
the locale in the root? Anybody got another easier workaround?


i don't use a coding strategy for this but an extension to wicket filter that 
parses the 'relative path' of the url for locale definitions, strips them and 
sets a locale-attribute to the application.


e.g.:

http://my.host.de/app/en/mymount/ --> /mymount/ with locale 'en'
http://my.host.de/app/pt/mymount/ --> /mymount/ with locale 'pt'

best regards, --- jan.



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



Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Johan Compagner
So when you do this:

mount(new WhateverUrlCodingStrategy("/mypage", MyPage.class, Locale.NL));

then when i hit

/mypage

we have to set the sessions locale to NL then?

johan


On Mon, Apr 14, 2008 at 12:40 PM, Sebastiaan van Erk <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> I have localized my Wicket site, but I have a problem with localization +
> (mounted) bookmarkable pages.
>
> When mounting a bookmarkable page:
>
>mount(new WhateverUrlCodingStrategy("/mypage", MyPage.class));
>
> there is no locale parameter...
>
> This means:
>
> 1) I cannot give my stateless pages of different locales different URLs,
> which means that nobody can link directly to a non-default locale version of
> the page.
>
> 2) My stateless pages are impossible to index in different locales. Google
> either finds only the default locale pages, or must follow a stateful
> "change locale" link, which will cause it to index pages which will be
> expired by the time they're in Google's search results.
>
> I know that I can make my own workaround, i.e., write my own url coding
> strategy with the locale in the root, /en/mypage to the english version,
> /mypage to the default locale, etc.. Or I could use
> IndexedParameterCodingStrategy to make the first parameter the locale
> (although this does not work if I want to use another coding strategy).
>
> However they're still workarounds for something that I think is
> conceptually not quite right in Wicket currently: the fact that it should be
> possible to mount different locales of a page on different urls, for
> *whatever* coding strategy I choose to use.
>
> Any ideas on this? Anybody already implemented the coding strategy for the
> locale in the root? Anybody got another easier workaround?
>
> Regards,
> Sebastiaan
>
>


Re: Check validator existence

2008-04-14 Thread Igor Vaynberg
no, i dont think we do. what is your usecase?

-igor


On Mon, Apr 14, 2008 at 2:45 AM, Paolo Di Tommaso
<[EMAIL PROTECTED]> wrote:
> Guys,
>
>  is there an API in wicket to know if a Validator instance has been added to
>  a form?
>
>  Something like Form#contains( IValidator ) or any workaround to know it?
>
>
>  Thanks,
>
>
>  // Paolo
>

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



Re: Facebook Wicket Integration

2008-04-14 Thread itai


Hi!
Thanks a lot - this works...

Ill have to put the validation on the BasePage class to authenticate every
page because in many cases (like in links that are used on facebook
notifications) the first accessed page is an internal one.

Another question, my application runs as an iframe inside facebook. I want
all URLs in the application to point to
http://apps.facebook.com//. 

Can this be done using Wicket?

Thanks!
itai.
-- 
View this message in context: 
http://www.nabble.com/Facebook-Wicket-Integration-tp16558748p16678578.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]



Re: Radio group, model

2008-04-14 Thread Michael O'Cleirigh

Hi Goran,


I have a form with a radio group. Everithing works (page renders without
errors) but I can't get selected radio in forms onSubmit method.
model.getSomeRadioGroup() returns null.

It probably some logical error using the models. Does radioGroup have to
have its own model or something like that.

  
RadioGroup does need to have its own model and it also needs to be 
included in the markup and it needs to wrap (be the parent) of the 
specific radio's.


If your radio's are directly adjacent in the markup you might find the 
RadioChoice class easier since you can just set 1 model and pass in a 
list of the options.





Here is simplified example:

FORM:
public SomeForm(String id) {
  super(id, new CompoundPropertyModel(new SomeModel()));
  RadioGroup radioGroup = new RadioGroup("someRadioGroup");
  add(radioGroup);

  radioGroup.add(new Radio("radio1"));
  radioGroup.add(new Radio("radio2"));
  radioGroup.add(new Radio("radio3"));

}
  
You need to set a model value for each radio since wicket will do a 
radioGroup.modelObject = selectedRadio.modelObject when the form is 
submitted.






protected void onSubmit() {
  super.onSubmit();
  SomeModel model = (SomeModel) getModelObject();
  System.out.println(model.getSomeRadioGroup()); // This returns null
  System.out.println(model.getRadio1());// This returns null
  System.out.println(model.getRadio2());// This returns null
  System.out.println(model.getRadio3());// This returns null
}

FORMS MODEL:
public class EmailSettingsModel {

private String radio1;

private String radio2;

private String radio3;

private String someRadioGroup;

//... plus getters and setters
}

  

I would change this so that the options for the radio were and enumeration:

public enum EmailOptions { OPTION_1, OPTION_2, OPTION_3; }

then just use a regular Model to hold the values:

FORM:
public SomeForm(String id) {
 super(id, new CompoundPropertyModel(new Model()));
 RadioGroup radioGroup = new RadioGroup("someRadioGroup", new Model 
(EmailOptions.OPTION_1);
 add(radioGroup);

 radioGroup.add(new EmailOptionRadio("radio1", new Model 
(EmailOptions.OPTION_1)));
 radioGroup.add(new EmailOptionRadio("radio2", new Model 
(EmailOptions.OPTION_2)));
 radioGroup.add(new EmailOptionRadio("radio3",  new Model 
(EmailOptions.OPTION_3)));

}

Where emailOptionRadio overrides the Component.getConverter(Class c) method to 
return an IConverter for the EmailOptions enumeration like:

/* (non-Javadoc)
 * @see org.apache.wicket.Component#getConverter(java.lang.Class)
 */
@Override
public IConverter getConverter(Class type) {

return new IConverter () {

/* (non-Javadoc)
 * @see 
org.apache.wicket.util.convert.IConverter#convertToObject(java.lang.String, 
java.util.Locale)
 */
@Override
public Object convertToObject(String value, Locale 
locale) {

if (value.equals("1")) {
return EmailOptions.OPTION_1;
}
else 
if (value.equals("2")) {

return EmailOptions.OPTION_2;
}
if (value.equals("3")) {
return EmailOptions.OPTION_3;
}
else return null;
 



}

/* (non-Javadoc)
 * @see 
org.apache.wicket.util.convert.IConverter#convertToString(java.lang.Object, 
java.util.Locale)
 */
@Override
public String convertToString(Object value, Locale 
locale) {

EmailOptions opts = (EmailOptions)value;

if (opts == EmailOptions.OPTION_1) 
	return "1";
if (opts == EmailOptions.OPTION_2) 
	return "2";


if (opts == EmailOptions.OPTION_3) 
	return "3";


else return "";

}};
}



HTML:



  
  
  



  


Mike


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



How to change the html folder?

2008-04-14 Thread liny

Hi~

In default, for example, your html and web page class must be together.
Can I move my html files to a single folder?
And how?

Thanks
-- 
View this message in context: 
http://www.nabble.com/How-to-change-the-html-folder--tp16678545p16678545.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]




Re: Removing the jsessionid for SEO

2008-04-14 Thread Korbinian Bachl - privat


Yeah, its quite a shame that google doesnt open source their logic ;)

would be nice if you could give us the code however, so we could have a 
look at it :)


Rüdiger Schulz schrieb:

Hm, SEO is really a little bit like black science sometimes *g*

This (german) article states, that SID cloaking would be ok for google:
http://www.trafficmaxx.de/blog/google/gutes-cloaking-schlechtes-cloaking

Some more googling, and here someone seems to confirm this:
http://www.webmasterworld.com/cloaking/3201743.htm
" I was actually at SMX West and Matt Cutts specifically sa*id* that this is
OK"

All I can say in our case is that I added this filter several months ago,
and I can't see any negative effects so far.


greetings,

Rüdiger


2008/4/14, Korbinian Bachl - privat <[EMAIL PROTECTED]>:

Hi Rüdiger,

AFAIK this could lead to some punishment by google, as he browses the site
multiple times using different agents and origin IPs and in case he sees
different behaviours he thinks about cloaking/ prepared content and will act
accordingly to it;

This is usually noticed after the regular google index refreshes that
happen some times a year - you should keep an eye onto this;

Best,

Korbinian

Rüdiger Schulz schrieb:


Hello everybody,

I just want to add my 2 cents to this discussion.

At IndyPhone we too wanted to get rid of jesessionid-URLs in google's
index.
Yeah, it would be nice if the google bot would be as clever as the one
from
yahoo, and just remove them himself. But he doesn't.

So I implemented a Servlet-Filter which checks the user agent header for
google bot, and skips the url rewriting just for those clients. As this
will
generate lots of new sessions, the filter invalidates the session right
after the request. Also, if a crawler is doing a request containing a
jsessionid (which he stored before the filter was implemented), he
redirects
the crawler to the same URL, just without the jsessionid parameter. That
way, the index will be updated for those old URLs.

Now we have almost none of those URLs in google's index.

If anyone is interested in the code, I'd be willing to publish this. As
it
is not wicket specific, I could share it with some generic servlet tools
OS
project - is there something like that on apache or elsewhere?

But maybe Google is smarter by now, and it is not required anymore?



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



MOdal window feedback panel something strange is going on

2008-04-14 Thread taygolf

Hey guys. I am not sure that this has anything to do with the feed back panel
or not but I wanted to mention it.

Here is what I have. I have a modal window with required textfields in it.
The textfields have another modal window that creates a 'popup' and the user
selects the value they want entered into the requiredtextfield.

When the user opens the first modal window they see the required textfields.
when they click on the button to open the second modal window the user sees
their options in a select list. They select one and hit submit and the
textfield is populated with their choice vie ajax.

The problem I have is what happens when the user trys to submit the first
modal window with out filling out the required textfield. I have a feedback
panel that popups up and tells the user that the must selct a user name. 

After the feedback panel is shown the user will click on the button to show
second modal window. Again their choices appear in a modal window. They can
select one and hit submit just like before but this time the textfield is
not populated.

So the question is why does it do this. It works great until there is an
error in the modal window and then everything goes to hell. I have to
require the testfield so I can not just remove the requirement. What is the
problem here.  I am sure it is something simple I have over looked

Thanks

T
-- 
View this message in context: 
http://www.nabble.com/MOdal-window-feedback-panel-something-strange-is-going-on-tp16678101p16678101.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]



Radio group, model

2008-04-14 Thread Goran Novak

Hi,

I have a form with a radio group. Everithing works (page renders without
errors) but I can't get selected radio in forms onSubmit method.
model.getSomeRadioGroup() returns null.

It probably some logical error using the models. Does radioGroup have to
have its own model or something like that.


Here is simplified example:

FORM:
public SomeForm(String id) {
  super(id, new CompoundPropertyModel(new SomeModel()));
  RadioGroup radioGroup = new RadioGroup("someRadioGroup");
  add(radioGroup);

  radioGroup.add(new Radio("radio1"));
  radioGroup.add(new Radio("radio2"));
  radioGroup.add(new Radio("radio3"));

}

protected void onSubmit() {
  super.onSubmit();
  SomeModel model = (SomeModel) getModelObject();
  System.out.println(model.getSomeRadioGroup()); // This returns null
  System.out.println(model.getRadio1());// This returns null
  System.out.println(model.getRadio2());// This returns null
  System.out.println(model.getRadio3());// This returns null
}

FORMS MODEL:
public class EmailSettingsModel {

private String radio1;

private String radio2;

private String radio3;

private String someRadioGroup;

//... plus getters and setters
}

HTML:



  
  
  



-- 
View this message in context: 
http://www.nabble.com/Radio-group%2C-model-tp16678100p16678100.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]



Re: Removing the jsessionid for SEO

2008-04-14 Thread Erik van Oosten
Hi Rüdiger,

I would be very interested in the code.
If you can not find a suitable repository, could you just do something
simple like linking to a  zip from a blog post?

Regards,
Erik.



Rüdiger Schulz wrote:
> Hello everybody,
>
> I just want to add my 2 cents to this discussion.
>
> At IndyPhone we too wanted to get rid of jesessionid-URLs in google's index.
> Yeah, it would be nice if the google bot would be as clever as the one from
> yahoo, and just remove them himself. But he doesn't.
>
> So I implemented a Servlet-Filter which checks the user agent header for
> google bot, and skips the url rewriting just for those clients. As this will
> generate lots of new sessions, the filter invalidates the session right
> after the request. Also, if a crawler is doing a request containing a
> jsessionid (which he stored before the filter was implemented), he redirects
> the crawler to the same URL, just without the jsessionid parameter. That
> way, the index will be updated for those old URLs.
>
> Now we have almost none of those URLs in google's index.
>
> If anyone is interested in the code, I'd be willing to publish this. As it
> is not wicket specific, I could share it with some generic servlet tools OS
> project - is there something like that on apache or elsewhere?
>
> But maybe Google is smarter by now, and it is not required anymore?
>
>   

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



Re: [WUG] Copenhagen

2008-04-14 Thread Frank Bille
We could also have an informal "ask-a-question" session for 30-45 min
in the beginning?

Which expectations does people have for this meeting?

Frank

On Mon, Apr 14, 2008 at 2:49 PM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
> Hi
>
>  This is a reminder, and callout as it would be really nice to be some more
> people in order to get discussions going.
>
>  Heres the proposed content:
>
>  *Wicket-Spring-JPA-Hibernate (Could also be a discussion of the upcomming
> archetype wicket Iolith)
>  *Wicket Testsing experiences
>  *Creating behaviors
>  *Selling Wicket (to your company, and customers)
>  * Integrating javascript libraries with wicket
>
>  Please sign up here:
>  23 april 16 hrs is date and time.
>
>  http://cwiki.apache.org/confluence/display/WICKET/Community+meetups
>
>  If you have any suggestions on content, etc please write. This also goes
> for requests on content.
>
>
>
>  --
>  -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]



Messages with labels

2008-04-14 Thread Java Programmer
Hello,
How can I in unit tests check if the messages with $label are
displayed on page eg.:
add_advert.street=Street
add_advert.street.Required=Field '${label}' is required.

in unit tests:
getWicketTester().assertErrorMessages( new String[] {

getWicketTester().getComponentFromLastRenderedPage("add_advert:subject").getString("add_advert.street.Required")
});

That has not resolve message for component but expected still is Field
'${label}' is required. not Field 'Street' is required.
How can I change this?

Best regards,
Adr

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



Re: page reload

2008-04-14 Thread Milan Křápek
I am using the normal Link. My ListView Model takes data from 
LoadableDetachableModel. I think if the web page should refresh each time the 
Link is clicked, than the LoadableDetachableModel::load() method should be 
called but this does not happen. 
Is it possible that I am  using to old wicket version. I am using wicket 1.3.2. 

If the version is right, please just take the fact that for some reason the 
refresh of web page did not proceed. Is there any way how to reload the page 
manualy in the onClick event of normal Link object?

As I write in previos mails I try call

@Override
public final void onClick() {
   BaseGroup group = (BaseGroup) getModelObject();
   groupManager.deleteGroup(group.getId());
   getPage().modelChanged();
   setResponsePage(getPage());
   setRedirect(true);
} 

but this does not work too. Any idea how to make it different way?

hierarchy of my page is

Page
 ListView
 ListItem
 Link remove

And I need to reload whole page or at least the ListView.

Thanks for any advice

Milan

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



Re: [WUG] Copenhagen

2008-04-14 Thread Nino Saturnino Martinez Vazquez Wael

Hi

This is a reminder, and callout as it would be really nice to be some 
more people in order to get discussions going.


Heres the proposed content:

*Wicket-Spring-JPA-Hibernate (Could also be a discussion of the 
upcomming archetype wicket Iolith)

*Wicket Testsing experiences
*Creating behaviors
*Selling Wicket (to your company, and customers)
* Integrating javascript libraries with wicket

Please sign up here:
23 april 16 hrs is date and time.
http://cwiki.apache.org/confluence/display/WICKET/Community+meetups

If you have any suggestions on content, etc please write. This also goes 
for requests on content.


--
-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: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk

Gwyn Evans wrote:

On Mon, Apr 14, 2008 at 11:40 AM, Sebastiaan van Erk
<[EMAIL PROTECTED]> wrote:


 However they're still workarounds for something that I think is
conceptually not quite right in Wicket currently: the fact that it should be
possible to mount different locales of a page on different urls, for
*whatever* coding strategy I choose to use.


I suspect that it's just that the default behaviour (automatically
using the user's locale to return the locale-specific page) covers the
majority of requirements & no-one's raised an issue to modify the url
coding strategies, let alone contributed code!  A quick search back on
the list suggested something similar had been asked by various people
a couple of times before, but it's not clear if anything was then
coded or if they found a different approach.


Yes, I did the search as well, and saw nobody with a clear answer on how 
they went about it. The best approach I saw on the list was getting the 
locale from the root part of the URL, but I'm not that deep into wicket 
that I'd know how to go about building that in a proper way.



Note that even if you think you can't contribute code for one reason
or another, an discussion here followed by a JIRA issue with specific
use-cases will mean it's not forgotten, at least.


It does seem unlogical to me that you would *mount* different versions 
of a resource on a single URL, so I'll open a JIRA on it.




/Gwyn




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Removing the jsessionid for SEO

2008-04-14 Thread Rüdiger Schulz
Hm, SEO is really a little bit like black science sometimes *g*

This (german) article states, that SID cloaking would be ok for google:
http://www.trafficmaxx.de/blog/google/gutes-cloaking-schlechtes-cloaking

Some more googling, and here someone seems to confirm this:
http://www.webmasterworld.com/cloaking/3201743.htm
" I was actually at SMX West and Matt Cutts specifically sa*id* that this is
OK"

All I can say in our case is that I added this filter several months ago,
and I can't see any negative effects so far.


greetings,

Rüdiger


2008/4/14, Korbinian Bachl - privat <[EMAIL PROTECTED]>:
>
> Hi Rüdiger,
>
> AFAIK this could lead to some punishment by google, as he browses the site
> multiple times using different agents and origin IPs and in case he sees
> different behaviours he thinks about cloaking/ prepared content and will act
> accordingly to it;
>
> This is usually noticed after the regular google index refreshes that
> happen some times a year - you should keep an eye onto this;
>
> Best,
>
> Korbinian
>
> Rüdiger Schulz schrieb:
>
> > Hello everybody,
> >
> > I just want to add my 2 cents to this discussion.
> >
> > At IndyPhone we too wanted to get rid of jesessionid-URLs in google's
> > index.
> > Yeah, it would be nice if the google bot would be as clever as the one
> > from
> > yahoo, and just remove them himself. But he doesn't.
> >
> > So I implemented a Servlet-Filter which checks the user agent header for
> > google bot, and skips the url rewriting just for those clients. As this
> > will
> > generate lots of new sessions, the filter invalidates the session right
> > after the request. Also, if a crawler is doing a request containing a
> > jsessionid (which he stored before the filter was implemented), he
> > redirects
> > the crawler to the same URL, just without the jsessionid parameter. That
> > way, the index will be updated for those old URLs.
> >
> > Now we have almost none of those URLs in google's index.
> >
> > If anyone is interested in the code, I'd be willing to publish this. As
> > it
> > is not wicket specific, I could share it with some generic servlet tools
> > OS
> > project - is there something like that on apache or elsewhere?
> >
> > But maybe Google is smarter by now, and it is not required anymore?
> >
> >
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
greetings from Berlin,

Rüdiger Schulz

www.2rue.de
www.indyphone.de - Coole Handy Logos einfach selber bauen


Re: Wicket portles in Sun Portal

2008-04-14 Thread Thijs
Liferay is not really supported, We have it running but have hacked 
wicket to do so (in a combindation of a bridges implementation and a 
custom wicket version). Especially to get the Ajax stuff working correctly.
We are hoping that with portlet 2.0 supported both by Liferay and wicket 
that the issues are going to be a lot less. Especially with 
resourceUrl's and HTTP header's / cookies


Thijs



Wilhelmsen Tor Iver schreef:

We have (wisely :) ) chosen Wicket as web framework, but also chosen Sun
Portal as the portal engine (not just Pluto but the commercial product).
This causes a problem since Sun apparently haven't implemented the two
interfaces required by Apache's bridge, so Wicket 1.3.x portlets do not
work since the WicketPortlet appears to require the bridge.

Are there anyone else who have used this combination successfully?

As I see it, there are four possible solutions:

1) Provide implementations of the interfaces that hook into the Sun
portlet engine
2) Make a custom WicketPortlet that does away with the bridge
requirement and does all translation between the portlet world and the
Wicket world. Has the disadvantage of effectively redoing work that the
bridge already does 
3) Make a custom Wicket "Channel" in the portlet server to (in effect)

provide such a bridge (or wait for someone at Sun to write one :) )
which has the disadvantage of being tied to Sun's product
4) Serve the Wicket portlets from a second portlet container that _does_
support the bridge (Liferay, Jetspeed or JBoss if I am not mistaken),
and use WSRP to show them in Sun's portal

Which do you guys think is most likely to succeed?

Med vennlig hilsen

TOR IVER WILHELMSEN
Senior systemutvikler
Arrive AS
T (+47) 48 16 06 18
E-post: [EMAIL PROTECTED]
http://servicedesk.arrive.no



  



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



Wicket portles in Sun Portal

2008-04-14 Thread Wilhelmsen Tor Iver
We have (wisely :) ) chosen Wicket as web framework, but also chosen Sun
Portal as the portal engine (not just Pluto but the commercial product).
This causes a problem since Sun apparently haven't implemented the two
interfaces required by Apache's bridge, so Wicket 1.3.x portlets do not
work since the WicketPortlet appears to require the bridge.

Are there anyone else who have used this combination successfully?

As I see it, there are four possible solutions:

1) Provide implementations of the interfaces that hook into the Sun
portlet engine
2) Make a custom WicketPortlet that does away with the bridge
requirement and does all translation between the portlet world and the
Wicket world. Has the disadvantage of effectively redoing work that the
bridge already does 
3) Make a custom Wicket "Channel" in the portlet server to (in effect)
provide such a bridge (or wait for someone at Sun to write one :) )
which has the disadvantage of being tied to Sun's product
4) Serve the Wicket portlets from a second portlet container that _does_
support the bridge (Liferay, Jetspeed or JBoss if I am not mistaken),
and use WSRP to show them in Sun's portal

Which do you guys think is most likely to succeed?

Med vennlig hilsen

TOR IVER WILHELMSEN
Senior systemutvikler
Arrive AS
T (+47) 48 16 06 18
E-post: [EMAIL PROTECTED]
http://servicedesk.arrive.no




Re: Removing the jsessionid for SEO

2008-04-14 Thread Korbinian Bachl - privat

Hi Rüdiger,

AFAIK this could lead to some punishment by google, as he browses the 
site multiple times using different agents and origin IPs and in case he 
sees different behaviours he thinks about cloaking/ prepared content and 
will act accordingly to it;


This is usually noticed after the regular google index refreshes that 
happen some times a year - you should keep an eye onto this;


Best,

Korbinian

Rüdiger Schulz schrieb:

Hello everybody,

I just want to add my 2 cents to this discussion.

At IndyPhone we too wanted to get rid of jesessionid-URLs in google's index.
Yeah, it would be nice if the google bot would be as clever as the one from
yahoo, and just remove them himself. But he doesn't.

So I implemented a Servlet-Filter which checks the user agent header for
google bot, and skips the url rewriting just for those clients. As this will
generate lots of new sessions, the filter invalidates the session right
after the request. Also, if a crawler is doing a request containing a
jsessionid (which he stored before the filter was implemented), he redirects
the crawler to the same URL, just without the jsessionid parameter. That
way, the index will be updated for those old URLs.

Now we have almost none of those URLs in google's index.

If anyone is interested in the code, I'd be willing to publish this. As it
is not wicket specific, I could share it with some generic servlet tools OS
project - is there something like that on apache or elsewhere?

But maybe Google is smarter by now, and it is not required anymore?



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



Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Gwyn Evans
On Mon, Apr 14, 2008 at 11:40 AM, Sebastiaan van Erk
<[EMAIL PROTECTED]> wrote:

>  However they're still workarounds for something that I think is
> conceptually not quite right in Wicket currently: the fact that it should be
> possible to mount different locales of a page on different urls, for
> *whatever* coding strategy I choose to use.

I suspect that it's just that the default behaviour (automatically
using the user's locale to return the locale-specific page) covers the
majority of requirements & no-one's raised an issue to modify the url
coding strategies, let alone contributed code!  A quick search back on
the list suggested something similar had been asked by various people
a couple of times before, but it's not clear if anything was then
coded or if they found a different approach.

Note that even if you think you can't contribute code for one reason
or another, an discussion here followed by a JIRA issue with specific
use-cases will mean it's not forgotten, at least.

/Gwyn

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



Re: CompoundPropertyModel need to track changes

2008-04-14 Thread Gerolf Seitz
On Mon, Apr 14, 2008 at 1:05 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote:

> Hmm, it should try to use bean methods before trying the field directly.
> you could try changing the wicket id of your formcomponent to the full
> method name, e.g. setLastname() if your property is lastname.
> If that does not work, it might indicate a problem with your getters
> and setters.
>

it could also be that he only provided a getter or a setter and not both.
in this case, the field is accessed directly.

  Gerolf


>
> An alternative way to intercept changes (only those coming through the
> compoundmodel) is to override
> CompoundPropertyModel#wrapOnInheritance(Component) and return a model
> similar to AttachedCompoundPropertyModel where you overwrite the
> setObject method to listen for changes. Unfortunately you cannot
> extend it because it is private so you have to copy paste it.
>
> Maurice
>
> On Mon, Apr 14, 2008 at 5:37 AM, Karen Schaper
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> >  I am using a CompoundPropertyModel.
> >
> >  CompoundPropertyModel personModel  = new CompoundPropertyModel(
> >  person );
> >  Form_editForm= new EditPersonForm(
> "editForm",
> >  personModel ) ;
> >
> >  Upon submitting the form, I thought that the setter methods would be
> called
> >  on the person object. How is the person object updated?  The code in
> the
> >  setter methods of person are not called.
> >
> >  Am I missing something?
> >
> >  I want to track changes in my object and I wanted to check for the
> change in
> >  the setter methods of the person object.
> >
> >  Thanks for any help.  It is greatly appreciated!
> >
> >  Karen
> >
> >
> >
> >
> >  -
> >  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]
>
>


SV: Check validator existence

2008-04-14 Thread Wilhelmsen Tor Iver
> is there an API in wicket to know if a Validator instance has been
added to a form?

Two solutions: 

1) Call iterator() and test with instanceof IValidator on each element
until you get true. This will only find validators on the form and not
on the subcomponents...

2) Make a Component.IVisitor that checks with instanceof and call
form.visitChildren(). This has the advantage that it will detect
validators on the components.

public class HasValidatorsVisitor implements IVisitor {
private boolean hasValidator;

  public boolean hasValidator() { return hasValidator; }

public Component component(Component component) {
hasValidator = hasValidator || (component instanceof
IValidator);
// Make visitor stop if we found one
return hasValidator? component : CONTINUE_TRAVERSAL;
}
}

- Tor Iver

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



Re: page reload

2008-04-14 Thread Maurice Marrink
Are you using an ajaxlink or a regular link?
if(ajax)
 try wrapping your list in a WebMarkupContainer and add that to the ajaxtarget.
else
 this should already work, the entire page is automatically refreshed
after the onclick exits.

Maurice

On Mon, Apr 14, 2008 at 12:38 PM, Milan Křápek <[EMAIL PROTECTED]> wrote:
> Thanks a lot,
>   with the LoadableDetachableModel I am now able to show the changes when I 
> edit the item. But some problems still remain.
>   To delete items I have just link, that on the onClick event removes the 
> selected item. So I need to reload the page after this remove too. I try to 
> do it by adding
>   @Override
>protected void onComponentTag(ComponentTag tag) {
>   super.onComponentTag(tag);
>tag.put("onclick", "window.refresh();");
>}
>  to that Link. This works, but the window.refresh() commnad is called before 
> the action in the onClick method. Is it posible to do the refresh after the 
> action in onClick method??
>
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: CompoundPropertyModel need to track changes

2008-04-14 Thread Maurice Marrink
Hmm, it should try to use bean methods before trying the field directly.
you could try changing the wicket id of your formcomponent to the full
method name, e.g. setLastname() if your property is lastname.
If that does not work, it might indicate a problem with your getters
and setters.

An alternative way to intercept changes (only those coming through the
compoundmodel) is to override
CompoundPropertyModel#wrapOnInheritance(Component) and return a model
similar to AttachedCompoundPropertyModel where you overwrite the
setObject method to listen for changes. Unfortunately you cannot
extend it because it is private so you have to copy paste it.

Maurice

On Mon, Apr 14, 2008 at 5:37 AM, Karen Schaper
<[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I am using a CompoundPropertyModel.
>
>  CompoundPropertyModel personModel  = new CompoundPropertyModel(
>  person );
>  Form_editForm= new EditPersonForm( 
> "editForm",
>  personModel ) ;
>
>  Upon submitting the form, I thought that the setter methods would be called
>  on the person object. How is the person object updated?  The code in the
>  setter methods of person are not called.
>
>  Am I missing something?
>
>  I want to track changes in my object and I wanted to check for the change in
>  the setter methods of the person object.
>
>  Thanks for any help.  It is greatly appreciated!
>
>  Karen
>
>
>
>
>  -
>  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]



DynamicWebResource filename

2008-04-14 Thread Sebastiaan van Erk

Hi,

Any reason why the filename field in DynamicWebResource does not at 
least have a protected getter so you can use it in subclasses without 
having to add the field again?


Regards,
Sebastiaan


smime.p7s
Description: S/MIME Cryptographic Signature


Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk

Hi,

I have localized my Wicket site, but I have a problem with localization 
+ (mounted) bookmarkable pages.


When mounting a bookmarkable page:

mount(new WhateverUrlCodingStrategy("/mypage", MyPage.class));

there is no locale parameter...

This means:

1) I cannot give my stateless pages of different locales different URLs, 
which means that nobody can link directly to a non-default locale 
version of the page.


2) My stateless pages are impossible to index in different locales. 
Google either finds only the default locale pages, or must follow a 
stateful "change locale" link, which will cause it to index pages which 
will be expired by the time they're in Google's search results.


I know that I can make my own workaround, i.e., write my own url coding 
strategy with the locale in the root, /en/mypage to the english version, 
/mypage to the default locale, etc.. Or I could use 
IndexedParameterCodingStrategy to make the first parameter the locale 
(although this does not work if I want to use another coding strategy).


However they're still workarounds for something that I think is 
conceptually not quite right in Wicket currently: the fact that it 
should be possible to mount different locales of a page on different 
urls, for *whatever* coding strategy I choose to use.


Any ideas on this? Anybody already implemented the coding strategy for 
the locale in the root? Anybody got another easier workaround?


Regards,
Sebastiaan



smime.p7s
Description: S/MIME Cryptographic Signature


Re: page reload

2008-04-14 Thread Milan Křápek
Thanks a lot, 
  with the LoadableDetachableModel I am now able to show the changes when I 
edit the item. But some problems still remain. 
  To delete items I have just link, that on the onClick event removes the 
selected item. So I need to reload the page after this remove too. I try to do 
it by adding
  @Override
   protected void onComponentTag(ComponentTag tag) {
  super.onComponentTag(tag);
   tag.put("onclick", "window.refresh();");
   }
to that Link. This works, but the window.refresh() commnad is called before the 
action in the onClick method. Is it posible to do the refresh after the action 
in onClick method??

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



Re: Removing the jsessionid for SEO

2008-04-14 Thread Rüdiger Schulz
Hello everybody,

I just want to add my 2 cents to this discussion.

At IndyPhone we too wanted to get rid of jesessionid-URLs in google's index.
Yeah, it would be nice if the google bot would be as clever as the one from
yahoo, and just remove them himself. But he doesn't.

So I implemented a Servlet-Filter which checks the user agent header for
google bot, and skips the url rewriting just for those clients. As this will
generate lots of new sessions, the filter invalidates the session right
after the request. Also, if a crawler is doing a request containing a
jsessionid (which he stored before the filter was implemented), he redirects
the crawler to the same URL, just without the jsessionid parameter. That
way, the index will be updated for those old URLs.

Now we have almost none of those URLs in google's index.

If anyone is interested in the code, I'd be willing to publish this. As it
is not wicket specific, I could share it with some generic servlet tools OS
project - is there something like that on apache or elsewhere?

But maybe Google is smarter by now, and it is not required anymore?

-- 
greetings from Berlin,

Rüdiger Schulz

www.2rue.de
www.indyphone.de - Coole Handy Logos einfach selber bauen


Re: AjaxLink doesn't work for Wicket 1.3.3 ?

2008-04-14 Thread Matej Knopp
Please create a jira issue and attach a page source code that doesn't work.

-Matej

2008/4/14 Tomasz Prus <[EMAIL PROTECTED]>:
> I have AjaxLink which works good in Wicket 1.3.2 but doens't work whe i
>  change version to 1.3.3.
>
>  package pl.mainseek.car.wicket.components;
>
>  import java.util.Arrays;
>  import java.util.List;
>
>  import org.apache.wicket.PageParameters;
>  import org.apache.wicket.ajax.AjaxRequestTarget;
>  import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
>  import org.apache.wicket.ajax.markup.html.AjaxLink;
>  import org.apache.wicket.markup.html.form.Button;
>  import org.apache.wicket.markup.html.form.DropDownChoice;
>  import org.apache.wicket.markup.html.form.Form;
>  import org.apache.wicket.markup.html.form.IChoiceRenderer;
>  import org.apache.wicket.markup.html.form.RequiredTextField;
>  import org.apache.wicket.markup.html.form.StatelessForm;
>  import org.apache.wicket.markup.html.panel.Panel;
>  import org.apache.wicket.model.CompoundPropertyModel;
>  import org.apache.wicket.model.Model;
>  import org.apache.wicket.spring.injection.annot.SpringBean;
>
>  import pl.mainseek.car.dao.CarsDAO;
>  import pl.mainseek.car.entities.CarModel;
>  import pl.mainseek.car.entities.CarPart.Condition;
>  import pl.mainseek.car.wicket.CommonWebPage;
>  import pl.mainseek.car.wicket.models.SearchCarPartsModel;
>  import pl.mainseek.car.wicket.pages.AdvertismentsList;
>  import pl.mainseek.forum.wicket.pages.ForumList;
>
>  public class SearchPanel extends Panel {
>
> public static final String FORUM_OPTION = "forum";
> public static final String ADS_OPTION = "ads";
>
> @SpringBean
> private CarsDAO carsDAO;
>
> //keys
> private static final String ADVANCED_SEARCH_BUTTON_KEY =
>  "advanced.search.button";
>
> //wicket:ids
> public static final String SEARCH_FORM = "search_form";
> public static final String CONDITION = "condition";
> public static final String CAR_MODEL = "carModel";
> public static final String CAR_MARK = "carMark";
> public static final String QUERY = "query";
> public static final String ADVANCED_SEARCH = "advanced_search";
> public static final String SEARCH_BUTTON = "search_button";
> public static final String SEARCH_WHERE = "searchWhere";
>
> private final DropDownChoice searchWhereDDC, carMarkDDC, carModelDDC,
>  conditionDDC;
> private final RequiredTextField queryField;
>
> private final String[] searchWhereKeys = new String[] {ADS_OPTION,
>  FORUM_OPTION};
>
> //model
> private SearchCarPartsModel carPartsModel;
>
> public SearchPanel(String id, SearchCarPartsModel model) {
> super(id);
> this.carPartsModel = model;
> final Form searchForm = new StatelessForm(SEARCH_FORM, new
>  CompoundPropertyModel(carPartsModel)) {
> @Override
> protected void onSubmit() {
> super.onSubmit();
> setRedirect(true);
> PageParameters pageParameters = new PageParameters();
> pageParameters.add("query", carPartsModel.getQuery());
> if(carPartsModel.getCarModel() != null) {
> pageParameters.add("carModel",
>  String.valueOf(carPartsModel.getCarModel().getId()));
> } else if(carPartsModel.getCarMark() != null) {
> pageParameters.add("carMark",
>  String.valueOf(carPartsModel.getCarMark().getId()));
> }
> if(carPartsModel.getSearchWhere().equals(ADS_OPTION)) {
> if(carPartsModel.getCondition() != null) {
> pageParameters.add("condition",
>  carPartsModel.getCondition().toString().toLowerCase());
> }
> setResponsePage(AdvertismentsList.class,
>  pageParameters);
> } else
>  if(carPartsModel.getSearchWhere().equals(FORUM_OPTION)) {
> setResponsePage(ForumList.class, pageParameters);
> }
> }
> };
> searchForm.setOutputMarkupId(true);
> queryField = new RequiredTextField(QUERY);
> searchWhereDDC = getSearchWhereDDC(searchForm);
> conditionDDC = getConditionDDC(searchForm);
> List carModels =
>  carsDAO.getCarModels(carPartsModel.getCarMark());
> carModelDDC = getCarModelDDC(carModels);
> carMarkDDC = getCarMarkDDC(carModels);
> carMarkDDC.setVisible(false);
> carModelDDC.setVisible(false);
> conditionDDC.setVisible(false);
>
> searchForm.add(queryField);
> searchForm.add(searchWhereDDC);
> searchForm.add(conditionDDC);
> searchForm.add(carMarkDDC);
> searchForm.add(carModelDDC);
> final AjaxLink advancedSearch = new AjaxLink(ADVANCED_SEARCH) {
> @Override public void onClick(AjaxRequestTarget target) {
> carMarkDDC.setVisible(!carMarkDDC.isVisible());
>

Check validator existence

2008-04-14 Thread Paolo Di Tommaso
Guys,

is there an API in wicket to know if a Validator instance has been added to
a form?

Something like Form#contains( IValidator ) or any workaround to know it?


Thanks,


// Paolo


CompoundPropertyModel need to track changes

2008-04-14 Thread Karen Schaper
Hi,

I am using a CompoundPropertyModel.

CompoundPropertyModel personModel  = new CompoundPropertyModel(
person );
Form_editForm= new EditPersonForm( 
"editForm",
personModel ) ;

Upon submitting the form, I thought that the setter methods would be called
on the person object. How is the person object updated?  The code in the
setter methods of person are not called.

Am I missing something?

I want to track changes in my object and I wanted to check for the change in
the setter methods of the person object.

Thanks for any help.  It is greatly appreciated!

Karen




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



[announce] WUG(Wicket User Group) becomes WUGI at Øredev?

2008-04-14 Thread Nino Saturnino Martinez Vazquez Wael

Hi

Im dabling with making a Wicket user group meetup at Øredev, since 
øredev attracts people from all over it means that the WUG would become 
International, hence WUGI. And I do think we getting Martijn Dashorst 
todo the keynote for opening the WUGI. It will be a conference within a 
conference. The WUGI will be a one day event.


I thought it would be a great way to spread knowledge of Wicket, and a 
good opportunity to see all the guys from the different WUG's around the 
world.


However I would like to ask what you think? Would you come?

For some information about Øredev look here http://oredev.dk/

Heres the pricings:

This years Øredev prices will be as follows, please see the notes about 
discounts;


1 day - €630
2 days - €930
3 days - €1190

For Wicket User Group-member we will offer them WUG-day for free if they 
book a 3 day conference pass - Which means that WUG-members will pay 
€930. This will include all Øredev activities; seminars, evening 
parties, etc. They will of course receive a 20% Early bird discount as 
well.


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: Pass Model to ModalWindow

2008-04-14 Thread Milan Křápek
Thanks a lot, the constructor way wokrs fine. And I you were right in the other 
thing too. I set the model before I add the modal window, but after I create 
the content :o) Sorry for this dummy mistake. 

Milan

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



RE: Using a static image map

2008-04-14 Thread Martijn C. Vos
Cristina wrote:
> Hello,
> 
> I've defined a simple HTML image map from a business process diagram:
> 
> 
> 
> 
>  href="Module01.html" title="Subprocess 1" />
>  href="Module02.html" title="Subprocess 2" />
>  href="Module03.html" title="Subprocess 3" /> 
> 
> Basic Business Process (BPMN)
> 
> 
> Now I would like to enable this image map within Wicket...
> I've found out the ImageMap class in the API javadoc but I
> don't see how I should combine it with the above HTML.

What exactly is it that you want to enable about this in Wicket?
Do you want the areas to remain static, and only the links to
become Wicket links?

As far as I can tell, the standard Wicket ImageMap lets you
add areas (called ShapeLinks) to an ImageMap, and each ShapeLink
has a shape (rect, circle, polygon), coordinates, and a Link.
Ofcourse if the ImageMap's areas are completely static, you may
want to keep the shape and coordinates of the links outside the
Wicket code and only in the html, so I'm kinda wondering if it
would be possible to keep the map outside Wicket, and simply
give each area a wicket:id corresponding to a Link in your
Wicket code.

No idea if that would work (the ImageMap is kinda old and rarely
used), but that's what I'd try.

Otherwise, simply use the ImageMap the way it's written (which
is a bit odd, I admit): give a static  a wicket:id
corresponding to an ImageMap, and add ShapeLinks (with shape,
coords and Link) to that ImageMap. That should work.

(It's probably a good idea to take my advice with a grain of
salt; I'm still very new to Wicket myself. My own problem
with the ImageMap is that it's not dynamic enough, instead of
too dynamic.)


mcv.

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



AjaxLink doesn't work for Wicket 1.3.3 ?

2008-04-14 Thread Tomasz Prus
I have AjaxLink which works good in Wicket 1.3.2 but doens't work whe i
change version to 1.3.3.

package pl.mainseek.car.wicket.components;

import java.util.Arrays;
import java.util.List;

import org.apache.wicket.PageParameters;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.IChoiceRenderer;
import org.apache.wicket.markup.html.form.RequiredTextField;
import org.apache.wicket.markup.html.form.StatelessForm;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;

import pl.mainseek.car.dao.CarsDAO;
import pl.mainseek.car.entities.CarModel;
import pl.mainseek.car.entities.CarPart.Condition;
import pl.mainseek.car.wicket.CommonWebPage;
import pl.mainseek.car.wicket.models.SearchCarPartsModel;
import pl.mainseek.car.wicket.pages.AdvertismentsList;
import pl.mainseek.forum.wicket.pages.ForumList;

public class SearchPanel extends Panel {

public static final String FORUM_OPTION = "forum";
public static final String ADS_OPTION = "ads";

@SpringBean
private CarsDAO carsDAO;

//keys
private static final String ADVANCED_SEARCH_BUTTON_KEY =
"advanced.search.button";

//wicket:ids
public static final String SEARCH_FORM = "search_form";
public static final String CONDITION = "condition";
public static final String CAR_MODEL = "carModel";
public static final String CAR_MARK = "carMark";
public static final String QUERY = "query";
public static final String ADVANCED_SEARCH = "advanced_search";
public static final String SEARCH_BUTTON = "search_button";
public static final String SEARCH_WHERE = "searchWhere";

private final DropDownChoice searchWhereDDC, carMarkDDC, carModelDDC,
conditionDDC;
private final RequiredTextField queryField;

private final String[] searchWhereKeys = new String[] {ADS_OPTION,
FORUM_OPTION};

//model
private SearchCarPartsModel carPartsModel;

public SearchPanel(String id, SearchCarPartsModel model) {
super(id);
this.carPartsModel = model;
final Form searchForm = new StatelessForm(SEARCH_FORM, new
CompoundPropertyModel(carPartsModel)) {
@Override
protected void onSubmit() {
super.onSubmit();
setRedirect(true);
PageParameters pageParameters = new PageParameters();
pageParameters.add("query", carPartsModel.getQuery());
if(carPartsModel.getCarModel() != null) {
pageParameters.add("carModel",
String.valueOf(carPartsModel.getCarModel().getId()));
} else if(carPartsModel.getCarMark() != null) {
pageParameters.add("carMark",
String.valueOf(carPartsModel.getCarMark().getId()));
}
if(carPartsModel.getSearchWhere().equals(ADS_OPTION)) {
if(carPartsModel.getCondition() != null) {
pageParameters.add("condition",
carPartsModel.getCondition().toString().toLowerCase());
}
setResponsePage(AdvertismentsList.class,
pageParameters);
} else
if(carPartsModel.getSearchWhere().equals(FORUM_OPTION)) {
setResponsePage(ForumList.class, pageParameters);
}
}
};
searchForm.setOutputMarkupId(true);
queryField = new RequiredTextField(QUERY);
searchWhereDDC = getSearchWhereDDC(searchForm);
conditionDDC = getConditionDDC(searchForm);
List carModels =
carsDAO.getCarModels(carPartsModel.getCarMark());
carModelDDC = getCarModelDDC(carModels);
carMarkDDC = getCarMarkDDC(carModels);
carMarkDDC.setVisible(false);
carModelDDC.setVisible(false);
conditionDDC.setVisible(false);

searchForm.add(queryField);
searchForm.add(searchWhereDDC);
searchForm.add(conditionDDC);
searchForm.add(carMarkDDC);
searchForm.add(carModelDDC);
final AjaxLink advancedSearch = new AjaxLink(ADVANCED_SEARCH) {
@Override public void onClick(AjaxRequestTarget target) {
carMarkDDC.setVisible(!carMarkDDC.isVisible());
carModelDDC.setVisible(!carModelDDC.isVisible());
conditionDDC.setVisible(!carModelDDC.isVisible());
if(carMarkDDC.isVisible()){
carMarkDDC.setChoices(carsDAO.getAllCarMarks());
}
target.addComponent(searchForm);
}
};
searchForm.add(advancedSearch);
searc

Re: OutOfMemoryError when deploying (only)

2008-04-14 Thread Martijn Dashorst
seems like a permgen space issue

On 4/14/08, Anders Peterson <[EMAIL PROTECTED]> wrote:
> Problem seems to be fixed...
>
>  I was building/deploying my application using wicket 1.3.3. Tomcat on the
> deployment server had wicket-examples-1.3.0 installed. When I removed that
> the problem disappeared.
>
>  /Anders
>
>
>  Anders Peterson wrote:
>
> > Hi,
> >
> > I've got a problem when deploying my wicket application. I deploy to
> Tomcat 5.5 on Linux.
> >
> > The problem is that I get an OutOfMemoryError when viewing one particular
> page. I can go straight from starting Tomcat to accessing that page and get
> the error - there is "no history". That kind of behavior would suggest that
> you've done something seriously/obviously wrong. But, when I run/debug the
> application in eclipse it behaves perfectly normal.
> >
> > How can I get info from Tomcat regarding what's happening?
> >
> >
> > /Anders
> >
>
>
> -
>  To unsubscribe, e-mail:
> [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2

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



Re: Pass Model to ModalWindow

2008-04-14 Thread Nino Saturnino Martinez Vazquez Wael

I do it like this:

AjaxLink popupLink = new AjaxLink("manageWeightPop") {
@Override
public void onClick(AjaxRequestTarget target) {
modalWindow.setContent(new ManageWeightPanel(modalWindow
.getContentId(), modalWindow,
new BaseEntityDetachableModel(getPerson(;
modalWindow.show(target);

}
};

Which means I've made my panel aware of the fact that it lives in a 
modal window...


regards Nino

Milan Kr(ápek wrote:
Hi, 
  please how can I pass the model to the modal window. I have my form in modal window and I want to show there some default vaules that can be changed. But I am not able to pass the model to the window. In constructor there is not any parameter for model. I try to do this:

  MyWindow.setModel(new Model(myObject));

and in the modal window I try to acces myModel with standatd procedure:
   myObject) = ((MyObject)) getModel().getObject());

but this throws me NullPointerException. But I do not know why. When I set the 
model I am  sure that it has some value.

Thanks for  any advice

Milan

-
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: Pass Model to ModalWindow

2008-04-14 Thread Maurice Marrink
If you subclass ModalWindow you can add any constructor argument you like.
alternatively you can set the modal on the component/page you use as content.
That being said there is no reason why setModel followed by a getModel
should throw a nullpointer.
are you sure you are not accidentally invoking getModel before you had
the chance to setModel?

Maurice

On Mon, Apr 14, 2008 at 9:45 AM, Milan Křápek <[EMAIL PROTECTED]> wrote:
> Hi,
>   please how can I pass the model to the modal window. I have my form in 
> modal window and I want to show there some default vaules that can be 
> changed. But I am not able to pass the model to the window. In constructor 
> there is not any parameter for model. I try to do this:
>   MyWindow.setModel(new Model(myObject));
>
>  and in the modal window I try to acces myModel with standatd procedure:
>myObject) = ((MyObject)) getModel().getObject());
>
>  but this throws me NullPointerException. But I do not know why. When I set 
> the model I am  sure that it has some value.
>
>  Thanks for  any advice
>
>  Milan
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: page reload

2008-04-14 Thread Maurice Marrink
In navigationBorder.add(new MyList("myList",
databaseManager.loadAndGetGroups()));
databaseManager.loadAndGetGroups() should return a reloading model
like LoadableDetachableModel which in the load method always goes to
the database
I assume that right now it simply returns a list or a non reloading model.

Maurice

On Mon, Apr 14, 2008 at 8:08 AM, Milan Křápek <[EMAIL PROTECTED]> wrote:
> Hi,
>   I am  still stack on this problem. It seems that page refresh does not 
> help. I try to add javascript command window.refresh and window.reload but 
> this does not wokr too.
>   Only thing that helps is new call of this page constructor. (I add some 
> refrsh link, that generates the new page)
>   This seems that I have bad written page constructor. That on the refresh 
> the model is not updated.
>
>  Here are some snippets of y code:
>
>  public class Page extends MainTemplate // maintemplate is some base page 
> that gives common look
>  {
> // Inject spring bean for group management
> @SpringBean(name="baseGroupManager")
> private DtabaseManager databaseManager;
>
> public Page() {
> // Create navigation border
> // this creates something like navomatic example on wicket
> NavigationTable navigationBorder = new 
> NavigationTable("navigationBorder");
>
> // Add items to page body
> // model is created by calling function that receive some data from 
> database
> navigationBorder.add(new MyList("myList", 
> databaseManager.loadAndGetGroups()));
> /
> // Add navigation border
> add(navigationBorder);
>
>
>
> // Add Add modal window
> final ModalWindow addWindow;
> navigationBorder.add(addWindow = new ModalWindow("addWindow"));
>
> addWindow.setContent(new 
> GroupManagementAddPanel(addWindow.getContentId(), addWindow));
> addWindow.setTitle("Add Group.");
> addWindow.setCookieName("addWindow");
>
> addWindow.setCloseButtonCallback(new ModalWindow.CloseButtonCallback()
> {
> @Override
> public boolean onCloseButtonClicked(AjaxRequestTarget target)
> {
> return true;
> }
> });
>
> addWindow.setWindowClosedCallback(new 
> ModalWindow.WindowClosedCallback()
>
> {
> @Override
> public void onClose(AjaxRequestTarget target)
> {
> getPage().modelChanged();
> setResponsePage(target.getPage());
> setRedirect(true);
> }
> });
>
> navigationBorder.add(new AjaxLink("add")
> {
> @Override
> public void onClick(AjaxRequestTarget target)
> {
> addWindow.show(target);
> }
> });
> }
>  }
>
>  Please do anybody see something wrong. Let me know.  I do not know why the 
> model
>   navigationBorder.add(new MyList("myList", 
> databaseManager.loadAndGetGroups()));
>  is not reloaded. The constructor of MyList class just call super(id, list);
>
>  Thanks for your advice
>
>
>
>  Milan
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: OutOfMemoryError when deploying (only)

2008-04-14 Thread Anders Peterson

Problem seems to be fixed...

I was building/deploying my application using wicket 1.3.3. Tomcat on 
the deployment server had wicket-examples-1.3.0 installed. When I 
removed that the problem disappeared.


/Anders

Anders Peterson wrote:

Hi,

I've got a problem when deploying my wicket application. I deploy to 
Tomcat 5.5 on Linux.


The problem is that I get an OutOfMemoryError when viewing one 
particular page. I can go straight from starting Tomcat to accessing 
that page and get the error - there is "no history". That kind of 
behavior would suggest that you've done something seriously/obviously 
wrong. But, when I run/debug the application in eclipse it behaves 
perfectly normal.


How can I get info from Tomcat regarding what's happening?


/Anders



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



Pass Model to ModalWindow

2008-04-14 Thread Milan Křápek
Hi, 
  please how can I pass the model to the modal window. I have my form in modal 
window and I want to show there some default vaules that can be changed. But I 
am not able to pass the model to the window. In constructor there is not any 
parameter for model. I try to do this:
  MyWindow.setModel(new Model(myObject));

and in the modal window I try to acces myModel with standatd procedure:
   myObject) = ((MyObject)) getModel().getObject());

but this throws me NullPointerException. But I do not know why. When I set the 
model I am  sure that it has some value.

Thanks for  any advice

Milan

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



OutOfMemoryError when deploying (only)

2008-04-14 Thread Anders Peterson

Hi,

I've got a problem when deploying my wicket application. I deploy to 
Tomcat 5.5 on Linux.


The problem is that I get an OutOfMemoryError when viewing one 
particular page. I can go straight from starting Tomcat to accessing 
that page and get the error - there is "no history". That kind of 
behavior would suggest that you've done something seriously/obviously 
wrong. But, when I run/debug the application in eclipse it behaves 
perfectly normal.


How can I get info from Tomcat regarding what's happening?


/Anders


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