[Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Alberto Bueno
Hi,

I'm using IComponentInstantiationListener to add additional 
functionality to my components. But in this listener I need to know the 
model of the component to condition this functionality.
If we inspect the code, we can see that the listeners are called before 
assigning the model to the component:

public Component(final String id, final IModel model)
{
setId(id);
getApplication().notifyComponentInstantiationListeners(this);
this.model = wrap(model);

final IDebugSettings debugSettings = 
Application.get().getDebugSettings();
if (debugSettings.getComponentUseCheck())
{
setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new 
MarkupException(
constructed)));
}
}

Are there any reason to do the notification in that moment?

Thanks



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Alberto Bueno
I think I cannot use this solution.
The problem in that case is that the behavior is executed in another 
moment, not in instantiation time of the component.  And the children of 
the component depend of this listener.
For this reason, the only moment where I can execute the functionality 
is in the listener, when component is instantiated.

 I've had this same issue when trying to build a component 
 instantiation listener for inspecting hibernate annotations.  Since 
 the IComponentInstantiationListener interface doesn't have a hook for 
 onModelBinding, i've tried to use Behaviors instead.  Can you try 
 something like this?

 public MyComponentInstantiationListener implements 
 IComponentInstantiationListener {
 public void onInstantiation(Component component) {
 component.add(new MyBehavior());
 }
 }

 public MyBehavior extends AbstractBehavior {
 public void bind(Component component) {
 super.bind(component);

 //inspect the model of the component and do your crazy work here
}
 }


 On 6/18/07, *Alberto Bueno* [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 Hi,

 I'm using IComponentInstantiationListener to add additional
 functionality to my components. But in this listener I need to
 know the
 model of the component to condition this functionality.
 If we inspect the code, we can see that the listeners are called
 before
 assigning the model to the component:

 public Component(final String id, final IModel model)
 {
 setId(id);
 getApplication().notifyComponentInstantiationListeners(this);
  this.model = wrap(model);

 final IDebugSettings debugSettings =
 Application.get().getDebugSettings();
 if (debugSettings.getComponentUseCheck())
 {
 setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new
 MarkupException(
 constructed)));
 }
 }

 Are there any reason to do the notification in that moment?

 Thanks



 -

 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 

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


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] IComponentInstantiationListener problem

