Dynamic links

2009-04-22 Thread Md. Jahid Shohel
Hi,

I have a use case like below -


- There will be two frames, more like the left frame will have menus. On
click on left menu items, on right side the page will be displayed. Now
on left side, how many items will be in menus is not static. They come
from a service, so its dynamic.


I have tried below given way -

- I have used repeater (the data view with a table and td) to put
dynamic links. The links are added fine on left menu. But when I click
on those links, each click creates a new frame on right side (on first
click its 2 frames, on second click its 3 frames, on third click its 4
frames.). The sample code is like -

table cellspacing=0
tr
thAvailable Services.../th
/tr
tr wicket:id=listServices
td
span wicket:id=service
span
wicket:id=serviceName[ServiceName]/span
/span
/td
/tr
/table






private ListClass? extends AbstractServiceWebPage classes = new
ArrayListClass? extends AbstractServiceWebPage();

classes.add(RoleService.class);
final IDataProvider dataProvider = new DataProviderClass?
extends AbstractServiceWebPage(classes);

add(new DataView(listServices, dataProvider) {

@Override
protected void populateItem(Item item) {
final Class? extends AbstractServiceWebPage clazz =
(Class? extends AbstractServiceWebPage) item.getModelObject();
String serviceName = null;
try {
serviceName = ((AbstractServiceWebPage)
clazz.newInstance()).getServiceName();
} catch (InstantiationException ex) {
throw new RuntimeException(ex);
} catch (IllegalAccessException ex) {
throw new RuntimeException(ex);
}

if (serviceName == null) {
throw new IllegalStateException(Service name can
not be null);
}
item.add(new ChangeFramePageLink(service, bodyFrame,
clazz).add(new Label(serviceName, serviceName)));
}
});



- But If I create a link normal way then it works fine, but on that
situation the links and their labels will not be dynamic, but hard
coded. Which is -

 div
ul
lia href=# wicket:id=linkToPage1
target=_parentRole Service/a/li
/ul
 /div


And in code its like --

add(new ChangeFramePageLink(linkToPage1, bodyFrame,
RoleService.class));









Any suggestion will be highly appreciated.


Regards,


//Jahid


Re: making tinymce textarea read only

2009-04-22 Thread Swanthe Lindgren
I solved the problem by downloading the tinymce source from the svn 
repository together with the javascript lib from tinymce.moxiecode.com 
and repacking it. The latest version of the scripts handles the readonly 
option correct.


//Swanthe

tubin gen wrote:

I am trying to make   teaxarea  with a tinymce behavior readonly   below is
the code for that , but this is not working , please help me make this
readonly.


tinyMCESettings.addCustomSetting(readonly : true);

  




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



Re: ModalWindow Position

2009-04-22 Thread Steve Swinsburg

Hi,

I use a javascript function to move it and then a  
target.appendJavascript() to call it. This is for an iframe but should  
work for you. Every now and then I notice a very tiny delay in the  
appearance of the ModalWindow and the movement of it to its final  
location. if you can fix that let me know ;)


final AjaxLink link = new AjaxLink(modal-link) {
public void onClick(AjaxRequestTarget target) {
window.show(target);
target.appendJavascript(fixWindowVertical(););
}
};


/* fix vertical issue with Wicket Modal window in an iframe. puts it  
50px below top of viewport rather than vertically centered. */

function fixWindowVertical() {
var myWindow=Wicket.Window.get();
if(myWindow) {
var top = getScroll() + 50;
myWindow.window.style.top = top + px;
}
return false;
}


cheers,
Steve






On 21 Apr 2009, at 14:53, Matías Tito wrote:


Hi, I have the following problem.
I add a ModalWindow in a Page. I want to change the initial top- 
position

of that. I try adding an AtributteModifier but it doesn't work.

Thanks!


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





smime.p7s
Description: S/MIME cryptographic signature


Exceptions after Tomcat restart

2009-04-22 Thread Wicket Account Wicket Account



Re: Strange behavior with palette (1.3.4) and IE7

2009-04-22 Thread Eyal Golan
I fixed the annoying thing by overriding the html panel of the palette
(which I did previously for other purposes) and adding an element (1484 is
our bugzilla issue number):
!-- Do not remove ie7bug-1484. customepalette.js uses this element --
span id=ie7bug-1484 style=display: none;/span

Also:
/**
 * Renders header contributions
 *
 * @param response
 */
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.renderJavascriptReference(new
ResourceReference(CustomPalette.class, customepalette.js));
}

and finally:
Wicket.Palette.moveUp=function(choicesId, selectionId, recorderId) {
var selection=Wicket.Palette.$(selectionId);

if (Wicket.Palette.moveUpHelper(selection)) {
document.getElementById('ie7bug-1484').innerHTML = '';
var recorder=Wicket.Palette.$(recorderId);
Wicket.Palette.updateRecorder(selection, recorder);
} else {
document.getElementById('ie7bug-1484').innerHTML = '';
}
}

I really don't like these kinds of hacks, but what can I say? IE7 wouldn't
let me any other option.

Eyal Golan
egola...@gmail.com

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

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


On Wed, Apr 22, 2009 at 12:13 PM, Eyal Golan egola...@gmail.com wrote:

 We have a very strange behavior in palette and IE7.
 We use Wicket 1.3.4 .

 The situation is:
 when pressing the UP button, the selected element goes up in each click.
 That's OK.
 The problem occurs when this element is in the second row.
 When pressing UP, it won't go to the first (upper) row. Only when we move
 the mouse to the area of the selected elements it goes up.

 In FF it doesn't happen.
 in IE6 it doesn't happen as well.

 I looked in the mailing list and couldn't see something about it.

 Was it fixed in 1.3.5 ?

 Thanks


 Eyal Golan
 egola...@gmail.com

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

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



Re: jboss + ear + wicket

2009-04-22 Thread Francis De Brabandere
As usual I found the problem creating a quickstart. It was a file name problem.

I'm used to woking in linux but for this project I work in windows. It
seems jetty/glassfish classloaders are not case-sensitive but the
jboss one is. That's why one of my markup files was not found on
jboss. (Logpanel.html instead of LogPanel.html). Using linux I would
have seen this problem long before :-s

Thanks for the replys though.

On Tue, Apr 21, 2009 at 1:33 PM, Francis De Brabandere
franci...@gmail.com wrote:
 I know that is supported but he should not be looking for these files
 as the markup is available in ParentClass.html

 for example you have a page with a form with some components in it

 in you page you add the form and to the form you add components
 now he tries to find ParentClass$FormClass.html but that markup is
 contained in the ParentClass.html

 this only happens on jboss using an ear file, deploying the plain war
 works, and deploying the ear on glassfish works

 I'll create an example app to make this more clear.

 Thanks for the replys

 On Tue, Apr 21, 2009 at 12:48 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 ParentClass$InnerClass.html are supported.. I think, I've done that
 with forms atleast.. Could you provide a sample?

 2009/4/21 Francis De Brabandere franci...@gmail.com:
 Nino,

 I think your problem is not related.

 The html files are found, pages without inner classes are correctly
 rendered. It's just that he does not seem to be finding markup that is
 contained in the parent markup. He looks for
 ParentClass$InnerClass.html.

 and we are not using eclipse for that build, standard maven ear and
 war/jar packaging

 I might create a sample project and submit a jira issue later this week

 Francis

 On Fri, Apr 17, 2009 at 11:50 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 Nope not general.. However if you use a eclipse plugin to
 publish/deploy with It might be the case anyhow..

 2009/4/17 nino martinez wael nino.martinez.w...@gmail.com:
 Ahh I think it was Martijn.. and just a general maven thing perhaps..

 2009/4/17 nino martinez wael nino.martinez.w...@gmail.com:
 Hi Francis,

 I think I know the problem.. Remember what igor wrote a few days ago
 about the new maven eclipse:eclipse plugin not allowing html resources
 along in main java or test only in resources.. Anyway that seems the
 issue I've run into now on my ubuntu box. I get the exact same thing
 as you do when I run it in a embedded jetty..:

 WicketMessage: Markup of type 'html' for component
 'org.wicketstuff.HomePage' not found. Enable debug messages for
 org.apache.wicket.util.resource to get a list of all filenames tried.:
 [Page class = org.wicketstuff.HomePage, id = 0, version = 0]

 Root cause:

 org.apache.wicket.markup.MarkupNotFoundException: Markup of type
 'html' for component 'org.wicketstuff.HomePage' not found. Enable
 debug messages for org.apache.wicket.util.resource to get a list of
 all filenames tried.: [Page class = org.wicketstuff.HomePage, id = 0,
 version = 0]
 at 
 org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:226)
 at 
 org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351)
 at org.apache.wicket.Page.onRender(Page.java:1515)
 at org.apache.wicket.Component.render(Component.java:2421)
 at org.apache.wicket.Page.renderPage(Page.java:926)
 at 
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262)
 at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
 at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1200)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:501)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288)
 at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
 at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
 at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
 at 
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
 at 
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
 at org.mortbay.jetty.Server.handle(Server.java:295)
 at 
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
 at 
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)

Re: jboss + ear + wicket

2009-04-22 Thread nino martinez wael
Hehe, that usually happens for me too, when im 100% sure that theres
an error I then go ahead to create the quickstart and 90% of the time
I see what the error are in the creation of the quickstart :)

