Re: manual ajax..

2008-01-26 Thread Nino Saturnino Martinez Vazquez Wael

Solution for me was to append a js where I set the id on a variable...

regards Nino

Nino Saturnino Martinez Vazquez Wael wrote:

Hi

Im doing some manual ajax with wicketAjaxGet.. And I need to get a id 
from one of the things added upon the request, how can I get that?


It's for the openlayers contrib, I need the content of the element 
containing the id to be shown in a popup.


regards Nino



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



DropDownChoice default value

2008-01-26 Thread Mathias P.W Nilsson

I have a dropDownChoice populated with Category objects. If it is the first
time the page is rendered 
the Choose one is visible in the list. If I choose any category this item
gets removed because it is not a Category object. How can I always have a
Choose one option as the first item in my DropDownChoice?
-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-default-value-tp15106932p15106932.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: DropDownChoice default value

2008-01-26 Thread Timo Rantalaiho
On Sat, 26 Jan 2008, Mathias P.W Nilsson wrote:
 I have a dropDownChoice populated with Category objects. If it is the first
 time the page is rendered 
 the Choose one is visible in the list. If I choose any category this item
 gets removed because it is not a Category object. How can I always have a
 Choose one option as the first item in my DropDownChoice?

I think that there is a setting called nullValid or something
like that (with a setter or overridable getter).

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

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



Re: DropDownChoice default value

2008-01-26 Thread Mathias P.W Nilsson

Thanks but it still does not work. I have set the setIsNullValid to true and
overrided the getDefaultChoice

 @Override
protected java.lang.CharSequence getDefaultChoice(final Object selected){
 return Test value;
}

But what happens then is that the null value is removed from the list. I
would like to have an option with id  and a value of my choice in top. 
-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-default-value-tp15106932p15107379.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]



Not allowed to have whitespace in value

2008-01-26 Thread Mathias P.W Nilsson

Hi!

I'm not allowed to have WhiteSpace in the value of a DropDownList. How come?
If I implement the IChoiceRenderer and implement the method getDisplayValue
and returnit is trimmed! 
I would like to be able to indent child in the drop downlist. How is this
possible?

Thanks
-- 
View this message in context: 
http://www.nabble.com/Not-allowed-to-have-whitespace-in-value-tp15107381p15107381.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: Not allowed to have whitespace in value

2008-01-26 Thread James Carman
Have you tried using nbsp;?  That's just the nature of HTML (and XML).  The
surrounding whitespace is ignored.

On 1/26/08, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:


 Hi!

 I'm not allowed to have WhiteSpace in the value of a DropDownList. How
 come?
 If I implement the IChoiceRenderer and implement the method
 getDisplayValue
 and returnit is trimmed!
 I would like to be able to indent child in the drop downlist. How is this
 possible?

 Thanks
 --
 View this message in context:
 http://www.nabble.com/Not-allowed-to-have-whitespace-in-value-tp15107381p15107381.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: Not allowed to have whitespace in value

2008-01-26 Thread Mathias P.W Nilsson

If I put in the html character of whitespace  nbsp; it will type the value
out!
-- 
View this message in context: 
http://www.nabble.com/Not-allowed-to-have-whitespace-in-value-tp15107381p15107854.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]



Using javascript limits me from having an immersive user interface:Re: Add row to list of items on a page dynamically via ajax without repainting whole list

2008-01-26 Thread atul singh
Thanks for the pointer. I tried to follow what is in the link.
http://www.nabble.com/Adding-item-to-ListView-over-Ajax---refresh-only-newest-row-td11272937.html

Still I am facing a lot of serious problem. I am trying to generate html for
the new row as said using javascript.
I add the item manually, and after adding it use its markup id in the html
generated using javascript. but I would need the markup id of many of the
children of the item also. *Using javascript like this limits me from having
an immersive ajax user interface for the row generated using javascript.*
Can someone think of a way to achieve this using components??



On Jan 22, 2008 12:31 PM, Peter Thomas [EMAIL PROTECTED] wrote:

 On 1/22/08, atul singh [EMAIL PROTECTED] wrote:
 
  Hi
  I want to add a new row on my page using ajax, without having to repaint
  the
  complete list already being displayed on the page.
  This i want to reduce the ajax payload;any help on how i can do this?
 

 Try this thread:


 http://www.nabble.com/Adding-item-to-ListView-over-Ajax---refresh-only-newest-row-td11272937.html



Re: Using javascript limits me from having an immersive user interface:Re: Add row to list of items on a page dynamically via ajax without repainting whole list

2008-01-26 Thread atul singh
Sorry for this post ..I think my problem is solved(Once i added the item to
ajaxrequesttarget which is what i was forgetting)...I do not need to bother
about creating the children of the item using javascript...They are just in
place after the page is rendered...