2007-06-18 Thread Alberto Bueno
I know IComponentOnBeforeRenderListener, but I cannot use this
interface, because I need to condition
the instantiation of the children of my component, depending of the
functionality of the Listener.
And if I use IComponentOnBeforeRenderListener, the instantiation has
been finished when the interface
is called.
The best moment to use this functionality is in the
IComponentInstantiationListener... because any children
have been still instantiated.

 There is now - since a few weeks - also
 org.apache.wicket.application.IComponentOnBeforeRenderListener, which
 may suit your needs better.

 We (Teachscape) use it like:

 public final class ValidationListener implements
 IComponentOnBeforeRenderListener {

   public void onBeforeRender(Component component) {
 if (component instanceof FormComponent  !component.hasBeenRendered()) {
   // add validators
   processComponent((FormComponent) component);
 }
 }

 and in our application's init method:

 addComponentOnBeforeRenderListener(new ValidationListener());


 Eelco

 On 6/18/07, Alberto Bueno [EMAIL PROTECTED] wrote:
   
 Hi,

 I'm using IComponentInstantiationListener to add additional
 functionality to my components. But in this listener I need to know the
 model of the component to condition this functionality.
 If we inspect the code, we can see that the listeners are called before
 assigning the model to the component:

 public Component(final String id, final IModel model)
 {
 setId(id);
 getApplication().notifyComponentInstantiationListeners(this);
 this.model = wrap(model);

 final IDebugSettings debugSettings =
 Application.get().getDebugSettings();
 if (debugSettings.getComponentUseCheck())
 {
 setMetaData(CONSTRUCTED_AT_KEY, Strings.toString(this, new
 MarkupException(
 constructed)));
 }
 }

 Are there any reason to do the notification in that moment?

 Thanks



 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Problem adding css with ajax in Firefox

2007-01-18 Thread Alberto Bueno
Hello,

I'm trying to load css files with ajax, but the problem is that the 
rendering of the components are executed before the loading of the css 
files.
This problem means that if I have to use styles in the component 
updated, these styles are not executed, because when the component is 
rendered,
the styles are not loaded yet.

This is a very simple example where the css file doesn't work correctly:

MyPage.java:

public class MyPage extends WebPage
{
private static final long serialVersionUID = 1L;

private Component panel = null;
   
public MyPage(final PageParameters parameters)
{
super();
   
panel = new Label(this,panel,panel);
panel.setOutputMarkupId(true);
   
AjaxLink link = new AjaxLink(this, link, new Model(link)){
@Override
public void onClick(AjaxRequestTarget target) {
   
panel = new MyPanel(TogglePanePage.this,panel);
panel.setOutputMarkupId(true);
   
panel.add(HeaderContributor.forCss(this.getClass(), 
mycss.css));
target.addComponent(panel);
   
}
};
  }
}

MyPage.html
html
body
h1Dialogs/h1
div style=padding:20px 
h4Inline Accordeon/h4
div style=padding-left: 40px;
  span wicket:id=panel/span
  a wicket:id=linklink/a
 /div 
/div
   /body
/html



MyPanel.java

public class MyPanel extends Panel {

public MyPanel(MarkupContainer parent, String id) {
super(parent, id);
}

private static final long serialVersionUID = 1L;

}


MyPanel.html
html
body
wicket:panel
scriptalert(loaded)/script
div class=testtest/div
/wicket:panel
   /body
/html


mycss.css
body
{
background-color: red;
}

In the example, the javascript alert() is executed before the 
background-color has been changed. And the background-color would have 
to be changed before.

I think this is not a correct behavior, because with javascript files 
work correcty. But javascript files call to the server to load the file 
and css files don't call to the server.

Any suggestion?

Thanks






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


Re: [Wicket-user] Problem adding css with ajax in Firefox

2007-01-18 Thread Alberto Bueno
The most important is not the example, the important is the concept. The 
file is loaded after the rendering of the component.
Another example:

TogglePanePage.class

public class TogglePanePage extends WebPage
{
private static final long serialVersionUID = 1L;

private MyPanel panel = null;
   
public TogglePanePage(final PageParameters parameters)
{
super();
   
panel = new MyPanel(this,panel);
panel.setOutputMarkupId(true);
   
AjaxLink link = new AjaxLink(this, link, new Model(link)){
@Override
public void onClick(AjaxRequestTarget target) {
   
panel.get(mypanel2).setVisible(true);
   
target.addComponent(panel);
   
}
}; 
}
}

TogglePanePage.html

html
body
wicket:extend
h1Dialogs/h1
div style=padding:20px
 
h4Inline Accordeon/h4
div style=padding-left: 40px;
  span wicket:id=panel/span
  a wicket:id=linklink/a
 /div
   

/div
/wicket:extend
   /body
/html

MyPanel.java
public class MyPanel extends Panel {

public MyPanel(MarkupContainer parent, String id) {
super(parent, id);
   
new MyPanel2(this, mypanel2).setVisible(false);
   
}

MyPanel.html
wicket:panel
div wicket:id=mypanel2test/div
/wicket:panel


MyPanel2.java
public class MyPanel2 extends Panel {

public MyPanel2(MarkupContainer parent, String id) {
super(parent, id);
   
add(HeaderContributor.forCss(this.getClass(), mycss.css));
   
}
}


MyPanel2.html
wicket:panel
scriptalert(loaded)/script
/wicket:panel


mycss.css
body
{
background-color: red;
}

Thanks

 This doesn't really make sense. You can't create panel in the onClick 
 handler without placing it anywhere in page. You can either create the 
 panel in advance (and hide it) or create another component and replace 
 it by the new panel panel.

 -Matej


 Alberto Bueno wrote:
   
 Hello,

 I'm trying to load css files with ajax, but the problem is that the 
 rendering of the components are executed before the loading of the css 
 files.
 This problem means that if I have to use styles in the component 
 updated, these styles are not executed, because when the component is 
 rendered,
 the styles are not loaded yet.

 This is a very simple example where the css file doesn't work correctly:

 MyPage.java:

 public class MyPage extends WebPage
 {
 private static final long serialVersionUID = 1L;

 private Component panel = null;

 public MyPage(final PageParameters parameters)
 {
 super();

 panel = new Label(this,panel,panel);
 panel.setOutputMarkupId(true);

 AjaxLink link = new AjaxLink(this, link, new Model(link)){
 @Override
 public void onClick(AjaxRequestTarget target) {

 panel = new MyPanel(TogglePanePage.this,panel);
 panel.setOutputMarkupId(true);

 panel.add(HeaderContributor.forCss(this.getClass(), 
 mycss.css));
 target.addComponent(panel);

 }
 };
   }
 }

 MyPage.html
 html
 body
 h1Dialogs/h1
 div style=padding:20px 
 h4Inline Accordeon/h4
 div style=padding-left: 40px;
   span wicket:id=panel/span
   a wicket:id=linklink/a
  /div 
 /div
/body
 /html



 MyPanel.java

 public class MyPanel extends Panel {

 public MyPanel(MarkupContainer parent, String id) {
 super(parent, id);
 }

 private static final long serialVersionUID = 1L;

 }


 MyPanel.html
 html
 body
 wicket:panel
 scriptalert(loaded)/script
 div class=testtest/div
 /wicket:panel
/body
 /html


 mycss.css
 body
 {
 background-color: red;
 }

 In the example, the javascript alert() is executed before the 
 background-color has been changed. And the background-color would have 
 to be changed before.

 I think this is not a correct behavior, because with javascript files 
 work correcty. But javascript files call to the server to load the file 
 and css files don't call to the server.

 Any suggestion?

 Thanks






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

[Wicket-user] Adding onload event in Ajax border

2006-11-28 Thread Alberto Bueno
My problem is that I want to call to a javascript method after the 
rendering of a page or after the rendering of the component with ajax.

Now I have a border and I want to add in the component an onload event. 
For instance:

body onload=alert('test');
  wicket:border
wicket:child/
/wicket:border
/body

The alert runs correctly if I use the border in the page. But if I 
update the border
with ajax, the alert is not rendered.

Who can I do to add the alert in both cases?

Thanks

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


[Wicket-user] Problem in generation of the html code of the page

2006-11-10 Thread Alberto Bueno
When I create a page, and this page generate this html code:

script type=text/javascript !--/*--![CDATA[/*!--*/
if (window.name=='') { 
window.location=/quickstart/app?wicket:interface=:1::INewBrowserWindowListener;
 }
/*--]]*//script


Now, I add a button in the page (a very simple page):

public class Index extends QuickStartPage
{
public Index(final PageParameters parameters)
{

Form form = new Form(this, form);
new Button(form, button){

@Override
public void onSubmit()
{
// TODO Auto-generated method stub
String p = ;
}
   
};
}
}

And when I click the button, in the generation of the page I have the 
code duplicated:

script type=text/javascript !--/*--![CDATA[/*!--*/
if (window.name=='') { 
window.location=/quickstart/app?wicket:interface=:1::INewBrowserWindowListener;
 }
/*--]]*//script


script type=text/javascript !--/*--![CDATA[/*!--*/
if (window.name=='') { 
window.location=/quickstart/app?wicket:interface=:1::INewBrowserWindowListener;
 }
/*--]]*//script


And if I continue clicking the button, the page continue duplicating the 
code...

If problem of my application?

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Why add(IBehavior) is final?

2006-11-10 Thread Alberto Bueno





In my case, I have created a TextField component, that is a panel that
contains internally a TextField wicket component. Now, if I add the
method addToField, the user will have two methods:

TextField.add(IBehavior behavior)
TextField.addToField(IBehavior behavior)

I think that this case will be more confused than if I have only one
method:

TextField.add(IBehavior behavior){
 textField.add(behavior);
}

I don't want to add any behavior in the panel, I only want to add
behaviors in the field. Why do I have to create another method, that it
will be more confused for the user?

This is the same situation that when we use the IAlternateParent. We
add the component in a component, but the real parent is another...



  I am definitely /not/ against removing final, but it is not going to 
work (not in general that is).

Alberto's defense is that the user thinks he is working with a field, 
while in reality he is working with a panel. I assume that Alberto is 
using a panel because he wants some extra functionality around the 
field, say a button or a link. Anyway, now the user adds some behavior, 
say 'new SimpleAttributeModifier("style", "background-color: #d91")'. 
Now in the described setup only the field will get the new background, 
while the user probably also wanted to color the whitespace around it. 
As a user I would find this pretty confusing.

In short: there is no way of hiding the fact that the component you are 
offering to a user is a composite, if you also want the user to have 
access to the inner components.

So my solution would be to either expose the inner field through a 
getter, or write the addToField method that was discussed earlier.

Regards,
 Erik.



Eelco Hillenius schreef:
  
  
I could definitively live with removing final there. And maybe some
other methods too.

Anyone against removing final from add(IBehavior)?

Eelco


On 11/9/06, Alberto Bueno [EMAIL PROTECTED] wrote:
  


  Hi,
now I have this solution, but I don't like it for you reasons:

- Now I have two methods to add a Behavior: add(IBehavior) and
addToField(IBehavior), and for the users can be confuse.
- I want to have a transparent component. The user doesn't have to know
that he is working with a panel. This is working with a "field". If I have:

MyField extends Panel{
 public MyField(MarkupContainer parent, String id){
super(parent, id);

new TextField(this, "myField");
 }
}

For the user, MyField is a form Component, and if he add a new Behavior,
the user thinks that the behavior is for the field, not for the panel.

This is the idea...



  
  
Why don't you write in your panel: void addToField(Behavior b) {...}?
There is no need to corrupt the meaning of Wicket methods ;)

Regards,
 Erik.


Alberto Bueno schreef:

  


  Hi,

I want to overwrite the add(IBehavior) method of the component, but this
method is final.
I want to use the same idea of AlternateParent when we add a new component.
I have a panel, and I want to add a behavior in the panel, but the
behavior is used in a field
component that is in the panel.

I don't want to say:
panel.get("myField").add(new MyBehavior());

I want to say:

panel.add(new MyBehavior());

and in the add() method of the panel say:

public Component add(final IBehavior behavior)
{
  get("myField").add(behavior);
}

Any idea to implement this functionality?

Thanks

  

  

  
  
  





-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Problem in generation of the html code of the page

2006-11-10 Thread Alberto Bueno
The trunk

 What version of Wicket do you use?

 Regards

 Korbinian
  

   
 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] Im Auftrag 
 von Alberto Bueno
 Gesendet: Freitag, 10. November 2006 10:35
 An: wicket-user@lists.sourceforge.net
 Betreff: [Wicket-user] Problem in generation of the html code 
 of the page

 When I create a page, and this page generate this html code:

 script type=text/javascript 
 
 !--/*--![CDATA[/*!--*/ if (window.name=='') { 
   
 window.location=/quickstart/app?wicket:interface=:1::INewBrow
 
 serWindowListener; } /*--]]*//script
   
 Now, I add a button in the page (a very simple page):

 public class Index extends QuickStartPage {
 public Index(final PageParameters parameters)
 {

 Form form = new Form(this, form);
 new Button(form, button){

 @Override
 public void onSubmit()
 {
 // TODO Auto-generated method stub
 String p = ;
 }

 };
 }
 }

 And when I click the button, in the generation of the page I 
 have the code duplicated:

 script type=text/javascript 
 
 !--/*--![CDATA[/*!--*/ if (window.name=='') { 
   
 window.location=/quickstart/app?wicket:interface=:1::INewBrow
 
 serWindowListener; } /*--]]*//script
   
 script type=text/javascript 
 
 !--/*--![CDATA[/*!--*/ if (window.name=='') { 
   
 window.location=/quickstart/app?wicket:interface=:1::INewBrow
 
 serWindowListener; } /*--]]*//script
   
 And if I continue clicking the button, the page continue 
 duplicating the code...

 If problem of my application?

 --
 ---
 Using Tomcat but need to do more? Need to support web 
 services, security?
 Get stuff done quickly with pre-integrated technology to make 
 your job easier Download IBM WebSphere Application Server 
 v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057;
 
 dat=121642
   
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 


 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Why add(IBehavior) is final?