2009/4/22 Francis De Brabandere franci...@gmail.com:
 As usual I found the problem creating a quickstart. It was a file name 
 problem.

 I'm used to woking in linux but for this project I work in windows. It
 seems jetty/glassfish classloaders are not case-sensitive but the
 jboss one is. That's why one of my markup files was not found on
 jboss. (Logpanel.html instead of LogPanel.html). Using linux I would
 have seen this problem long before :-s

 Thanks for the replys though.

 On Tue, Apr 21, 2009 at 1:33 PM, Francis De Brabandere
 franci...@gmail.com wrote:
 I know that is supported but he should not be looking for these files
 as the markup is available in ParentClass.html

 for example you have a page with a form with some components in it

 in you page you add the form and to the form you add components
 now he tries to find ParentClass$FormClass.html but that markup is
 contained in the ParentClass.html

 this only happens on jboss using an ear file, deploying the plain war
 works, and deploying the ear on glassfish works

 I'll create an example app to make this more clear.

 Thanks for the replys

 On Tue, Apr 21, 2009 at 12:48 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 ParentClass$InnerClass.html are supported.. I think, I've done that
 with forms atleast.. Could you provide a sample?

 2009/4/21 Francis De Brabandere franci...@gmail.com:
 Nino,

 I think your problem is not related.

 The html files are found, pages without inner classes are correctly
 rendered. It's just that he does not seem to be finding markup that is
 contained in the parent markup. He looks for
 ParentClass$InnerClass.html.

 and we are not using eclipse for that build, standard maven ear and
 war/jar packaging

 I might create a sample project and submit a jira issue later this week

 Francis

 On Fri, Apr 17, 2009 at 11:50 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 Nope not general.. However if you use a eclipse plugin to
 publish/deploy with It might be the case anyhow..

 2009/4/17 nino martinez wael nino.martinez.w...@gmail.com:
 Ahh I think it was Martijn.. and just a general maven thing perhaps..

 2009/4/17 nino martinez wael nino.martinez.w...@gmail.com:
 Hi Francis,

 I think I know the problem.. Remember what igor wrote a few days ago
 about the new maven eclipse:eclipse plugin not allowing html resources
 along in main java or test only in resources.. Anyway that seems the
 issue I've run into now on my ubuntu box. I get the exact same thing
 as you do when I run it in a embedded jetty..:

 WicketMessage: Markup of type 'html' for component
 'org.wicketstuff.HomePage' not found. Enable debug messages for
 org.apache.wicket.util.resource to get a list of all filenames tried.:
 [Page class = org.wicketstuff.HomePage, id = 0, version = 0]

 Root cause:

 org.apache.wicket.markup.MarkupNotFoundException: Markup of type
 'html' for component 'org.wicketstuff.HomePage' not found. Enable
 debug messages for org.apache.wicket.util.resource to get a list of
 all filenames tried.: [Page class = org.wicketstuff.HomePage, id = 0,
 version = 0]
 at 
 org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:226)
 at 
 org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351)
 at org.apache.wicket.Page.onRender(Page.java:1515)
 at org.apache.wicket.Component.render(Component.java:2421)
 at org.apache.wicket.Page.renderPage(Page.java:926)
 at 
 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262)
 at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
 at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1200)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:501)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455)
 at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288)
 at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
 at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
 at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
 at 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
 at 
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
 at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
 at 
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
 at org.mortbay.jetty.Server.handle(Server.java:295)
 at 
 

Basic help please

2009-04-22 Thread HHB
Hey,
I have a panel that consists of two parts:
the first lists groups names.
the second lists the contacts of a group, which gets 
populated upon clicking on the group name (via Ajax).

wicket:panel
div
div wicket:id=groups
span wicket:id=nameGroup Name/span
/div
/div
div
div
table wicket:id=contactsTable
tr wicket:id=contacts
tdspan wicket:id=gsmnumber/span/td
/tr
/table
/div
/div
/wicket:panel

I created this model:

public class ContactsModel extends 
LoadableDetachableModel {

private Long groupId;

@SpringBean
private Service service;

public ContactsModel(Long groupId) {
InjectorHolder.getInjector().inject(this);
this.groupId = groupId;
}

@Override
protected Object load() {
return service.findContactsByGroupId(groupId);
}

}

And here is a snippet from the panel class:

ListView entry = new ListView(groups, 
new GroupsModel()) {
@Override
protected void populateItem(ListItem item) {
Group group = (Group) item.getModelObject();
item.setModel(new CompoundPropertyModel(group));
item.add(new AjaxFallbackLink() {
   @Override
   public void onClick(AjaxRequestTarget target) {
  //what to do?
   }
});
}
};


Yes, inside onClick I can get the group ID, but what to do?
I have to do something like this inside onClick:
ContactsModel cm = new ContactsModel(groupId);
What to put inside onClick() ?
I'm new to Wicket so I appreciate your time.
Thanks.


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



Re: Strange behavior with palette (1.3.4) and IE7

2009-04-22 Thread Carlo Camerino
I think we are also expericning this problem same as yours
If you will allow, can I have a copy of your fix for this one?
what files did you modify?
Thanks

Carlo

2009/4/22 Eyal Golan egola...@gmail.com

 I fixed the annoying thing by overriding the html panel of the palette
 (which I did previously for other purposes) and adding an element (1484 is
 our bugzilla issue number):
 !-- Do not remove ie7bug-1484. customepalette.js uses this element --
 span id=ie7bug-1484 style=display: none;/span

 Also:
/**
 * Renders header contributions
 *
 * @param response
 */
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.renderJavascriptReference(new
 ResourceReference(CustomPalette.class, customepalette.js));
}

 and finally:
 Wicket.Palette.moveUp=function(choicesId, selectionId, recorderId) {
var selection=Wicket.Palette.$(selectionId);

if (Wicket.Palette.moveUpHelper(selection)) {
document.getElementById('ie7bug-1484').innerHTML = '';
var recorder=Wicket.Palette.$(recorderId);
Wicket.Palette.updateRecorder(selection, recorder);
} else {
document.getElementById('ie7bug-1484').innerHTML = '';
}
}

 I really don't like these kinds of hacks, but what can I say? IE7 wouldn't
 let me any other option.

 Eyal Golan
 egola...@gmail.com

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

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


 On Wed, Apr 22, 2009 at 12:13 PM, Eyal Golan egola...@gmail.com wrote:

  We have a very strange behavior in palette and IE7.
  We use Wicket 1.3.4 .
 
  The situation is:
  when pressing the UP button, the selected element goes up in each click.
  That's OK.
  The problem occurs when this element is in the second row.
  When pressing UP, it won't go to the first (upper) row. Only when we move
  the mouse to the area of the selected elements it goes up.
 
  In FF it doesn't happen.
  in IE6 it doesn't happen as well.
 
  I looked in the mailing list and couldn't see something about it.
 
  Was it fixed in 1.3.5 ?
 
  Thanks
 
 
  Eyal Golan
  egola...@gmail.com
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 
  P  Save a tree. Please don't print this e-mail unless it's really
 necessary
 



LinkTree will not be updated

2009-04-22 Thread ElenaStoll
I have a problem with LinkTree in Wicket, namely : 
I have a LinkTree where NodeComponent a TreeLinkIconPanel is.
TreeLinkIconPanel is a subclass of LinkIconPanel.

public TreeLinkIconPanel(String id, IModel model, BaseTree tree) {
super(id, model, tree);
}

Where a content as a label and image as a normal Icon:

protected Component newContentComponent(String componentId, BaseTree tree,
IModel model) {
...
if (model.getObject() instanceof ProcessNode) {
  lLabel = new Label(componentId, ((ProcessNode) model.getObject())
.getName());
}
...
return lLabel;
}

@Override
protected Component newImageComponent(String componentId, BaseTree tree,
IModel model) {
Image lImage=(Image)super.newImageComponent(componentId, tree, model);
if (model.getObject() instanceof ProcessNode) {
lImage = new Image(componentId,((ProcessNode)model.getObject   
  ()).getState());
}
...
return lImage;
}


The model is not updated, when the Tree to AjaxRequestTarget added.
And when ClickEven must this tree, in my case image the tree's, refresh
But what is not done:

protected void onNodeLinkClicked(TreeNode node, BaseTree tree,
AjaxRequestTarget target) {
super.onNodeLinkClicked(node, tree, target);
if (node instanceof ProcessNode) {
((ProcessNode)node).setStateGreen();
fireProcessClickEvent(target);
} else if (node instanceof ActivityNode) {
((ActivityNode)node).setStateYellow();
fireActivityClickEvent(((ActivityNode) node).getName(), 
target);
}
}

Here, this event is received:

tree.addTreeListener(new TreeListener() {

@Override
public void onActivityClicked(String nameOfNode,AjaxRequestTarget 
target){
...
target.addComponent(tree);
}
@Override
public void onProcessClicked(AjaxRequestTarget target) {
... 
target.addComponent(tree);
}

});


But if I befor the tree, the new model set, then it works:

tree.addTreeListener(new TreeListener() {

@Override
public void onActivityClicked(String nameOfNode,AjaxRequestTarget 
target){
...
tree.setModel(new Model((Serializable) new DefaultTreeModel
  (processNode)));
target.addComponent(tree);
}
@Override
public void onProcessClicked(AjaxRequestTarget target) {
... 
tree.setModel(new Model((Serializable) new DefaultTreeModel
  (processNode)));
target.addComponent(tree);
}

});
It is of course not as nice and not so expected. 
If someone can help me - that would be very nice. 
Thanks in advance.
Elena




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



Re: Basic help please

2009-04-22 Thread Linda van der Pal
I think you should detach the model of the contacts and then add the 
contacts to the target.


Linda.

HHB wrote:

Hey,
I have a panel that consists of two parts:
the first lists groups names.
the second lists the contacts of a group, which gets 
populated upon clicking on the group name (via Ajax).


wicket:panel
div
div wicket:id=groups
span wicket:id=nameGroup Name/span
/div
/div
div
div
table wicket:id=contactsTable
tr wicket:id=contacts
tdspan wicket:id=gsmnumber/span/td
/tr
/table
/div
/div
/wicket:panel

I created this model:

public class ContactsModel extends 
LoadableDetachableModel {


private Long groupId;

@SpringBean
private Service service;

public ContactsModel(Long groupId) {
InjectorHolder.getInjector().inject(this);
this.groupId = groupId;
}

@Override
protected Object load() {
return service.findContactsByGroupId(groupId);
}

}

And here is a snippet from the panel class:

ListView entry = new ListView(groups, 
new GroupsModel()) {

@Override
protected void populateItem(ListItem item) {
Group group = (Group) item.getModelObject();
item.setModel(new CompoundPropertyModel(group));
item.add(new AjaxFallbackLink() {
   @Override
   public void onClick(AjaxRequestTarget target) {
  //what to do?
   }
});
}
};


Yes, inside onClick I can get the group ID, but what to do?
I have to do something like this inside onClick:
ContactsModel cm = new ContactsModel(groupId);
What to put inside onClick() ?
I'm new to Wicket so I appreciate your time.
Thanks.


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




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.287 / Virus Database: 270.12.2/2072 - Release Date: 04/21/09 16:48:00


  



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



Register - activate account - login

2009-04-22 Thread Jan Torben Heuer
Hi,


Is there a component that handles user registration, email verification 
(account activation) and login stuff?

I currently use the classes
org.apache.wicket.authentication.AuthenticatedWebApplication;
org.apache.wicket.authentication.AuthenticatedWebSession;
org.apache.wicket.authentication.panel.SignInPanel.SignInPanel
which work well in my project.

Thanks,

Jan



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



Re: Strange behavior with palette (1.3.4) and IE7

2009-04-22 Thread Eyal Golan
With pleasure.

1. I overridden Palette.java and Palette.html
In Palette.html I added the line below (with the span).
In Palette.java all we did is override renderHead (see below)
2. We created a new palette.js and added the script file as below.

Hope that helps.

Eyal Golan
egola...@gmail.com

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

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