On Jan 26, 2008 8:56 PM, atul singh [EMAIL PROTECTED] wrote:

 Thanks for the pointer. I tried to follow what is in the link.

 http://www.nabble.com/Adding-item-to-ListView-over-Ajax---refresh-only-newest-row-td11272937.html

 Still I am facing a lot of serious problem. I am trying to generate html
 for the new row as said using javascript.
 I add the item manually, and after adding it use its markup id in the html
 generated using javascript. but I would need the markup id of many of the
 children of the item also. *Using javascript like this limits me from
 having an immersive ajax user interface for the row generated using
 javascript.*
 Can someone think of a way to achieve this using components??



 On Jan 22, 2008 12:31 PM, Peter Thomas [EMAIL PROTECTED] wrote:

  On 1/22/08, atul singh [EMAIL PROTECTED] wrote:
  
   Hi
   I want to add a new row on my page using ajax, without having to
  repaint
   the
   complete list already being displayed on the page.
   This i want to reduce the ajax payload;any help on how i can do this?
  
 
  Try this thread:
 
 
  http://www.nabble.com/Adding-item-to-ListView-over-Ajax---refresh-only-newest-row-td11272937.html
 




Re: Not allowed to have whitespace in value

2008-01-26 Thread Eelco Hillenius
On Jan 26, 2008 5:21 AM, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:

 If I put in the html character of whitespace  nbsp; it will type the value
 out!

You have to tell Wicket not to escape the output of your drop down
list, which you do by calling setEscapeModelStrings(false) on it.

Eelco

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



Re: Strange Sql exception accesing Wicket page

2008-01-26 Thread Nino Saturnino Martinez Vazquez Wael

How do you store your dao? Is it a transient object on the page?


regards nino

[EMAIL PROTECTED] wrote:

Hello:
I have several bookmarkable links that would bring up page with data retrieved 
from database via JPA/TOPLINK (EntityManager is always created fresh evertime 
data is retrieved).  The servlet session time is 30 minutes but after several 
days when accessing some links, I got this
WicketMessage: Error attaching this container for rendering .
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.8 (Build 060830)): 
oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-02396: exceeded maximum idle 
time, please connect again
Error Code: 2396
It appears that somewhere the page object is still holding on something causing 
this. After a few repeated clicking of browser refreshing button, the error 
would go away and a normal page is displayed without any other intervention. 
I'd think after a few days, all session related page objects would be no 
factors and it would work like the first time ever accessing it. Maybe I have 
problem with my jpa setup but I used similar methods under Seam(no EJB3) 
without issues so I think there maybe some issues with page caching?
Thanks
  


--
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: DropDownChoice default value

2008-01-26 Thread Eelco Hillenius
On Jan 26, 2008 4:19 AM, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:

 Thanks but it still does not work. I have set the setIsNullValid to true and
 overrided the getDefaultChoice

  @Override
 protected java.lang.CharSequence getDefaultChoice(final Object selected){
  return Test value;
 }

 But what happens then is that the null value is removed from the list. I
 would like to have an option with id  and a value of my choice in top.

Make that something like:

@Override
protected CharSequence getDefaultChoice(Object selected)
{
return option value=\\This is the null choice/option;
}

If you would look at the source that Wicket spits out of your earlier
attempt, you'll see that Test value is actually printed, but as it
is not printed as an option, it is ignored (and is invalid even).

Eelco

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



Dynamic Link Generation

2008-01-26 Thread mgiedt

Suppose I have two users, one with admin rights and one without. How do I
remove the 'admin' link from my application when the non-admin logs in?

Something similar to the TabbedPanel where I can dynamically create
individual tabs, how do I dynamically create a list of links?

With thanks,
-Matt
-- 
View this message in context: 
http://www.nabble.com/Dynamic-Link-Generation-tp15114204p15114204.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: Dynamic Link Generation

2008-01-26 Thread Maurice Marrink
You always add all the links and then decide for each link if it
should display or not.
You can do this manually by having the isVisible method of your link
check for an admin user or you can defer this to your security
framework, swarm for instance automatically hides secure links.

http://wicketstuff.org/wicketsecurity/
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security

Maurice


On Jan 27, 2008 12:45 AM, mgiedt [EMAIL PROTECTED] wrote:

 Suppose I have two users, one with admin rights and one without. How do I
 remove the 'admin' link from my application when the non-admin logs in?

 Something similar to the TabbedPanel where I can dynamically create
 individual tabs, how do I dynamically create a list of links?

 With thanks,
 -Matt
 --
 View this message in context: 
 http://www.nabble.com/Dynamic-Link-Generation-tp15114204p15114204.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: DropDownChoice default value

2008-01-26 Thread Mathias P.W Nilsson