2006-11-09 Thread Alberto Bueno
Hi,
now I have this solution, but I don't like it for you reasons:

- Now I have two methods to add a Behavior: add(IBehavior) and 
addToField(IBehavior), and for the users can be confuse.
- I want to have a transparent component. The user doesn't have to know 
that he is working with a panel. This is working with a field. If I have:

MyField extends Panel{
 public MyField(MarkupContainer parent, String id){
super(parent, id);

new TextField(this, myField);
 }
}

For the user, MyField is a form Component, and if he add a new Behavior, 
the user thinks that the behavior is for the field, not for the panel.

This is the idea...


 Why don't you write in your panel: void addToField(Behavior b) {...}?
 There is no need to corrupt the meaning of Wicket methods ;)

 Regards,
  Erik.


 Alberto Bueno schreef:
   
 Hi,

 I want to overwrite the add(IBehavior) method of the component, but this 
 method is final.
 I want to use the same idea of AlternateParent when we add a new component.
 I have a panel, and I want to add a behavior in the panel, but the 
 behavior is used in a field
 component that is in the panel.

 I don't want to say:
 panel.get(myField).add(new MyBehavior());

 I want to say:

 panel.add(new MyBehavior());

 and in the add() method of the panel say:

 public Component add(final IBehavior behavior)
 {
   get(myField).add(behavior);
 }

 Any idea to implement this functionality?

 Thanks
   
 

   


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] How to configure a HeaderContributor