On Wed, Apr 22, 2009 at 5:34 PM, Carlo Camerino cmcamer...@gmail.comwrote:

 I think we are also expericning this problem same as yours
 If you will allow, can I have a copy of your fix for this one?
 what files did you modify?
 Thanks

 Carlo

 2009/4/22 Eyal Golan egola...@gmail.com

  I fixed the annoying thing by overriding the html panel of the palette
  (which I did previously for other purposes) and adding an element (1484
 is
  our bugzilla issue number):
  !-- Do not remove ie7bug-1484. customepalette.js uses this element --
  span id=ie7bug-1484 style=display: none;/span
 
  Also:
 /**
  * Renders header contributions
  *
  * @param response
  */
 @Override
 public void renderHead(IHeaderResponse response) {
 super.renderHead(response);
 response.renderJavascriptReference(new
  ResourceReference(CustomPalette.class, customepalette.js));
 }
 
  and finally:
  Wicket.Palette.moveUp=function(choicesId, selectionId, recorderId) {
 var selection=Wicket.Palette.$(selectionId);
 
 if (Wicket.Palette.moveUpHelper(selection)) {
 document.getElementById('ie7bug-1484').innerHTML = '';
 var recorder=Wicket.Palette.$(recorderId);
 Wicket.Palette.updateRecorder(selection, recorder);
 } else {
 document.getElementById('ie7bug-1484').innerHTML = '';
 }
 }
 
  I really don't like these kinds of hacks, but what can I say? IE7
 wouldn't
  let me any other option.
 
  Eyal Golan
  egola...@gmail.com
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 
  P  Save a tree. Please don't print this e-mail unless it's really
 necessary
 
 
  On Wed, Apr 22, 2009 at 12:13 PM, Eyal Golan egola...@gmail.com wrote:
 
   We have a very strange behavior in palette and IE7.
   We use Wicket 1.3.4 .
  
   The situation is:
   when pressing the UP button, the selected element goes up in each
 click.
   That's OK.
   The problem occurs when this element is in the second row.
   When pressing UP, it won't go to the first (upper) row. Only when we
 move
   the mouse to the area of the selected elements it goes up.
  
   In FF it doesn't happen.
   in IE6 it doesn't happen as well.
  
   I looked in the mailing list and couldn't see something about it.
  
   Was it fixed in 1.3.5 ?
  
   Thanks
  
  
   Eyal Golan
   egola...@gmail.com
  
   Visit: http://jvdrums.sourceforge.net/
   LinkedIn: http://www.linkedin.com/in/egolan74
  
   P  Save a tree. Please don't print this e-mail unless it's really
  necessary
  
 



Re: Google Analytics and Wicket

2009-04-22 Thread Mariana Bustamante
Hello,

sorry I've taken so long to write again.

The solution suggested by Janos Cserep using the line 
target.appendJavaScript(pageTracker._trackPageview(' + panel trackCode +
'););

worked!

Thanks to all for you ideas :)


On Sun, Apr 19, 2009 at 7:42 AM, James Carman
jcar...@carmanconsulting.comwrote:

 I think the idea is that they're not switching pages, but switching
 panels.  They'd like each panel to show up as a unique page with its
 own id?

 On Sat, Apr 18, 2009 at 4:14 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
  Hmm why are that approach requiring more changes than this other? This
  just involves that you change extend webpage to mybasepage, and then
  drop the few lines of js in the markup of the mybasepage...
 
  2009/4/18 Mariana Bustamante marian...@gmail.com:
  Is there any other method that doesn't mean many changes in my
 application??
  Everything is already working fine and adding Google Analytics was
 supposed
  to be one the final details..
 
  I was thinking of something like adding the javascript manually into my
  panels, I tried this on the panel to test it but it didn't work:
 
 border.add(new AjaxEventBehavior(onload){
 @Override
 protected void onEvent(AjaxRequestTarget target)
 {
 if(!tracked){
 String jsGoogle = if
  (http_request.readyState == 4) { if (http_request.status == 200)
 {
  alert(http_request.responseText);
  pageTracker._trackPageview('+GOOGLE_NAME+' ); } else {
 alert('Error.'); ;
 
 
  target.addComponent(border);
 
  target.appendJavascript(jsGoogle);
 tracked = true;
 }
 }
 
 });
 
  any more ideas?
 
  Thanks in advance,
 
  Mariana
 
  On Sat, Apr 18, 2009 at 5:28 PM, nino martinez wael 
  nino.martinez.w...@gmail.com wrote:
 
  If you use markup inheritance just drop it in the parent page.. And
  there you go.. :) If not.. Well this is a good reason to start :)
  Works like a snug for my applications
 
  2009/4/17 Mariana Bustamante marian...@gmail.com:
   Hello,
  
   I'm trying to use Google Analytics with my web application made using
   Wicket. The layout of my application is like this:
  
   I have a global plage called homePage that contains some panels
 inside.
   One of the panels is a menu which is completely made in java code
 using
   Wicket, the other important panel is the content panel that changes
 to a
   different panel with Ajax every time a user clicks a button on the
 menu.
  
   I tried placing the Google Analytics script at the bottom of the
 homePage
   but, as expected, in the generated report I can only see this page.
  However,
   I need to be able to view every panel as a different page.
  
   There is a link in the google analytics suppport page that seems like
  what
   I'm looking for (
  
 
 http://www.google.com/support/googleanalytics/bin/answer.py?hl=enanswer=55519
  )
   but I can't see where to put the code they give since the links in my
  menu
   are generated by Wicket in java code and not in html.
  
   I would really appreciate any help to solve this problem,
  
   Thanks in advance,
  
   Mariana
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




-- 
Ing. Mariana Bustamante
Integra Consultores


Re: tinymce textarea

2009-04-22 Thread fachhoch

Tinymce text is formatted with html and when I add text to label i  see the 
text with html , please tell me how can I tell wicket   that model also has
html tags and browser should interpet them and   not display ?  If I set
model of a 
label as html text   I   am expecting to seehtml parsed by browser  and
not the same html I set as model 
attached is the image   , it shows the same text i sert as model and i am
expecting browser to parse those html tags and not just display , please
help me how to acheieve this ?
\
Linkan wrote:
  http://www.nabble.com/file/p23175527/textarea-read-only.png   
 
 
 What you get out and put in tinymce is html, so why not continue with 
 pre tags? Or perhaps put it in a div tag with some style, like 
 border-left: 2px solid blue; padding-left: 5px;.
 
 //Swanthe
 
 fachhoch wrote:
 It worked , that's good, need one more suggestion , Usually without
 tinymce
 we show comments  to display  inside a pre tag  to retain the line breaks
 etc , but in case of tinymce   what's the best  way to display comments  
 ?


 Linkan wrote:
   
 Try add TinyMceAjaxSubmitModifier to your submit button

 //Swanthe

 
 
 
 
 tubin gen wrote:
 
 I am trying to make my text editor (text area )  to rich text eitors
   using timymce.First I tried wicket timymce behaviour , the problem
 is the  tinymce java scriopt is repalce my textarea html with an
 iframe


 this  is my html , but the   style=display: none; is added by tinymce
 textarea maxlength=4000 cols=120 rows=8
 name=reassignmentComments wicket:id=reassignmentComments
 id=reassignmentComments style=display: none;/

 and code generated by tinymce is   lot,  but the problem is it uses
 iframe and because of  which the textarea value is not posted to my
 form   , please help me integrating tinymce

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


   
   

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



 

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

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


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



Re: How to determine which validator failed in a CompoundValidator?

2009-04-22 Thread Tauren Mills
Daan,

Yes, this definitely looks like the direction I should go for most of
my form components.  Thanks for sharing it!

However, I also need to make a PasswordStrengthMeter, which will show
different values (and css styling) based on the strength of a password
entered into a password field.  Something like one of these:
http://ui-patterns.com/pattern/PasswordStrengthMeter
http://ui-patterns.com/userset/39/image/1104#focus

Before I embark on building it, do you have any suggestions on easy
ways to use your solution to do this?

Thanks!
Tauren



On Tue, Apr 21, 2009 at 10:18 PM, nino martinez wael
nino.martinez.w...@gmail.com wrote:
 Yeah looks like the way Tauren should go.. Did'nt know that was what
 he was looking fore..

 2009/4/22 Daan van Etten d...@stuq.nl:
 Hi Tauren,

 A while ago I wrote this article, which may give you some hints on how to
 achieve this:
 http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket

 Regards,

 Daan

 Op 21 apr 2009, om 17:36 heeft Tauren Mills het volgende geschreven:

 Thanks Nino,

 Actually, I want just one error message right next to the username field
 that is specific to the username. I also want to highlight via css the
 username field. A messagepanel would list errors in other fields as well,
 wouldn't it?

 Tauren

 On Apr 21, 2009 5:06 AM, nino martinez wael
 nino.martinez.w...@gmail.com
 wrote:

 Hmm, it happens automatically, a validator can register errors.. Like
 this:

      form.add(new TextFieldString(email,new
 PropertyModelString(form.getModel(),email)).add(
                              EmailAddressValidator.getInstance()).add(new
 IValidator() {
                      public void validate(IValidatable validatable) {
                              String string = (String)
 validatable.getValue();
                              if (userRepository.areEmailThere(string)) {
                                      validatable.error(new
 ValidationError().addMessageKey(

 error.unique).setVariable(email,

 validatable.getValue()));
                              }

                      }
              }));

              form.add(new CheckBox(agree, new ModelBoolean(false))
                              .add(new IValidatorBoolean() {
                                      public void
 validate(IValidatableBoolean validatable) {
                                              Boolean agree =
 validatable.getValue();
                                              if (!agree) {
                                                      validatable.error(new
 ValidationError()

 .addMessageKey(error.mustagree));
                                              }

                                      }
                              }));


 And then just in your ajax add the error message panel to the
 response.. Works just fine... Or is it something more you want?

 2009/4/21 Tauren Mills tau...@tauren.com:

 On a site registration form, I have three validators on the username 

 field.  One tests to make s...

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



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


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



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



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



Re: Dynamically update TreeTable model

2009-04-22 Thread CrocodileShoes

I have the same problem but with a different tree use case.  I'm implementing
a facet search which needs to update the tree after a user selects a tree
node (facet).  If I recreate the tree model like you were doing it doesn't
persistent the selection, obviously.

I'm not experienced with Swings trees but I think I may have to implment my
own TreeModel.

Does anybody have the solution for this?


jchappelle wrote:
 
 I have a TreeTable and I have links within it. When a user clicks a link
 they are presented with a modal window with a FileUpload component in it.
 When they upload a new file and click close on the modal window, the
 TreeTable is not updated. I tried to use a LoadableDetachableModel that
 returns a DefaultTreeModel but if I do that then every time I click to
 expand a folder node the tree refreshes the model and the tree state and
 the icon doesn't expand(i'm guessing it's because the treestate gets
 recreated?). 
 
 I searched but couldn't find anyone with this specific problem in the
 forum. Can someone please help?
 
 I am using wicket 1.3.4.
 
 Thanks,
 
 Josh
 

-- 
View this message in context: 
http://www.nabble.com/Dynamically-update-TreeTable-model-tp21056846p23175533.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: tinymce textarea