Thanks alot! It works now. :jumping:
-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-default-value-tp15106932p15114359.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: Not allowed to have whitespace in value

2008-01-26 Thread Mathias P.W Nilsson

This solved my problem. 
-- 
View this message in context: 
http://www.nabble.com/Not-allowed-to-have-whitespace-in-value-tp15107381p15114402.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]



Label is driving me a *little* crazy

2008-01-26 Thread Andy Czerwonka
I found this thread:

http://www.mail-archive.com/users@wicket.apache.org/msg04400.html

I have written similair code, but I'm getting an exception.  Clearly my 
markup is wrong, but I can't for the life of me unnderstand why?  When I 
inspect the code, the page contains the right things.  I'm a wicket newbie 
to be sure, so apologies if it's a silly question.

Here's the java snippet (similair to the java on the above thread)

private void buildForm() {

RequiredTextField nameTextField = new RequiredTextField(name);

nameTextField.setLabel(new Model(Business Name));

add(nameTextField);

addFieldLabel(this, nameTextField);

add(new Button(saveButton));

}


protected FormComponentLabel addFieldLabel(final MarkupContainer container, 
final FormComponent formComponent) {

SimpleFormComponentLabel label = new 
SimpleFormComponentLabel(formComponent.getId() + Label,

formComponent);

container.add(label);

return label;

}

The markup is as follows:

form wicket:id=newListingForm action=save

fieldset

label for=name wicket:id=nameLabel 
id=nameLabel[nameLabel]/label

input wicket:id=name id=name type=text size=50 /

input type=submit wicket:id=saveButton value=save /

/fieldset

/form

The error looks like:

1. [MarkupContainer [Component id = nameLabel, page = 
ca.arcticpenguin.mff.NewListingPage, path = 
0:newListingForm:nameLabel.SimpleFormComponentLabel, isVisible = true, 
isVersioned = false]]






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



Wicket Security - runtime ACLs and Groups help plz

2008-01-26 Thread Ned Collyer

With wicket security (either wasp/swarm, or wicket-auth-roles) can things
like Roles and Permissions be created through a web interface?

Eg,
I need a system whereby I can add new roles (or principals) through the web
interface, and define their permission to a ACLs which are determined by
which which plugins the system is configured to use.

Each plugin will implement some interface, and expose the ACLs that it has
available. - these will not be manually configured, and should not require
any java code change when I add a plugin to the system.

I'm having trouble mapping this to either swarm or wicket-auth-roles. (and
trouble explaining it well ;))

I believe wicket-auth-roles is more component oriented, but reading about
this stuff makes my head swim.

Can anyone either steer me in the right direction, or point at an example
that gets these ACLs and roles from a datastore at run time.
-- 
View this message in context: 
http://www.nabble.com/Wicket-Security---runtime-ACLs-and-Groups-help-plz-tp15115011p15115011.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]



tracking upload with wicket

2008-01-26 Thread Gareth Segree
I am writing a web application that  will allow the admin for the app to
track who is uploading files and the progress on each file being uploaded.

How can this be done using wicket.

thanks

 



Re: tracking upload with wicket

2008-01-26 Thread Igor Vaynberg
http://wicketstuff.org/wicket13/upload/single

see that example for a monitored upload. now this upload reports to
the user, but you can use the same mechanism to report the progress to
somewhere where you can track it.

-igor


On Jan 26, 2008 6:06 PM, Gareth Segree [EMAIL PROTECTED] wrote:
 I am writing a web application that  will allow the admin for the app to
 track who is uploading files and the progress on each file being uploaded.

 How can this be done using wicket.

 thanks





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



Re: How to get a form component's value that is not a sub-node of the Form.

2008-01-26 Thread smallufo
Can you specify details more precisely ?
According to http://www.thescripts.com/forum/thread95602.html
It seems nested forms is forbidden.



2008/1/25, Eelco Hillenius [EMAIL PROTECTED]:

 You could try nested forms.

 Eelco

 On Jan 24, 2008 11:19 AM, smallufo [EMAIL PROTECTED] wrote:
  I have a Form component : SomeCheckGroup added to a SomePanel.
  For screen arrangement purpose , this SomePanel is not a sub-node of the
  Form ,
  it's outside of the Form . It looks like this :
 
  OutmostPanel add FormPanel
FormPanel add MainForm
  MainForm add other form components
  OutmostPanel add SomePanel
SomePanel add SomeCheckGroup1
SomePanel add SomeCheckGroup2
SomePanel add SomeCheckGroup3 ...
 
  How do I get the value of SomeCheckGroup when MainForm submit() ?
 
  Now , I could only use AjaxCheckBox in SomeCheckGroup to update the
  MainForm's model ,
  but sometimes , it seems maybe network delay problem , cause some
  synchronized problem , which set null to the form's model , it's hard
 to
  debug ,
  and I feel it is bandwidth consumptive... But I cannot find a way to not
  using AJAX and notify the checkGroup latest model to MainForm's model .
  Can somebody give me a hint .
  Thanks in advanced.