2006-11-09 Thread Alberto Bueno
Hi,

I want to add a css file to a component, but this css can be defined by 
the user. For example:

public class TabSet extends PanelString implements 
IAlternateParentProvider{
   
private ResourceReference styleURI = new 
ResourceReference(ManagerStyleSheetFiles.class, tabSet.css);

public TabSet(MarkupContainer parent, String id) {
super(parent, id,new ModelString());
   
add(HeaderContributor.forCss(styleURI));  
Toolbar toolbar=  new Toolbar(this, tabs);
   
}
}

and the user can do this:

   TabSet tabSet = new TabSet(form, tabSet);
   tabSet.setStyleURI(new 
ResourceReference(ManagerStyleSheetFiles.class, main.css));

The problem is where or when can I add the HeaderContributor in the 
tabset to use the correct css file?
Because if I add the HeaderContributor in the contructor, I cannot 
change it later.

Any idea?

Thanks



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to configure a HeaderContributor

2006-11-09 Thread Alberto Bueno
Yes, but I don't know when I have to add the behavior.
In the internalOnAttach I cannot add the behavior, because I want to add 
it only one time.
I need to add the behavior before of the first rendering and I need to 
add it only one time...

 Just add it later. As long as you add it before the component renders,
 you're fine.

 Eelco


 On 11/9/06, Alberto Bueno [EMAIL PROTECTED] wrote:
   
 Hi,

 I want to add a css file to a component, but this css can be defined by
 the user. For example:

 public class TabSet extends PanelString implements
 IAlternateParentProvider{

 private ResourceReference styleURI = new
 ResourceReference(ManagerStyleSheetFiles.class, tabSet.css);

 public TabSet(MarkupContainer parent, String id) {
 super(parent, id,new ModelString());

 add(HeaderContributor.forCss(styleURI));
 Toolbar toolbar=  new Toolbar(this, tabs);

 }
 }

 and the user can do this:

TabSet tabSet = new TabSet(form, tabSet);
tabSet.setStyleURI(new
 ResourceReference(ManagerStyleSheetFiles.class, main.css));

 The problem is where or when can I add the HeaderContributor in the
 tabset to use the correct css file?
 Because if I add the HeaderContributor in the contructor, I cannot
 change it later.

 Any idea?

 Thanks



 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 

 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
   


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Why add(IBehavior) is final?

2006-11-08 Thread Alberto Bueno
Hi,

I want to overwrite the add(IBehavior) method of the component, but this 
method is final.
I want to use the same idea of AlternateParent when we add a new component.
I have a panel, and I want to add a behavior in the panel, but the 
behavior is used in a field
component that is in the panel.

I don't want to say:
panel.get(myField).add(new MyBehavior());

I want to say:

panel.add(new MyBehavior());

and in the add() method of the panel say:

public Component add(final IBehavior behavior)
{
  get(myField).add(behavior);
}

Any idea to implement this functionality?

Thanks

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Why form validators are private?

2006-10-27 Thread Alberto Bueno
I'm trying to overwrite the validateRequired of the Form, but this 
method is private.
My problem is that I have two submit buttons: the first button is to 
insert the data into the database, and this button need to check the 
required fields. The another button is a confirm button that need to do 
the submit but I don't need to do the check for the required fields.
The idea is to overwrite the validateRequired to control what button is 
clicked and to know if the fields have to be validated.
Now the solution is to overwrite all fields of the form and overwrite 
the isRequired method.

Do you know another idea to do this?

Thanks

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Why form validators are private?

2006-10-27 Thread Alberto Bueno
My problem is that the only validation that I don't want to do is the 
requiredValidation. I want to to the rest of the process.

 button.setDefaultFormProcessing(false)

 public class Button extends FormComponent {

   /**
* Sets the defaultFormProcessing property. When false (default is 
 true),
* all validation and formupdating is bypassed and the onSubmit method 
 of
* that button is called directly, and the onSubmit method of the parent
* form is not called. A common use for this is to create a cancel 
 button.
*
* @param defaultFormProcessing
*defaultFormProcessing
* @return This
*/
   public final Button setDefaultFormProcessing(boolean 
 defaultFormProcessing)

 }


 Martijn

 On 10/27/06, Alberto Bueno [EMAIL PROTECTED] wrote:
   
 I'm trying to overwrite the validateRequired of the Form, but this
 method is private.
 My problem is that I have two submit buttons: the first button is to
 insert the data into the database, and this button need to check the
 required fields. The another button is a confirm button that need to do
 the submit but I don't need to do the check for the required fields.
 The idea is to overwrite the validateRequired to control what button is
 clicked and to know if the fields have to be validated.
 Now the solution is to overwrite all fields of the form and overwrite
 the isRequired method.

 Do you know another idea to do this?

 Thanks

 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

 


   


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Why form validators are private?