2009-04-22 Thread Swanthe Lindgren

I suggest that you display the text in a read only tinymce text area.

TinyMCESettings mceSettings = new TinyMCESettings(Theme.advanced);
mceSettings.addCustomSetting(readonly:true);

This only works if you update the tinymce javascripts as in  
http://www.nabble.com/Re%3A-making-tinymce-textarea-read-only-p23170821.html


fachhoch wrote:
Tinymce text is formatted with html and when I add text to label i  see the 
text with html , please tell me how can I tell wicket   that model also has

html tags and browser should interpet them and   not display ?  If I set
model of a 
label as html text   I   am expecting to seehtml parsed by browser  and
not the same html I set as model 
attached is the image   , it shows the same text i sert as model and i am

expecting browser to parse those html tags and not just display , please
help me how to acheieve this ?
\
Linkan wrote:
  
 http://www.nabble.com/file/p23175527/textarea-read-only.png   



What you get out and put in tinymce is html, so why not continue with 
pre tags? Or perhaps put it in a div tag with some style, like 
border-left: 2px solid blue; padding-left: 5px;.


//Swanthe

fachhoch wrote:


It worked , that's good, need one more suggestion , Usually without
tinymce
we show comments  to display  inside a pre tag  to retain the line breaks
etc , but in case of tinymce   what's the best  way to display comments  
?



Linkan wrote:
  
  

Try add TinyMceAjaxSubmitModifier to your submit button

//Swanthe







tubin gen wrote:



I am trying to make my text editor (text area )  to rich text eitors
  using timymce.First I tried wicket timymce behaviour , the problem
is the  tinymce java scriopt is repalce my textarea html with an
iframe


this  is my html , but the   style=display: none; is added by tinymce
textarea maxlength=4000 cols=120 rows=8
name=reassignmentComments wicket:id=reassignmentComments
id=reassignmentComments style=display: none;/

and code generated by tinymce is   lot,  but the problem is it uses
iframe and because of  which the textarea value is not posted to my
form   , please help me integrating tinymce

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


  
  
  

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





  
  


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






  




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



Re: Random exception at ResourceListenerInterface

2009-04-22 Thread Igor Vaynberg
why dont you set a breakpoint for classcastexception and see what it
is trying to cast to what.

-igor

On Wed, Apr 22, 2009 at 3:52 AM, Daniel Fernandez daniel.f...@gmail.com wrote:
 Hello,

 I have a page which makes quite a heavy use of an
 AbstractAjaxTimerBehavior for retrieving the content of some Panels
 (and stops itself after the content is ready, like a sort of
 polling) and I am getting a very strange exception which only seems
 to appear randomly:


 -

 2009-04-22 12:21:30,592 ERROR [RequestCycle] (RequestCycle.java:1463)
 - Method onResourceRequested of interface
 org.apache.wicket.IResourceListener targeted at component
 [MarkupContainer [Component id = content]] threw an exception
 org.apache.wicket.WicketRuntimeException: Method onResourceRequested
 of interface org.apache.wicket.IResourceListener targeted at component
 [MarkupContainer [Component id = content]] threw an exception
        at 
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:199)
        at 
 org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:163)
        at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
        at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1192)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:501)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
        at 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
        at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
        at 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
        at 
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at 
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
        at 
 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
        at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
        at java.lang.Thread.run(Thread.java:619)
 Caused by: java.lang.IllegalArgumentException:
 java.lang.classcastexcept...@42ae5f
        at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
        at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc1cessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
        ... 26 more


 -


 The problem is this I don't get more information than that, and I only
 get the exception once each, say... 50 times I reload the page (I mean
 browser reload = new page object). The other 49 times everything
 works fine. It's quite random...

 Any clues?


 Regards,
 Daniel.

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



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



html text as model

2009-04-22 Thread tubin gen
I have text area   with tinynmce behaviour, so any text  saved from this
textarea will contain html tags to retain format of the text.Now in other
pages I want to display this text as read-only  , for which i get the string
comment text from database and set it to as  model to my  label ,  the
problem is the comment text its getting displayed  as it is showing html
tags and browser is not parsing them ,

for example

add(new Label(comments,new ModelString(pTinyMCE is a platform
independent web /p));

 once the page is rendered   I am expecting to see  this as  *TinyMCE is a
 platform independent web*  and not   *pTinyMCE is a platform independent
 web /p  , *

please tell me how to  resolve this.


Re: html text as model

2009-04-22 Thread Jeremy Thomerson
On your label: setEscapeModelStrings(false)

--
Jeremy Thomerson
http://www.wickettraining.com



On Wed, Apr 22, 2009 at 11:24 AM, tubin gen fachh...@gmail.com wrote:

 I have text area   with tinynmce behaviour, so any text  saved from this
 textarea will contain html tags to retain format of the text.Now in other
 pages I want to display this text as read-only  , for which i get the
 string
 comment text from database and set it to as  model to my  label ,  the
 problem is the comment text its getting displayed  as it is showing html
 tags and browser is not parsing them ,

 for example

 add(new Label(comments,new ModelString(pTinyMCE is a platform
 independent web /p));

  once the page is rendered   I am expecting to see  this as  *TinyMCE is a
  platform independent web*  and not   *pTinyMCE is a platform
 independent
  web /p  , *

 please tell me how to  resolve this.



Re: Strange behavior with palette (1.3.4) and IE7

2009-04-22 Thread Igor Vaynberg
the right thing to do would be to provide a patch back to the community...

-igor

On Wed, Apr 22, 2009 at 7:52 AM, Eyal Golan egola...@gmail.com wrote:
 With pleasure.

 1. I overridden Palette.java and Palette.html
 In Palette.html I added the line below (with the span).
 In Palette.java all we did is override renderHead (see below)
 2. We created a new palette.js and added the script file as below.

 Hope that helps.

 Eyal Golan
 egola...@gmail.com

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

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


 On Wed, Apr 22, 2009 at 5:34 PM, Carlo Camerino cmcamer...@gmail.comwrote:

 I think we are also expericning this problem same as yours
 If you will allow, can I have a copy of your fix for this one?
 what files did you modify?
 Thanks

 Carlo

 2009/4/22 Eyal Golan egola...@gmail.com

  I fixed the annoying thing by overriding the html panel of the palette
  (which I did previously for other purposes) and adding an element (1484
 is
  our bugzilla issue number):
  !-- Do not remove ie7bug-1484. customepalette.js uses this element --
  span id=ie7bug-1484 style=display: none;/span
 
  Also:
     /**
      * Renders header contributions
      *
      * @param response
      */
    �...@override
     public void renderHead(IHeaderResponse response) {
         super.renderHead(response);
         response.renderJavascriptReference(new
  ResourceReference(CustomPalette.class, customepalette.js));
     }
 
  and finally:
  Wicket.Palette.moveUp=function(choicesId, selectionId, recorderId) {
         var selection=Wicket.Palette.$(selectionId);
 
         if (Wicket.Palette.moveUpHelper(selection)) {
             document.getElementById('ie7bug-1484').innerHTML = '';
             var recorder=Wicket.Palette.$(recorderId);
             Wicket.Palette.updateRecorder(selection, recorder);
         } else {
             document.getElementById('ie7bug-1484').innerHTML = '';
         }
     }
 
  I really don't like these kinds of hacks, but what can I say? IE7
 wouldn't
  let me any other option.
 
  Eyal Golan
  egola...@gmail.com
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 
  P  Save a tree. Please don't print this e-mail unless it's really
 necessary
 
 
  On Wed, Apr 22, 2009 at 12:13 PM, Eyal Golan egola...@gmail.com wrote:
 
   We have a very strange behavior in palette and IE7.
   We use Wicket 1.3.4 .
  
   The situation is:
   when pressing the UP button, the selected element goes up in each
 click.
   That's OK.
   The problem occurs when this element is in the second row.
   When pressing UP, it won't go to the first (upper) row. Only when we
 move
   the mouse to the area of the selected elements it goes up.
  
   In FF it doesn't happen.
   in IE6 it doesn't happen as well.
  
   I looked in the mailing list and couldn't see something about it.
  
   Was it fixed in 1.3.5 ?
  
   Thanks
  
  
   Eyal Golan
   egola...@gmail.com
  
   Visit: http://jvdrums.sourceforge.net/
   LinkedIn: http://www.linkedin.com/in/egolan74
  
   P  Save a tree. Please don't print this e-mail unless it's really
  necessary
  
 



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



Re: Wicket Tree with Swing DefaultMutableTreeNode

2009-04-22 Thread JulianS

Hi, I did it a different way. I have no problem adding checkboxes with this
technique. See
http://javathoughts.capesugarbird.com/2009/03/jquery-tree-table-for-wicket.html.
-- 
View this message in context: 
http://www.nabble.com/Wicket-Tree-with-Swing-DefaultMutableTreeNode-tp18486972p23175575.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: LinkTree will not be updated

2009-04-22 Thread James McLaughlin
add tree.updateTree(target) before adding the tree to the target.

hth,
jim



 tree.addTreeListener(new TreeListener() {

@Override
public void onActivityClicked(String nameOfNode,AjaxRequestTarget
target){
...
target.addComponent(tree);
}
@Override
public void onProcessClicked(AjaxRequestTarget target) {
...
target.addComponent(tree);
}

 });








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




Re: how to not display RepeaterView

2009-04-22 Thread Jason Novotny


Igor, Jeremy,

Just want to say thanks for your constant support on the mailing list! 
This is a huge part of why I've become a wicket enthusiast. Keep up the 
great work!


   Cheers, Jason

Igor Vaynberg wrote:

no need, just attach it to a wicket:container

[wicket:container][h3]..[/h3][div]..[/div][/wicket:container]

alternatively you can attach it to any tag and call setrenderbodyonly
on the component that is direct child of repeatingview

-igor

On Tue, Apr 21, 2009 at 5:48 PM, Jeremy Thomerson
jer...@wickettraining.com wrote:
  

Sorry - poor formatting in my client made it hard to notice the closing H3.

Looking at RV code - it really doesn't seem to work for this.  I'd suggest
opening a JIRA and then adjusting your jquery script to expect the div.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Apr 21, 2009 at 7:35 PM, Jason Novotny novo...@gridsphere.orgwrote:



Ah but the h3 doesn't wrap the whole thing (or does it need to?) Basically
I'm trying to repeat the following structure:

h3some stuff/h3
divsome div/div

h3more stuff/h3
divmore div/div

h3more more stuff/h3
divmore more div/div

Thanks Jeremy!


Jeremy Thomerson wrote:

  

Why don't you just make your outermost tag the repeater (it looks like an
H3
in your example)?

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Apr 21, 2009 at 7:24 PM, Jason Novotny novo...@gridsphere.org


wrote:
  




Hi,

I have some markup I wish to repeat like so:

...

h3a href=#span wicket:id=workoutCategoryBlah Blah
Blah/span/a/h3
div wicket:id=activeGroup
 p
 ol wicket:id=workoutList class=workoutList
 li wicket:id=itemspan wicket:id=labelstrongWorkout
Name./strong/span/li
 /ol
 /p
/div


...

So I wrapped the whole thing inside a div wicket:id=container like
so:

div wicket:id=container
 h3a href=#span wicket:id=workoutCategoryBlah Blah
Blah/span/a/h3
   div wicket:id=activeGroup
    /div
/div

and use a RepeatingView rv = new RepeatingView(container);

This works fine except the resulting HTML still contains the outer div to
appear which causes the markup to break since it relies on Jquery to
attach
some classes, etc and is not expecting the outer div's.
I've tried rv.setRenderBody(false) which works for wicket Label's if you
don't want to display the span tag but doesn't work here. Does anyone
have
any idea of how to not display the RepeatingView markup of div tags?

Thanks a bunch. Jason



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




  




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


  


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

  



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



Clickably Selectable DIVs

2009-04-22 Thread Dane Laverty
I'm working on a project management application that lists all of a
project's tasks. Each task is displayed as a DIV. I want the user to be
able to select a specific task by clicking on its DIV, which would then
highlight that DIV by adding a CSS class and display some information
about the task in a separate panel.

 

I can use an AjaxFallbackLink to get the information to display, but how
can I add a CSS class when the DIV is clicked, and then remove the CSS
class when another DIV is clicked?



Re: Random exception at ResourceListenerInterface

2009-04-22 Thread Daniel Fernandez
Thanks for your answer, Igor.

Now I know what is happening more in detail. It is not easy to
explain, sorry for the long text:

I have:

  - DataPanel: a panel with data I want to show.

  - LoadingPanel: a panel which just shows a loading... image.

  - PanelLoader: a Panel with an inner panel called content, which
is loaded initially with LoadingPanel, and sets an AjaxTimerBehavior
which polls the server until the data is ready, and then creates the
DataPanel, replaces the inner content with this DataPanel, and stops
the timer behavior.


All this works perfectly until I use a subclass of DataPanel called
FlashDataPanel which, for showing data, shows a flash object which in
turn has to make a request from the browser to get its data. I offer
this data to the flash object as a resource, by making this subclass
of DataPanel implement IResourceListener, and implementing its
onResourceRequested method. The URL I add to the flash object is
obtained like:

CharSequence dataPath =
RequestCycle.get().urlFor(FlashDataContainer.this,
IResourceListener.INTERFACE);
return RequestUtils.toAbsolutePath( dataPath.toString() );

The problems seems to be that *sometimes, and only sometimes* (maybe
once each 50 correct loads or so), the onResourceRequested method
gets called on the LoadingPanel instead of the DataPanel... which is
something strange to my eyes (unless there is something I don't
understand, of course). The URL is created passing the
FlashDataContainer.this object, so I cannot understand how it gets
called on a LoadingPanel, which of course does not implement
IResourceListener, and thus provokes this exception.

Regards,
Daniel.



2009/4/22 Igor Vaynberg igor.vaynb...@gmail.com:
 why dont you set a breakpoint for classcastexception and see what it
 is trying to cast to what.

 -igor

 On Wed, Apr 22, 2009 at 3:52 AM, Daniel Fernandez daniel.f...@gmail.com 
 wrote:
 Hello,

 I have a page which makes quite a heavy use of an
 AbstractAjaxTimerBehavior for retrieving the content of some Panels
 (and stops itself after the content is ready, like a sort of
 polling) and I am getting a very strange exception which only seems
 to appear randomly:


 -

 2009-04-22 12:21:30,592 ERROR [RequestCycle] (RequestCycle.java:1463)
 - Method onResourceRequested of interface
 org.apache.wicket.IResourceListener targeted at component
 [MarkupContainer [Component id = content]] threw an exception
 org.apache.wicket.WicketRuntimeException: Method onResourceRequested
 of interface org.apache.wicket.IResourceListener targeted at component
 [MarkupContainer [Component id = content]] threw an exception
        at 
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:199)
        at 
 org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:163)
        at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
        at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1192)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:501)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
        at 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
        at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at 
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
        at 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
        at 
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
        at 
 