RE: TextField not getting value on the fly?

2008-01-26 Thread dvd
Sorry Textfield id should be key.  Should be

class C extends webpage{
  String key = default;
  add(new Form(f, new CompoundPropertyModel(this))
  form.add(new Textfield(key)
 




Hello: here is a strange result

class C extends webpage{
  String key = default;
  add(new Form(f, new CompoundPropertyModel(this))
  form.add(new Textfield(tf)
 
}
When I enter a something like Test and hit submit
I'd expect the textfield would return with Test since
it has been saved to mode object (key) and the textfield
should display the new value. But instead it always 'default'
when it returns even though I check the model value was set
to Test, the html markup input value=Test was not changed
even though the model value has been set. Should it be this way?
the value attribute of input element is not backed by model value?
Thanks

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



TextField not getting value on the fly?

2008-01-26 Thread dvd
Hello: here is a strange result

class C extends webpage{
  String key = default;
  add(new Form(f, new CompoundPropertyModel(this))
  form.add(new Textfield(tf)
 
}
When I enter a something like Test and hit submit
I'd expect the textfield would return with Test since
it has been saved to mode object (key) and the textfield
should display the new value. But instead it always 'default'
when it returns even though I check the model value was set
to Test, the html markup input value=Test was not changed
even though the model value has been set. Should it be this way?
the value attribute of input element is not backed by model value?
Thanks

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



RE: TextField not getting value on the fly?

2008-01-26 Thread dvd
Apologies. Pls disregard this question. I found the problem.

Sorry Textfield id should be key.  Should be

class C extends webpage{
  String key = default;
  add(new Form(f, new CompoundPropertyModel(this))
  form.add(new Textfield(key)
 




Hello: here is a strange result

class C extends webpage{
  String key = default;
  add(new Form(f, new CompoundPropertyModel(this))
  form.add(new Textfield(tf)
 
}
When I enter a something like Test and hit submit
I'd expect the textfield would return with Test since
it has been saved to mode object (key) and the textfield
should display the new value. But instead it always 'default'
when it returns even though I check the model value was set
to Test, the html markup input value=Test was not changed
even though the model value has been set. Should it be this way?
the value attribute of input element is not backed by model value?
Thanks

-
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: How to get a form component's value that is not a sub-node of the Form.

2008-01-26 Thread Eelco Hillenius
On Jan 26, 2008 7:47 PM, smallufo [EMAIL PROTECTED] wrote:
 Can you specify details more precisely ?
 According to http://www.thescripts.com/forum/thread95602.html
 It seems nested forms is forbidden.

In Wicket you can nest them and let Wicket figure out to not actually
print the inner ones. I don't know the gory details of how this works,
but it should be in the mailing archives.

Eelco

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



Re: Label is driving me a *little* crazy

2008-01-26 Thread Erik van Oosten
Try removing the id attributes from the markup. Wicket likes to generate 
this for itself.
You'll also need to add a FormLabel (or something named like that) to 
the for element.


Regards,
Erik.


Andy Czerwonka wrote:

I found this thread:

http://www.mail-archive.com/users@wicket.apache.org/msg04400.html

I have written similair code, but I'm getting an exception.  Clearly my 
markup is wrong, but I can't for the life of me unnderstand why?  When I 
inspect the code, the page contains the right things.  I'm a wicket newbie 
to be sure, so apologies if it's a silly question.


Here's the java snippet (similair to the java on the above thread)

private void buildForm() {

RequiredTextField nameTextField = new RequiredTextField(name);

nameTextField.setLabel(new Model(Business Name));

add(nameTextField);

addFieldLabel(this, nameTextField);

add(new Button(saveButton));

}


protected FormComponentLabel addFieldLabel(final MarkupContainer container, 
final FormComponent formComponent) {


SimpleFormComponentLabel label = new 
SimpleFormComponentLabel(formComponent.getId() + Label,


formComponent);

container.add(label);

return label;

}

The markup is as follows:

form wicket:id=newListingForm action=save

fieldset

label for=name wicket:id=nameLabel 
id=nameLabel[nameLabel]/label


input wicket:id=name id=name type=text size=50 /

input type=submit wicket:id=saveButton value=save /

/fieldset

/form

The error looks like:

1. [MarkupContainer [Component id = nameLabel, page = 
ca.arcticpenguin.mff.NewListingPage, path = 
0:newListingForm:nameLabel.SimpleFormComponentLabel, isVisible = true, 
isVersioned = false]]







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