2006-10-27 Thread Alberto Bueno
It would be a very good idea. ;)


 we could make the protected final so that you can add your own method 
 that calls the validation methods you do want.


 On 10/27/06, *Alberto Bueno*  [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 My problem is that the only validation that I don't want to do is the
 requiredValidation. I want to to the rest of the process.

  button.setDefaultFormProcessing(false)
 
  public class Button extends FormComponent {
 
/**
 * Sets the defaultFormProcessing property. When false
 (default is true),
 * all validation and formupdating is bypassed and the
 onSubmit method of
 * that button is called directly, and the onSubmit method
 of the parent
 * form is not called. A common use for this is to create
 a cancel button.
 *
 * @param defaultFormProcessing
 *defaultFormProcessing
 * @return This
 */
public final Button setDefaultFormProcessing(boolean
 defaultFormProcessing)
 
  }
 
 
  Martijn
 
  On 10/27/06, Alberto Bueno [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
 
  I'm trying to overwrite the validateRequired of the Form, but this
  method is private.
  My problem is that I have two submit buttons: the first button
 is to
  insert the data into the database, and this button need to
 check the
  required fields. The another button is a confirm button that
 need to do
  the submit but I don't need to do the check for the required
 fields.
  The idea is to overwrite the validateRequired to control what
 button is
  clicked and to know if the fields have to be validated.
  Now the solution is to overwrite all fields of the form and
 overwrite
  the isRequired method.
 
  Do you know another idea to do this?
 
  Thanks
 
 
 -
  Using Tomcat but need to do more? Need to support web services,
 security?
  Get stuff done quickly with pre-integrated technology to make
 your job easier
  Download IBM WebSphere Application Server v.1.0.1 based on
 Apache Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 


 -
 Using Tomcat but need to do more? Need to support web services,
 security?
 Get stuff done quickly with pre-integrated technology to make your
 job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache
 Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 

 -
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 

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


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] How to remove a behavior

2006-10-27 Thread Alberto Bueno
I'm trying to remove a behavior from a component, but the method
getBehaviors returns an unmodifiableList and I cannot remove the behavior.
My problem if that the rendering of a component depends of a mode, and 
if the mode is view
then the component have a AbstractTransformerBehavior (to change the 
rendering), but if I refresh the page and the mode has been changed, 
then I have to remove this behavior.

Do you have any idea to implement this case?

Thanks

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Problem with FormBorder and not visible components (in trunk)

2006-10-09 Thread Alberto Bueno
Hi Juergen Donnerstag

Thanks for you patience. ;)

The problem has been fixed with the changes that we have added to the 
trunk.
Now I have another question.
In the example BoxBorderTextPage_7 we add a TextField in the FormBorder. 
After that,
If I want to find this component into the FormBorder component, I cannot 
find it.

public BoxBorderTestPage_7()
{
Border formBorder = new FormBorder(this, border);

TextField textfield = new TextFieldString(formBorder, name, 
new PropertyModelString(
properties, name));

Component c = formBorder.get(name);
   
// Test setVisible on formBorders
textfield.setVisible(false);

new Link(this, link)
{
private static final long serialVersionUID = 1L;

@Override
public void onClick()
{
String p = ;
}
};
}

The line Component c = formBorder.get(name); has been added in the 
example, and return null.
Is correct this result, or the get() method should return the TextField 
component?




 I extened BoxBorderTestPage_7 to click the link and to validate the
 output of the second render as well. The problem should be fixed.

 Juergen

 On 10/7/06, Alberto Bueno [EMAIL PROTECTED] wrote:
   
 Hi Juergen Donnerstag,

 The example BoxBorderTestPage_7 runs correctly because you only render
 the page only one time. The problem is if
 you have to reload the page again, because TextField has been removed in
 the first rendering and the markup
 doesn't find this component in the second rendering.
 I don't know how to simulate the situation in a test case, but if you
 check the example that I wrote,
 you will see the problem:

 MyBorderPage.html

 div wicket:id=border
 label wicket:id=span
 test
 /label
 /div
 a wicket:id=linklink/a


 MyBorderPage.java

 FormBorder border = new FormBorder(this, border);

 Label span = new Label(border, span,testt);
 span.setVisible(false);

 new Link(this, link){

 @Override
 public void onClick() {
 String p =;

 }

 };


 
 I've copied BoxBorderTestPage_3 into BoxBorderTestPage_7 and made the
 change you suggested. It is working properly. The textield is no
 longer printed.

 Juergen

 On 10/6/06, Alberto Bueno [EMAIL PROTECTED] wrote:

   
 you have the the test case:

 public class BoxBorderTestPage_3 extends WebPage
 {
 private static final long serialVersionUID = 1L;

 private final ValueMap properties = new ValueMap();

 /**
  * Construct.
  *
  *
  */
 public BoxBorderTestPage_3()
 {
 Border formBorder = new FormBorder(this, border);

new TextFieldString(formBorder, name, new
 PropertyModelString(properties, name));
 }
 }

 That runs correctly.

 But if you change TextField component to setVisible(false):

 TextField textfield = new TextFieldString(formBorder, name,
 new PropertyModelString(properties, name));
 textfield.setVisible(false);

 Then the case has an error, because in the
 DiffUtil.validatePage(document, this.getClass(), filename) the component
 doesn't exists.
 (Because has been removed by the page when it check if the autocomponent
 contain not visible component to remove).






 
 This is V2 svn trunk? Could you please create a test case (see
 src/test) for me which makes is much easier to follow up. Thanks

 Juergen

 On 10/6/06, Alberto Bueno [EMAIL PROTECTED] wrote:


   
 Hi,

 the problem is when I want to add in a FormBorder a component with
 setVisible(false), because  this component
 is removed in the first rendering, and in the next rendering the
 component is not found.
 This is a simple example:

 MyBorderPage.html

 div wicket:id=border
   label wicket:id=span
   test