Re: Clickably Selectable DIVs

2009-04-22 Thread Jeremy Thomerson
Try something like this in the onClick(AjaxRequestTarget):

this.add(new SimpleAttributeModifier(class, foobar));
target.add(this);

previouslyClicked.add(new SimpleAttributeModifier(class, otherclass));
target.add(previouslyClicked);

previouslyClicked = this;

--
Jeremy Thomerson
http://www.wickettraining.com



On Wed, Apr 22, 2009 at 12:52 PM, Dane Laverty danelave...@chemeketa.eduwrote:

 I'm working on a project management application that lists all of a
 project's tasks. Each task is displayed as a DIV. I want the user to be
 able to select a specific task by clicking on its DIV, which would then
 highlight that DIV by adding a CSS class and display some information
 about the task in a separate panel.



 I can use an AjaxFallbackLink to get the information to display, but how
 can I add a CSS class when the DIV is clicked, and then remove the CSS
 class when another DIV is clicked?




Re: Clickably Selectable DIVs

2009-04-22 Thread Clint Popetz
You can add an AttributeModifier to the wicket component representing
your div, which picks the correct attribute based on the model, and
add the divs to the target in your AjaxFallbackLink.onClick().

-Clint

On Wed, Apr 22, 2009 at 12:52 PM, Dane Laverty
danelave...@chemeketa.edu wrote:
 I'm working on a project management application that lists all of a
 project's tasks. Each task is displayed as a DIV. I want the user to be
 able to select a specific task by clicking on its DIV, which would then
 highlight that DIV by adding a CSS class and display some information
 about the task in a separate panel.



 I can use an AjaxFallbackLink to get the information to display, but how
 can I add a CSS class when the DIV is clicked, and then remove the CSS
 class when another DIV is clicked?



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



Re: Dynamically update TreeTable model

2009-04-22 Thread James McLaughlin
You should not recreate the TreeModel and for most cases DefaultTreeModel is
what you want. If you are adding a node, add it with:

http://java.sun.com/javase/6/docs/api/javax/swing/tree/DefaultTreeModel.html#insertNodeInto(javax.swing.tree.MutableTreeNode,%20javax.swing.tree.MutableTreeNode,%20int)

which will notify all the listeners, such as the wicket tree

On Wed, Apr 22, 2009 at 10:56 AM, CrocodileShoes mark.do...@logica.comwrote:


 I have the same problem but with a different tree use case.  I'm
 implementing
 a facet search which needs to update the tree after a user selects a tree
 node (facet).  If I recreate the tree model like you were doing it doesn't
 persistent the selection, obviously.

 I'm not experienced with Swings trees but I think I may have to implment my
 own TreeModel.

 Does anybody have the solution for this?


 jchappelle wrote:
 
  I have a TreeTable and I have links within it. When a user clicks a link
  they are presented with a modal window with a FileUpload component in it.
  When they upload a new file and click close on the modal window, the
  TreeTable is not updated. I tried to use a LoadableDetachableModel that
  returns a DefaultTreeModel but if I do that then every time I click to
  expand a folder node the tree refreshes the model and the tree state and
  the icon doesn't expand(i'm guessing it's because the treestate gets
  recreated?).
 
  I searched but couldn't find anyone with this specific problem in the
  forum. Can someone please help?
 
  I am using wicket 1.3.4.
 
  Thanks,
 
  Josh
 

 --
 View this message in context:
 http://www.nabble.com/Dynamically-update-TreeTable-model-tp21056846p23175533.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Jim McLaughlin
Lead Software Engineer
Stonewater Control Systems
(o) 847.864.1060 x107
(c) 773.416.0994


RE: Clickably Selectable DIVs

2009-04-22 Thread Dane Laverty
Fabulous. Thank you for the quick response!

-Original Message-
From: Jeremy Thomerson [mailto:jer...@wickettraining.com] 
Sent: Wednesday, April 22, 2009 10:58 AM
To: users@wicket.apache.org
Subject: Re: Clickably Selectable DIVs

Try something like this in the onClick(AjaxRequestTarget):

this.add(new SimpleAttributeModifier(class, foobar));
target.add(this);

previouslyClicked.add(new SimpleAttributeModifier(class,
otherclass));
target.add(previouslyClicked);

previouslyClicked = this;

--
Jeremy Thomerson
http://www.wickettraining.com



On Wed, Apr 22, 2009 at 12:52 PM, Dane Laverty
danelave...@chemeketa.eduwrote:

 I'm working on a project management application that lists all of a
 project's tasks. Each task is displayed as a DIV. I want the user to
be
 able to select a specific task by clicking on its DIV, which would
then
 highlight that DIV by adding a CSS class and display some information
 about the task in a separate panel.



 I can use an AjaxFallbackLink to get the information to display, but
how
 can I add a CSS class when the DIV is clicked, and then remove the CSS
 class when another DIV is clicked?



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



Re: Random exception at ResourceListenerInterface

2009-04-22 Thread Igor Vaynberg
browsers are asynchronous, so you might have a race codition. eg
browser requests the data url and you press the refresh button, so now
there are two urls in the queue: the data and the page. if page is
processed first then the data url will fail because when the page is
first constructed you have a loading panel in there. makes sense?

take a look at wicket's ajaxlazyloadingpanel, it might have a way to
handle this.

-igor

On Wed, Apr 22, 2009 at 10:23 AM, Daniel Fernandez
daniel.f...@gmail.com wrote:
 Thanks for your answer, Igor.

 Now I know what is happening more in detail. It is not easy to
 explain, sorry for the long text:

 I have:

  - DataPanel: a panel with data I want to show.

  - LoadingPanel: a panel which just shows a loading... image.

  - PanelLoader: a Panel with an inner panel called content, which
 is loaded initially with LoadingPanel, and sets an AjaxTimerBehavior
 which polls the server until the data is ready, and then creates the
 DataPanel, replaces the inner content with this DataPanel, and stops
 the timer behavior.


 All this works perfectly until I use a subclass of DataPanel called
 FlashDataPanel which, for showing data, shows a flash object which in
 turn has to make a request from the browser to get its data. I offer
 this data to the flash object as a resource, by making this subclass
 of DataPanel implement IResourceListener, and implementing its
 onResourceRequested method. The URL I add to the flash object is
 obtained like:

        CharSequence dataPath =
 RequestCycle.get().urlFor(FlashDataContainer.this,
 IResourceListener.INTERFACE);
        return RequestUtils.toAbsolutePath( dataPath.toString() );

 The problems seems to be that *sometimes, and only sometimes* (maybe
 once each 50 correct loads or so), the onResourceRequested method
 gets called on the LoadingPanel instead of the DataPanel... which is
 something strange to my eyes (unless there is something I don't
 understand, of course). The URL is created passing the
 FlashDataContainer.this object, so I cannot understand how it gets
 called on a LoadingPanel, which of course does not implement
 IResourceListener, and thus provokes this exception.

 Regards,
 Daniel.



 2009/4/22 Igor Vaynberg igor.vaynb...@gmail.com:
 why dont you set a breakpoint for classcastexception and see what it
 is trying to cast to what.

 -igor

 On Wed, Apr 22, 2009 at 3:52 AM, Daniel Fernandez daniel.f...@gmail.com 
 wrote:
 Hello,

 I have a page which makes quite a heavy use of an
 AbstractAjaxTimerBehavior for retrieving the content of some Panels
 (and stops itself after the content is ready, like a sort of
 polling) and I am getting a very strange exception which only seems
 to appear randomly:


 -

 2009-04-22 12:21:30,592 ERROR [RequestCycle] (RequestCycle.java:1463)
 - Method onResourceRequested of interface
 org.apache.wicket.IResourceListener targeted at component
 [MarkupContainer [Component id = content]] threw an exception
 org.apache.wicket.WicketRuntimeException: Method onResourceRequested
 of interface org.apache.wicket.IResourceListener targeted at component
 [MarkupContainer [Component id = content]] threw an exception
        at 
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:199)
        at 
 org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:163)
        at 
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
        at 
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1192)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:501)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455)
        at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
        at 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
        at 
 