/label
 /div
 a wicket:id=linklink/a


 MyBorderPage.java

 FormBorder border = new FormBorder(this, border);

Label span = new Label(border, span,testt);
span.setVisible(false);

new Link(this, link){

@Override
public void onClick() {
String p =;

}

};

 When I click the link, I have the error:

 Unable to find component with id 'span' in [MarkupContainer
 [Component id = auto-body, page = 
 com.isencia.paging.wicket.MyBorderPage,
 path = 8:border:myForm:auto-body.Border$BorderBody, isVisible = true,
 isVersioned = true]].


 Do you know any solution to solve this problem, or is a bug?

 Thanks




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

Re: [Wicket-user] Problem with FormBorder and not visible components (in trunk)

2006-10-09 Thread Alberto Bueno
Yes, now the ways to find the child into the border are the ways that 
you say, but I think that the
way would have to be transparent, like when we add a new child:

TextField textfield = new TextFieldString(formBorder, name,
new PropertyModelString(
   properties, name));

In that case, I really don't know where the textfield is added. Only
internally the textfield is added in the body container.
For the same reason, when I want to search a child, I don't have to know
where is exactly this child...
I think that in this case, I only have to know that the textfield has been
added in a formborder, and I have to go to search this field in the formBorder.
In this case, the get() method of the formBorder have to know internally where 
is the 
children, depending of the body container.

I think this is a good idea to implement for components that implements 
IAlternateParent...





 Because FormBorder puts a form _around_ the wicket:body tag, the
 name component gets added to the body container. The body container
 id is border.getId() + Body. Hence
 get(border.form.borderBody.name) or
 border.getBodyContainer().get(name) or
 formBorder.get(borderBody.name)

 Juergen

 On 10/9/06, Alberto Bueno [EMAIL PROTECTED] wrote:
   
 Hi Juergen Donnerstag

 Thanks for you patience. ;)

 The problem has been fixed with the changes that we have added to the
 trunk.
 Now I have another question.
 In the example BoxBorderTextPage_7 we add a TextField in the FormBorder.
 After that,
 If I want to find this component into the FormBorder component, I cannot
 find it.

public BoxBorderTestPage_7()
{
Border formBorder = new FormBorder(this, border);

TextField textfield = new TextFieldString(formBorder, name,
 new PropertyModelString(
properties, name));

Component c = formBorder.get(name);

// Test setVisible on formBorders
textfield.setVisible(false);

new Link(this, link)
{
private static final long serialVersionUID = 1L;

@Override
public void onClick()
{
String p = ;
}
};
}

 The line Component c = formBorder.get(name); has been added in the
 example, and return null.
 Is correct this result, or the get() method should return the TextField
 component?




 
 I extened BoxBorderTestPage_7 to click the link and to validate the
 output of the second render as well. The problem should be fixed.

 Juergen

 On 10/7/06, Alberto Bueno [EMAIL PROTECTED] wrote:

   
 Hi Juergen Donnerstag,

 The example BoxBorderTestPage_7 runs correctly because you only render
 the page only one time. The problem is if
 you have to reload the page again, because TextField has been removed in
 the first rendering and the markup
 doesn't find this component in the second rendering.
 I don't know how to simulate the situation in a test case, but if you
 check the example that I wrote,
 you will see the problem:

 MyBorderPage.html

 div wicket:id=border
 label wicket:id=span
 test
 /label
 /div
 a wicket:id=linklink/a


 MyBorderPage.java

 FormBorder border = new FormBorder(this, border);

 Label span = new Label(border, span,testt);
 span.setVisible(false);

 new Link(this, link){

 @Override
 public void onClick() {
 String p =;

 }

 };



 
 I've copied BoxBorderTestPage_3 into BoxBorderTestPage_7 and made the
 change you suggested. It is working properly. The textield is no
 longer printed.

 Juergen

 On 10/6/06, Alberto Bueno [EMAIL PROTECTED] wrote:


   
 you have the the test case:

 public class BoxBorderTestPage_3 extends WebPage
 {
 private static final long serialVersionUID = 1L;

 private final ValueMap properties = new ValueMap();

 /**
  * Construct.
  *
  *
  */
 public BoxBorderTestPage_3()
 {
 Border formBorder = new FormBorder(this, border);

new TextFieldString(formBorder, name, new
 PropertyModelString(properties, name));
 }
 }

 That runs correctly.

 But if you change TextField component to setVisible(false):

 TextField textfield = new TextFieldString(formBorder, name,
 new PropertyModelString(properties, name));
 textfield.setVisible(false);

 Then the case has an error, because in the
 DiffUtil.validatePage(document, this.getClass(), filename) the component
 doesn't exists.
 (Because has been removed by the page when it check if the autocomponent
 contain not visible component to remove).







 
 This is V2 svn trunk? Could you please create a test case (see
 src/test) for me which makes is much easier to follow up. Thanks

 Juergen

 On 10/6/06, Alberto Bueno [EMAIL PROTECTED] wrote:



   
 Hi,

 the problem is when I want to add in a FormBorder a component with
 setVisible(false), because  this component
 is removed in the first rendering, and in the next rendering the
 component is not found.
 This is a simple example

Re: [Wicket-user] Problem with FormBorder and not visible components (in trunk)

2006-10-09 Thread Alberto Bueno
Yes, this method can be used,
but imagine that I create my own FormBorder, that other people will use 
to create different forms.
These developers can add content to this FormBorder, and they will add 
this content in the FormBorder
component.

Border formBorder = new FormBorder(this, border);
TextField textfield = new TextFieldString(formBorder,name, new 
PropertyModelString(properties, name));


These developers don't have to know that the components have been added 
in the form component, because
they are adding the components in the FormBorder component. How the 
FormBorder works internally is not
important for these developers. They only have to know that they are 
adding components to the FormBorder.
For this reason, If they want to search the textfield component, they 
only have to search this component
in the FormBorder component.

It's only an idea that would be nice to have in your framework, and 
probably will be interesting for the
developers that they use this functionality. ;)




 getBodyContainer() already exists

 Juergen

 On 10/9/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
   
 we can add border.getBodyContainer() to make it easier to find the body
 container.

 a couple of notes on wicket 2.0 in general.

 because of constructor change and the need for IAlternateParentProvider you
 can no longer assume that

 Container c=new Container(...);
 Label l=new Label(c);

 l.getParent()==c

 that is simply the nature of the beast. if you need to get a hold of l after
 you added it to c later, then keep a reference, dont depend on the id.

 same thing is with models because of the way they wrap each other

 IModel model=getModel();
 Labe l=new Label();
 l.setModel(model);

 you cannot depend on

 model==l.getModel()

 because if model was assignment aware it wouldve generated a wrapper of
 itself in setModel() call.

 -Igor




 On 10/9/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 
 On 10/9/06, Alberto Bueno [EMAIL PROTECTED]  wrote:
   
 Yes, now the ways to find the child into the border are the ways that
 you say, but I think that the
 way would have to be transparent, like when we add a new child:

 TextField textfield = new TextFieldString(formBorder, name,
 new PropertyModelString(
   properties, name));

 
 not quite. Remember that in case of FormBorder you  must call
 Border.setBorderBodyContainer(parent). Hence, it is not completely
 transparent.

   
 In that case, I really don't know where the textfield is added.
 
 call Component.getPath()

   
 Only
 internally the textfield is added in the body container.
 For the same reason, when I want to search a child, I don't have to know
 where is exactly this child...
 I think that in this case, I only have to know that the textfield has
 
 been
 
 added in a formborder, and I have to go to search this field in the
 
 formBorder.
 
 In this case, the get() method of the formBorder have to know internally
 
 where is the
 
 children, depending of the body container.

 I think this is a good idea to implement for components that implements
 
 IAlternateParent...
 
 You see the nasty point about this is that we would have to maintain
 two parent per component. The real one and the user one.
 Give me some time to think about it.

 Juergen

   


 
 Because FormBorder puts a form _around_ the wicket:body tag, the
 name component gets added to the body container. The body container
 id is border.getId() + Body. Hence
 get( border.form.borderBody.name) or
 border.getBodyContainer().get(name) or
 formBorder.get(borderBody.name)

 Juergen

 On 10/9/06, Alberto Bueno  [EMAIL PROTECTED] wrote:

   
 Hi Juergen Donnerstag

 Thanks for you patience. ;)

 The problem has been fixed with the changes that we have added to the
 trunk.
 Now I have another question.
 In the example BoxBorderTextPage_7 we add a TextField in the
 
 FormBorder.
 
 After that,
 If I want to find this component into the FormBorder component, I
 
 cannot
 
 find it.

public BoxBorderTestPage_7()
{
Border formBorder = new FormBorder(this, border);

TextField textfield = new TextFieldString(formBorder,
 
 name,
 
 new PropertyModelString(
properties, name));

Component c = formBorder.get(name);

// Test setVisible on formBorders
textfield.setVisible(false);

new Link(this, link)
{
private static final long serialVersionUID = 1L;

@Override
public void onClick()
{
String p = ;
}
};
}

 The line Component c = formBorder.get(name); has been added in the
 example, and return null.
 Is correct this result, or the get() method should return the
 
 TextField
 
 component?





 
 I extened BoxBorderTestPage_7 to click the link

Re: [Wicket-user] Problem with FormBorder and not visible components (in trunk)

2006-10-07 Thread Alberto Bueno
Hi Juergen Donnerstag,

The example BoxBorderTestPage_7 runs correctly because you only render 
the page only one time. The problem is if
you have to reload the page again, because TextField has been removed in 
the first rendering and the markup
doesn't find this component in the second rendering.
I don't know how to simulate the situation in a test case, but if you 
check the example that I wrote,
you will see the problem:

MyBorderPage.html

div wicket:id=border
label wicket:id=span
test
/label
/div
a wicket:id=linklink/a


MyBorderPage.java

FormBorder border = new FormBorder(this, border);

Label span = new Label(border, span,testt);
span.setVisible(false);

new Link(this, link){

@Override
public void onClick() {
String p =;

}

};


 I've copied BoxBorderTestPage_3 into BoxBorderTestPage_7 and made the
 change you suggested. It is working properly. The textield is no
 longer printed.

 Juergen

 On 10/6/06, Alberto Bueno [EMAIL PROTECTED] wrote:
   
 you have the the test case:

 public class BoxBorderTestPage_3 extends WebPage
 {
 private static final long serialVersionUID = 1L;

 private final ValueMap properties = new ValueMap();

 /**
  * Construct.
  *
  *
  */
 public BoxBorderTestPage_3()
 {
 Border formBorder = new FormBorder(this, border);

new TextFieldString(formBorder, name, new
 PropertyModelString(properties, name));
 }
 }

 That runs correctly.

 But if you change TextField component to setVisible(false):

 TextField textfield = new TextFieldString(formBorder, name,
 new PropertyModelString(properties, name));
 textfield.setVisible(false);

 Then the case has an error, because in the
 DiffUtil.validatePage(document, this.getClass(), filename) the component
 doesn't exists.
 (Because has been removed by the page when it check if the autocomponent
 contain not visible component to remove).





 
 This is V2 svn trunk? Could you please create a test case (see
 src/test) for me which makes is much easier to follow up. Thanks

 Juergen

 On 10/6/06, Alberto Bueno [EMAIL PROTECTED] wrote:

   
 Hi,

 the problem is when I want to add in a FormBorder a component with
 setVisible(false), because  this component
 is removed in the first rendering, and in the next rendering the
 component is not found.
 This is a simple example:

 MyBorderPage.html

 div wicket:id=border
   label wicket:id=span
   test