Re: Clickably Selectable DIVs

2009-04-22 Thread Igor Vaynberg
you cant keep adding attribute modifiers on every click, much better to simply:

class mylink extends link {
 private string clazz;

 oncomponenttag(tag) {
super.oncomponenttag(tag);
   tag.put(class,clazz);
 }

 public void setclazz(string c) { clazz=c; }
}

-igor


On Wed, Apr 22, 2009 at 11:09 AM, Dane Laverty
danelave...@chemeketa.edu wrote:
 Fabulous. Thank you for the quick response!

 -Original Message-
 From: Jeremy Thomerson [mailto:jer...@wickettraining.com]
 Sent: Wednesday, April 22, 2009 10:58 AM
 To: users@wicket.apache.org
 Subject: Re: Clickably Selectable DIVs

 Try something like this in the onClick(AjaxRequestTarget):

 this.add(new SimpleAttributeModifier(class, foobar));
 target.add(this);

 previouslyClicked.add(new SimpleAttributeModifier(class,
 otherclass));
 target.add(previouslyClicked);

 previouslyClicked = this;

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Wed, Apr 22, 2009 at 12:52 PM, Dane Laverty
 danelave...@chemeketa.eduwrote:

 I'm working on a project management application that lists all of a
 project's tasks. Each task is displayed as a DIV. I want the user to
 be
 able to select a specific task by clicking on its DIV, which would
 then
 highlight that DIV by adding a CSS class and display some information
 about the task in a separate panel.



 I can use an AjaxFallbackLink to get the information to display, but
 how
 can I add a CSS class when the DIV is clicked, and then remove the CSS
 class when another DIV is clicked?



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



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



should i migrate from 1.3.to 1.4?

2009-04-22 Thread Phillip Rhodes
I am trying to use some components from wicket-stuff that I need to build from 
the 1.3.5 tag, and to do this, I need to build wicket from the 1.3.5.  That's 2 
projects that I need to build from source so I can use some components.

I am considering migrating to 1.4 so I can use the distributed artifacts.

Any reason that I shouldn't do this?

Thanks.



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



Re: should i migrate from 1.3.to 1.4?

2009-04-22 Thread Igor Vaynberg
no reason except that 1.4 will still have minor api breaks as we move
toward the final release.

wicket 1.3.5 should be available in maven repositories, no need to
build from scratch.

-igor

On Wed, Apr 22, 2009 at 11:21 AM, Phillip Rhodes
spamsu...@rhoderunner.com wrote:
 I am trying to use some components from wicket-stuff that I need to build 
 from the 1.3.5 tag, and to do this, I need to build wicket from the 1.3.5.  
 That's 2 projects that I need to build from source so I can use some 
 components.

 I am considering migrating to 1.4 so I can use the distributed artifacts.

 Any reason that I shouldn't do this?

 Thanks.



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



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



How to send data to server - form submission

2009-04-22 Thread Juan G. Arias
Hi all,I wanted to check with you if my reasoning is ok.

I have my model object, bound to some controls displayed in the page using
PropertyModel.
I also have one ajax event (using a simple AjaxLink).

When the user clicks this ajax link, some components in the page are added
to the ajax target in order to be updated.
And the components linked to my model object resets to their original
values.

This is happening because there is no submission of information from
browser, that's ok.

One possible solution to this is to add a form component, surrounding my
components. And replace the AjaxLink with a AjaxSubmitLink.
That would submit information from the form in the browser, update my model,
and finally render the components updated.

Finally, the question: Is there any other option to do this? Does wicket
have some component to send information via ajax without a form?

Form submission is the regular way to send information from browser to
server, in regular (no ajax) pages.
I understand that AjaxSubmitLink doesn't submit the whole page, only the
form, and that's nice.
But i wonder if there is some alternate way to link properties to
components.

Thanks in advance!
Juan


Re: How to send data to server - form submission

2009-04-22 Thread Jeremy Thomerson
Why do you want an alternate way?  Is there some advantage you see?

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Apr 22, 2009 at 2:10 PM, Juan G. Arias juangar...@gmail.com wrote:
 Hi all,I wanted to check with you if my reasoning is ok.

 I have my model object, bound to some controls displayed in the page using
 PropertyModel.
 I also have one ajax event (using a simple AjaxLink).

 When the user clicks this ajax link, some components in the page are added
 to the ajax target in order to be updated.
 And the components linked to my model object resets to their original
 values.

 This is happening because there is no submission of information from
 browser, that's ok.

 One possible solution to this is to add a form component, surrounding my
 components. And replace the AjaxLink with a AjaxSubmitLink.
 That would submit information from the form in the browser, update my model,
 and finally render the components updated.

 Finally, the question: Is there any other option to do this? Does wicket
 have some component to send information via ajax without a form?

 Form submission is the regular way to send information from browser to
 server, in regular (no ajax) pages.
 I understand that AjaxSubmitLink doesn't submit the whole page, only the
 form, and that's nice.
 But i wonder if there is some alternate way to link properties to
 components.

 Thanks in advance!
 Juan


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



Re: Strange behavior with palette (1.3.4) and IE7

2009-04-22 Thread Eyal Golan
I would love doing so.
Is there a special way / place?
(where to put? what to put?)


Eyal Golan
egola...@gmail.com

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

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


On Wed, Apr 22, 2009 at 7:43 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 the right thing to do would be to provide a patch back to the community...

 -igor

 On Wed, Apr 22, 2009 at 7:52 AM, Eyal Golan egola...@gmail.com wrote:
  With pleasure.
 
  1. I overridden Palette.java and Palette.html
  In Palette.html I added the line below (with the span).
  In Palette.java all we did is override renderHead (see below)
  2. We created a new palette.js and added the script file as below.
 
  Hope that helps.
 
  Eyal Golan
  egola...@gmail.com
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 
  P  Save a tree. Please don't print this e-mail unless it's really
 necessary
 
 
  On Wed, Apr 22, 2009 at 5:34 PM, Carlo Camerino cmcamer...@gmail.com
 wrote:
 
  I think we are also expericning this problem same as yours
  If you will allow, can I have a copy of your fix for this one?
  what files did you modify?
  Thanks
 
  Carlo
 
  2009/4/22 Eyal Golan egola...@gmail.com
 
   I fixed the annoying thing by overriding the html panel of the palette
   (which I did previously for other purposes) and adding an element
 (1484
  is
   our bugzilla issue number):
   !-- Do not remove ie7bug-1484. customepalette.js uses this element
 --
   span id=ie7bug-1484 style=display: none;/span
  
   Also:
  /**
   * Renders header contributions
   *
   * @param response
   */
  @Override
  public void renderHead(IHeaderResponse response) {
  super.renderHead(response);
  response.renderJavascriptReference(new
   ResourceReference(CustomPalette.class, customepalette.js));
  }
  
   and finally:
   Wicket.Palette.moveUp=function(choicesId, selectionId, recorderId) {
  var selection=Wicket.Palette.$(selectionId);
  
  if (Wicket.Palette.moveUpHelper(selection)) {
  document.getElementById('ie7bug-1484').innerHTML = '';
  var recorder=Wicket.Palette.$(recorderId);
  Wicket.Palette.updateRecorder(selection, recorder);
  } else {
  document.getElementById('ie7bug-1484').innerHTML = '';
  }
  }
  
   I really don't like these kinds of hacks, but what can I say? IE7
  wouldn't
   let me any other option.
  
   Eyal Golan
   egola...@gmail.com
  
   Visit: http://jvdrums.sourceforge.net/
   LinkedIn: http://www.linkedin.com/in/egolan74
  
   P  Save a tree. Please don't print this e-mail unless it's really
  necessary
  
  
   On Wed, Apr 22, 2009 at 12:13 PM, Eyal Golan egola...@gmail.com
 wrote:
  
We have a very strange behavior in palette and IE7.
We use Wicket 1.3.4 .
   
The situation is:
when pressing the UP button, the selected element goes up in each
  click.
That's OK.
The problem occurs when this element is in the second row.
When pressing UP, it won't go to the first (upper) row. Only when we
  move
the mouse to the area of the selected elements it goes up.
   
In FF it doesn't happen.
in IE6 it doesn't happen as well.
   
I looked in the mailing list and couldn't see something about it.
   
Was it fixed in 1.3.5 ?
   
Thanks
   
   
Eyal Golan
egola...@gmail.com
   
Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74
   
P  Save a tree. Please don't print this e-mail unless it's really
   necessary
   
  
 
 

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




Re: Strange behavior with palette (1.3.4) and IE7