/label
 /div
 a wicket:id=linklink/a


 MyBorderPage.java

 FormBorder border = new FormBorder(this, border);

Label span = new Label(border, span,testt);
span.setVisible(false);

new Link(this, link){

@Override
public void onClick() {
String p =;

}

};

 When I click the link, I have the error:

 Unable to find component with id 'span' in [MarkupContainer
 [Component id = auto-body, page = com.isencia.paging.wicket.MyBorderPage,
 path = 8:border:myForm:auto-body.Border$BorderBody, isVisible = true,
 isVersioned = true]].


 Do you know any solution to solve this problem, or is a bug?

 Thanks




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


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

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

 

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

Re: [Wicket-user] Problem with FormBorder and not visible components (in trunk)

2006-10-06 Thread Alberto Bueno
you have the the test case:

public class BoxBorderTestPage_3 extends WebPage
{
private static final long serialVersionUID = 1L;

private final ValueMap properties = new ValueMap();

/**
 * Construct.
 *
 *
 */
public BoxBorderTestPage_3()
{
Border formBorder = new FormBorder(this, border);

   new TextFieldString(formBorder, name, new 
PropertyModelString(properties, name));
}
}

That runs correctly.

But if you change TextField component to setVisible(false):

TextField textfield = new TextFieldString(formBorder, name, 
new PropertyModelString(properties, name));
textfield.setVisible(false);

Then the case has an error, because in the 
DiffUtil.validatePage(document, this.getClass(), filename) the component 
doesn't exists.
(Because has been removed by the page when it check if the autocomponent 
contain not visible component to remove).





 This is V2 svn trunk? Could you please create a test case (see
 src/test) for me which makes is much easier to follow up. Thanks

 Juergen

 On 10/6/06, Alberto Bueno [EMAIL PROTECTED] wrote:
   
 Hi,

 the problem is when I want to add in a FormBorder a component with
 setVisible(false), because  this component
 is removed in the first rendering, and in the next rendering the
 component is not found.
 This is a simple example:

 MyBorderPage.html

 div wicket:id=border
   label wicket:id=span
   test
/label
 /div
 a wicket:id=linklink/a


 MyBorderPage.java

 FormBorder border = new FormBorder(this, border);

Label span = new Label(border, span,testt);
span.setVisible(false);

new Link(this, link){

@Override
public void onClick() {
String p =;

}

};

 When I click the link, I have the error:

 Unable to find component with id 'span' in [MarkupContainer
 [Component id = auto-body, page = com.isencia.paging.wicket.MyBorderPage,
 path = 8:border:myForm:auto-body.Border$BorderBody, isVisible = true,
 isVersioned = true]].


 Do you know any solution to solve this problem, or is a bug?

 Thanks




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

 

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


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


[Wicket-user] IAlternateParentProvider method attributes

2006-10-01 Thread Alberto Bueno
Hi,

I'm using the IalternateParentProvider to manipulate the parent of the
children of my component. But the problem
is that I need information about the children in getAlternateParent
method and I only have the childClass and the childId.
Why the child component is not passed to the method? Are there any way
to know what is the child?

Thanks



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


[Wicket-user] Problem with RepeatingView in trunk

2006-09-27 Thread Alberto Bueno
Hi,

In Wicket 1.2 I had this code:

RepeatingView r = new RepeatingView(form);
r.add(new Label(view,view));
r.add(new Label(create,create));
add(r);

Now in trunk I have:

RepeatingView r = new RepeatingView(form, toolbar);
new Label(r, view,view);
new Label(r, create,create);

but this code doesn't run now. If I change the ids of the labels by 
numbers like:

RepeatingView r = new RepeatingView(form, toolbar);
new Label(r, 1,view);
new Label(r, 2,create);

then it works. But my problem is that I have predefined components with 
their specific ids and I cannot
change these ids.

Why doesn't it run as previous version? Are there another solution to 
use another kind of ids?

Thanks

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


[Wicket-user] Adding events to a form component

2006-09-21 Thread Alberto Bueno
I would like to know if is possible to add different actions to the same
event
to a form component. For instance, I want to add two actions to the same
textfield, but from different places:

textField.add(new SimpleAttributeModifier(onchange,
alert(this.value);));

textField.add(new SimpleAttributeModifier(onchange,
alert('this.value');));

The problem is that the second attribute overwrites the first attribute.
Do you have implemented some functionality to do this?

Thanks

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


Re: [Wicket-user] Adding events to a form component

2006-09-21 Thread Alberto Bueno
Thanks :)

Martijn Dashorst wrote:
 wicket.behavior.AttributeAppender

 On 9/21/06, Alberto Bueno [EMAIL PROTECTED] wrote:
   
 I would like to know if is possible to add different actions to the same
 event
 to a form component. For instance, I want to add two actions to the same
 textfield, but from different places:

 textField.add(new SimpleAttributeModifier(onchange,
 alert(this.value);));

 textField.add(new SimpleAttributeModifier(onchange,
 alert('this.value');));

 The problem is that the second attribute overwrites the first attribute.
 Do you have implemented some functionality to do this?

 Thanks

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

 


   


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