2009-04-22 Thread Jeremy Thomerson
http://issues.apache.org/jira/browse/WICKET

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Apr 22, 2009 at 2:53 PM, Eyal Golan egola...@gmail.com wrote:
 I would love doing so.
 Is there a special way / place?
 (where to put? what to put?)


 Eyal Golan
 egola...@gmail.com

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

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


 On Wed, Apr 22, 2009 at 7:43 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 the right thing to do would be to provide a patch back to the community...

 -igor

 On Wed, Apr 22, 2009 at 7:52 AM, Eyal Golan egola...@gmail.com wrote:
  With pleasure.
 
  1. I overridden Palette.java and Palette.html
  In Palette.html I added the line below (with the span).
  In Palette.java all we did is override renderHead (see below)
  2. We created a new palette.js and added the script file as below.
 
  Hope that helps.
 
  Eyal Golan
  egola...@gmail.com
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 
  P  Save a tree. Please don't print this e-mail unless it's really
 necessary
 
 
  On Wed, Apr 22, 2009 at 5:34 PM, Carlo Camerino cmcamer...@gmail.com
 wrote:
 
  I think we are also expericning this problem same as yours
  If you will allow, can I have a copy of your fix for this one?
  what files did you modify?
  Thanks
 
  Carlo
 
  2009/4/22 Eyal Golan egola...@gmail.com
 
   I fixed the annoying thing by overriding the html panel of the palette
   (which I did previously for other purposes) and adding an element
 (1484
  is
   our bugzilla issue number):
   !-- Do not remove ie7bug-1484. customepalette.js uses this element
 --
   span id=ie7bug-1484 style=display: none;/span
  
   Also:
      /**
       * Renders header contributions
       *
       * @param response
       */
     �...@override
      public void renderHead(IHeaderResponse response) {
          super.renderHead(response);
          response.renderJavascriptReference(new
   ResourceReference(CustomPalette.class, customepalette.js));
      }
  
   and finally:
   Wicket.Palette.moveUp=function(choicesId, selectionId, recorderId) {
          var selection=Wicket.Palette.$(selectionId);
  
          if (Wicket.Palette.moveUpHelper(selection)) {
              document.getElementById('ie7bug-1484').innerHTML = '';
              var recorder=Wicket.Palette.$(recorderId);
              Wicket.Palette.updateRecorder(selection, recorder);
          } else {
              document.getElementById('ie7bug-1484').innerHTML = '';
          }
      }
  
   I really don't like these kinds of hacks, but what can I say? IE7
  wouldn't
   let me any other option.
  
   Eyal Golan
   egola...@gmail.com
  
   Visit: http://jvdrums.sourceforge.net/
   LinkedIn: http://www.linkedin.com/in/egolan74
  
   P  Save a tree. Please don't print this e-mail unless it's really
  necessary
  
  
   On Wed, Apr 22, 2009 at 12:13 PM, Eyal Golan egola...@gmail.com
 wrote:
  
We have a very strange behavior in palette and IE7.
We use Wicket 1.3.4 .
   
The situation is:
when pressing the UP button, the selected element goes up in each
  click.
That's OK.
The problem occurs when this element is in the second row.
When pressing UP, it won't go to the first (upper) row. Only when we
  move
the mouse to the area of the selected elements it goes up.
   
In FF it doesn't happen.
in IE6 it doesn't happen as well.
   
I looked in the mailing list and couldn't see something about it.
   
Was it fixed in 1.3.5 ?
   
Thanks
   
   
Eyal Golan
egola...@gmail.com
   
Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74
   
P  Save a tree. Please don't print this e-mail unless it's really
   necessary
   
  
 
 

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




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



Re: How to send data to server - form submission

2009-04-22 Thread Juan G. Arias
The html and the object component hierarchy would be simplier.My question is
why stay attached to the HTML standard (use forms to submit), if AJAX
doesn't need to.

I need this inside a form, and only for one or maybe two text fields.
If I can link the component to the model without a form, I think it might be
better.

Do you agree?

On Wed, Apr 22, 2009 at 4:15 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 Why do you want an alternate way?  Is there some advantage you see?

 --
 Jeremy Thomerson
 http://www.wickettraining.com




 On Wed, Apr 22, 2009 at 2:10 PM, Juan G. Arias juangar...@gmail.com
 wrote:
  Hi all,I wanted to check with you if my reasoning is ok.
 
  I have my model object, bound to some controls displayed in the page
 using
  PropertyModel.
  I also have one ajax event (using a simple AjaxLink).
 
  When the user clicks this ajax link, some components in the page are
 added
  to the ajax target in order to be updated.
  And the components linked to my model object resets to their original
  values.
 
  This is happening because there is no submission of information from
  browser, that's ok.
 
  One possible solution to this is to add a form component, surrounding my
  components. And replace the AjaxLink with a AjaxSubmitLink.
  That would submit information from the form in the browser, update my
 model,
  and finally render the components updated.
 
  Finally, the question: Is there any other option to do this? Does wicket
  have some component to send information via ajax without a form?
 
  Form submission is the regular way to send information from browser to
  server, in regular (no ajax) pages.
  I understand that AjaxSubmitLink doesn't submit the whole page, only the
  form, and that's nice.
  But i wonder if there is some alternate way to link properties to
  components.
 
  Thanks in advance!
  Juan
 

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




Re: How to send data to server - form submission

2009-04-22 Thread Jeremy Thomerson
Not really - I'd liken that to reinventing the wheel.  Wicket provides
easy support for linking the component and the model through an ajax
event - form submission.  But, you could probably write your own JS
that takes advantage of the wicket-ajax stuff and manually sends the
form values as parameters on the ajax request, etc...

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Apr 22, 2009 at 4:06 PM, Juan G. Arias juangar...@gmail.com wrote:
 The html and the object component hierarchy would be simplier.My question is
 why stay attached to the HTML standard (use forms to submit), if AJAX
 doesn't need to.

 I need this inside a form, and only for one or maybe two text fields.
 If I can link the component to the model without a form, I think it might be
 better.

 Do you agree?

 On Wed, Apr 22, 2009 at 4:15 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 Why do you want an alternate way?  Is there some advantage you see?

 --
 Jeremy Thomerson
 http://www.wickettraining.com




 On Wed, Apr 22, 2009 at 2:10 PM, Juan G. Arias juangar...@gmail.com
 wrote:
  Hi all,I wanted to check with you if my reasoning is ok.
 
  I have my model object, bound to some controls displayed in the page
 using
  PropertyModel.
  I also have one ajax event (using a simple AjaxLink).
 
  When the user clicks this ajax link, some components in the page are
 added
  to the ajax target in order to be updated.
  And the components linked to my model object resets to their original
  values.
 
  This is happening because there is no submission of information from
  browser, that's ok.
 
  One possible solution to this is to add a form component, surrounding my
  components. And replace the AjaxLink with a AjaxSubmitLink.
  That would submit information from the form in the browser, update my
 model,
  and finally render the components updated.
 
  Finally, the question: Is there any other option to do this? Does wicket
  have some component to send information via ajax without a form?
 
  Form submission is the regular way to send information from browser to
  server, in regular (no ajax) pages.
  I understand that AjaxSubmitLink doesn't submit the whole page, only the
  form, and that's nice.
  But i wonder if there is some alternate way to link properties to
  components.
 
  Thanks in advance!
  Juan
 

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




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



Re: Strange behavior with palette (1.3.4) and IE7

2009-04-22 Thread Ryan McKinley
The following like is for Apache Solr, but most of it applies to any  
Apache project:

http://wiki.apache.org/solr/HowToContribute

In particular, check:
http://wiki.apache.org/solr/HowToContribute#head-23efb2d0bdccabdfb1de743a6dea519e9194


On Apr 22, 2009, at 3:55 PM, Jeremy Thomerson wrote:


http://issues.apache.org/jira/browse/WICKET

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Apr 22, 2009 at 2:53 PM, Eyal Golan egola...@gmail.com  
wrote:

I would love doing so.
Is there a special way / place?
(where to put? what to put?)


Eyal Golan
egola...@gmail.com

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

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



On Wed, Apr 22, 2009 at 7:43 PM, Igor Vaynberg igor.vaynb...@gmail.com 
wrote:


the right thing to do would be to provide a patch back to the  
community...


-igor

On Wed, Apr 22, 2009 at 7:52 AM, Eyal Golan egola...@gmail.com  
wrote:

With pleasure.

1. I overridden Palette.java and Palette.html
In Palette.html I added the line below (with the span).
In Palette.java all we did is override renderHead (see below)
2. We created a new palette.js and added the script file as below.

Hope that helps.

Eyal Golan
egola...@gmail.com

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

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

necessary



On Wed, Apr 22, 2009 at 5:34 PM, Carlo Camerino cmcamer...@gmail.com
wrote:


I think we are also expericning this problem same as yours
If you will allow, can I have a copy of your fix for this one?
what files did you modify?
Thanks

Carlo

2009/4/22 Eyal Golan egola...@gmail.com

I fixed the annoying thing by overriding the html panel of the  
palette

(which I did previously for other purposes) and adding an element

(1484

is

our bugzilla issue number):
!-- Do not remove ie7bug-1484. customepalette.js uses this  
element

--

span id=ie7bug-1484 style=display: none;/span

Also:
   /**
* Renders header contributions
*
* @param response
*/
   @Override
   public void renderHead(IHeaderResponse response) {
   super.renderHead(response);
   response.renderJavascriptReference(new
ResourceReference(CustomPalette.class, customepalette.js));
   }

and finally:
Wicket.Palette.moveUp=function(choicesId, selectionId,  
recorderId) {

   var selection=Wicket.Palette.$(selectionId);

   if (Wicket.Palette.moveUpHelper(selection)) {
   document.getElementById('ie7bug-1484').innerHTML = '';
   var recorder=Wicket.Palette.$(recorderId);
   Wicket.Palette.updateRecorder(selection, recorder);
   } else {
   document.getElementById('ie7bug-1484').innerHTML = '';
   }
   }

I really don't like these kinds of hacks, but what can I say? IE7

wouldn't

let me any other option.

Eyal Golan
egola...@gmail.com

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

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

necessary



On Wed, Apr 22, 2009 at 12:13 PM, Eyal Golan egola...@gmail.com

wrote:



We have a very strange behavior in palette and IE7.
We use Wicket 1.3.4 .

The situation is:
when pressing the UP button, the selected element goes up in  
each

click.

That's OK.
The problem occurs when this element is in the second row.
When pressing UP, it won't go to the first (upper) row. Only  
when we

move

the mouse to the area of the selected elements it goes up.

In FF it doesn't happen.
in IE6 it doesn't happen as well.

I looked in the mailing list and couldn't see something about  
it.


Was it fixed in 1.3.5 ?

Thanks


Eyal Golan
egola...@gmail.com

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

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

necessary










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






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




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



Registering 'global' Ajax listeners?

2009-04-22 Thread Liam Clarke-Hutchinson
Hi,

I have  page with several child components, and several of the
children update themselves using Ajax. Is it possible for the page to
register an Ajax listener that is called on the Ajax events of the
children?

Regards,

Liam Clarke

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



Re: Mutually dependent component and how to update a textfield when a link is clicked

2009-04-22 Thread Liam Clarke-Hutchinson
Thanks John, that page was very useful. :)

On Wed, Apr 22, 2009 at 2:57 AM, John Krasnay j...@krasnay.ca wrote:
 Hi Liam,

 Check out this page:

 http://cwiki.apache.org/WICKET/conditional-validation.html

 It has a bunch of recipes for interactions between components, e.g.
 requiring a text field only if a checkbox is checked or a certain submit
 button was used. Sounds similar to what you need to do.

 jk

 On Tue, Apr 21, 2009 at 09:40:09AM -0500, Jeremy Thomerson wrote:
 As far as sharing models - just make sure both components' model reads from
 the same backing object - be it the component itself or a domain object.

 As far as submitting the value - basically there are two ways - just like if
 you had a plain HTML page - form submission or javascript that appends the
 value to the end of a GET url.

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Tue, Apr 21, 2009 at 5:21 AM, Liam Clarke-Hutchinson l...@steelsky.co.nz
  wrote:

  Hi,
 
  Come across a few situations where there are two components are
  reliant on each other, say a checkbox's model value that a textfield
  uses in its isDisabled method, and the textfield needs the
  abstractCheckboxModel to re-evaluate a particular value on a given
  response.
 
  For the first bit, we tend to just move the dependency onto a local
  variable or field, and for the second, we've decided to make the
  changes on the underlying entity model that they were all holding
  models on instead, as a workaround, but it's getting a bit dicey - I
  get the feeling this is the sort of thing that CPMs can help well with
  - where you've got multiple components needing to share state between
  them?
 
  One last thing, if I have a textfield that I want to post the value to
  the server of when a link is clicked, and only that textfield for only
  that link, how do I model this? So far using a small form for each
  pair and then calling submit only on that form seems to be the way to
  do it?
 
  Regards,
 
  Liam Clarke
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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



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



adding javascript to response

2009-04-22 Thread João Pereira
Hi,

I'm new here to wicket.

I'm trying to add a javascrip code to the response after processing a form.

public void onSubmit() {
//do something
   //add javascript code in the response to be processed by the
browse?

}

What the best aproach to achieve this?


AjaxLink causing a redirect

2009-04-22 Thread Matthew Welch
I've been playing around with URL rewriting a bit and have run across some
promising techniques. While testing these techniques, I've been slowly
loading up my pages with a number of different kinds of actions and links.
Everything was working pretty smoothly until I got put my first AjaxLink on
the page. For some reason, just the presence of an AjaxLink causes a
redirect during the processing of the page. Remove the AjaxLink; no
redirect.

I'm not questioning the necessity of this as I'm sure there's a good reason.
I am curious though. Why does this happen?

Matt


Re: AjaxLink causing a redirect

2009-04-22 Thread Jeremy Thomerson
Do you mean while loading a page that has an ajax link you are
redirected to another?  Please provide example (URLs and code).

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Apr 22, 2009 at 9:25 PM, Matthew Welch matt...@welchkin.net wrote:
 I've been playing around with URL rewriting a bit and have run across some
 promising techniques. While testing these techniques, I've been slowly
 loading up my pages with a number of different kinds of actions and links.
 Everything was working pretty smoothly until I got put my first AjaxLink on
 the page. For some reason, just the presence of an AjaxLink causes a
 redirect during the processing of the page. Remove the AjaxLink; no
 redirect.

 I'm not questioning the necessity of this as I'm sure there's a good reason.
 I am curious though. Why does this happen?

 Matt


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



Re: Wicket portlet into liferay

2009-04-22 Thread Tonio Caputo
Hi,

After trying a lot I finally was able to show and work (more or less).

A warning: Never call your appl/portlet-name with the same name
as the url-mapping, if not it won't work that was the main problem.

My new problem I'm using DatePicker from wicket-extensions/wicket-date
in a form, the date picker is not working (I mean the button that shows the
calendar
and let you choose a date in a friendly way)

Not found something useful in mailing-lists so
I added supports mime-type: text/javascript and application/x-javascript to
portlet.xml, but still not working.

Any idea of what is happening, or a solution to this problem

Thanks very much in advance
tonio

On Tue, Apr 21, 2009 at 5:33 PM, Rob Sonke r...@tigrou.nl wrote:

 Hi,

 We're running wicket 1.4m2 on liferay 5.2.x and that's working fine. We
 only use the sun portlet container instead of the one from Liferay. Search
 the mailinglist and the liferay forum for the steps which you'll have to
 perform.

 Rob


 On 4/21/09 4:45 AM, Tonio Caputo wrote:

 Hi,

 I've tried with liferay 5.2.2 tomcat6/tomcat55/jetty6.1.14, and no
 success.

 In both tomcat, application is deployed, but when put into a page, the
 application
 is not shown.

 In jetty, the application doesn't get deployed.

 In all cases there is no log, or any message that let me know what is
 happening.

 Any help will be greatly welcome
 Wicket is really a nice framework (the nicer I've seen), and it would be
 wonderful if I can use it instead JSP framework provided by liferay.

 Thanks in advance
 tonio

 On Mon, Apr 20, 2009 at 12:21 PM, Tonio Caputoton...@exeo.com.ar
  wrote:



 Hi wicket users,

 I'm a newbie in wicket and portlets, I'm involved in trying to find a
 web framework to create portlets in a liferay portal, my duty is to
 try wicket and see if it works.

 Versions   wicket 1-4-rc2
  liferay 5.2

 After reading  Issue https://issues.apache.org/jira/browse/WICKET-1620,
 it
 seems clear
 that this is possible.

 Reading wicket portlet examples, I realized there is a lot of stuff in
 WicketPortlet, that
 is a bit difficult to understand for a newbie for both things
 (wicket/portlet).

 I'll just like to know, if this is the correct example after WICKET-1620,
 or perhaps there
 is a simpler one.

 Thanks in advance
 tonio










Re: AjaxLink causing a redirect

2009-04-22 Thread Liam Clarke-Hutchinson
What do you mean by processing? Form processing? Normal rendering?

On Thu, Apr 23, 2009 at 2:25 PM, Matthew Welch matt...@welchkin.net wrote:
 I've been playing around with URL rewriting a bit and have run across some
 promising techniques. While testing these techniques, I've been slowly
 loading up my pages with a number of different kinds of actions and links.
 Everything was working pretty smoothly until I got put my first AjaxLink on
 the page. For some reason, just the presence of an AjaxLink causes a
 redirect during the processing of the page. Remove the AjaxLink; no
 redirect.

 I'm not questioning the necessity of this as I'm sure there's a good reason.
 I am curious though. Why does this happen?

 Matt


divbr/div

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



Re: AjaxLink causing a redirect

2009-04-22 Thread Matt Welch

Hmmm perhaps it was a byproduct of the URL rewriting. As it turns out,
even with normal PageLinks this redirect occurs. BookmarkablePageLinks do
not cause the redirect. What's odd is that the redirect doesn't actually
change anything. 

With the URL rewriting disabled, there are no redirects. 

Anyway it's no big deal. I think I'm going to have to give up on this URL
rewriting stuff anyway. I was trying out URL Rewrite Filter
(http://tuckey.org/urlrewrite/) and I was getting pretty close to what I
needed (see my original thread on this topic:
http://www.nabble.com/Custom-URL-Handling-to23130367.html which you actually
responded too. You're a busy fellow!). It rewrites both incoming and
outgoing URLs. The incoming rewrites are fairly obvious, but the outbound
ones are done by embedding itself as part of the response.encodeURL() call. 

I managed to get the incoming URL rewrites working perfectly but some of the
outbound URLs refuse to cooperate. Things like Wicket ajax calls and these
redirects were popping up as obstacles. Maybe if I were a little more of a
regex expert I could get this to work, but I'm close to throwing in the
towel at this point.

-Matt





Jeremy Thomerson-5 wrote:
 
 Do you mean while loading a page that has an ajax link you are
 redirected to another?  Please provide example (URLs and code).
 
 --
 Jeremy Thomerson
 http://www.wickettraining.com
 
 
 
 
 On Wed, Apr 22, 2009 at 9:25 PM, Matthew Welch matt...@welchkin.net
 wrote:
 I've been playing around with URL rewriting a bit and have run across
 some
 promising techniques. While testing these techniques, I've been slowly
 loading up my pages with a number of different kinds of actions and
 links.
 Everything was working pretty smoothly until I got put my first AjaxLink
 on
 the page. For some reason, just the presence of an AjaxLink causes a
 redirect during the processing of the page. Remove the AjaxLink; no
 redirect.

 I'm not questioning the necessity of this as I'm sure there's a good
 reason.
 I am curious though. Why does this happen?

 Matt

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

-- 
View this message in context: 
http://www.nabble.com/AjaxLink-causing-a-redirect-tp23189186p23189693.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: AjaxLink causing a redirect

2009-04-22 Thread Jeremy Thomerson
Bummer - if you didn't throw in the towel, I'd be interested in seeing
the result.  All session-relative wicket links are going to have a
very distinct pattern that should be fairly easy [sic] to get in the
pattern and not rewrite.

Mind posting your rewrite code and maybe somebody can help with the
regex?  I may not be able to help, but I have put together some pretty
hideous regex in my time.

--
Jeremy Thomerson
http://www.wickettraining.com




On Wed, Apr 22, 2009 at 11:44 PM, Matt Welch matt...@welchkin.net wrote:

 Hmmm perhaps it was a byproduct of the URL rewriting. As it turns out,
 even with normal PageLinks this redirect occurs. BookmarkablePageLinks do
 not cause the redirect. What's odd is that the redirect doesn't actually
 change anything.

 With the URL rewriting disabled, there are no redirects.

 Anyway it's no big deal. I think I'm going to have to give up on this URL
 rewriting stuff anyway. I was trying out URL Rewrite Filter
 (http://tuckey.org/urlrewrite/) and I was getting pretty close to what I
 needed (see my original thread on this topic:
 http://www.nabble.com/Custom-URL-Handling-to23130367.html which you actually
 responded too. You're a busy fellow!). It rewrites both incoming and
 outgoing URLs. The incoming rewrites are fairly obvious, but the outbound
 ones are done by embedding itself as part of the response.encodeURL() call.

 I managed to get the incoming URL rewrites working perfectly but some of the
 outbound URLs refuse to cooperate. Things like Wicket ajax calls and these
 redirects were popping up as obstacles. Maybe if I were a little more of a
 regex expert I could get this to work, but I'm close to throwing in the
 towel at this point.

 -Matt





 Jeremy Thomerson-5 wrote:

 Do you mean while loading a page that has an ajax link you are
 redirected to another?  Please provide example (URLs and code).

 --
 Jeremy Thomerson
 http://www.wickettraining.com




 On Wed, Apr 22, 2009 at 9:25 PM, Matthew Welch matt...@welchkin.net
 wrote:
 I've been playing around with URL rewriting a bit and have run across
 some
 promising techniques. While testing these techniques, I've been slowly
 loading up my pages with a number of different kinds of actions and
 links.
 Everything was working pretty smoothly until I got put my first AjaxLink
 on
 the page. For some reason, just the presence of an AjaxLink causes a
 redirect during the processing of the page. Remove the AjaxLink; no
 redirect.

 I'm not questioning the necessity of this as I'm sure there's a good
 reason.
 I am curious though. Why does this happen?

 Matt


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




 --
 View this message in context: 
 http://www.nabble.com/AjaxLink-causing-a-redirect-tp23189186p23189693.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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