Re: JFreeChart component

2008-10-28 Thread Nino Saturnino Martinez Vazquez Wael
Cool, why not put it in wicket stuff somewhere? I think theres some 
jfree stuff in there


jwray wrote:

Hi,

I recently developed a component that displays a chart generated from
JFreeChart and includes the associated image map that allows the chart to
generate tooltips and respond to user clicks, via an Ajax link. I thought
this maybe useful to other people so I've included the files here.

To use simply construct the MappedChart with you JFreeChart and provide an
implementation of the onClickCallback function to respond to user clicks.

Jonny

http://www.nabble.com/file/p20200322/MappedChart.java MappedChart.java 
http://www.nabble.com/file/p20200322/MapArea.java MapArea.java 
http://www.nabble.com/file/p20200322/DynamicImageMap.java
DynamicImageMap.java 
http://www.nabble.com/file/p20200322/ChartImage.java ChartImage.java 
http://www.nabble.com/file/p20200322/MappedChart.html MappedChart.html 
  


--
-Wicket for love

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


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



Re: Yahoo Menus

2008-10-28 Thread Nino Saturnino Martinez Vazquez Wael

You should be able to override the css by specifying a more direct style..

like if it says

.menu {
width:10em;
}

you could wrap it in a span and say

span .menu {
width:5em;
}

It's something like this..

wadi wrote:

Hi All!I'm building an application and I would like to use yahoo dropdown
menus. The thing is that when I use the yahoo menu It uses his own css. How
can I make it to change the style of the menu?should I overide it on a new
css?Isn't there any other alternative to yahoo menus?
THanks in advance,
Regards,
Wadi
  


--
-Wicket for love

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


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



Migration to 1.4 - generic headache

2008-10-28 Thread Artur W.

Hi Guys,

In the weekend I tried to migrate our application to wicket 1.4.
I was very happy to use generics with wicket but now I frustrated.

I love Wicket and I know it is nobody fault (it java fault! :)) but the
generics sucks.

Our application is quite big, more than one thousand classes and after
adding generics
the code looks awful and it is unreadable. I could live with that but
especially frustrating are
more than 4.000 warnings that I have now.

Most of them I cannot fix. For example the warnings apply to the components
that don't have models but I have to add them a type. What type? Any?
Example:

add(new Link(link) { //warning here
@Override
public void onClick() {
//do something here
}
});

I have a warning here because I didn't set a type of Link. But it doesn't
have any model. I know I can add @SuppressWarnings(unchecked) but I don't
want to do
that in more than 4000 places in my code. If I do than I will loose all the
warnign event that I would to have or could save me in the future.

So a question is there any way to workaround about this warnings problem?
I don't want to stay with wicket 1.3 because I realize that it will be
abandon in a year or something.


Thanks in advance,
Artur

-- 
View this message in context: 
http://www.nabble.com/Migration-to-1.4---generic-headache-tp20205449p20205449.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Illegal State Exception on DefaultTeeModel.removeNodeFromParent

2008-10-28 Thread Matej Knopp
Might be a big. Jira issue with attached quickstart project to reproduce it
would be helpful.

-Matej

On Mon, Oct 27, 2008 at 11:24 AM, Hannes Schubert [EMAIL PROTECTED] wrote:

 Hi all,

 if I call removeNodeFromParent for the last (and only) child node of a
 parent node on second or deeper level in a TreeTable, Wicket throws an
 IllegalStateException like this:

 ERROR - RequestCycle   - Cannot remove [MarkupContainer
 [Component id = 11, page = No Page, path = 11.AbstractTree$TreeItem]] from
 null parent!
 java.lang.IllegalStateException: Cannot remove [MarkupContainer [Component
 id = 11, page = No Page, path = 11.AbstractTree$TreeItem]] from null
 parent!
   at org.apache.wicket.Component.remove(Component.java:2204)
   at
 org.apache.wicket.markup.html.tree.AbstractTree.removeItem(AbstractTree.java:1441)
   at
 org.apache.wicket.markup.html.tree.AbstractTree.treeNodesRemoved(AbstractTree.java:832)
   at
 javax.swing.tree.DefaultTreeModel.fireTreeNodesRemoved(DefaultTreeModel.java:530)
   at
 javax.swing.tree.DefaultTreeModel.nodesWereRemoved(DefaultTreeModel.java:310)
   at
 javax.swing.tree.DefaultTreeModel.removeNodeFromParent(DefaultTreeModel.java:244)

 It runs well if child node is not the last child of parent. Before calling
 removeNodeFromParent() the instance method  TreeNode.getParent()  always
 returns the valid instance of DefaultMutableTreeNode. So tree seems to be
 intact for me...

 Any hints?

 Best regards
 Hannes Schubert

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




RE: Migration to 1.4 - generic headache

2008-10-28 Thread Artur W.

Hi Stefan!

Stefan Lindner wrote:
 
 Use a Void Link (LinkVoid) or create your own Link wrapper class
 
   Class MyLink extends LinkVoid
 

I know I can create a wrapper but it is a ugly was to solve my problem :/

The Void think is a good idea but it doesn't work everywhere. For example
this doesn't compile:

new AjaxButton(cancelButton) {
@Override
protected void onSubmit(AjaxRequestTarget target, Formlt;Voidgt; 
form) {
modal.close(target);
   }
}


Artur

-- 
View this message in context: 
http://www.nabble.com/Migration-to-1.4---generic-headache-tp20205449p20205654.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Re: Spring and servlet config instead of filter

2008-10-28 Thread Joni Lahtinen
Thank you Igor. Works fine without spring web application factory. (just 
commented it out from web.xml).


Igor Vaynberg wrote:

are you running on jdk1.4? because that is pretty much the only reason
to need to use spring web application factory...

-igor

On Fri, Oct 24, 2008 at 3:14 AM, Joni Lahtinen
[EMAIL PROTECTED] wrote:
  

I have problems to replace filter configuration in web.xml with servlet
configuration. Why I try to use servlet configuration is to get wickets
run with spring in websphere. I'm trying now to deploy this application
in jetty but I run to problems. I have read from this mailing list that
the problem I run to is reported as a bug and fixed. Please ask for more
information if it is needed.

Thank you for advance. And next more details:

I'm using these versions.

repository/org/apache/wicket/wicket-extensions/1.3.5/wicket-extensions-1.3.5.jar
repository/org/apache/wicket/wicket-spring-annot/1.3.5/wicket-spring-annot-1.3.5.jar
repository/org/apache/wicket/wicket-spring/1.3.5/wicket-spring-1.3.5.jar
repository/org/apache/wicket/wicket-ioc/1.3.5/wicket-ioc-1.3.5.jar
repository/org/springframework/spring-core/2.5.5/spring-core-2.5.5.jar

Here is my web.xml

context-param
   param-namecontextConfigLocation/param-name
   param-value/WEB-INF/sovelluskonteksti.xml/param-value
   /context-param
   servlet
   servlet-namecontext/servlet-name

servlet-classorg.springframework.web.context.ContextLoaderServlet/servlet-class
   load-on-startup0/load-on-startup
   /servlet
   servlet
   servlet-namewicket.wicket/servlet-name

servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
   init-param
   param-nameapplicationClassName/param-name
   
param-valuecom.loginets.rfidgate.web.HotelliSovellus/param-value
   /init-param
   init-param
   param-nameapplicationFactoryClassName/param-name

param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
   /init-param
   load-on-startup1/load-on-startup
   /servlet
   servlet-mapping
   servlet-namewicket.wicket/servlet-name
   url-pattern/app/*/url-pattern
   /servlet-mapping


Here is exception:

java.lang.IllegalStateException: bean of type
[org.apache.wicket.protocol.http.WebApplication] not found
   at
org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:107)
   at
org.apache.wicket.spring.SpringWebApplicationFactory.createApplication(SpringWebApplicationFactory.java:86)
   at
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:551)
   at
org.apache.wicket.protocol.http.WicketServlet.init(WicketServlet.java:194)
   at javax.servlet.GenericServlet.init(GenericServlet.java:241)
   at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:431)
   at
org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
   at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
   at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:643)
   at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
   at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1234)
   at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
   at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:460)
   at
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:124)
   at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
   at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
   at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
   at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
   at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
   at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
   at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
   at org.mortbay.jetty.Server.doStart(Server.java:222)
   at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
   at
org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
   at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:388)
   at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:324)
   at
org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:205)
   at
org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
   at

RE: Migration to 1.4 - generic headache

2008-10-28 Thread Stefan Lindner
In this cases use

new AjaxButton(cancelButton) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form? form) {
modal.close(target);
   }
}


-Ursprüngliche Nachricht-
Von: Artur W. [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 28. Oktober 2008 12:40
An: users@wicket.apache.org
Betreff: RE: Migration to 1.4 - generic headache


Hi Stefan!

Stefan Lindner wrote:
 
 Use a Void Link (LinkVoid) or create your own Link wrapper class
 
   Class MyLink extends LinkVoid
 

I know I can create a wrapper but it is a ugly was to solve my problem :/

The Void think is a good idea but it doesn't work everywhere. For example
this doesn't compile:

new AjaxButton(cancelButton) {
@Override
protected void onSubmit(AjaxRequestTarget target, Formlt;Voidgt; 
form) {
modal.close(target);
   }
}


Artur

-- 
View this message in context: 
http://www.nabble.com/Migration-to-1.4---generic-headache-tp20205449p20205654.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


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



Re: Migration to 1.4 - generic headache

2008-10-28 Thread Nino Saturnino Martinez Vazquez Wael
But In the form case, It's really nice to be able todo 
form.getModelObject which if you use generics will return the right 
object with typesafety...


Unless you have forms which contain different classes, but that would 
not make much sense..


Stefan Lindner wrote:

In this cases use

new AjaxButton(cancelButton) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form? form) {
modal.close(target);
   }
}


-Ursprüngliche Nachricht-
Von: Artur W. [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 28. Oktober 2008 12:40

An: users@wicket.apache.org
Betreff: RE: Migration to 1.4 - generic headache


Hi Stefan!

Stefan Lindner wrote:
  

Use a Void Link (LinkVoid) or create your own Link wrapper class

Class MyLink extends LinkVoid




I know I can create a wrapper but it is a ugly was to solve my problem :/

The Void think is a good idea but it doesn't work everywhere. For example
this doesn't compile:

new AjaxButton(cancelButton) {
@Override
protected void onSubmit(AjaxRequestTarget target, Formlt;Voidgt; 
form) {
modal.close(target);
   }
}


Artur

  


--
-Wicket for love

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


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



Re: DataTable cell link

2008-10-28 Thread James Carman
Here's an example where I put a remove link in a DefaultDataTable cell:

https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.java


On Tue, Oct 28, 2008 at 6:33 AM, dlipski [EMAIL PROTECTED] wrote:

 Hi

 I have one short question:
 How to make entire cell in a DataTable a link ?
 I've read that Link component can be attached not only to lt;agt; tags but
 also to any other html elements (like tr and td) but I dont know how to
 use it with DataTable API.

 Regards Daniel
 --
 View this message in context: 
 http://www.nabble.com/DataTable-cell-link-tp20204702p20204702.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: few (not only) AutoCompleteTextField questions

2008-10-28 Thread dlipski



dlipski wrote:
 
 Hi,
 
 First, problem description:
 Recently I was asked to change DropDownChoice field into
 AutoCompleteTextField. 
 Everything was ok untill I noticed that old DropDownChoice field has
 attached OnChangeAjaxBehavior.
 Ofcourse what works well with DropDownChoice doesnt work as I want with
 AutoCompleteTextField. 
 The problem is that I want to update a model after user selects one of
 choices(from autocomplete) not after any change of text field. 
 I found getOnSelectJavascriptExpression method in
 AbstractAutoCompleteRenderer (since Wicket 1.4 ?) and I thought that it
 would be a good place to call some JS to update text field model.
 I looked at
 http://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html to see
 how to call server side Wicket code from JavaScript. 
 Next I had the idea to attach to text field
 AjaxFormComponentUpdatingBehavior and call its getCallbackUrl() from
 JavaScript returned from mentioned earlier
 getOnSelectJavascriptExpression().
 The problem is that AjaxFormComponentUpdatingBehavior expects event name
 in constructor  - in this case I dont need any onXXX event because I will
 call its getCallbackUrl() directly from JS.
 
 Now few questions:
 1)How to update (via Ajax) model of some FormComponents from JavaScript?
 Do I have to attach AjaxFormComponentUpdatingBehavior to some dummy event
 and call its getCallbackUrl() directly in JavaScript ? If so, its kind of
 hacking for me and AjaxFormComponentUpdatingBehavior should provide
 no-argument constructor.
 
 2)Does JavaScript returned from getOnSelectJavascriptExpression is called
 after corresponding TextField value has been set ?
 
 3)At Wicket wiki I found description how to work with
 AutoCompleteTextField and Models:
 http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html
 I dont understand why this problem is not solved by subclassing directly
 form AutoCompleteTextField and overriding getConverter and provide some
 custom converter ?
 
 Ps. My colegue told me to attach AjaxFormComponentUpdatingBehavior to
 onBlur event, maybe this is the solution ? (but still, for me better place
 to update a model is in Javasript from getOnSelectJavascriptExpression()
 than in onblur event handler...)
 
 Best regards
 Daniel
 

It was as simple as using a AjaxFormComponentUpdatingBehavior... I was
confused because I started with OnChangeAjaxBehavior and it was broking
AutoCompleteTextField - thats why I started thinking of diffrent approaches.

BTW. Why AjaxFormComponentUpdatingBehavior works well with
AutoCompleteTextField  and OnChangeAjaxBehavior doesnt ? Is it a bug in
OnChangeAjaxBehavior or the purpose of this class is different ?

Regards Daniel 

-- 
View this message in context: 
http://www.nabble.com/few-%28not-only%29-AutoCompleteTextField-questions-tp20131044p20207012.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



OnChangeAjaxBehavior receives only first input character

2008-10-28 Thread Daniele Dellafiore
Hi all.

I am using an OnChangeAjaxBehavior on a textField to filter contents
of a table.
My code is very similar to this example:
http://www.wicket-library.com/wicket-examples/ajax/on-change-ajax-behavior

The problem I have is that the first input character is received and I
can get it in the onUpdate method of the Behavior. Then it stops
sending event, the wicket ajax debug console confirm that nothing is
sent anymore. If I remove and give the focus back to the field, I
receive a new character, and only one again.

Here is the debug console output for the first char I receive.

INFO: focus removed from
INFO: focus set on filter5
INFO:
INFO: Initiating Ajax POST request on
?wicket:interface=:2:authorSearch:form:filter::IBehaviorListener:0:random=0.08630731350941423
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (261 characters)
INFO:
?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
id=authors6 ![CDATA[table id=authors6

thead


tr class=headers

thspanNome/span/th

/tr


/thead


tbody

/tbody
/table]]/component/ajax-response
INFO: Response parsed. Now invoking steps...
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: Calling focus on filter5
INFO: focus removed from filter5

-- 
Daniele Dellafiore
http://blog.ildella.net/

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



Change row appearance in a DataGrid

2008-10-28 Thread bjolletz

Hi!

I've just started learning Wicket and like it very much so far. I've found
the very nice DataGrid component, for which I have a question:

Is it possible to alter the appearance of a row in the grid in some custom
way? What I want to do is that depending on my row data, I want all text in
certain rows to be printed with bold text-weight. In other words, I want to
add a class attribute to some of the rows, for which I can provide a style
sheet.

Is this possible in some way?

Thanks in advance!

/Daniel
-- 
View this message in context: 
http://www.nabble.com/Change-row-appearance-in-a-DataGrid-tp20207345p20207345.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Change row appearance in a DataGrid

2008-10-28 Thread James Carman
Override newRowItem() and decorate it however you want (using
AttributeAppender behavior perhaps).

On Tue, Oct 28, 2008 at 9:37 AM, bjolletz [EMAIL PROTECTED] wrote:

 Hi!

 I've just started learning Wicket and like it very much so far. I've found
 the very nice DataGrid component, for which I have a question:

 Is it possible to alter the appearance of a row in the grid in some custom
 way? What I want to do is that depending on my row data, I want all text in
 certain rows to be printed with bold text-weight. In other words, I want to
 add a class attribute to some of the rows, for which I can provide a style
 sheet.

 Is this possible in some way?

 Thanks in advance!

 /Daniel
 --
 View this message in context: 
 http://www.nabble.com/Change-row-appearance-in-a-DataGrid-tp20207345p20207345.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



[Wicketstuff jQuery] not compiling?

2008-10-28 Thread Nino Saturnino Martinez Vazquez Wael

Hi Guys

The JQuery stuff project arent compiling, seems to be dependant on 
Wicket 1.4 and using generics. But the pom uses this parent:

   groupIdorg.wicketstuff/groupId
   artifactIdwicketstuff-parent/artifactId
   version2-nojavadoc/version
Which includes wicket 1.3.1...

Whats up?

--
-Wicket for love

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


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



Re: DataTable cell link

2008-10-28 Thread dlipski

Hi
I dont know wicketopia project (and any of its classes like FragmentColumn)
so I can misunderstand your idea but as far as I am able to read that code
It looks like you are adding a link to the table cell, not making a cell
itself a link.

If I understand your code it is familar to:

tdlt;agt;textlt;/agt;/td

but Im wondering how to achive:
td on click=xyztext/td

where xyz is code generated by Wicket (like in Link component class)

If I misundestood you could you give me some more details hot to make cell
itself a link ? (not adding a link to the cell) ?

Regards 
Daniel



jwcarman wrote:
 
 Here's an example where I put a remove link in a DefaultDataTable cell:
 
 https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.java
 
 
 On Tue, Oct 28, 2008 at 6:33 AM, dlipski [EMAIL PROTECTED]
 wrote:

 Hi

 I have one short question:
 How to make entire cell in a DataTable a link ?
 I've read that Link component can be attached not only to lt;agt; tags
 but
 also to any other html elements (like tr and td) but I dont know how
 to
 use it with DataTable API.

 Regards Daniel
 --
 View this message in context:
 http://www.nabble.com/DataTable-cell-link-tp20204702p20204702.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/DataTable-cell-link-tp20204702p20207438.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DataTable cell link

2008-10-28 Thread James Carman
I apologize.  I must have misunderstood your question.

On Tue, Oct 28, 2008 at 9:42 AM, dlipski [EMAIL PROTECTED] wrote:

 Hi
 I dont know wicketopia project (and any of its classes like FragmentColumn)
 so I can misunderstand your idea but as far as I am able to read that code
 It looks like you are adding a link to the table cell, not making a cell
 itself a link.

 If I understand your code it is familar to:

 tdlt;agt;textlt;/agt;/td

 but Im wondering how to achive:
 td on click=xyztext/td

 where xyz is code generated by Wicket (like in Link component class)

 If I misundestood you could you give me some more details hot to make cell
 itself a link ? (not adding a link to the cell) ?

 Regards
 Daniel



 jwcarman wrote:

 Here's an example where I put a remove link in a DefaultDataTable cell:

 https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.java


 On Tue, Oct 28, 2008 at 6:33 AM, dlipski [EMAIL PROTECTED]
 wrote:

 Hi

 I have one short question:
 How to make entire cell in a DataTable a link ?
 I've read that Link component can be attached not only to lt;agt; tags
 but
 also to any other html elements (like tr and td) but I dont know how
 to
 use it with DataTable API.

 Regards Daniel
 --
 View this message in context:
 http://www.nabble.com/DataTable-cell-link-tp20204702p20204702.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context: 
 http://www.nabble.com/DataTable-cell-link-tp20204702p20207438.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Change row appearance in a DataGrid

2008-10-28 Thread bjolletz

Thanks for the very quick reply!

I may be stupid but DataGrid doesn't seem to have a newRowItem() method to
override. I did some googling and found that you can do just this for
DataGridView, but I'm using DataGrid, which does not extend from
AbstractGridView (which has the newRowItem method), but from AbstractGrid.

Am I missing something obvious here?

/Daniel


jwcarman wrote:
 
 Override newRowItem() and decorate it however you want (using
 AttributeAppender behavior perhaps).
 
 On Tue, Oct 28, 2008 at 9:37 AM, bjolletz [EMAIL PROTECTED]
 wrote:

 Hi!

 I've just started learning Wicket and like it very much so far. I've
 found
 the very nice DataGrid component, for which I have a question:

 Is it possible to alter the appearance of a row in the grid in some
 custom
 way? What I want to do is that depending on my row data, I want all text
 in
 certain rows to be printed with bold text-weight. In other words, I want
 to
 add a class attribute to some of the rows, for which I can provide a
 style
 sheet.

 Is this possible in some way?

 Thanks in advance!

 /Daniel
 --
 View this message in context:
 http://www.nabble.com/Change-row-appearance-in-a-DataGrid-tp20207345p20207345.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Change-row-appearance-in-a-DataGrid-tp20207345p20207809.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: OnChangeAjaxBehavior receives only first input character

2008-10-28 Thread Nino Saturnino Martinez Vazquez Wael

Hi Daniele

Provide your code, java and html cutout, it's clearly not similar then 
it would work..


Daniele Dellafiore wrote:

Hi all.

I am using an OnChangeAjaxBehavior on a textField to filter contents
of a table.
My code is very similar to this example:
http://www.wicket-library.com/wicket-examples/ajax/on-change-ajax-behavior

The problem I have is that the first input character is received and I
can get it in the onUpdate method of the Behavior. Then it stops
sending event, the wicket ajax debug console confirm that nothing is
sent anymore. If I remove and give the focus back to the field, I
receive a new character, and only one again.

Here is the debug console output for the first char I receive.

INFO: focus removed from
INFO: focus set on filter5
INFO:
INFO: Initiating Ajax POST request on
?wicket:interface=:2:authorSearch:form:filter::IBehaviorListener:0:random=0.08630731350941423
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (261 characters)
INFO:
?xml version=1.0 encoding=UTF-8?ajax-responsecomponent
id=authors6 ![CDATA[table id=authors6

thead


tr class=headers

thspanNome/span/th

/tr


/thead


tbody

/tbody
/table]]/component/ajax-response
INFO: Response parsed. Now invoking steps...
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: Calling focus on filter5
INFO: focus removed from filter5

  


--
-Wicket for love

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


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



wicket and 508 compilance

2008-10-28 Thread miro

I am new to wicket and  want to build web application using wicket, my
application should be 508 compliance , so want to know using wicket for any
reason can break 508 compliance ?
-- 
View this message in context: 
http://www.nabble.com/wicket-and-508-compilance-tp20208921p20208921.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket and 508 compilance

2008-10-28 Thread Nino Saturnino Martinez Vazquez Wael

You mean like WAI triple A?

http://www.w3.org/WAI/WCAG1AAA-Conformance

No it won't break it but it wont enforce it either..

miro wrote:

I am new to wicket and  want to build web application using wicket, my
application should be 508 compliance , so want to know using wicket for any
reason can break 508 compliance ?
  


--
-Wicket for love

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


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



Re: Yahoo Menus

2008-10-28 Thread wadi


Great!Thanks!I also had to add  on the init method of my app
getMarkupSettings().setStripWicketTags(true); because if not it won't render
the 
submenus!


Nino.Martinez wrote:
 
 You should be able to override the css by specifying a more direct style..
 
 like if it says
 
 .menu {
 width:10em;
 }
 
 you could wrap it in a span and say
 
 span .menu {
 width:5em;
 }
 
 It's something like this..
 
 wadi wrote:
 Hi All!I'm building an application and I would like to use yahoo dropdown
 menus. The thing is that when I use the yahoo menu It uses his own css.
 How
 can I make it to change the style of the menu?should I overide it on a
 new
 css?Isn't there any other alternative to yahoo menus?
 THanks in advance,
 Regards,
 Wadi
   
 
 -- 
 -Wicket for love
 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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


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



Re: no title in ExternalLink

2008-10-28 Thread Steve Swinsburg
Yeah you can do that, you can do it heaps of different ways, but why  
not have a title field on an ExternalLink component, its such a basic  
attribute that is being missed. See the thread about Wicket and 508  
compliance.



Steve






On 28 Oct 2008, at 15:03, Erik van Oosten wrote:



The following extends Link to have a title model in the constructor.  
Its easy

to do the same for an ExternalLink.

public abstract class TitledLink extends Link {

   public TitledLink(String id, String title) {
   this(id, new ModelString(title));
   }

   public TitledLink(String id, IModelString titleModel) {
   super(id);
   add(new AttributeModifier(title, true, titleModel));
   }

}



Steve Swinsburg-2 wrote:



Hi all,

I've just noticed a deficiency in the ExternalLink component that
doesn't allow a 'title' field to be set in its constructor. This is a
basic HTML attribute that all links should have (for accessibility  
and

expected behaviour).

Currently this is only achieved by using AttributeAppender and  
setting

the title attribute onto the link component. I propose a new
construcotr that takes the title attribute as a parameter (or the
ExternalLink set a title by default).

I have filed a Jira ticket here:
https://issues.apache.org/jira/browse/WICKET-1878


cheers,
Steve




--
View this message in context: 
http://www.nabble.com/no-title-in-ExternalLink-tp20030239p20208934.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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





smime.p7s
Description: S/MIME cryptographic signature


Re: wicket and 508 compilance

2008-10-28 Thread Martijn Dashorst
There are lots of ways of making accessibility happening, but throwing
more arguments to constructors isn't one of 'm. Ever took a short look
at DDC?

Instead of taking this narrow vision, perhaps start a discussion of
how we can make accessibility easy to implement, while not raping our
API?

Martijn

On Tue, Oct 28, 2008 at 4:23 PM, Steve Swinsburg
[EMAIL PROTECTED] wrote:
 I alluded to this in a feature request for a new constructor of the
 ExternalLink component in the hope that it would start the ball rolling on
 getting some accessibility happening in the rest of Wicket, but just about
 everyone that commented said it should not be implemented.

 https://issues.apache.org/jira/browse/WICKET-1878

 Wont fix?!  Its section 13.1 of the accessibility document!
 Yes you can add it manually, but you can do many things manually. If the
 constructor is there it allows people to automatically take advantage of it.
 If you don't manually add it, you won't get a title on your link.

 Come on, lets get some accessibility happening. Then we can tout Wicket as
 being a accessible-by-design as well!

 Steve




 On 28 Oct 2008, at 15:07, Nino Saturnino Martinez Vazquez Wael wrote:

 Of course you should be aware that some components might not be compliant,
 but I think that's mostly in wicketstuff..

 Nino Saturnino Martinez Vazquez Wael wrote:

 You mean like WAI triple A?

 http://www.w3.org/WAI/WCAG1AAA-Conformance

 No it won't break it but it wont enforce it either..

 miro wrote:

 I am new to wicket and  want to build web application using wicket, my
 application should be 508 compliance , so want to know using wicket for
 any
 reason can break 508 compliance ?



 --
 -Wicket for love

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


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






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

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



Re: Nice URL in DataTable

2008-10-28 Thread Jeremy Thomerson
Can you send your mount code and examples of a piece of code that works
correctly and one that doesn't?


-- 
Jeremy Thomerson
http://www.wickettraining.com
On Tue, Oct 28, 2008 at 5:02 AM, Daniele Dellafiore [EMAIL PROTECTED]wrote:

 Hi.

 In my app I have mounted a page with mountBookmarkablePage the way
 explained in wicket-library examples, and it works.
 I have:

 http://localhost/myapp/page

 In that page I have a DataTable. A columns is configure to render a
 custom Panel with a BookmarkablePageLink inside, that links to the
 details of the item using the id as parameter. That link does not show
 a url like:

 http://localhost/myapp/page/id/1

 instead


 http://localhost:8080/myapp/page?wicket:bookmarkablePage=%3Acom.myapp.DetailsPageid=1

 If in the same page I add a BookmarkablePageLink the same way but
 outside the table, the link is of the first time, as I expected.

 What should be the problem?
 I have already noticed that in that point of the code, that is inside
 the custom Panel inside the Column, the getPage returns null. Maybe
 that this is the problem...

 --
 Daniele Dellafiore
 http://blog.ildella.net/

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




problem with PropertyModel and setDefaultFormProcessing(false) for button

2008-10-28 Thread itayh

Hey,

I have a page that contain a hidden form. When the user press on Add Item
or Edit Item then I set the visability of the form to true and the user
can add details and the OK button save the data and set the visability of
the form to false.
The problem is if the user press on cancel. I need to set
setDefaultFormProcessing(false) for the cancel button (since I don't want to
do validation checks) but It cause the next problem:
After the cancel press next time I press the Add Item or Edit Item the
data that I see is the old data (The one I press cancel on)
Changing setDefaultFormProcessing(true) for the cancel fix that problem.

Here is the code:

private String name;
TextField nameField = new TextField(name, new PropertyModel(this,
name));
addGameItemForm.add(nameField);

...

Link link = new Link(edit-link, item.getModel()) {
public void onClick() {
onEditItem((Item) getModelObject());
}
};

...

Button save = new Button(save, new Model(Save)) {
public void onSubmit() {
onSaveItem();
}
;   
addItemForm.add(save);

addItemForm.add(new Button(cancel, new Model(Cancel)) {
public void onSubmit() {
onCanceItem();
}
}.setDefaultFormProcessing(false));

private void onCancelGameItem() {
addItemsForm.setVisible(false);
}

protected void onEditItem(Item item) {
name = gameitem.getName();
addItemsForm.setVisible(true);
}

In case that the setDefaultFormProcessing is false for the cancel button,
the name is not the one I press edit on. It is the old one.

Any Idea?





-- 
View this message in context: 
http://www.nabble.com/problem-with-PropertyModel-and-setDefaultFormProcessing%28false%29-for-button-tp20209348p20209348.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: problem with PropertyModel and setDefaultFormProcessing(false) for button

2008-10-28 Thread James Carman
Set the name property to  in your cancel handler logic?

On Tue, Oct 28, 2008 at 11:41 AM, itayh [EMAIL PROTECTED] wrote:

 Hey,

 I have a page that contain a hidden form. When the user press on Add Item
 or Edit Item then I set the visability of the form to true and the user
 can add details and the OK button save the data and set the visability of
 the form to false.
 The problem is if the user press on cancel. I need to set
 setDefaultFormProcessing(false) for the cancel button (since I don't want to
 do validation checks) but It cause the next problem:
 After the cancel press next time I press the Add Item or Edit Item the
 data that I see is the old data (The one I press cancel on)
 Changing setDefaultFormProcessing(true) for the cancel fix that problem.

 Here is the code:

 private String name;
 TextField nameField = new TextField(name, new PropertyModel(this,
 name));
 addGameItemForm.add(nameField);

 ...

 Link link = new Link(edit-link, item.getModel()) {
public void onClick() {
onEditItem((Item) getModelObject());
}
 };

 ...

 Button save = new Button(save, new Model(Save)) {
public void onSubmit() {
onSaveItem();
}
 ;
 addItemForm.add(save);

 addItemForm.add(new Button(cancel, new Model(Cancel)) {
public void onSubmit() {
onCanceItem();
}
 }.setDefaultFormProcessing(false));

 private void onCancelGameItem() {
addItemsForm.setVisible(false);
 }

 protected void onEditItem(Item item) {
name = gameitem.getName();
addItemsForm.setVisible(true);
 }

 In case that the setDefaultFormProcessing is false for the cancel button,
 the name is not the one I press edit on. It is the old one.

 Any Idea?





 --
 View this message in context: 
 http://www.nabble.com/problem-with-PropertyModel-and-setDefaultFormProcessing%28false%29-for-button-tp20209348p20209348.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: wicket and 508 compilance

2008-10-28 Thread Steve Swinsburg
What are you referring to when you say DDC? The Dewey Decimal System?  
Used by pretty much every library around the world making it really  
easy to find books? I'd call that accessible.


So my vision for wanting to enforce a bit of accessibility on the web  
is narrow(?), but no one wants to move forward with the most simple of  
modifications to make it easier to implement accessibility. The most  
basic of things to do would be to update the JavaDocs for the API to  
say:


NOTE: you should always include an AttributeModifier/Appender (or  
roll your own implementation) to include the title attribute on every  
link. here's some examples, etc


Or would that be too much bloat as well?


Steve





On 28 Oct 2008, at 15:35, Martijn Dashorst wrote:


There are lots of ways of making accessibility happening, but throwing
more arguments to constructors isn't one of 'm. Ever took a short look
at DDC?

Instead of taking this narrow vision, perhaps start a discussion of
how we can make accessibility easy to implement, while not raping our
API?

Martijn

On Tue, Oct 28, 2008 at 4:23 PM, Steve Swinsburg
[EMAIL PROTECTED] wrote:

I alluded to this in a feature request for a new constructor of the
ExternalLink component in the hope that it would start the ball  
rolling on
getting some accessibility happening in the rest of Wicket, but  
just about

everyone that commented said it should not be implemented.

https://issues.apache.org/jira/browse/WICKET-1878

Wont fix?!  Its section 13.1 of the accessibility document!
Yes you can add it manually, but you can do many things manually.  
If the
constructor is there it allows people to automatically take  
advantage of it.

If you don't manually add it, you won't get a title on your link.

Come on, lets get some accessibility happening. Then we can tout  
Wicket as

being a accessible-by-design as well!

Steve




On 28 Oct 2008, at 15:07, Nino Saturnino Martinez Vazquez Wael wrote:

Of course you should be aware that some components might not be  
compliant,

but I think that's mostly in wicketstuff..

Nino Saturnino Martinez Vazquez Wael wrote:


You mean like WAI triple A?

http://www.w3.org/WAI/WCAG1AAA-Conformance

No it won't break it but it wont enforce it either..

miro wrote:


I am new to wicket and  want to build web application using  
wicket, my
application should be 508 compliance , so want to know using  
wicket for

any
reason can break 508 compliance ?





--
-Wicket for love

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


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








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

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





smime.p7s
Description: S/MIME cryptographic signature


Re: ajax does not work in IE6 when using domain name. but works with IP

2008-10-28 Thread vkoratek


Any suggestions on this problem please? 

vkoratek wrote:
 
 website runs on apache+resin 3.1.5 and wicket 1.3.3. Load balancer exists.
 
 Specifics of the problem are-
 1. customer accesses the site from inside their company's network, have a
 problem.
 2. Customer uses IE6.
 3. Problem occurs when customer uses domain name. 
 4. No problem seen when IP address of the website is used.
 5. Problem is that none of the ajax pieces works.  java  class throws an
 npe for AjaxRequestTarget object.
 
 When i view the source code, i do see these lines-
 script
 src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js
 type=text/javascript
 and
 script
 src=resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js
 type=text/javascript
 
 
 What is it that IE screws up when domain name is used vs using the IP
 address of either of the 2 prod servers?
 

-- 
View this message in context: 
http://www.nabble.com/ajax-does-not-work-in-IE6-when-using-domain-name.-but-works-with-IP-tp20153993p20209735.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket and 508 compilance

2008-10-28 Thread Steve Swinsburg
lol ok agreed, DropDownChoice is far over the top, but someone let all  
those methods get through. Perhaps its time to start rolling some up  
and deprecating others. And getting some examples happening about how  
best to use the DropDownChoice component.







On 28 Oct 2008, at 15:50, James Carman wrote:


DropDownChoice

On Tue, Oct 28, 2008 at 11:48 AM, Steve Swinsburg
[EMAIL PROTECTED] wrote:
What are you referring to when you say DDC? The Dewey Decimal  
System? Used
by pretty much every library around the world making it really easy  
to find

books? I'd call that accessible.

So my vision for wanting to enforce a bit of accessibility on the  
web is

narrow(?), but no one wants to move forward with the most simple of
modifications to make it easier to implement accessibility. The  
most basic

of things to do would be to update the JavaDocs for the API to say:

NOTE: you should always include an AttributeModifier/Appender (or  
roll your
own implementation) to include the title attribute on every link.  
here's

some examples, etc

Or would that be too much bloat as well?


Steve





On 28 Oct 2008, at 15:35, Martijn Dashorst wrote:

There are lots of ways of making accessibility happening, but  
throwing
more arguments to constructors isn't one of 'm. Ever took a short  
look

at DDC?

Instead of taking this narrow vision, perhaps start a discussion of
how we can make accessibility easy to implement, while not raping  
our

API?

Martijn

On Tue, Oct 28, 2008 at 4:23 PM, Steve Swinsburg
[EMAIL PROTECTED] wrote:


I alluded to this in a feature request for a new constructor of the
ExternalLink component in the hope that it would start the ball  
rolling

on
getting some accessibility happening in the rest of Wicket, but  
just

about
everyone that commented said it should not be implemented.

https://issues.apache.org/jira/browse/WICKET-1878

Wont fix?!  Its section 13.1 of the accessibility document!
Yes you can add it manually, but you can do many things manually.  
If the
constructor is there it allows people to automatically take  
advantage of

it.
If you don't manually add it, you won't get a title on your link.

Come on, lets get some accessibility happening. Then we can tout  
Wicket

as
being a accessible-by-design as well!

Steve




On 28 Oct 2008, at 15:07, Nino Saturnino Martinez Vazquez Wael  
wrote:



Of course you should be aware that some components might not be
compliant,
but I think that's mostly in wicketstuff..

Nino Saturnino Martinez Vazquez Wael wrote:


You mean like WAI triple A?

http://www.w3.org/WAI/WCAG1AAA-Conformance

No it won't break it but it wont enforce it either..

miro wrote:


I am new to wicket and  want to build web application using  
wicket, my
application should be 508 compliance , so want to know using  
wicket

for
any
reason can break 508 compliance ?





--
-Wicket for love

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


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








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

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






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





smime.p7s
Description: S/MIME cryptographic signature


Re: wicket and 508 compilance

2008-10-28 Thread James Carman
DropDownChoice

On Tue, Oct 28, 2008 at 11:48 AM, Steve Swinsburg
[EMAIL PROTECTED] wrote:
 What are you referring to when you say DDC? The Dewey Decimal System? Used
 by pretty much every library around the world making it really easy to find
 books? I'd call that accessible.

 So my vision for wanting to enforce a bit of accessibility on the web is
 narrow(?), but no one wants to move forward with the most simple of
 modifications to make it easier to implement accessibility. The most basic
 of things to do would be to update the JavaDocs for the API to say:

 NOTE: you should always include an AttributeModifier/Appender (or roll your
 own implementation) to include the title attribute on every link. here's
 some examples, etc

 Or would that be too much bloat as well?


 Steve





 On 28 Oct 2008, at 15:35, Martijn Dashorst wrote:

 There are lots of ways of making accessibility happening, but throwing
 more arguments to constructors isn't one of 'm. Ever took a short look
 at DDC?

 Instead of taking this narrow vision, perhaps start a discussion of
 how we can make accessibility easy to implement, while not raping our
 API?

 Martijn

 On Tue, Oct 28, 2008 at 4:23 PM, Steve Swinsburg
 [EMAIL PROTECTED] wrote:

 I alluded to this in a feature request for a new constructor of the
 ExternalLink component in the hope that it would start the ball rolling
 on
 getting some accessibility happening in the rest of Wicket, but just
 about
 everyone that commented said it should not be implemented.

 https://issues.apache.org/jira/browse/WICKET-1878

 Wont fix?!  Its section 13.1 of the accessibility document!
 Yes you can add it manually, but you can do many things manually. If the
 constructor is there it allows people to automatically take advantage of
 it.
 If you don't manually add it, you won't get a title on your link.

 Come on, lets get some accessibility happening. Then we can tout Wicket
 as
 being a accessible-by-design as well!

 Steve




 On 28 Oct 2008, at 15:07, Nino Saturnino Martinez Vazquez Wael wrote:

 Of course you should be aware that some components might not be
 compliant,
 but I think that's mostly in wicketstuff..

 Nino Saturnino Martinez Vazquez Wael wrote:

 You mean like WAI triple A?

 http://www.w3.org/WAI/WCAG1AAA-Conformance

 No it won't break it but it wont enforce it either..

 miro wrote:

 I am new to wicket and  want to build web application using wicket, my
 application should be 508 compliance , so want to know using wicket
 for
 any
 reason can break 508 compliance ?



 --
 -Wicket for love

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


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






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

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




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



Re: wicket and 508 compilance

2008-10-28 Thread Martijn Dashorst
On Tue, Oct 28, 2008 at 4:48 PM, Steve Swinsburg
[EMAIL PROTECTED] wrote:
 So my vision for wanting to enforce a bit of accessibility on the web is
 narrow(?), but no one wants to move forward with the most simple of
 modifications to make it easier to implement accessibility. The most basic
 of things to do would be to update the JavaDocs for the API to say:

 NOTE: you should always include an AttributeModifier/Appender (or roll your
 own implementation) to include the title attribute on every link. here's
 some examples, etc

Where's your patch then?

Martijn

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



Re: wicket and 508 compilance

2008-10-28 Thread Steve Swinsburg

For the Javadoc? (please stop being so vague!)

No worries, I'll do this up and submit it into a general accessibility  
Javadoc improvement Jira ticket.


Steve






On 28 Oct 2008, at 15:57, Martijn Dashorst wrote:


On Tue, Oct 28, 2008 at 4:48 PM, Steve Swinsburg
[EMAIL PROTECTED] wrote:
So my vision for wanting to enforce a bit of accessibility on the  
web is

narrow(?), but no one wants to move forward with the most simple of
modifications to make it easier to implement accessibility. The  
most basic

of things to do would be to update the JavaDocs for the API to say:

NOTE: you should always include an AttributeModifier/Appender (or  
roll your
own implementation) to include the title attribute on every link.  
here's

some examples, etc


Where's your patch then?

Martijn

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





smime.p7s
Description: S/MIME cryptographic signature


Re: wicket and 508 compilance

2008-10-28 Thread James Carman
I don't think Martijn is intentionally being vague.  DDC is a common
abbreviation for DropDownChoice among folks within the Wicket
community.   As for the request for a patch, that's the best way to
get your code suggestions merged into the codebase, providing a patch.
 Please make sure you include test cases with your patch that exercise
the new code.

On Tue, Oct 28, 2008 at 12:02 PM, Steve Swinsburg
[EMAIL PROTECTED] wrote:
 For the Javadoc? (please stop being so vague!)

 No worries, I'll do this up and submit it into a general accessibility
 Javadoc improvement Jira ticket.

 Steve






 On 28 Oct 2008, at 15:57, Martijn Dashorst wrote:

 On Tue, Oct 28, 2008 at 4:48 PM, Steve Swinsburg
 [EMAIL PROTECTED] wrote:

 So my vision for wanting to enforce a bit of accessibility on the web is
 narrow(?), but no one wants to move forward with the most simple of
 modifications to make it easier to implement accessibility. The most
 basic
 of things to do would be to update the JavaDocs for the API to say:

 NOTE: you should always include an AttributeModifier/Appender (or roll
 your
 own implementation) to include the title attribute on every link. here's
 some examples, etc

 Where's your patch then?

 Martijn

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




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



Re: problem with PropertyModel and setDefaultFormProcessing(false) for button

2008-10-28 Thread itayh

Did it. It has no affect. I clear the name in the cancel and I also set it to
the new value in edit item action. But still after cancel when i try to edit
new item I get the old value. 

jwcarman wrote:
 
 Set the name property to  in your cancel handler logic?
 
 On Tue, Oct 28, 2008 at 11:41 AM, itayh [EMAIL PROTECTED] wrote:

 Hey,

 I have a page that contain a hidden form. When the user press on Add
 Item
 or Edit Item then I set the visability of the form to true and the user
 can add details and the OK button save the data and set the visability of
 the form to false.
 The problem is if the user press on cancel. I need to set
 setDefaultFormProcessing(false) for the cancel button (since I don't want
 to
 do validation checks) but It cause the next problem:
 After the cancel press next time I press the Add Item or Edit Item
 the
 data that I see is the old data (The one I press cancel on)
 Changing setDefaultFormProcessing(true) for the cancel fix that problem.

 Here is the code:

 private String name;
 TextField nameField = new TextField(name, new PropertyModel(this,
 name));
 addGameItemForm.add(nameField);

 ...

 Link link = new Link(edit-link, item.getModel()) {
public void onClick() {
onEditItem((Item) getModelObject());
}
 };

 ...

 Button save = new Button(save, new Model(Save)) {
public void onSubmit() {
onSaveItem();
}
 ;
 addItemForm.add(save);

 addItemForm.add(new Button(cancel, new Model(Cancel)) {
public void onSubmit() {
onCanceItem();
}
 }.setDefaultFormProcessing(false));

 private void onCancelGameItem() {
addItemsForm.setVisible(false);
 }

 protected void onEditItem(Item item) {
name = gameitem.getName();
addItemsForm.setVisible(true);
 }

 In case that the setDefaultFormProcessing is false for the cancel button,
 the name is not the one I press edit on. It is the old one.

 Any Idea?





 --
 View this message in context:
 http://www.nabble.com/problem-with-PropertyModel-and-setDefaultFormProcessing%28false%29-for-button-tp20209348p20209348.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/problem-with-PropertyModel-and-setDefaultFormProcessing%28false%29-for-button-tp20209348p20210308.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Changing model of TextField with DDC

2008-10-28 Thread Igor Vaynberg
this really looks like a hack :) you should keep the field and text in
two different fields, and then in form.onsubmit do the right thing.

-igor

On Mon, Oct 27, 2008 at 8:32 PM, Ryan [EMAIL PROTECTED] wrote:
 I have a search page that lets the use enter the search term in a
 TextField and select the field to search with a DDC. Using
 onSelectionChanged I am able to create a new TextField pointing to the
 new model that was selected in the DDC and everything works as expected.

 However, if I do not want to use javascript and the roundtrip for
 onSelectionChanged what would be the best way to implement this?

 Here is the onSelectionChanged method for clarification:

 protected void onSelectionChanged(Object o) {
super.onSelectionChanged(o);
field = new TextField(test,new 
 PropertyModel(HomePage.this,o.toString()));
if(val.equals(test3)) {
field.add(NumberValidator.RangeValidator.range(100,200));
}
f.addOrReplace(field);
 }

 Thanks,
 Ryan

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



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



Re: wicket and 508 compilance

2008-10-28 Thread Steve Swinsburg
Well the last post was unclear about which patch he was referring to  
(Javadoc or codebase).


From the previous discussions, it's clear that a patch for a new  
constructor won't be considered. I will, however, get some information  
to extend the Javadocs and submit that.

Javadco improvement Jira here: https://issues.apache.org/jira/browse/WICKET-1899

Interestingly enough, a ticket was created last year to get the ball  
rolling with accessibility:

https://issues.apache.org/jira/browse/WICKET-982

Steve


On 28 Oct 2008, at 16:06, James Carman wrote:


I don't think Martijn is intentionally being vague.  DDC is a common
abbreviation for DropDownChoice among folks within the Wicket
community.   As for the request for a patch, that's the best way to
get your code suggestions merged into the codebase, providing a patch.
Please make sure you include test cases with your patch that exercise
the new code.

On Tue, Oct 28, 2008 at 12:02 PM, Steve Swinsburg
[EMAIL PROTECTED] wrote:

For the Javadoc? (please stop being so vague!)

No worries, I'll do this up and submit it into a general  
accessibility

Javadoc improvement Jira ticket.

Steve






On 28 Oct 2008, at 15:57, Martijn Dashorst wrote:


On Tue, Oct 28, 2008 at 4:48 PM, Steve Swinsburg
[EMAIL PROTECTED] wrote:


So my vision for wanting to enforce a bit of accessibility on the  
web is

narrow(?), but no one wants to move forward with the most simple of
modifications to make it easier to implement accessibility. The  
most

basic
of things to do would be to update the JavaDocs for the API to say:

NOTE: you should always include an AttributeModifier/Appender  
(or roll

your
own implementation) to include the title attribute on every link.  
here's

some examples, etc


Where's your patch then?

Martijn

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






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





smime.p7s
Description: S/MIME cryptographic signature


Write XML response

2008-10-28 Thread Ambrose . Wheatcroft
Hello,

I wonder if you can help.  I'm trying to send back some XML from an 
AbstractAjaxBehavior  like this:

public class MyAjaxBehavior extends AbstractAjaxBehavior {

@Override
public void onRequest() {
 
String reply = XML document as String.
RequestCycle.get().setRequestTarget(new 
StringRequestTarget(reply));
 
} 
}

How can I set the response type to text/xml ?  The clients get the 
response okay, but the fact that they don't know it's XML is causing 
problems in Firefox and Chrome.

Many thanks,

JHC 

Ambrose Wheatcroft 
Analyst / Programmer 

Email: [EMAIL PROTECTED]

London office • Cottons Centre, Cottons Lane, London SE1 2QG • Telephone: 
+44 (0)20 7367 6500 • Fax: +44 (0)20 7367 6501 

This message is private and confidential. If you have received this message in 
error, please notify us and remove it from your system. 
This message has been scanned for all known viruses. However, recipients are 
advised to apply their own antivirus detection measures to this message and any 
attachments upon receipt. 

JHC Plc is a limited company registered in England and Wales. Registered 
number: 2243258. Registered office:Canterbury House, 85 Newhall Street, 
Birmingham, B3 1LH, England.  

Re: Migration to 1.4 - generic headache

2008-10-28 Thread Igor Vaynberg
yes it sucks. i agree. personally i prefer code written against wicket
1.3. even in 1.3 i hardly had to cast anything and even with those
casts i do not remember getting any class cast exceptions.

i do think imodelt makes a ton of sense, but the types on components
are pretty bad.

in 1.5 i have an idea to fix it, but i am not sure it is going to work
without giving up compound property model. the idea is to remove the
default model from component completely and have user keep the model
as a field. in ondetach() we can then detach any fields that are
imodel via reflection. this will neatly solve all generics problems
but it has limitations.

anyways, we will see how it goes. until 1.4 i think the generics will
stay the way they are unless we hear a ton of users complaining.

-igor

On Tue, Oct 28, 2008 at 4:23 AM, Artur W. [EMAIL PROTECTED] wrote:

 Hi Guys,

 In the weekend I tried to migrate our application to wicket 1.4.
 I was very happy to use generics with wicket but now I frustrated.

 I love Wicket and I know it is nobody fault (it java fault! :)) but the
 generics sucks.

 Our application is quite big, more than one thousand classes and after
 adding generics
 the code looks awful and it is unreadable. I could live with that but
 especially frustrating are
 more than 4.000 warnings that I have now.

 Most of them I cannot fix. For example the warnings apply to the components
 that don't have models but I have to add them a type. What type? Any?
 Example:

 add(new Link(link) { //warning here
 @Override
 public void onClick() {
 //do something here
 }
 });

 I have a warning here because I didn't set a type of Link. But it doesn't
 have any model. I know I can add @SuppressWarnings(unchecked) but I don't
 want to do
 that in more than 4000 places in my code. If I do than I will loose all the
 warnign event that I would to have or could save me in the future.

 So a question is there any way to workaround about this warnings problem?
 I don't want to stay with wicket 1.3 because I realize that it will be
 abandon in a year or something.


 Thanks in advance,
 Artur

 --
 View this message in context: 
 http://www.nabble.com/Migration-to-1.4---generic-headache-tp20205449p20205449.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Changing model of TextField with DDC

2008-10-28 Thread Ryan
Yea, I've started to come to that conclusion.

Thanks Igor!
Ryan

On Tue, Oct 28, 2008 at 09:14:42AM -0700, Igor Vaynberg exclaimed:

this really looks like a hack :) you should keep the field and text in
two different fields, and then in form.onsubmit do the right thing.

-igor

On Mon, Oct 27, 2008 at 8:32 PM, Ryan [EMAIL PROTECTED] wrote:
 I have a search page that lets the use enter the search term in a
 TextField and select the field to search with a DDC. Using
 onSelectionChanged I am able to create a new TextField pointing to the
 new model that was selected in the DDC and everything works as expected.

 However, if I do not want to use javascript and the roundtrip for
 onSelectionChanged what would be the best way to implement this?

 Here is the onSelectionChanged method for clarification:

 protected void onSelectionChanged(Object o) {
super.onSelectionChanged(o);
field = new TextField(test,new 
 PropertyModel(HomePage.this,o.toString()));
if(val.equals(test3)) {
field.add(NumberValidator.RangeValidator.range(100,200));
}
f.addOrReplace(field);
 }

 Thanks,
 Ryan

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



Re: [Wicketstuff jQuery] not compiling?

2008-10-28 Thread Martin Grigorov
I've changed it.

Since r4284 wicketstuff-parent/pom.xml has this:
 properties
java.src.version1.5/java.src.version
wicket.version1.4-m3/wicket.version
slf4j.version1.5.2/slf4j.version
runtime.logtarget/velocity.log/runtime.log
/properties


Where did you see 1.3.1 ?

Martin


On Tue, 2008-10-28 at 14:42 +0100, Nino Saturnino Martinez Vazquez Wael
wrote:
 Hi Guys
 
 The JQuery stuff project arent compiling, seems to be dependant on 
 Wicket 1.4 and using generics. But the pom uses this parent:
 groupIdorg.wicketstuff/groupId
 artifactIdwicketstuff-parent/artifactId
 version2-nojavadoc/version
 Which includes wicket 1.3.1...
 
 Whats up?
 


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



Re: few (not only) AutoCompleteTextField questions

2008-10-28 Thread Igor Vaynberg
probably because textfields do not receive onchange event, or
something else was hijacking it.

-igor

On Tue, Oct 28, 2008 at 6:17 AM, dlipski [EMAIL PROTECTED] wrote:



 dlipski wrote:

 Hi,

 First, problem description:
 Recently I was asked to change DropDownChoice field into
 AutoCompleteTextField.
 Everything was ok untill I noticed that old DropDownChoice field has
 attached OnChangeAjaxBehavior.
 Ofcourse what works well with DropDownChoice doesnt work as I want with
 AutoCompleteTextField.
 The problem is that I want to update a model after user selects one of
 choices(from autocomplete) not after any change of text field.
 I found getOnSelectJavascriptExpression method in
 AbstractAutoCompleteRenderer (since Wicket 1.4 ?) and I thought that it
 would be a good place to call some JS to update text field model.
 I looked at
 http://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html to see
 how to call server side Wicket code from JavaScript.
 Next I had the idea to attach to text field
 AjaxFormComponentUpdatingBehavior and call its getCallbackUrl() from
 JavaScript returned from mentioned earlier
 getOnSelectJavascriptExpression().
 The problem is that AjaxFormComponentUpdatingBehavior expects event name
 in constructor  - in this case I dont need any onXXX event because I will
 call its getCallbackUrl() directly from JS.

 Now few questions:
 1)How to update (via Ajax) model of some FormComponents from JavaScript?
 Do I have to attach AjaxFormComponentUpdatingBehavior to some dummy event
 and call its getCallbackUrl() directly in JavaScript ? If so, its kind of
 hacking for me and AjaxFormComponentUpdatingBehavior should provide
 no-argument constructor.

 2)Does JavaScript returned from getOnSelectJavascriptExpression is called
 after corresponding TextField value has been set ?

 3)At Wicket wiki I found description how to work with
 AutoCompleteTextField and Models:
 http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html
 I dont understand why this problem is not solved by subclassing directly
 form AutoCompleteTextField and overriding getConverter and provide some
 custom converter ?

 Ps. My colegue told me to attach AjaxFormComponentUpdatingBehavior to
 onBlur event, maybe this is the solution ? (but still, for me better place
 to update a model is in Javasript from getOnSelectJavascriptExpression()
 than in onblur event handler...)

 Best regards
 Daniel


 It was as simple as using a AjaxFormComponentUpdatingBehavior... I was
 confused because I started with OnChangeAjaxBehavior and it was broking
 AutoCompleteTextField - thats why I started thinking of diffrent approaches.

 BTW. Why AjaxFormComponentUpdatingBehavior works well with
 AutoCompleteTextField  and OnChangeAjaxBehavior doesnt ? Is it a bug in
 OnChangeAjaxBehavior or the purpose of this class is different ?

 Regards Daniel

 --
 View this message in context: 
 http://www.nabble.com/few-%28not-only%29-AutoCompleteTextField-questions-tp20131044p20207012.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: no title in ExternalLink

2008-10-28 Thread Erik van Oosten

Hehe, that's a nice one too.


James Carman wrote:

Perhaps just a helper method somewhere?

public AbstractLink addTitle(AbstractLink link, IModelString titleModel)
{
  link.add(new AttributeModifier(title, true, titleModel));
  return link;
}

  



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


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



Re: wicket and 508 compilance

2008-10-28 Thread Igor Vaynberg
both 1899 and 982 are pretty friggin vague :)

how often are link titles dynamic? i am thinking not very often at
all, so why add another imodel slot to make the component event bigger
for a small percantage of usecases.

in most cases a wicket:id=external-link title=
wicket:message=title:key-to-title../a works just fine for
internationalization. for the very few times where you do need a
dynamic title you can use an attribute appender or subclass
externallink and write a trivial implementation.

we try to keep the core components with as small a footprint as
possible, but we also make them pretty damn trivial to extend.

-igor

On Tue, Oct 28, 2008 at 9:15 AM, Steve Swinsburg
[EMAIL PROTECTED] wrote:
 Well the last post was unclear about which patch he was referring to
 (Javadoc or codebase).

 From the previous discussions, it's clear that a patch for a new constructor
 won't be considered. I will, however, get some information to extend the
 Javadocs and submit that.
 Javadco improvement Jira here:
 https://issues.apache.org/jira/browse/WICKET-1899

 Interestingly enough, a ticket was created last year to get the ball rolling
 with accessibility:
 https://issues.apache.org/jira/browse/WICKET-982

 Steve


 On 28 Oct 2008, at 16:06, James Carman wrote:

 I don't think Martijn is intentionally being vague.  DDC is a common
 abbreviation for DropDownChoice among folks within the Wicket
 community.   As for the request for a patch, that's the best way to
 get your code suggestions merged into the codebase, providing a patch.
 Please make sure you include test cases with your patch that exercise
 the new code.

 On Tue, Oct 28, 2008 at 12:02 PM, Steve Swinsburg
 [EMAIL PROTECTED] wrote:

 For the Javadoc? (please stop being so vague!)

 No worries, I'll do this up and submit it into a general accessibility
 Javadoc improvement Jira ticket.

 Steve






 On 28 Oct 2008, at 15:57, Martijn Dashorst wrote:

 On Tue, Oct 28, 2008 at 4:48 PM, Steve Swinsburg
 [EMAIL PROTECTED] wrote:

 So my vision for wanting to enforce a bit of accessibility on the web
 is
 narrow(?), but no one wants to move forward with the most simple of
 modifications to make it easier to implement accessibility. The most
 basic
 of things to do would be to update the JavaDocs for the API to say:

 NOTE: you should always include an AttributeModifier/Appender (or roll
 your
 own implementation) to include the title attribute on every link.
 here's
 some examples, etc

 Where's your patch then?

 Martijn

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




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




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



Re: Write XML response

2008-10-28 Thread Igor Vaynberg
is it not just a matter of setting the right header?

-igor

On Tue, Oct 28, 2008 at 9:19 AM,  [EMAIL PROTECTED] wrote:
 Hello,

 I wonder if you can help.  I'm trying to send back some XML from an
 AbstractAjaxBehavior  like this:

 public class MyAjaxBehavior extends AbstractAjaxBehavior {

@Override
public void onRequest() {

String reply = XML document as String.
RequestCycle.get().setRequestTarget(new
 StringRequestTarget(reply));

}
 }

 How can I set the response type to text/xml ?  The clients get the
 response okay, but the fact that they don't know it's XML is causing
 problems in Firefox and Chrome.

 Many thanks,

 JHC

 Ambrose Wheatcroft
 Analyst / Programmer

 Email: [EMAIL PROTECTED]

 London office • Cottons Centre, Cottons Lane, London SE1 2QG • Telephone:
 +44 (0)20 7367 6500 • Fax: +44 (0)20 7367 6501

 This message is private and confidential. If you have received this message 
 in error, please notify us and remove it from your system.
 This message has been scanned for all known viruses. However, recipients are 
 advised to apply their own antivirus detection measures to this message and 
 any attachments upon receipt.

 JHC Plc is a limited company registered in England and Wales. Registered 
 number: 2243258. Registered office:Canterbury House, 85 Newhall Street, 
 Birmingham, B3 1LH, England.

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



Re: Write XML response

2008-10-28 Thread Ambrose . Wheatcroft
Hello,

Yes, sorry and thanks - missed the StringRequestTarget(String contentType, 
String charSet, String content) constrcutor.

Thanks again.

JHC 

Ambrose Wheatcroft 
Analyst / Programmer 

Email: [EMAIL PROTECTED]

London office • Cottons Centre, Cottons Lane, London SE1 2QG • Telephone: 
+44 (0)20 7367 6500 • Fax: +44 (0)20 7367 6501 




From:
Igor Vaynberg [EMAIL PROTECTED]
To:
users@wicket.apache.org
Date:
28/10/2008 16:46
Subject:
Re: Write XML response



is it not just a matter of setting the right header?

-igor

On Tue, Oct 28, 2008 at 9:19 AM,  [EMAIL PROTECTED] wrote:
 Hello,

 I wonder if you can help.  I'm trying to send back some XML from an
 AbstractAjaxBehavior  like this:

 public class MyAjaxBehavior extends AbstractAjaxBehavior {

@Override
public void onRequest() {

String reply = XML document as String.
RequestCycle.get().setRequestTarget(new
 StringRequestTarget(reply));

}
 }

 How can I set the response type to text/xml ?  The clients get the
 response okay, but the fact that they don't know it's XML is causing
 problems in Firefox and Chrome.

 Many thanks,

 JHC

 Ambrose Wheatcroft
 Analyst / Programmer

 Email: [EMAIL PROTECTED]

 London office • Cottons Centre, Cottons Lane, London SE1 2QG • 
Telephone:
 +44 (0)20 7367 6500 • Fax: +44 (0)20 7367 6501

 This message is private and confidential. If you have received this 
message in error, please notify us and remove it from your system.
 This message has been scanned for all known viruses. However, recipients 
are advised to apply their own antivirus detection measures to this 
message and any attachments upon receipt.

 JHC Plc is a limited company registered in England and Wales. Registered 
number: 2243258. Registered office:Canterbury House, 85 Newhall Street, 
Birmingham, B3 1LH, England.

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





This message is private and confidential. If you have received this message in 
error, please notify us and remove it from your system. 
This message has been scanned for all known viruses. However, recipients are 
advised to apply their own antivirus detection measures to this message and any 
attachments upon receipt. 

JHC Plc is a limited company registered in England and Wales. Registered 
number: 2243258. Registered office:Canterbury House, 85 Newhall Street, 
Birmingham, B3 1LH, England.  

Re: no title in ExternalLink

2008-10-28 Thread Michael Sparer

I always go for accessibility and each of my links do have a title and I'd be
the last one to say that accessibility (and usability) isn't important. But
I think the footprint of the components should be kept as small as possible.
It isn't hard to extend them anyway. If you only use titled externallinks
(like I do) just subclass externallink and add an abstract method to return
the title. This way you're forced to come up with a decent title - which in
turn improves accessibility/usability. then you're not tempted to use a
default constructor ... well just my two cents - if the JIRA goes through,
I'll be fine with it too :-)

Michael


Steve Swinsburg-2 wrote:
 
 
 Hi all,
 
 I've just noticed a deficiency in the ExternalLink component that  
 doesn't allow a 'title' field to be set in its constructor. This is a  
 basic HTML attribute that all links should have (for accessibility and  
 expected behaviour).
 
 Currently this is only achieved by using AttributeAppender and setting  
 the title attribute onto the link component. I propose a new  
 construcotr that takes the title attribute as a parameter (or the  
 ExternalLink set a title by default).
 
 I have filed a Jira ticket here:
 https://issues.apache.org/jira/browse/WICKET-1878
 
 
 cheers,
 Steve
 
 
 
 
 
 
 
 
  
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/no-title-in-ExternalLink-tp20030239p20211164.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



using wicket

2008-10-28 Thread miro

I am new to wicket and no guru to help me answer questions  , I am starting a
new project , is it ok to work with wicket 1.4 , i mean is it a stable
release ,of should I use wicket 1.3 ? Please help me , also please point me
to  java  docs of wicket 1.4 if 1.4 is all teste3d and ready for use 
-- 
View this message in context: 
http://www.nabble.com/using-wicket-tp20211179p20211179.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DataTable cell link

2008-10-28 Thread Michael O'Cleirigh

Hi Daniel,

If you subclass DefaultDataTable there is a protected method call 
newCellItem(...) that you can use to attach the onclick class onto the td.


like:

class MyDataTable extends DefaultDataTable {
/* (non-Javadoc)
* @see 
org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable#newCellItem(java.lang.String, 
int, org.apache.wicket.model.IModel)

*/
   @Override
   protected Item newCellItem(String id, int index, IModel model) {


   Item cell = super.newCellItem(id, index, model);


   cell.add(new AttributeAppender(onclick, new Model 
(someJavascriptCall();));


   return cell;
   }
}

Alternately you can use a custom column implementation like the 
FragrementColumn and add the onclick when the cell is created like:


class MyOnClickColumn extends AbstractColumn {
...
public void populateItem(Item cellItem, String componentId, IModel rowModel)
   {
  Label cell = new Label(componentId, new PropertyModel(rowModel, 
property))


   cell.add (new AttributeAppender(onclick, new Model 
(someJavascriptCall();));


   cellItem.add(cell);
   }
}


I think the second version would attach the onclick to the label within 
the td/td of a cell.


Regards,

Mike

I dont know wicketopia project (and any of its classes like FragmentColumn)
so I can misunderstand your idea but as far as I am able to read that code
It looks like you are adding a link to the table cell, not making a cell
itself a link.

If I understand your code it is familar to:

tdlt;agt;textlt;/agt;/td

but Im wondering how to achive:
td on click=xyztext/td

where xyz is code generated by Wicket (like in Link component class)

If I misundestood you could you give me some more details hot to make cell
itself a link ? (not adding a link to the cell) ?

Regards 
Daniel




jwcarman wrote:
  

Here's an example where I put a remove link in a DefaultDataTable cell:

https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.java


On Tue, Oct 28, 2008 at 6:33 AM, dlipski [EMAIL PROTECTED]
wrote:


Hi

I have one short question:
How to make entire cell in a DataTable a link ?
I've read that Link component can be attached not only to lt;agt; tags
but
also to any other html elements (like tr and td) but I dont know how
to
use it with DataTable API.

Regards Daniel
--
View this message in context:
http://www.nabble.com/DataTable-cell-link-tp20204702p20204702.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


  

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






  



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



spring wicket application template or example

2008-10-28 Thread miro

I am starting   a new project with spring and wicket,  are there any wicket
spring examples which i can  use to   to get started 
-- 
View this message in context: 
http://www.nabble.com/spring--wicket--application--template-or-example-tp20211466p20211466.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Serialization problem - detaching an oblect from session

2008-10-28 Thread eyalbenamram

Hi,
My session is holding an non serializable object. this causes a problem
every time wicket is trying to serialize a page (since most pages in my app
are hoding a pointer to the session) Here is the exception:

http-6789-6 ERROR lang.Objects - Error serializing object class
screens.Login [object=[Page class = screens.Login, id = 4, version = 0]]
org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
Unable to serialize class: java.lang.Object
Field hierarchy is:
  4 [class=screens.Login, path=4]
MySession screens.Login.ns [class=MySession]
  private _community [class=core.community.User]
public core.community.TransactionManager
core.community.User.transactionManager
[class=core.community.TransactionManager]
  private core.transportLayer.Protocol
core.community.TransactionManager.protocol
[class=core.transportLayer.Protocol]
private network.NetworkManger
core.transportLayer.Protocol.network [class=network.NetworkManger]
  private java.util.Hashtable network.NetworkManger.poolManagers
[class=java.util.Hashtable]
private java.util.Hashtable
network.NetworkManger.poolManagers[write:1][write:2]
[class=network.PoolManager]
  private java.util.Vector
network.PoolManager.availableTransports [class=java.util.Vector]
private java.util.Vector
network.PoolManager.availableTransports[write:1] [class=[Ljava.lang.Object;]
  private java.util.Vector
network.PoolManager.availableTransports[write:1][0]
[class=network.Transport]
private java.lang.Object
network.Transport.messageProcessingLock [class=java.lang.Object] -
field that is not serializable

Is it possible that this object (held by the session) will not be serialized
at all??

Thanks, Eyal.
-- 
View this message in context: 
http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20211477.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Serialization problem - detaching an oblect from session

2008-10-28 Thread Igor Vaynberg
according to the j2ee spec, afair, httpsession must not hold any
non-serializable objects.

-igor

On Tue, Oct 28, 2008 at 10:02 AM, eyalbenamram [EMAIL PROTECTED] wrote:

 Hi,
 My session is holding an non serializable object. this causes a problem
 every time wicket is trying to serialize a page (since most pages in my app
 are hoding a pointer to the session) Here is the exception:

 http-6789-6 ERROR lang.Objects - Error serializing object class
 screens.Login [object=[Page class = screens.Login, id = 4, version = 0]]
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.lang.Object
 Field hierarchy is:
  4 [class=screens.Login, path=4]
MySession screens.Login.ns [class=MySession]
  private _community [class=core.community.User]
public core.community.TransactionManager
 core.community.User.transactionManager
 [class=core.community.TransactionManager]
  private core.transportLayer.Protocol
 core.community.TransactionManager.protocol
 [class=core.transportLayer.Protocol]
private network.NetworkManger
 core.transportLayer.Protocol.network [class=network.NetworkManger]
  private java.util.Hashtable network.NetworkManger.poolManagers
 [class=java.util.Hashtable]
private java.util.Hashtable
 network.NetworkManger.poolManagers[write:1][write:2]
 [class=network.PoolManager]
  private java.util.Vector
 network.PoolManager.availableTransports [class=java.util.Vector]
private java.util.Vector
 network.PoolManager.availableTransports[write:1] [class=[Ljava.lang.Object;]
  private java.util.Vector
 network.PoolManager.availableTransports[write:1][0]
 [class=network.Transport]
private java.lang.Object
 network.Transport.messageProcessingLock [class=java.lang.Object] -
 field that is not serializable

 Is it possible that this object (held by the session) will not be serialized
 at all??

 Thanks, Eyal.
 --
 View this message in context: 
 http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20211477.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Serialization problem - detaching an oblect from session

2008-10-28 Thread eyalbenamram

Thank you for the quick response. 


eyalbenamram wrote:
 
 Hi,
 My session is holding an non serializable object. this causes a problem
 every time wicket is trying to serialize a page (since most pages in my
 app are hoding a pointer to the session) Here is the exception:
 
 http-6789-6 ERROR lang.Objects - Error serializing object class
 screens.Login [object=[Page class = screens.Login, id = 4, version = 0]]
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.lang.Object
 Field hierarchy is:
   4 [class=screens.Login, path=4]
 MySession screens.Login.ns [class=MySession]
   private _community [class=core.community.User]
 public core.community.TransactionManager
 core.community.User.transactionManager
 [class=core.community.TransactionManager]
   private core.transportLayer.Protocol
 core.community.TransactionManager.protocol
 [class=core.transportLayer.Protocol]
 private network.NetworkManger
 core.transportLayer.Protocol.network [class=network.NetworkManger]
   private java.util.Hashtable
 network.NetworkManger.poolManagers [class=java.util.Hashtable]
 private java.util.Hashtable
 network.NetworkManger.poolManagers[write:1][write:2]
 [class=network.PoolManager]
   private java.util.Vector
 network.PoolManager.availableTransports [class=java.util.Vector]
 private java.util.Vector
 network.PoolManager.availableTransports[write:1]
 [class=[Ljava.lang.Object;]
   private java.util.Vector
 network.PoolManager.availableTransports[write:1][0]
 [class=network.Transport]
 private java.lang.Object
 network.Transport.messageProcessingLock [class=java.lang.Object] -
 field that is not serializable
 
 Is it possible that this object (held by the session) will not be
 serialized at all??
 
 Thanks, Eyal.
 

-- 
View this message in context: 
http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20211817.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: no title in ExternalLink

2008-10-28 Thread Steve Swinsburg
I have submitted small patches for both Link and ExternalLink to show  
users how to add in the title attribute themselves, in an attempt to  
improve the Javadocs for the HTML components and hence accessibility.  
More components will follow.


I will close the ticket regarding the additional constructor.

The Javadoc improvement regarding accessibility instruxtions is here:
https://issues.apache.org/jira/browse/WICKET-1899


cheers,
Steve







On 28 Oct 2008, at 16:48, Michael Sparer wrote:



I always go for accessibility and each of my links do have a title  
and I'd be
the last one to say that accessibility (and usability) isn't  
important. But
I think the footprint of the components should be kept as small as  
possible.
It isn't hard to extend them anyway. If you only use titled  
externallinks
(like I do) just subclass externallink and add an abstract method to  
return
the title. This way you're forced to come up with a decent title -  
which in
turn improves accessibility/usability. then you're not tempted to  
use a
default constructor ... well just my two cents - if the JIRA goes  
through,

I'll be fine with it too :-)

Michael


Steve Swinsburg-2 wrote:



Hi all,

I've just noticed a deficiency in the ExternalLink component that
doesn't allow a 'title' field to be set in its constructor. This is a
basic HTML attribute that all links should have (for accessibility  
and

expected behaviour).

Currently this is only achieved by using AttributeAppender and  
setting

the title attribute onto the link component. I propose a new
construcotr that takes the title attribute as a parameter (or the
ExternalLink set a title by default).

I have filed a Jira ticket here:
https://issues.apache.org/jira/browse/WICKET-1878


cheers,
Steve













-
Michael Sparer
http://talk-on-tech.blogspot.com
--
View this message in context: 
http://www.nabble.com/no-title-in-ExternalLink-tp20030239p20211164.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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





smime.p7s
Description: S/MIME cryptographic signature


inserting javascript from java to html file

2008-10-28 Thread eyalbenamram

Hi
I am inserting javascript code like this:

StringBuffer config = new StringBuffer();

config.append(script language=\JavaScript\\n);
config.append(function onLoad() { getValue();
setTimeout(\onRefresh();\,+ns.getAutoRefreshSecs()*1000+); }\n);
config.append(function onRefresh(){\n);
config.append(document.getElementById('hiddenVar').value =
document.getElementById('textString').value;\n);
config.append(window.location.reload(); }\n);
config.append(function getValue() {\n);
config.append(document.getElementById('textString').value =
document.getElementById('hiddenVar').value; }\n);
config.append(/script\n);

/*open to activate JS*/
add(new StringHeaderContributor(config.toString()));


and receive an error in log file:

http-6789-2 ERROR html.WebPage -
^
http-6789-2 ERROR html.WebPage - You probably forgot to add a body or
header tag to your markup since no Header Container was 
found but components where found which want to write to the head section.
script language=JavaScript
function removeBlur(checked) {
if(checked) {
document.getElementById('login_button').disabled = false;
} else {
document.getElementById('login_button').disabled = true;
} }
/script

although my html file contains a head tag, and the javascript code
actually appears in the rendered page (when I look at the source of the
page). 

any idea?

Thanks,Eyal.
-- 
View this message in context: 
http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20212650.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Serialization problem - detaching an oblect from session

2008-10-28 Thread eyalbenamram

The problem is, this object the session is holding cannot be serialized. Is
there a way
to hold this object on a defferent level or detach it from the session
despite the J2ee specs?


igor.vaynberg wrote:
 
 according to the j2ee spec, afair, httpsession must not hold any
 non-serializable objects.
 
 -igor
 
 On Tue, Oct 28, 2008 at 10:02 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi,
 My session is holding an non serializable object. this causes a problem
 every time wicket is trying to serialize a page (since most pages in my
 app
 are hoding a pointer to the session) Here is the exception:

 http-6789-6 ERROR lang.Objects - Error serializing object class
 screens.Login [object=[Page class = screens.Login, id = 4, version = 0]]
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.lang.Object
 Field hierarchy is:
  4 [class=screens.Login, path=4]
MySession screens.Login.ns [class=MySession]
  private _community [class=core.community.User]
public core.community.TransactionManager
 core.community.User.transactionManager
 [class=core.community.TransactionManager]
  private core.transportLayer.Protocol
 core.community.TransactionManager.protocol
 [class=core.transportLayer.Protocol]
private network.NetworkManger
 core.transportLayer.Protocol.network [class=network.NetworkManger]
  private java.util.Hashtable
 network.NetworkManger.poolManagers
 [class=java.util.Hashtable]
private java.util.Hashtable
 network.NetworkManger.poolManagers[write:1][write:2]
 [class=network.PoolManager]
  private java.util.Vector
 network.PoolManager.availableTransports [class=java.util.Vector]
private java.util.Vector
 network.PoolManager.availableTransports[write:1]
 [class=[Ljava.lang.Object;]
  private java.util.Vector
 network.PoolManager.availableTransports[write:1][0]
 [class=network.Transport]
private java.lang.Object
 network.Transport.messageProcessingLock [class=java.lang.Object] -
 field that is not serializable

 Is it possible that this object (held by the session) will not be
 serialized
 at all??

 Thanks, Eyal.
 --
 View this message in context:
 http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20211477.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20212873.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: inserting javascript from java to html file

2008-10-28 Thread Igor Vaynberg
use iheadercontributor, that should work much better

also make sure your page has body tag.

-igor

On Tue, Oct 28, 2008 at 10:57 AM, eyalbenamram [EMAIL PROTECTED] wrote:

 Hi
 I am inserting javascript code like this:

StringBuffer config = new StringBuffer();

config.append(script language=\JavaScript\\n);
config.append(function onLoad() { getValue();
 setTimeout(\onRefresh();\,+ns.getAutoRefreshSecs()*1000+); }\n);
config.append(function onRefresh(){\n);
config.append(document.getElementById('hiddenVar').value =
 document.getElementById('textString').value;\n);
config.append(window.location.reload(); }\n);
config.append(function getValue() {\n);
config.append(document.getElementById('textString').value =
 document.getElementById('hiddenVar').value; }\n);
config.append(/script\n);

/*open to activate JS*/
add(new StringHeaderContributor(config.toString()));


 and receive an error in log file:

 http-6789-2 ERROR html.WebPage -
 ^
 http-6789-2 ERROR html.WebPage - You probably forgot to add a body or
 header tag to your markup since no Header Container was
 found but components where found which want to write to the head section.
 script language=JavaScript
 function removeBlur(checked) {
 if(checked) {
 document.getElementById('login_button').disabled = false;
 } else {
 document.getElementById('login_button').disabled = true;
 } }
 /script

 although my html file contains a head tag, and the javascript code
 actually appears in the rendered page (when I look at the source of the
 page).

 any idea?

 Thanks,Eyal.
 --
 View this message in context: 
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20212650.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: inserting javascript from java to html file

2008-10-28 Thread eyalbenamram

but StringHeaderContibutor implement IHeaderContributor...

I also verfied body tag exists...

Can you please give a code ample. it will be much easier..
Thanks.


igor.vaynberg wrote:
 
 use iheadercontributor, that should work much better
 
 also make sure your page has body tag.
 
 -igor
 
 On Tue, Oct 28, 2008 at 10:57 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi
 I am inserting javascript code like this:

StringBuffer config = new StringBuffer();

config.append(script language=\JavaScript\\n);
config.append(function onLoad() { getValue();
 setTimeout(\onRefresh();\,+ns.getAutoRefreshSecs()*1000+); }\n);
config.append(function onRefresh(){\n);
config.append(document.getElementById('hiddenVar').value
 =
 document.getElementById('textString').value;\n);
config.append(window.location.reload(); }\n);
config.append(function getValue() {\n);
config.append(document.getElementById('textString').value
 =
 document.getElementById('hiddenVar').value; }\n);
config.append(/script\n);

/*open to activate JS*/
add(new StringHeaderContributor(config.toString()));


 and receive an error in log file:

 http-6789-2 ERROR html.WebPage -
 ^
 http-6789-2 ERROR html.WebPage - You probably forgot to add a body or
 header tag to your markup since no Header Container was
 found but components where found which want to write to the head
 section.
 script language=JavaScript
 function removeBlur(checked) {
 if(checked) {
 document.getElementById('login_button').disabled = false;
 } else {
 document.getElementById('login_button').disabled = true;
 } }
 /script

 although my html file contains a head tag, and the javascript code
 actually appears in the rendered page (when I look at the source of the
 page).

 any idea?

 Thanks,Eyal.
 --
 View this message in context:
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20212650.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20213031.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: inserting javascript from java to html file

2008-10-28 Thread eyalbenamram

Sorry, I understood what you meant and used IHeaderContributor. Thanks.

igor.vaynberg wrote:
 
 use iheadercontributor, that should work much better
 
 also make sure your page has body tag.
 
 -igor
 
 On Tue, Oct 28, 2008 at 10:57 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi
 I am inserting javascript code like this:

StringBuffer config = new StringBuffer();

config.append(script language=\JavaScript\\n);
config.append(function onLoad() { getValue();
 setTimeout(\onRefresh();\,+ns.getAutoRefreshSecs()*1000+); }\n);
config.append(function onRefresh(){\n);
config.append(document.getElementById('hiddenVar').value
 =
 document.getElementById('textString').value;\n);
config.append(window.location.reload(); }\n);
config.append(function getValue() {\n);
config.append(document.getElementById('textString').value
 =
 document.getElementById('hiddenVar').value; }\n);
config.append(/script\n);

/*open to activate JS*/
add(new StringHeaderContributor(config.toString()));


 and receive an error in log file:

 http-6789-2 ERROR html.WebPage -
 ^
 http-6789-2 ERROR html.WebPage - You probably forgot to add a body or
 header tag to your markup since no Header Container was
 found but components where found which want to write to the head
 section.
 script language=JavaScript
 function removeBlur(checked) {
 if(checked) {
 document.getElementById('login_button').disabled = false;
 } else {
 document.getElementById('login_button').disabled = true;
 } }
 /script

 although my html file contains a head tag, and the javascript code
 actually appears in the rendered page (when I look at the source of the
 page).

 any idea?

 Thanks,Eyal.
 --
 View this message in context:
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20212650.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20213139.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Serialization problem - detaching an oblect from session

2008-10-28 Thread Igor Vaynberg
what is its scope? what is the object?

-igor

On Tue, Oct 28, 2008 at 11:09 AM, eyalbenamram [EMAIL PROTECTED] wrote:

 The problem is, this object the session is holding cannot be serialized. Is
 there a way
 to hold this object on a defferent level or detach it from the session
 despite the J2ee specs?


 igor.vaynberg wrote:

 according to the j2ee spec, afair, httpsession must not hold any
 non-serializable objects.

 -igor

 On Tue, Oct 28, 2008 at 10:02 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi,
 My session is holding an non serializable object. this causes a problem
 every time wicket is trying to serialize a page (since most pages in my
 app
 are hoding a pointer to the session) Here is the exception:

 http-6789-6 ERROR lang.Objects - Error serializing object class
 screens.Login [object=[Page class = screens.Login, id = 4, version = 0]]
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.lang.Object
 Field hierarchy is:
  4 [class=screens.Login, path=4]
MySession screens.Login.ns [class=MySession]
  private _community [class=core.community.User]
public core.community.TransactionManager
 core.community.User.transactionManager
 [class=core.community.TransactionManager]
  private core.transportLayer.Protocol
 core.community.TransactionManager.protocol
 [class=core.transportLayer.Protocol]
private network.NetworkManger
 core.transportLayer.Protocol.network [class=network.NetworkManger]
  private java.util.Hashtable
 network.NetworkManger.poolManagers
 [class=java.util.Hashtable]
private java.util.Hashtable
 network.NetworkManger.poolManagers[write:1][write:2]
 [class=network.PoolManager]
  private java.util.Vector
 network.PoolManager.availableTransports [class=java.util.Vector]
private java.util.Vector
 network.PoolManager.availableTransports[write:1]
 [class=[Ljava.lang.Object;]
  private java.util.Vector
 network.PoolManager.availableTransports[write:1][0]
 [class=network.Transport]
private java.lang.Object
 network.Transport.messageProcessingLock [class=java.lang.Object] -
 field that is not serializable

 Is it possible that this object (held by the session) will not be
 serialized
 at all??

 Thanks, Eyal.
 --
 View this message in context:
 http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20211477.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context: 
 http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20212873.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: inserting javascript from java to html file

2008-10-28 Thread eyalbenamram

Hi again,

I used IHeaderContributer, and the javascript code is now garbled and not
working. 
Here is what I got:

script type=text/javascript
src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script
script type=text/javascript !--/*--![CDATA[/*!--*/
Wicket.Event.add(window, load, function() { script language=JavaScript
function removeBlur(checked) {
if(checked) {
document.getElementById('login_button').disabled = false;
} else {
document.getElementById('login_button').disabled = true;
} }
/script
;});
/*--]]*//script



igor.vaynberg wrote:
 
 use iheadercontributor, that should work much better
 
 also make sure your page has body tag.
 
 -igor
 
 On Tue, Oct 28, 2008 at 10:57 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi
 I am inserting javascript code like this:

StringBuffer config = new StringBuffer();

config.append(script language=\JavaScript\\n);
config.append(function onLoad() { getValue();
 setTimeout(\onRefresh();\,+ns.getAutoRefreshSecs()*1000+); }\n);
config.append(function onRefresh(){\n);
config.append(document.getElementById('hiddenVar').value
 =
 document.getElementById('textString').value;\n);
config.append(window.location.reload(); }\n);
config.append(function getValue() {\n);
config.append(document.getElementById('textString').value
 =
 document.getElementById('hiddenVar').value; }\n);
config.append(/script\n);

/*open to activate JS*/
add(new StringHeaderContributor(config.toString()));


 and receive an error in log file:

 http-6789-2 ERROR html.WebPage -
 ^
 http-6789-2 ERROR html.WebPage - You probably forgot to add a body or
 header tag to your markup since no Header Container was
 found but components where found which want to write to the head
 section.
 script language=JavaScript
 function removeBlur(checked) {
 if(checked) {
 document.getElementById('login_button').disabled = false;
 } else {
 document.getElementById('login_button').disabled = true;
 } }
 /script

 although my html file contains a head tag, and the javascript code
 actually appears in the rendered page (when I look at the source of the
 page).

 any idea?

 Thanks,Eyal.
 --
 View this message in context:
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20212650.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20213238.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: inserting javascript from java to html file

2008-10-28 Thread Igor Vaynberg
what is your code look like?

-igor

On Tue, Oct 28, 2008 at 11:28 AM, eyalbenamram [EMAIL PROTECTED] wrote:

 Hi again,

 I used IHeaderContributer, and the javascript code is now garbled and not
 working.
 Here is what I got:

 script type=text/javascript
 src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script
 script type=text/javascript !--/*--![CDATA[/*!--*/
 Wicket.Event.add(window, load, function() { script language=JavaScript
 function removeBlur(checked) {
 if(checked) {
 document.getElementById('login_button').disabled = false;
 } else {
 document.getElementById('login_button').disabled = true;
 } }
 /script
 ;});
 /*--]]*//script



 igor.vaynberg wrote:

 use iheadercontributor, that should work much better

 also make sure your page has body tag.

 -igor

 On Tue, Oct 28, 2008 at 10:57 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi
 I am inserting javascript code like this:

StringBuffer config = new StringBuffer();

config.append(script language=\JavaScript\\n);
config.append(function onLoad() { getValue();
 setTimeout(\onRefresh();\,+ns.getAutoRefreshSecs()*1000+); }\n);
config.append(function onRefresh(){\n);
config.append(document.getElementById('hiddenVar').value
 =
 document.getElementById('textString').value;\n);
config.append(window.location.reload(); }\n);
config.append(function getValue() {\n);
config.append(document.getElementById('textString').value
 =
 document.getElementById('hiddenVar').value; }\n);
config.append(/script\n);

/*open to activate JS*/
add(new StringHeaderContributor(config.toString()));


 and receive an error in log file:

 http-6789-2 ERROR html.WebPage -
 ^
 http-6789-2 ERROR html.WebPage - You probably forgot to add a body or
 header tag to your markup since no Header Container was
 found but components where found which want to write to the head
 section.
 script language=JavaScript
 function removeBlur(checked) {
 if(checked) {
 document.getElementById('login_button').disabled = false;
 } else {
 document.getElementById('login_button').disabled = true;
 } }
 /script

 although my html file contains a head tag, and the javascript code
 actually appears in the rendered page (when I look at the source of the
 page).

 any idea?

 Thanks,Eyal.
 --
 View this message in context:
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20212650.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context: 
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20213238.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Serialization problem - detaching an oblect from session

2008-10-28 Thread eyalbenamram

the object negotiates between the user and a server that provides a messaging
service.
there is a new object for each user - thus it must sit in the session.
The object contains non serializable objects such as sockets and
httpRequests...


igor.vaynberg wrote:
 
 what is its scope? what is the object?
 
 -igor
 
 On Tue, Oct 28, 2008 at 11:09 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 The problem is, this object the session is holding cannot be serialized.
 Is
 there a way
 to hold this object on a defferent level or detach it from the session
 despite the J2ee specs?


 igor.vaynberg wrote:

 according to the j2ee spec, afair, httpsession must not hold any
 non-serializable objects.

 -igor

 On Tue, Oct 28, 2008 at 10:02 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi,
 My session is holding an non serializable object. this causes a problem
 every time wicket is trying to serialize a page (since most pages in my
 app
 are hoding a pointer to the session) Here is the exception:

 http-6789-6 ERROR lang.Objects - Error serializing object class
 screens.Login [object=[Page class = screens.Login, id = 4, version =
 0]]
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.lang.Object
 Field hierarchy is:
  4 [class=screens.Login, path=4]
MySession screens.Login.ns [class=MySession]
  private _community [class=core.community.User]
public core.community.TransactionManager
 core.community.User.transactionManager
 [class=core.community.TransactionManager]
  private core.transportLayer.Protocol
 core.community.TransactionManager.protocol
 [class=core.transportLayer.Protocol]
private network.NetworkManger
 core.transportLayer.Protocol.network [class=network.NetworkManger]
  private java.util.Hashtable
 network.NetworkManger.poolManagers
 [class=java.util.Hashtable]
private java.util.Hashtable
 network.NetworkManger.poolManagers[write:1][write:2]
 [class=network.PoolManager]
  private java.util.Vector
 network.PoolManager.availableTransports [class=java.util.Vector]
private java.util.Vector
 network.PoolManager.availableTransports[write:1]
 [class=[Ljava.lang.Object;]
  private java.util.Vector
 network.PoolManager.availableTransports[write:1][0]
 [class=network.Transport]
private java.lang.Object
 network.Transport.messageProcessingLock [class=java.lang.Object] -
 field that is not serializable

 Is it possible that this object (held by the session) will not be
 serialized
 at all??

 Thanks, Eyal.
 --
 View this message in context:
 http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20211477.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context:
 http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20212873.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20213300.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: inserting javascript from java to html file

2008-10-28 Thread eyalbenamram

public void renderHead(IHeaderResponse response) {


StringBuffer config = new StringBuffer();

config.append(script language=\JavaScript\\n);
config.append(function removeBlur(checked) {\n);
config.append(if(checked) {\n);
config.append(document.getElementById('login_button').disabled 
=
false;\n);
config.append(} else {\n);
config.append(document.getElementById('login_button').disabled 
=
true;\n);
config.append(} }\n);
config.append(/script\n);

response.renderOnLoadJavascript(config.toString());



igor.vaynberg wrote:
 
 what is your code look like?
 
 -igor
 
 On Tue, Oct 28, 2008 at 11:28 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi again,

 I used IHeaderContributer, and the javascript code is now garbled and not
 working.
 Here is what I got:

 script type=text/javascript
 src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script
 script type=text/javascript !--/*--![CDATA[/*!--*/
 Wicket.Event.add(window, load, function() { script
 language=JavaScript
 function removeBlur(checked) {
 if(checked) {
 document.getElementById('login_button').disabled = false;
 } else {
 document.getElementById('login_button').disabled = true;
 } }
 /script
 ;});
 /*--]]*//script



 igor.vaynberg wrote:

 use iheadercontributor, that should work much better

 also make sure your page has body tag.

 -igor

 On Tue, Oct 28, 2008 at 10:57 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi
 I am inserting javascript code like this:

StringBuffer config = new StringBuffer();

config.append(script language=\JavaScript\\n);
config.append(function onLoad() { getValue();
 setTimeout(\onRefresh();\,+ns.getAutoRefreshSecs()*1000+); }\n);
config.append(function onRefresh(){\n);
   
 config.append(document.getElementById('hiddenVar').value
 =
 document.getElementById('textString').value;\n);
config.append(window.location.reload(); }\n);
config.append(function getValue() {\n);
   
 config.append(document.getElementById('textString').value
 =
 document.getElementById('hiddenVar').value; }\n);
config.append(/script\n);

/*open to activate JS*/
add(new StringHeaderContributor(config.toString()));


 and receive an error in log file:

 http-6789-2 ERROR html.WebPage -
 ^
 http-6789-2 ERROR html.WebPage - You probably forgot to add a body or
 header tag to your markup since no Header Container was
 found but components where found which want to write to the head
 section.
 script language=JavaScript
 function removeBlur(checked) {
 if(checked) {
 document.getElementById('login_button').disabled = false;
 } else {
 document.getElementById('login_button').disabled = true;
 } }
 /script

 although my html file contains a head tag, and the javascript code
 actually appears in the rendered page (when I look at the source of the
 page).

 any idea?

 Thanks,Eyal.
 --
 View this message in context:
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20212650.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context:
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20213238.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20213326.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: inserting javascript from java to html file

2008-10-28 Thread eyalbenamram

OK. What if I want all the JS to be inline (no .js file to be made)?
I saw that wicket created a .js file...


igor.vaynberg wrote:
 
 response.renderOnLoadJavascript() takes just the javascript - like the
 javadoc says. no need for you to output the script tags.
 
 -igor
 
 On Tue, Oct 28, 2008 at 11:33 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

public void renderHead(IHeaderResponse response) {


StringBuffer config = new StringBuffer();

config.append(script language=\JavaScript\\n);
config.append(function removeBlur(checked) {\n);
config.append(if(checked) {\n);
   
 config.append(document.getElementById('login_button').disabled =
 false;\n);
config.append(} else {\n);
   
 config.append(document.getElementById('login_button').disabled =
 true;\n);
config.append(} }\n);
config.append(/script\n);

response.renderOnLoadJavascript(config.toString());



 igor.vaynberg wrote:

 what is your code look like?

 -igor

 On Tue, Oct 28, 2008 at 11:28 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi again,

 I used IHeaderContributer, and the javascript code is now garbled and
 not
 working.
 Here is what I got:

 script type=text/javascript
 src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script
 script type=text/javascript !--/*--![CDATA[/*!--*/
 Wicket.Event.add(window, load, function() { script
 language=JavaScript
 function removeBlur(checked) {
 if(checked) {
 document.getElementById('login_button').disabled = false;
 } else {
 document.getElementById('login_button').disabled = true;
 } }
 /script
 ;});
 /*--]]*//script



 igor.vaynberg wrote:

 use iheadercontributor, that should work much better

 also make sure your page has body tag.

 -igor

 On Tue, Oct 28, 2008 at 10:57 AM, eyalbenamram
 [EMAIL PROTECTED]
 wrote:

 Hi
 I am inserting javascript code like this:

StringBuffer config = new StringBuffer();

config.append(script language=\JavaScript\\n);
config.append(function onLoad() { getValue();
 setTimeout(\onRefresh();\,+ns.getAutoRefreshSecs()*1000+); }\n);
config.append(function onRefresh(){\n);

 config.append(document.getElementById('hiddenVar').value
 =
 document.getElementById('textString').value;\n);
config.append(window.location.reload(); }\n);
config.append(function getValue() {\n);

 config.append(document.getElementById('textString').value
 =
 document.getElementById('hiddenVar').value; }\n);
config.append(/script\n);

/*open to activate JS*/
add(new StringHeaderContributor(config.toString()));


 and receive an error in log file:

 http-6789-2 ERROR html.WebPage -
 ^
 http-6789-2 ERROR html.WebPage - You probably forgot to add a body
 or
 header tag to your markup since no Header Container was
 found but components where found which want to write to the head
 section.
 script language=JavaScript
 function removeBlur(checked) {
 if(checked) {
 document.getElementById('login_button').disabled = false;
 } else {
 document.getElementById('login_button').disabled = true;
 } }
 /script

 although my html file contains a head tag, and the javascript code
 actually appears in the rendered page (when I look at the source of
 the
 page).

 any idea?

 Thanks,Eyal.
 --
 View this message in context:
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20212650.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context:
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20213238.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context:
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20213326.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 

Re: inserting javascript from java to html file

2008-10-28 Thread Igor Vaynberg
huh? it did not create the fileyour javascript will be inlined!

you are using the onloadjavascript which needs support for the onload
event, which is why the wicket-event.js is included before your
javascript.

all this is apparent just by looking at the output code, you can see
your code being inlined...

-igor

On Tue, Oct 28, 2008 at 11:45 AM, eyalbenamram [EMAIL PROTECTED] wrote:

 OK. What if I want all the JS to be inline (no .js file to be made)?
 I saw that wicket created a .js file...


 igor.vaynberg wrote:

 response.renderOnLoadJavascript() takes just the javascript - like the
 javadoc says. no need for you to output the script tags.

 -igor

 On Tue, Oct 28, 2008 at 11:33 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

public void renderHead(IHeaderResponse response) {


StringBuffer config = new StringBuffer();

config.append(script language=\JavaScript\\n);
config.append(function removeBlur(checked) {\n);
config.append(if(checked) {\n);

 config.append(document.getElementById('login_button').disabled =
 false;\n);
config.append(} else {\n);

 config.append(document.getElementById('login_button').disabled =
 true;\n);
config.append(} }\n);
config.append(/script\n);

response.renderOnLoadJavascript(config.toString());



 igor.vaynberg wrote:

 what is your code look like?

 -igor

 On Tue, Oct 28, 2008 at 11:28 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi again,

 I used IHeaderContributer, and the javascript code is now garbled and
 not
 working.
 Here is what I got:

 script type=text/javascript
 src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script
 script type=text/javascript !--/*--![CDATA[/*!--*/
 Wicket.Event.add(window, load, function() { script
 language=JavaScript
 function removeBlur(checked) {
 if(checked) {
 document.getElementById('login_button').disabled = false;
 } else {
 document.getElementById('login_button').disabled = true;
 } }
 /script
 ;});
 /*--]]*//script



 igor.vaynberg wrote:

 use iheadercontributor, that should work much better

 also make sure your page has body tag.

 -igor

 On Tue, Oct 28, 2008 at 10:57 AM, eyalbenamram
 [EMAIL PROTECTED]
 wrote:

 Hi
 I am inserting javascript code like this:

StringBuffer config = new StringBuffer();

config.append(script language=\JavaScript\\n);
config.append(function onLoad() { getValue();
 setTimeout(\onRefresh();\,+ns.getAutoRefreshSecs()*1000+); }\n);
config.append(function onRefresh(){\n);

 config.append(document.getElementById('hiddenVar').value
 =
 document.getElementById('textString').value;\n);
config.append(window.location.reload(); }\n);
config.append(function getValue() {\n);

 config.append(document.getElementById('textString').value
 =
 document.getElementById('hiddenVar').value; }\n);
config.append(/script\n);

/*open to activate JS*/
add(new StringHeaderContributor(config.toString()));


 and receive an error in log file:

 http-6789-2 ERROR html.WebPage -
 ^
 http-6789-2 ERROR html.WebPage - You probably forgot to add a body
 or
 header tag to your markup since no Header Container was
 found but components where found which want to write to the head
 section.
 script language=JavaScript
 function removeBlur(checked) {
 if(checked) {
 document.getElementById('login_button').disabled = false;
 } else {
 document.getElementById('login_button').disabled = true;
 } }
 /script

 although my html file contains a head tag, and the javascript code
 actually appears in the rendered page (when I look at the source of
 the
 page).

 any idea?

 Thanks,Eyal.
 --
 View this message in context:
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20212650.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context:
 http://www.nabble.com/inserting-javascript-from-java-to-html-file-tp20212650p20213238.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View 

Re: DataTable cell link

2008-10-28 Thread dlipski

All this solutions are correct but the problem is not in attaching some
custom Javascript to td element (which can be done in multiple ways) but
in making td element work as a link.

What exactly should I do to achive this ? What components should I add at
server side at what JavaScript should I render at markup ? 
If I have to copy-paste bunch of Link class code it looks like some
design/implementation problem of DataTable (or one of components it has).

Its really supprising that such common issue is such problematic.
I hope there is some simple and intuitive solution(if I find one I'll post
it here)

Thanks for your help
Regards Daniel


Michael O'Cleirigh wrote:
 
 Hi Daniel,
 
 If you subclass DefaultDataTable there is a protected method call 
 newCellItem(...) that you can use to attach the onclick class onto the
 td.
 
 like:
 
 class MyDataTable extends DefaultDataTable {
  /* (non-Javadoc)
  * @see 
 org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable#newCellItem(java.lang.String,
  
 int, org.apache.wicket.model.IModel)
  */
 @Override
 protected Item newCellItem(String id, int index, IModel model) {
 
  
 Item cell = super.newCellItem(id, index, model);
 
 
 cell.add(new AttributeAppender(onclick, new Model 
 (someJavascriptCall();));
 
 return cell;
 }
 }
 
 Alternately you can use a custom column implementation like the 
 FragrementColumn and add the onclick when the cell is created like:
 
 class MyOnClickColumn extends AbstractColumn {
 ...
 public void populateItem(Item cellItem, String componentId, IModel
 rowModel)
 {
Label cell = new Label(componentId, new PropertyModel(rowModel, 
 property))
 
 cell.add (new AttributeAppender(onclick, new Model 
 (someJavascriptCall();));
 
 cellItem.add(cell);
 }
 }
 
 
 I think the second version would attach the onclick to the label within 
 the td/td of a cell.
 
 Regards,
 
 Mike
 I dont know wicketopia project (and any of its classes like
 FragmentColumn)
 so I can misunderstand your idea but as far as I am able to read that
 code
 It looks like you are adding a link to the table cell, not making a cell
 itself a link.

 If I understand your code it is familar to:

 tdlt;agt;textlt;/agt;/td

 but Im wondering how to achive:
 td on click=xyztext/td

 where xyz is code generated by Wicket (like in Link component class)

 If I misundestood you could you give me some more details hot to make
 cell
 itself a link ? (not adding a link to the cell) ?

 Regards 
 Daniel



 jwcarman wrote:
   
 Here's an example where I put a remove link in a DefaultDataTable cell:

 https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.java


 On Tue, Oct 28, 2008 at 6:33 AM, dlipski [EMAIL PROTECTED]
 wrote:
 
 Hi

 I have one short question:
 How to make entire cell in a DataTable a link ?
 I've read that Link component can be attached not only to lt;agt;
 tags
 but
 also to any other html elements (like tr and td) but I dont know
 how
 to
 use it with DataTable API.

 Regards Daniel
 --
 View this message in context:
 http://www.nabble.com/DataTable-cell-link-tp20204702p20204702.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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



 

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

-- 
View this message in context: 
http://www.nabble.com/DataTable-cell-link-tp20204702p20213839.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Serialization problem - detaching an oblect from session

2008-10-28 Thread Igor Vaynberg
you can keep those in your application object, or servlet-context if
you think in j2ee terms.

so application.mapsessionid,object and when the session is destroyed
you remove it from the map.

-igor

On Tue, Oct 28, 2008 at 11:32 AM, eyalbenamram [EMAIL PROTECTED] wrote:

 the object negotiates between the user and a server that provides a messaging
 service.
 there is a new object for each user - thus it must sit in the session.
 The object contains non serializable objects such as sockets and
 httpRequests...


 igor.vaynberg wrote:

 what is its scope? what is the object?

 -igor

 On Tue, Oct 28, 2008 at 11:09 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 The problem is, this object the session is holding cannot be serialized.
 Is
 there a way
 to hold this object on a defferent level or detach it from the session
 despite the J2ee specs?


 igor.vaynberg wrote:

 according to the j2ee spec, afair, httpsession must not hold any
 non-serializable objects.

 -igor

 On Tue, Oct 28, 2008 at 10:02 AM, eyalbenamram [EMAIL PROTECTED]
 wrote:

 Hi,
 My session is holding an non serializable object. this causes a problem
 every time wicket is trying to serialize a page (since most pages in my
 app
 are hoding a pointer to the session) Here is the exception:

 http-6789-6 ERROR lang.Objects - Error serializing object class
 screens.Login [object=[Page class = screens.Login, id = 4, version =
 0]]
 org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
 Unable to serialize class: java.lang.Object
 Field hierarchy is:
  4 [class=screens.Login, path=4]
MySession screens.Login.ns [class=MySession]
  private _community [class=core.community.User]
public core.community.TransactionManager
 core.community.User.transactionManager
 [class=core.community.TransactionManager]
  private core.transportLayer.Protocol
 core.community.TransactionManager.protocol
 [class=core.transportLayer.Protocol]
private network.NetworkManger
 core.transportLayer.Protocol.network [class=network.NetworkManger]
  private java.util.Hashtable
 network.NetworkManger.poolManagers
 [class=java.util.Hashtable]
private java.util.Hashtable
 network.NetworkManger.poolManagers[write:1][write:2]
 [class=network.PoolManager]
  private java.util.Vector
 network.PoolManager.availableTransports [class=java.util.Vector]
private java.util.Vector
 network.PoolManager.availableTransports[write:1]
 [class=[Ljava.lang.Object;]
  private java.util.Vector
 network.PoolManager.availableTransports[write:1][0]
 [class=network.Transport]
private java.lang.Object
 network.Transport.messageProcessingLock [class=java.lang.Object] -
 field that is not serializable

 Is it possible that this object (held by the session) will not be
 serialized
 at all??

 Thanks, Eyal.
 --
 View this message in context:
 http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20211477.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context:
 http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20212873.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context: 
 http://www.nabble.com/Serialization-problem---detaching-an-oblect-from-session-tp20211477p20213300.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: few (not only) AutoCompleteTextField questions

2008-10-28 Thread dlipski

Textfields do recive onchange event, even AutocompleteTextField has modified
version off onchange event handler.
Whats more new AjaxFormComponentUpdatingBehavior(onchange){..}; works well
in this scenario but
OnChangeAjaxBehavior not. 
I looked at OnChangeAjaxBehavior implemenation and this is a subclass of
AjaxFormComponentUpdatingBehavior class with super(onchange); call in its
constructor. 
This class only provides its own implementation of onComponentRendered
method so there should be a problem. 
When I looked at OnChangeAjaxBehavior class contract description in JavaDoc
(A behavior that updates the hosting FormComponent via ajax when value of
the component is changed. This behavior uses best available method to track
changes on different types of form components.) there is no mention that it
shouldnt be used with some components so I think its bug either in
OnChangeAjaxBehavior class or AutocompleteTextField class.

Correct me if I'm wrong.
Regards Daniel


igor.vaynberg wrote:
 
 probably because textfields do not receive onchange event, or
 something else was hijacking it.
 
 -igor
 
 On Tue, Oct 28, 2008 at 6:17 AM, dlipski [EMAIL PROTECTED]
 wrote:



 dlipski wrote:

 Hi,

 First, problem description:
 Recently I was asked to change DropDownChoice field into
 AutoCompleteTextField.
 Everything was ok untill I noticed that old DropDownChoice field has
 attached OnChangeAjaxBehavior.
 Ofcourse what works well with DropDownChoice doesnt work as I want with
 AutoCompleteTextField.
 The problem is that I want to update a model after user selects one of
 choices(from autocomplete) not after any change of text field.
 I found getOnSelectJavascriptExpression method in
 AbstractAutoCompleteRenderer (since Wicket 1.4 ?) and I thought that it
 would be a good place to call some JS to update text field model.
 I looked at
 http://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html to
 see
 how to call server side Wicket code from JavaScript.
 Next I had the idea to attach to text field
 AjaxFormComponentUpdatingBehavior and call its getCallbackUrl() from
 JavaScript returned from mentioned earlier
 getOnSelectJavascriptExpression().
 The problem is that AjaxFormComponentUpdatingBehavior expects event name
 in constructor  - in this case I dont need any onXXX event because I
 will
 call its getCallbackUrl() directly from JS.

 Now few questions:
 1)How to update (via Ajax) model of some FormComponents from JavaScript?
 Do I have to attach AjaxFormComponentUpdatingBehavior to some dummy
 event
 and call its getCallbackUrl() directly in JavaScript ? If so, its kind
 of
 hacking for me and AjaxFormComponentUpdatingBehavior should provide
 no-argument constructor.

 2)Does JavaScript returned from getOnSelectJavascriptExpression is
 called
 after corresponding TextField value has been set ?

 3)At Wicket wiki I found description how to work with
 AutoCompleteTextField and Models:
 http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html
 I dont understand why this problem is not solved by subclassing directly
 form AutoCompleteTextField and overriding getConverter and provide some
 custom converter ?

 Ps. My colegue told me to attach AjaxFormComponentUpdatingBehavior to
 onBlur event, maybe this is the solution ? (but still, for me better
 place
 to update a model is in Javasript from getOnSelectJavascriptExpression()
 than in onblur event handler...)

 Best regards
 Daniel


 It was as simple as using a AjaxFormComponentUpdatingBehavior... I was
 confused because I started with OnChangeAjaxBehavior and it was broking
 AutoCompleteTextField - thats why I started thinking of diffrent
 approaches.

 BTW. Why AjaxFormComponentUpdatingBehavior works well with
 AutoCompleteTextField  and OnChangeAjaxBehavior doesnt ? Is it a bug in
 OnChangeAjaxBehavior or the purpose of this class is different ?

 Regards Daniel

 --
 View this message in context:
 http://www.nabble.com/few-%28not-only%29-AutoCompleteTextField-questions-tp20131044p20207012.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/few-%28not-only%29-AutoCompleteTextField-questions-tp20131044p20214060.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Notified when component.remove() called

2008-10-28 Thread metalotus

Hi,

I want to know when some components are removed.  I need to do a bit of
clean-up, such as remove their reference from a List. Is there such thing as
a removal listener, or a hierarchy change listener I can use?

Thakns,
James
-- 
View this message in context: 
http://www.nabble.com/Notified-when-component.remove%28%29-called-tp20213922p20213922.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DataTable cell link

2008-10-28 Thread James Carman
On Tue, Oct 28, 2008 at 3:05 PM, dlipski [EMAIL PROTECTED] wrote:

 All this solutions are correct but the problem is not in attaching some
 custom Javascript to td element (which can be done in multiple ways) but
 in making td element work as a link.


Right, the td element is already consumed by the Item object, so you
can't attach your link to it.

 What exactly should I do to achive this ? What components should I add at
 server side at what JavaScript should I render at markup ?
 If I have to copy-paste bunch of Link class code it looks like some
 design/implementation problem of DataTable (or one of components it has).


What is your requirement exactly?  Is there going to be any text (or
image) in your cell?  If so, why can't it be a link?

 Its really supprising that such common issue is such problematic.
 I hope there is some simple and intuitive solution(if I find one I'll post
 it here)

 Thanks for your help
 Regards Daniel


 Michael O'Cleirigh wrote:

 Hi Daniel,

 If you subclass DefaultDataTable there is a protected method call
 newCellItem(...) that you can use to attach the onclick class onto the
 td.

 like:

 class MyDataTable extends DefaultDataTable {
  /* (non-Javadoc)
  * @see
 org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable#newCellItem(java.lang.String,
 int, org.apache.wicket.model.IModel)
  */
 @Override
 protected Item newCellItem(String id, int index, IModel model) {


 Item cell = super.newCellItem(id, index, model);


 cell.add(new AttributeAppender(onclick, new Model
 (someJavascriptCall();));

 return cell;
 }
 }

 Alternately you can use a custom column implementation like the
 FragrementColumn and add the onclick when the cell is created like:

 class MyOnClickColumn extends AbstractColumn {
 ...
 public void populateItem(Item cellItem, String componentId, IModel
 rowModel)
 {
Label cell = new Label(componentId, new PropertyModel(rowModel,
 property))

 cell.add (new AttributeAppender(onclick, new Model
 (someJavascriptCall();));

 cellItem.add(cell);
 }
 }


 I think the second version would attach the onclick to the label within
 the td/td of a cell.

 Regards,

 Mike
 I dont know wicketopia project (and any of its classes like
 FragmentColumn)
 so I can misunderstand your idea but as far as I am able to read that
 code
 It looks like you are adding a link to the table cell, not making a cell
 itself a link.

 If I understand your code it is familar to:

 tdlt;agt;textlt;/agt;/td

 but Im wondering how to achive:
 td on click=xyztext/td

 where xyz is code generated by Wicket (like in Link component class)

 If I misundestood you could you give me some more details hot to make
 cell
 itself a link ? (not adding a link to the cell) ?

 Regards
 Daniel



 jwcarman wrote:

 Here's an example where I put a remove link in a DefaultDataTable cell:

 https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.java


 On Tue, Oct 28, 2008 at 6:33 AM, dlipski [EMAIL PROTECTED]
 wrote:

 Hi

 I have one short question:
 How to make entire cell in a DataTable a link ?
 I've read that Link component can be attached not only to lt;agt;
 tags
 but
 also to any other html elements (like tr and td) but I dont know
 how
 to
 use it with DataTable API.

 Regards Daniel
 --
 View this message in context:
 http://www.nabble.com/DataTable-cell-link-tp20204702p20204702.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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








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




 --
 View this message in context: 
 http://www.nabble.com/DataTable-cell-link-tp20204702p20213839.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



LoadableDetachableModel for drop-down menu selection

2008-10-28 Thread Gianni Doe
I'm starting out with Wicket and following the Wicket In Action  
examples through and I'm a bit stuck on how to make use of a  
LoadableDetachableModel in a drop-down menu situation.


I've got a drop-down menu of countries which is populated from a  
LoadableDetachableModel, this works perfectly but my selected Country  
is then stored in the page as a complete object, I'd like to be able  
to make use of LoadableDetachableModel also for the selectedCountry  
but I'm not clear on where and how I should instantiate it.
i.e. for the example below where do I put the new  
LoadableRefDataModelCountry(selectedCountry);.


I'd appreciate some suggestions, I think I'm getting the hang of the  
Model idea but can't see the wood for the trees at the moment.




public class LocationSearchPage extends WebPage {

private DropDownChoiceCountry countryChoice;

private DropDownChoiceLocation locationChoice;

private Country selectedCountry;

private ListLocation locations = new ArrayListLocation();

private Location selectedLocation;

@SpringBean
private RefDataService refDataService;

public LocationSearchPage() {

Form searchForm = new Form(searchForm) {
@Override
protected void onSubmit() {
//...
}
};
add(searchForm);

ChoiceRenderer countryRenderer = new  
ChoiceRenderer(description, id);
IModelList? extends Country countryModel = new  
LoadableDetachableModelList? extends Country() {

@Override
protected ListCountry load() {
return refDataService.getCountries();
}
};

countryChoice = new DropDownChoiceCountry(
country, selectedCountry, countryModel,  
countryRenderer);


countryChoice.add(new  
AjaxFormComponentUpdatingBehavior(onchange) {

protected void onUpdate(AjaxRequestTarget target) {
this.selectedLocation = null;
locationChoice.setChoices(new  
ArrayListCountry(selectedCountry.getLocations()));

target.addComponent(locationChoice);
}
});

ChoiceRenderer locationRenderer = new  
ChoiceRenderer(description, id);

locationChoice = new DropDownChoiceLocation(
location, new PropertyModelLocation(this,  
selectedLocation), locations, locationRenderer);

}
}


public class LoadableRefDataModelT extends RefData extends  
LoadableDetachableModel {


@SpringBean
private RefDataService refDataService;

private ClassT type;

private Serializable id;

public LoadableRefDataModel(ClassT type, Serializable id) {
InjectorHolder.getInjector().inject(this);
this.type = type;
this.id = id;
}

public LoadableRefDataModel(T domainObject) {
super(domainObject);
InjectorHolder.getInjector().inject(this);
this.type = (ClassT) domainObject.getClass();
this.id = domainObject.getCode();
}

@Override
protected T load() {
return refDataService.load(type, id);
}
}


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



Re: DataTable cell link

2008-10-28 Thread dlipski

Exaclty, problem is with 'consuming' td element by Item object.

The problem is that if you have wide column but short text in it some users
have problem with hitting the text (which is a link) .The idea is to make
whole td element 'clickable'(or linkable). 
The solution would be if table could have any component as row or cell
element not only Item object. 
But I know that this is a big change in DataTable class (or one of its child
component class) .



jwcarman wrote:
 
 On Tue, Oct 28, 2008 at 3:05 PM, dlipski [EMAIL PROTECTED]
 wrote:

 All this solutions are correct but the problem is not in attaching some
 custom Javascript to td element (which can be done in multiple ways)
 but
 in making td element work as a link.

 
 Right, the td element is already consumed by the Item object, so you
 can't attach your link to it.
 
 What exactly should I do to achive this ? What components should I add at
 server side at what JavaScript should I render at markup ?
 If I have to copy-paste bunch of Link class code it looks like some
 design/implementation problem of DataTable (or one of components it has).

 
 What is your requirement exactly?  Is there going to be any text (or
 image) in your cell?  If so, why can't it be a link?
 
 Its really supprising that such common issue is such problematic.
 I hope there is some simple and intuitive solution(if I find one I'll
 post
 it here)

 Thanks for your help
 Regards Daniel


 Michael O'Cleirigh wrote:

 Hi Daniel,

 If you subclass DefaultDataTable there is a protected method call
 newCellItem(...) that you can use to attach the onclick class onto the
 td.

 like:

 class MyDataTable extends DefaultDataTable {
  /* (non-Javadoc)
  * @see
 org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable#newCellItem(java.lang.String,
 int, org.apache.wicket.model.IModel)
  */
 @Override
 protected Item newCellItem(String id, int index, IModel model) {


 Item cell = super.newCellItem(id, index, model);


 cell.add(new AttributeAppender(onclick, new Model
 (someJavascriptCall();));

 return cell;
 }
 }

 Alternately you can use a custom column implementation like the
 FragrementColumn and add the onclick when the cell is created like:

 class MyOnClickColumn extends AbstractColumn {
 ...
 public void populateItem(Item cellItem, String componentId, IModel
 rowModel)
 {
Label cell = new Label(componentId, new PropertyModel(rowModel,
 property))

 cell.add (new AttributeAppender(onclick, new Model
 (someJavascriptCall();));

 cellItem.add(cell);
 }
 }


 I think the second version would attach the onclick to the label within
 the td/td of a cell.

 Regards,

 Mike
 I dont know wicketopia project (and any of its classes like
 FragmentColumn)
 so I can misunderstand your idea but as far as I am able to read that
 code
 It looks like you are adding a link to the table cell, not making a
 cell
 itself a link.

 If I understand your code it is familar to:

 tdlt;agt;textlt;/agt;/td

 but Im wondering how to achive:
 td on click=xyztext/td

 where xyz is code generated by Wicket (like in Link component class)

 If I misundestood you could you give me some more details hot to make
 cell
 itself a link ? (not adding a link to the cell) ?

 Regards
 Daniel



 jwcarman wrote:

 Here's an example where I put a remove link in a DefaultDataTable
 cell:

 https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.java


 On Tue, Oct 28, 2008 at 6:33 AM, dlipski [EMAIL PROTECTED]
 wrote:

 Hi

 I have one short question:
 How to make entire cell in a DataTable a link ?
 I've read that Link component can be attached not only to lt;agt;
 tags
 but
 also to any other html elements (like tr and td) but I dont know
 how
 to
 use it with DataTable API.

 Regards Daniel
 --
 View this message in context:
 http://www.nabble.com/DataTable-cell-link-tp20204702p20204702.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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








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




 --
 View this message in context:
 http://www.nabble.com/DataTable-cell-link-tp20204702p20213839.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 

Re: DataTable cell link

2008-10-28 Thread Jeremy Thomerson
Depending on what you are linking TO, it can be very simple.  You can call
urlFor(YourBookmarkablePage.class, pageParamsOrNullIfNone).  So, you could
do:

cellItem.add(new SimpleAttributeModifier(onclick, location.href = ' +
urlFor(YourBookmarkablePage.class, pageParamsOrNullIfNone) + '));

Of course, that JS could be better for triple click problems, etc.

Really, you may just consider using another Repeater rather than DataTable.
DataTable is for a very specific purpose, and it is often easier to roll
your own than make DT fit your purpose.


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


On Tue, Oct 28, 2008 at 2:05 PM, dlipski [EMAIL PROTECTED] wrote:


 All this solutions are correct but the problem is not in attaching some
 custom Javascript to td element (which can be done in multiple ways) but
 in making td element work as a link.

 What exactly should I do to achive this ? What components should I add at
 server side at what JavaScript should I render at markup ?
 If I have to copy-paste bunch of Link class code it looks like some
 design/implementation problem of DataTable (or one of components it has).

 Its really supprising that such common issue is such problematic.
 I hope there is some simple and intuitive solution(if I find one I'll post
 it here)

 Thanks for your help
 Regards Daniel


 Michael O'Cleirigh wrote:
 
  Hi Daniel,
 
  If you subclass DefaultDataTable there is a protected method call
  newCellItem(...) that you can use to attach the onclick class onto the
  td.
 
  like:
 
  class MyDataTable extends DefaultDataTable {
   /* (non-Javadoc)
   * @see
 
 org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable#newCellItem(java.lang.String,
  int, org.apache.wicket.model.IModel)
   */
  @Override
  protected Item newCellItem(String id, int index, IModel model) {
 
 
  Item cell = super.newCellItem(id, index, model);
 
 
  cell.add(new AttributeAppender(onclick, new Model
  (someJavascriptCall();));
 
  return cell;
  }
  }
 
  Alternately you can use a custom column implementation like the
  FragrementColumn and add the onclick when the cell is created like:
 
  class MyOnClickColumn extends AbstractColumn {
  ...
  public void populateItem(Item cellItem, String componentId, IModel
  rowModel)
  {
 Label cell = new Label(componentId, new PropertyModel(rowModel,
  property))
 
  cell.add (new AttributeAppender(onclick, new Model
  (someJavascriptCall();));
 
  cellItem.add(cell);
  }
  }
 
 
  I think the second version would attach the onclick to the label within
  the td/td of a cell.
 
  Regards,
 
  Mike
  I dont know wicketopia project (and any of its classes like
  FragmentColumn)
  so I can misunderstand your idea but as far as I am able to read that
  code
  It looks like you are adding a link to the table cell, not making a cell
  itself a link.
 
  If I understand your code it is familar to:
 
  tdlt;agt;textlt;/agt;/td
 
  but Im wondering how to achive:
  td on click=xyztext/td
 
  where xyz is code generated by Wicket (like in Link component class)
 
  If I misundestood you could you give me some more details hot to make
  cell
  itself a link ? (not adding a link to the cell) ?
 
  Regards
  Daniel
 
 
 
  jwcarman wrote:
 
  Here's an example where I put a remove link in a DefaultDataTable cell:
 
 
 https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.java
 
 
  On Tue, Oct 28, 2008 at 6:33 AM, dlipski [EMAIL PROTECTED]
  wrote:
 
  Hi
 
  I have one short question:
  How to make entire cell in a DataTable a link ?
  I've read that Link component can be attached not only to lt;agt;
  tags
  but
  also to any other html elements (like tr and td) but I dont know
  how
  to
  use it with DataTable API.
 
  Regards Daniel
  --
  View this message in context:
  http://www.nabble.com/DataTable-cell-link-tp20204702p20204702.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/DataTable-cell-link-tp20204702p20213839.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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




AbstractDefaultAjaxBehavior in a panel not working when loaded from an ajax context

2008-10-28 Thread adrienleroy

Hello,

I am trying to implements this JavaScript timedatepicker
http://labs.perifer.se/timedatepicker/ as an AbstractDefaultAjaxBehavior
here my class

public class TimePickBehavior extends AbstractDefaultAjaxBehavior {

private static final CompressedResourceReference TIMEPICKER_JS = new
CompressedResourceReference(
TimePickBehavior.class, resource/jquery.timePicker.js);
private static final CompressedResourceReference TIMEPICKER_CSS = new
CompressedResourceReference(
TimePickBehavior.class, resource/timePicker.css);
private String startHourMarkupId;
private String endHourMarkupId;

public TimePickBehavior(String startHourMarkupId, String
endHourMarkupId) {
this.startHourMarkupId = startHourMarkupId;
this.endHourMarkupId = endHourMarkupId;
}

@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.renderCSSReference(TIMEPICKER_CSS);
response.renderJavascriptReference(TIMEPICKER_JS);
String timePickerJS = jQuery(function() {;
timePickerJS += $(\# + startHourMarkupId + ,# + endHourMarkupId
+ \).timePicker();;
timePickerJS += var oldTime = $.timePicker(\# + startHourMarkupId
+ \).getTime();;
timePickerJS += $(\# + startHourMarkupId + \).change(function()
{;
timePickerJS += if ($(\# + endHourMarkupId + \).val()) {;
timePickerJS += var duration = ($.timePicker(\# + endHourMarkupId
+ \).getTime() - oldTime);;
timePickerJS += var time = $.timePicker(\# + startHourMarkupId +
\).getTime();;
timePickerJS += $.timePicker(\# + endHourMarkupId +
\).setTime(new Date(new Date(time.getTime() + duration)));;
timePickerJS += oldTime = time;;
timePickerJS += };
timePickerJS += });;
timePickerJS += $(\# + endHourMarkupId + \).change(function()
{;
timePickerJS += if($.timePicker(\# + startHourMarkupId +
\).getTime()  $.timePicker(this).getTime()) {;
timePickerJS += $(this).addClass(\error\);;
timePickerJS += };
timePickerJS += else {;
timePickerJS += $(this).removeClass(\error\);}});});;
//timePickerJS += //fin du script;
response.renderJavascript(timePickerJS,null);
}

@Override
protected void respond(AjaxRequestTarget arg0) {
throw new UnsupportedOperationException(Not supported yet.);
}
}

I have a page where i call a panel in ajax with this behaviour in it. In
that case the JavaScript is not working. But if i refresh the page it is
working.
In debug mode the JavaScript generated by this behaviour is between the
header-contribution encoding=wicket1  mark-up of the response. But it
seems unevaluated.

It seems to works in a none ajax context only.

I have tried different things to find where the problem is, but i am out of
ideas.

Thanks for any help


-- 
View this message in context: 
http://www.nabble.com/AbstractDefaultAjaxBehavior-in-a-panel-not-working-when-loaded-from-an-ajax-context-tp20214617p20214617.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: DataTable cell link

2008-10-28 Thread Jeremy Thomerson
If that's your problem, I'd suggest using CSS, something like:

TD A {
display: block;
}

This is much better because the anchor will fill the box (fixing your
problem), and you are more compatible (if JS is off, etc).


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


On Tue, Oct 28, 2008 at 2:42 PM, dlipski [EMAIL PROTECTED] wrote:


 Exaclty, problem is with 'consuming' td element by Item object.

 The problem is that if you have wide column but short text in it some users
 have problem with hitting the text (which is a link) .The idea is to make
 whole td element 'clickable'(or linkable).
 The solution would be if table could have any component as row or cell
 element not only Item object.
 But I know that this is a big change in DataTable class (or one of its
 child
 component class) .



 jwcarman wrote:
 
  On Tue, Oct 28, 2008 at 3:05 PM, dlipski [EMAIL PROTECTED]
  wrote:
 
  All this solutions are correct but the problem is not in attaching some
  custom Javascript to td element (which can be done in multiple ways)
  but
  in making td element work as a link.
 
 
  Right, the td element is already consumed by the Item object, so you
  can't attach your link to it.
 
  What exactly should I do to achive this ? What components should I add
 at
  server side at what JavaScript should I render at markup ?
  If I have to copy-paste bunch of Link class code it looks like some
  design/implementation problem of DataTable (or one of components it
 has).
 
 
  What is your requirement exactly?  Is there going to be any text (or
  image) in your cell?  If so, why can't it be a link?
 
  Its really supprising that such common issue is such problematic.
  I hope there is some simple and intuitive solution(if I find one I'll
  post
  it here)
 
  Thanks for your help
  Regards Daniel
 
 
  Michael O'Cleirigh wrote:
 
  Hi Daniel,
 
  If you subclass DefaultDataTable there is a protected method call
  newCellItem(...) that you can use to attach the onclick class onto the
  td.
 
  like:
 
  class MyDataTable extends DefaultDataTable {
   /* (non-Javadoc)
   * @see
 
 org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable#newCellItem(java.lang.String,
  int, org.apache.wicket.model.IModel)
   */
  @Override
  protected Item newCellItem(String id, int index, IModel model) {
 
 
  Item cell = super.newCellItem(id, index, model);
 
 
  cell.add(new AttributeAppender(onclick, new Model
  (someJavascriptCall();));
 
  return cell;
  }
  }
 
  Alternately you can use a custom column implementation like the
  FragrementColumn and add the onclick when the cell is created like:
 
  class MyOnClickColumn extends AbstractColumn {
  ...
  public void populateItem(Item cellItem, String componentId, IModel
  rowModel)
  {
 Label cell = new Label(componentId, new PropertyModel(rowModel,
  property))
 
  cell.add (new AttributeAppender(onclick, new Model
  (someJavascriptCall();));
 
  cellItem.add(cell);
  }
  }
 
 
  I think the second version would attach the onclick to the label within
  the td/td of a cell.
 
  Regards,
 
  Mike
  I dont know wicketopia project (and any of its classes like
  FragmentColumn)
  so I can misunderstand your idea but as far as I am able to read that
  code
  It looks like you are adding a link to the table cell, not making a
  cell
  itself a link.
 
  If I understand your code it is familar to:
 
  tdlt;agt;textlt;/agt;/td
 
  but Im wondering how to achive:
  td on click=xyztext/td
 
  where xyz is code generated by Wicket (like in Link component class)
 
  If I misundestood you could you give me some more details hot to make
  cell
  itself a link ? (not adding a link to the cell) ?
 
  Regards
  Daniel
 
 
 
  jwcarman wrote:
 
  Here's an example where I put a remove link in a DefaultDataTable
  cell:
 
 
 https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/example/src/main/java/org/wicketopia/example/web/page/HomePage.java
 
 
  On Tue, Oct 28, 2008 at 6:33 AM, dlipski [EMAIL PROTECTED]
 
  wrote:
 
  Hi
 
  I have one short question:
  How to make entire cell in a DataTable a link ?
  I've read that Link component can be attached not only to lt;agt;
  tags
  but
  also to any other html elements (like tr and td) but I dont know
  how
  to
  use it with DataTable API.
 
  Regards Daniel
  --
  View this message in context:
  http://www.nabble.com/DataTable-cell-link-tp20204702p20204702.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 
 
  

Re: [Wicketstuff jQuery] not compiling?

2008-10-28 Thread Nino Saturnino Martinez Vazquez Wael

As I mentioned I saw it in the parent pom..

Here:

https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery/pom.xml

Unless! I have an old outdated version of the pom.. That could be..


Nope, seems to be an old version on our maven repo:

http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-parent/2-nojavadoc/wicketstuff-parent-2-nojavadoc.pom

So we either need to refresh that one, or even better make a new version 
so it will not break with otherstuff using it?


Martin Grigorov wrote:

I've changed it.

Since r4284 wicketstuff-parent/pom.xml has this:
 properties
java.src.version1.5/java.src.version
wicket.version1.4-m3/wicket.version
slf4j.version1.5.2/slf4j.version
runtime.logtarget/velocity.log/runtime.log
/properties


Where did you see 1.3.1 ?

Martin


On Tue, 2008-10-28 at 14:42 +0100, Nino Saturnino Martinez Vazquez Wael
wrote:
  

Hi Guys

The JQuery stuff project arent compiling, seems to be dependant on 
Wicket 1.4 and using generics. But the pom uses this parent:

groupIdorg.wicketstuff/groupId
artifactIdwicketstuff-parent/artifactId
version2-nojavadoc/version
Which includes wicket 1.3.1...

Whats up?





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

  


--
-Wicket for love

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


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



Re: spring wicket application template or example

2008-10-28 Thread Nino Saturnino Martinez Vazquez Wael
Lots Wicket Iolite, WicketTopia these are maven archetypes, and 
wicketTopia much more...


miro wrote:

I am starting   a new project with spring and wicket,  are there any wicket
spring examples which i can  use to   to get started 
  


--
-Wicket for love

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


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



Re: LoadableDetachableModel for drop-down menu selection

2008-10-28 Thread Igor Vaynberg
this should give you an idea

http://wicketinaction.com/2008/09/building-a-smart-entitymodel/

-igor

On Tue, Oct 28, 2008 at 12:27 PM, Gianni Doe [EMAIL PROTECTED] wrote:
 I'm starting out with Wicket and following the Wicket In Action examples
 through and I'm a bit stuck on how to make use of a LoadableDetachableModel
 in a drop-down menu situation.

 I've got a drop-down menu of countries which is populated from a
 LoadableDetachableModel, this works perfectly but my selected Country is
 then stored in the page as a complete object, I'd like to be able to make
 use of LoadableDetachableModel also for the selectedCountry but I'm not
 clear on where and how I should instantiate it.
 i.e. for the example below where do I put the new
 LoadableRefDataModelCountry(selectedCountry);.

 I'd appreciate some suggestions, I think I'm getting the hang of the Model
 idea but can't see the wood for the trees at the moment.



 public class LocationSearchPage extends WebPage {

private DropDownChoiceCountry countryChoice;

private DropDownChoiceLocation locationChoice;

private Country selectedCountry;

private ListLocation locations = new ArrayListLocation();

private Location selectedLocation;

@SpringBean
private RefDataService refDataService;

public LocationSearchPage() {

Form searchForm = new Form(searchForm) {
@Override
protected void onSubmit() {
//...
}
};
add(searchForm);

ChoiceRenderer countryRenderer = new ChoiceRenderer(description,
 id);
IModelList? extends Country countryModel = new
 LoadableDetachableModelList? extends Country() {
@Override
protected ListCountry load() {
return refDataService.getCountries();
}
};

countryChoice = new DropDownChoiceCountry(
country, selectedCountry, countryModel, countryRenderer);

countryChoice.add(new AjaxFormComponentUpdatingBehavior(onchange) {
protected void onUpdate(AjaxRequestTarget target) {
this.selectedLocation = null;
locationChoice.setChoices(new
 ArrayListCountry(selectedCountry.getLocations()));
target.addComponent(locationChoice);
}
});

ChoiceRenderer locationRenderer = new ChoiceRenderer(description,
 id);
locationChoice = new DropDownChoiceLocation(
location, new PropertyModelLocation(this,
 selectedLocation), locations, locationRenderer);
}
 }


 public class LoadableRefDataModelT extends RefData extends
 LoadableDetachableModel {

@SpringBean
private RefDataService refDataService;

private ClassT type;

private Serializable id;

public LoadableRefDataModel(ClassT type, Serializable id) {
InjectorHolder.getInjector().inject(this);
this.type = type;
this.id = id;
}

public LoadableRefDataModel(T domainObject) {
super(domainObject);
InjectorHolder.getInjector().inject(this);
this.type = (ClassT) domainObject.getClass();
this.id = domainObject.getCode();
}

@Override
protected T load() {
return refDataService.load(type, id);
}
 }


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



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



Re: wicket and 508 compilance

2008-10-28 Thread Johan Compagner
i also dont want to have another constructor with that title parameter

But if there are a certain amount of components that could use something for
accessibility then i am more for just a method

setTitle(IModel model)

or something like that

johan


On Tue, Oct 28, 2008 at 5:15 PM, Steve Swinsburg 
[EMAIL PROTECTED] wrote:

 Well the last post was unclear about which patch he was referring to
 (Javadoc or codebase).

 From the previous discussions, it's clear that a patch for a new
 constructor won't be considered. I will, however, get some information to
 extend the Javadocs and submit that.
 Javadco improvement Jira here:
 https://issues.apache.org/jira/browse/WICKET-1899

 Interestingly enough, a ticket was created last year to get the ball
 rolling with accessibility:
 https://issues.apache.org/jira/browse/WICKET-982

 Steve



 On 28 Oct 2008, at 16:06, James Carman wrote:

  I don't think Martijn is intentionally being vague.  DDC is a common
 abbreviation for DropDownChoice among folks within the Wicket
 community.   As for the request for a patch, that's the best way to
 get your code suggestions merged into the codebase, providing a patch.
 Please make sure you include test cases with your patch that exercise
 the new code.

 On Tue, Oct 28, 2008 at 12:02 PM, Steve Swinsburg
 [EMAIL PROTECTED] wrote:

 For the Javadoc? (please stop being so vague!)

 No worries, I'll do this up and submit it into a general accessibility
 Javadoc improvement Jira ticket.

 Steve






 On 28 Oct 2008, at 15:57, Martijn Dashorst wrote:

  On Tue, Oct 28, 2008 at 4:48 PM, Steve Swinsburg
 [EMAIL PROTECTED] wrote:


 So my vision for wanting to enforce a bit of accessibility on the web
 is
 narrow(?), but no one wants to move forward with the most simple of
 modifications to make it easier to implement accessibility. The most
 basic
 of things to do would be to update the JavaDocs for the API to say:

 NOTE: you should always include an AttributeModifier/Appender (or roll
 your
 own implementation) to include the title attribute on every link.
 here's
 some examples, etc


 Where's your patch then?

 Martijn

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




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





Meetings in the Netherlands (or neighbouring countries)

2008-10-28 Thread Harro Lissenberg
A colleague and I are getting more and more interested in Wicket and
where wondering if any meetings/presentations/lectures in or around
the Netherlands are being planned.
The community meetups page is rather out-of-date:

http://cwiki.apache.org/WICKET/community-meetups.html

So, anybody out there know of any meetings that might be worthwhile?

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



Re: Meetings in the Netherlands (or neighbouring countries)

2008-10-28 Thread Rob Sonke
Not really a meeting but at november the 12th there's the NLJug's JFall 
again with at least one wicket session. I'll be there anyway.


Rob


Harro Lissenberg wrote:

A colleague and I are getting more and more interested in Wicket and
where wondering if any meetings/presentations/lectures in or around
the Netherlands are being planned.
The community meetups page is rather out-of-date:

http://cwiki.apache.org/WICKET/community-meetups.html

So, anybody out there know of any meetings that might be worthwhile?

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

  


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



Re: Meetings in the Netherlands (or neighbouring countries)

2008-10-28 Thread Johan Compagner
me to

On Tue, Oct 28, 2008 at 9:33 PM, Rob Sonke [EMAIL PROTECTED] wrote:

 Not really a meeting but at november the 12th there's the NLJug's JFall
 again with at least one wicket session. I'll be there anyway.

 Rob



 Harro Lissenberg wrote:

 A colleague and I are getting more and more interested in Wicket and
 where wondering if any meetings/presentations/lectures in or around
 the Netherlands are being planned.
 The community meetups page is rather out-of-date:

 http://cwiki.apache.org/WICKET/community-meetups.html

 So, anybody out there know of any meetings that might be worthwhile?

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




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




[Job Posting] Wicket Web Developer in Northern California

2008-10-28 Thread Michael

Hello,

My company is looking for a web developer that has both Wicket and  
portal(Jetspeed, Liferay) experience.  Our company has recently  
adopted Wicket as our standard Java Web Framework.  You can find the  
job posting on Dice:


http://seeker.dice.com/jobsearch/servlet/JobSearch?op=302dockey=xml/7/3/[EMAIL 
PROTECTED]source=24FREE_TEXT=rating=99

Our company is located in Roseville, CA, which is just outside of  
Sacramento.  The company website is http://www.osi.com if you want  
some more general information.  Primarily we develop network and  
service management software for large telco and wireless providers.


If you are looking for a position where you can make a big impact  
while working as a team then you should strongly consider this  
opportunity.  If you apply for the position, please tell them Michael  
the Wicket guy sent you.


Thank for your time,
Michael

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



Feedback Panel on Modal Window With Field Validation does not work

2008-10-28 Thread sureshram

Hello,

  I am trying to add auto validation in the modal window but I don't see any
error messages. I added a feedback panel on a modal window which has a
required text field.  When I try to submit, the modal window does not do any
thing and I think what happens here is wicket does validation (which is
failing) and does not submit the form. It does not show error messages in
the feedbackpanel also.

public class AddAccountModalWindow extends ModalWindow {

public AddAccountModalWindow(String id) throws Exception {
super(id);
setInitialHeight(450);
setInitialWidth(500);

setTitle(Add New Account);
AddAccountContentPanel newAccPanel = new 
AddAccountContentPanel(content)
{   
private static final long serialVersionUID = 1L;

void onCancel(AjaxRequestTarget target) {
close(target);
}

};
setContent(newAccPanel);

};

}

public abstract class AddAccountContentPanel extends Panel {

public AddAccountContentPanel(String id) throws Exception {
Form accForm = new Form(accForm);
accForm.setOutputMarkupId(true);
setModel(new Model());
add(accForm);

feedbackPanel = new FeedbackPanel(feedback, new
ContainerFeedbackMessageFilter(accForm));
accForm.add(feedbackPanel);

TextField  accName = new TextField(accName, new
PropertyModel(clearingAccount, mnemonic));

   AjaxFallbackButton createAccount = new
AjaxFallbackButton(createAccount, accForm){
 protected void onSubmit(AjaxRequestTarget target,
Form form) {
//hidden code here.
 }
   }
  accForm.add(accName);
  accForm.add(createAccount);

}

}

= AddAccountContentPanel.html

html
body style=background-color:#bbd1ef
wicket:panel
wicket:panel

form wicket:id=accForm style=background-color:#bbd1ef
div style= float:left; 
div style=margin: 20px 0 0 20px;float:left 
wicket:id=feedback/div
div style=clear:both/div
div style=margin: 20px 0 0 20px;float:left
 Account Name: 
input style=font:16px Calibri; margin-left:10px; type=text
wicket:id=accName/
/div
div
input style=font: 16px Calibri; margin: 20px 0 0 120px;
wicket:id=createAccount type=submit value=Add Account /

/div
/div
/form

/wicket:panel

= AddAccountModalWindow.html

html

body style=background-color:#bbd1ef
wicket:panel
div wicket:id=content style=background-color:#bbd1ef; 
width:100%;
height: 100%/div
/wicket:panel
/body
/html



/body
/html

I apprciate your help,

Thanks
Suresh


-- 
View this message in context: 
http://www.nabble.com/Feedback-Panel-on-Modal-Window-With-Field-Validation-does-not-work-tp20216419p20216419.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Forcing property models to update

2008-10-28 Thread walnutmon

I did as you said, and have the unit tests, and read the wiki on chaining
models... something still isn't clicking though.  BTW, I have Wicket in
action and it is fantastic, perhaps there is still something elduing me
though...  I still can't wrap my head around why that property model doesn't
update in the first case you show me.  If the property model is calling that
object, and doing a get description each time it's called it's own
getObject() method, why doesn't changing the reference externally work?

If you simply point me to a page number and tell me to read until I
understand, I would be greatful!

Thanks again!
Justin


Martijn Dashorst wrote:
 
 No defensive copying happening. Just your plain old references
 updating. Read the models page on the wiki about chaining models.
 
 Put this in a unit test case:
 
 State s = new State();
 s.setDescription(I haven't read Wicket in Action but hear it helps
 solve these questions);
 PropertyModel pm = new PropertyModel(s, description);
 assertEquals(I haven't read Wicket in Action but hear it helps solve
 these questions, pm.getObject());
 
 s = new State();
 s.setDescription(I'll buy Wicket in Action, just because I now get
 why my property model doesn't know this new state yet.);
 assertEquals(I'll buy Wicket in Action, just because I now get why my
 property model doesn't know this new state yet., pm.getObject());
 
 This is basically what you are doing in your panel.
 
 but if you did:
 State s = new State(Foo);
 Model m = new Model();
 m.setObject(s);
 PropertyModel pm = new PropertyModel(m, description);
 assertEquals(Foo, pm.getObject());
 
 and now for the coup de grace:
 
 s = new State(Bar);
 m.setObject(s);
 assertEquals(Bar, pm.getObject());
 
 Martijn
 
 On Fri, Oct 24, 2008 at 3:57 PM, walnutmon [EMAIL PROTECTED]
 wrote:

 I have two panels, a view panel where you can look for news and an edit
 panel.  The edit panel has a reference to a news object and all of it's
 form elements have property models that use that object.

 When I pass a news object into the panel on creation all of the form
 elements fill as expected.  However, if I set that object through a
 setter
 in the panel class, the elements do not update.  My theory (which may be
 wrong) is that the property model makes a defensive copy and therefore is
 not linked to the object in the class.  If this is true, can I resend the
 object to the property model?

 If that's not true, any insight as to what I may be doing wrong?
 --
 View this message in context:
 http://www.nabble.com/Forcing-property-models-to-update-tp20150693p20150693.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


 
 
 
 -- 
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.4 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Forcing-property-models-to-update-tp20150693p20216529.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: wicket and 508 compilance

2008-10-28 Thread Pointbreak
I don't understand why you keep insisting that a title attribute should
always be included in an anchor. In most cases the text within the
anchor tag is enough information for what the purpose of the link is,
certainly if you think a minute about that text. In such cases a title
attribute will just confuse users with an overload of unnecessary
information. Which by the way is especially irritating for users that
use screenreaders. Yes some accessibility guideline checkers will
generate warnings or errors if you omit the title tag, but what do they
know, they are just stupid programs. 

On Tue, 28 Oct 2008 16:15:12 +, Steve Swinsburg
[EMAIL PROTECTED] said:
 Well the last post was unclear about which patch he was referring to  
 (Javadoc or codebase).
 
  From the previous discussions, it's clear that a patch for a new  
 constructor won't be considered. I will, however, get some information  
 to extend the Javadocs and submit that.
 Javadco improvement Jira here:
 https://issues.apache.org/jira/browse/WICKET-1899
 
 Interestingly enough, a ticket was created last year to get the ball  
 rolling with accessibility:
 https://issues.apache.org/jira/browse/WICKET-982
 
 Steve
 
 
 On 28 Oct 2008, at 16:06, James Carman wrote:
 
  I don't think Martijn is intentionally being vague.  DDC is a common
  abbreviation for DropDownChoice among folks within the Wicket
  community.   As for the request for a patch, that's the best way to
  get your code suggestions merged into the codebase, providing a patch.
  Please make sure you include test cases with your patch that exercise
  the new code.
 
  On Tue, Oct 28, 2008 at 12:02 PM, Steve Swinsburg
  [EMAIL PROTECTED] wrote:
  For the Javadoc? (please stop being so vague!)
 
  No worries, I'll do this up and submit it into a general  
  accessibility
  Javadoc improvement Jira ticket.
 
  Steve
 
 
 
 
 
 
  On 28 Oct 2008, at 15:57, Martijn Dashorst wrote:
 
  On Tue, Oct 28, 2008 at 4:48 PM, Steve Swinsburg
  [EMAIL PROTECTED] wrote:
 
  So my vision for wanting to enforce a bit of accessibility on the  
  web is
  narrow(?), but no one wants to move forward with the most simple of
  modifications to make it easier to implement accessibility. The  
  most
  basic
  of things to do would be to update the JavaDocs for the API to say:
 
  NOTE: you should always include an AttributeModifier/Appender  
  (or roll
  your
  own implementation) to include the title attribute on every link.  
  here's
  some examples, etc
 
  Where's your patch then?
 
  Martijn
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



Re: GMap2 - GInfoWindow

2008-10-28 Thread Martin Funk

Jeremy Thomerson wrote:
I'm not sure who maintains GMap2 (Martin F?) 

I guess one could say that :-)

- but I just created a class
that allows me to show an info window when a GMarker is clicked.  This could
actually be abstracted to allow other calls on a GMarker fairly easily.

Two questions:
1 - is there a better way already built in?  (I couldn't find one)
  

It's hard to say what way is better. Look at what we've done in
wicket.contrib.examples.gmap.top.HomePage
I think it pretty much implements the same as what you came up with.
But it does it in an ajax way, clicking a Marker sends an ajax call to 
the server, which generates what has to show up in the Infowindow and 
sends it back.
As I understand your code example the html for the InfoWindow has to be 
known by the time the marker is inserted in the map.

Which might suite your needs.


2 - can you use this class or a better method to include this functionality
in GMap2?
  
If you want your code to be preserved for others, come up with a patch 
for wicket-contrib-gmap2-examples.
And if you are desperate you could ask for commit rights on the 
userlist, and do it yourself.


Feel free  have fun,

Martin

Thanks for the GMap2 contribution!!

(Class pasted below)

  



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



Re: [Wicketstuff jQuery] not compiling?

2008-10-28 Thread Martin Grigorov
I've updated and build locally all projects that extends
wicketstuff-parent when I changed the dependency and everything was
fine.

But ... the 1.3.x projects
(https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x)
still depends on wicketstuff-parent:2-nojavadoc...
Ok, I will update the version of wicketstuff-parent in trunk. After that
a new snapshot of it should be build and all 1.4-SNAPSHOT (trunk)
project should be ok again.

Last time when I checked WicketStuff's TeamCity it didn't work - the
synchronization from SF.net had problems. Is this fixed now ?

Martin

On Tue, 2008-10-28 at 20:52 +0100, Nino Saturnino Martinez Vazquez Wael
wrote:
 As I mentioned I saw it in the parent pom..
 
 Here:
 
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery/pom.xml
 
 Unless! I have an old outdated version of the pom.. That could be..
 
 
 Nope, seems to be an old version on our maven repo:
 
 http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-parent/2-nojavadoc/wicketstuff-parent-2-nojavadoc.pom
 
 So we either need to refresh that one, or even better make a new version 
 so it will not break with otherstuff using it?
 
  Martin Grigorov wrote:
  I've changed it.
 
  Since r4284 wicketstuff-parent/pom.xml has this:
   properties
  java.src.version1.5/java.src.version
  wicket.version1.4-m3/wicket.version
  slf4j.version1.5.2/slf4j.version
  runtime.logtarget/velocity.log/runtime.log
  /properties
 
 
  Where did you see 1.3.1 ?
 
  Martin
 
 
  On Tue, 2008-10-28 at 14:42 +0100, Nino Saturnino Martinez Vazquez Wael
  wrote:

  Hi Guys
 
  The JQuery stuff project arent compiling, seems to be dependant on 
  Wicket 1.4 and using generics. But the pom uses this parent:
  groupIdorg.wicketstuff/groupId
  artifactIdwicketstuff-parent/artifactId
  version2-nojavadoc/version
  Which includes wicket 1.3.1...
 
  Whats up?
 
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

 


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



Wicket and URLs

2008-10-28 Thread S D

Hi,

I was browsing through examples, it looks very impressive but there's a thing 
that bothers me somewhat. The Basic Label example uses the following URL:

http://wicketstuff.org/wicket13/compref/;jsessionid=F8C6R0F2601C96D1Y3CAD8B69E8779D4?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.LabelPage

The problem with that is that we'd like to have an appearance of a technology 
neutral site (or at least not to be blatant about it) but Jsessionid and 
especially 
wicket:bookmarkablePage=:org.apache.wicket.examples.compref.LabelPage 
destroy that impression completely.

I understand it's possible to remove Jsessionid from URL but what about 
Wicket's contribution to the URL? We'd like to keep our URLs as clean and 
readable as possible.

Thanks




  


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



Re: [Wicketstuff jQuery] not compiling?

2008-10-28 Thread Martin Grigorov
Ok, I just updated wicketstuff-patent and all projects that extend it ( 
wicketstuff-annotation/pom.xml
wicketstuff-jquery/pom.xml
wicketstuff-jquery-examples/pom.xml
wicketstuff-misc/pom.xml
wicketstuff-objectautocomplete/pom.xml ) to ver. 1.4-SNAPSHOT

The only project in trunk that still depends on the old version
(2-nojavadoc) is wicketstuff-simile-timeline. It doesn't build locally
because it has unresolved dependencies to net.sf.json classes. There is
no Maven dependency to them...

@Arnout: Could you please check what is wrong when you have time?
Thanks !

Martin


On Wed, 2008-10-29 at 00:43 +0200, Martin Grigorov wrote:
 I've updated and build locally all projects that extends
 wicketstuff-parent when I changed the dependency and everything was
 fine.
 
 But ... the 1.3.x projects
 (https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-1.3.x)
 still depends on wicketstuff-parent:2-nojavadoc...
 Ok, I will update the version of wicketstuff-parent in trunk. After that
 a new snapshot of it should be build and all 1.4-SNAPSHOT (trunk)
 project should be ok again.
 
 Last time when I checked WicketStuff's TeamCity it didn't work - the
 synchronization from SF.net had problems. Is this fixed now ?
 
 Martin
 
 On Tue, 2008-10-28 at 20:52 +0100, Nino Saturnino Martinez Vazquez Wael
 wrote:
  As I mentioned I saw it in the parent pom..
  
  Here:
  
  https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-jquery/pom.xml
  
  Unless! I have an old outdated version of the pom.. That could be..
  
  
  Nope, seems to be an old version on our maven repo:
  
  http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-parent/2-nojavadoc/wicketstuff-parent-2-nojavadoc.pom
  
  So we either need to refresh that one, or even better make a new version 
  so it will not break with otherstuff using it?
  
   Martin Grigorov wrote:
   I've changed it.
  
   Since r4284 wicketstuff-parent/pom.xml has this:
properties
   java.src.version1.5/java.src.version
   wicket.version1.4-m3/wicket.version
   slf4j.version1.5.2/slf4j.version
   runtime.logtarget/velocity.log/runtime.log
   /properties
  
  
   Where did you see 1.3.1 ?
  
   Martin
  
  
   On Tue, 2008-10-28 at 14:42 +0100, Nino Saturnino Martinez Vazquez Wael
   wrote:
 
   Hi Guys
  
   The JQuery stuff project arent compiling, seems to be dependant on 
   Wicket 1.4 and using generics. But the pom uses this parent:
   groupIdorg.wicketstuff/groupId
   artifactIdwicketstuff-parent/artifactId
   version2-nojavadoc/version
   Which includes wicket 1.3.1...
  
   Whats up?
  
   
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
 
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: spring wicket application template or example

2008-10-28 Thread shetc

See Wicket In Action, Chapter 13.
-- 
View this message in context: 
http://www.nabble.com/spring--wicket--application--template-or-example-tp20211466p20218516.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket and URLs

2008-10-28 Thread Scott Swank
One option is to define urls in your application:

   mountBookmarkablePage(/Tour, TourBrowsePage.class);

On Tue, Oct 28, 2008 at 4:03 PM, S D [EMAIL PROTECTED] wrote:

 Hi,

 I was browsing through examples, it looks very impressive but there's a thing 
 that bothers me somewhat. The Basic Label example uses the following URL:

 http://wicketstuff.org/wicket13/compref/;jsessionid=F8C6R0F2601C96D1Y3CAD8B69E8779D4?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.LabelPage

 The problem with that is that we'd like to have an appearance of a technology 
 neutral site (or at least not to be blatant about it) but Jsessionid and 
 especially 
 wicket:bookmarkablePage=:org.apache.wicket.examples.compref.LabelPage
 destroy that impression completely.

 I understand it's possible to remove Jsessionid from URL but what about 
 Wicket's contribution to the URL? We'd like to keep our URLs as clean and 
 readable as possible.

 Thanks







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



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



Re: Wicket and URLs

2008-10-28 Thread S D

But what if the URL is dynamic like, for example, is this google URL that 
points to the second page of results:

http://www.google.com/search?hl=enq=wicketstart=10sa=N

Thanks

--- On Tue, 10/28/08, Scott Swank [EMAIL PROTECTED] wrote:

 One option is to define urls in your application:
 
mountBookmarkablePage(/Tour,
 TourBrowsePage.class);


 On Tue, Oct 28, 2008 at 4:03 PM, S D
 [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I was browsing through examples, it looks very
 impressive but there's a thing that bothers me somewhat.
 The Basic Label example uses the following URL:
 
 
 http://wicketstuff.org/wicket13/compref/;jsessionid=F8C6R0F2601C96D1Y3CAD8B69E8779D4?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.LabelPage
 
  The problem with that is that we'd like to have an
 appearance of a technology neutral site (or at least not to
 be blatant about it) but Jsessionid and especially
 wicket:bookmarkablePage=:org.apache.wicket.examples.compref.LabelPage
  destroy that impression completely.
 
  I understand it's possible to remove Jsessionid
 from URL but what about Wicket's contribution to the
 URL? We'd like to keep our URLs as clean and readable as
 possible.
 
  Thanks



  


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



Re: Wicket and URLs

2008-10-28 Thread Scott Swank
Those will be available to you in the YourPage(PageParameters
parameters) constructor.

On Tue, Oct 28, 2008 at 5:08 PM, S D [EMAIL PROTECTED] wrote:

 But what if the URL is dynamic like, for example, is this google URL that 
 points to the second page of results:

 http://www.google.com/search?hl=enq=wicketstart=10sa=N

 Thanks

 --- On Tue, 10/28/08, Scott Swank [EMAIL PROTECTED] wrote:

 One option is to define urls in your application:

mountBookmarkablePage(/Tour,
 TourBrowsePage.class);


 On Tue, Oct 28, 2008 at 4:03 PM, S D
 [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I was browsing through examples, it looks very
 impressive but there's a thing that bothers me somewhat.
 The Basic Label example uses the following URL:
 
 
 http://wicketstuff.org/wicket13/compref/;jsessionid=F8C6R0F2601C96D1Y3CAD8B69E8779D4?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.LabelPage
 
  The problem with that is that we'd like to have an
 appearance of a technology neutral site (or at least not to
 be blatant about it) but Jsessionid and especially
 wicket:bookmarkablePage=:org.apache.wicket.examples.compref.LabelPage
  destroy that impression completely.
 
  I understand it's possible to remove Jsessionid
 from URL but what about Wicket's contribution to the
 URL? We'd like to keep our URLs as clean and readable as
 possible.
 
  Thanks






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



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



Re: Wicket and URLs

2008-10-28 Thread S D
--- On Wed, 10/29/08, Scott Swank [EMAIL PROTECTED] wrote:

 Those will be available to you in the
 YourPage(PageParameters
 parameters) constructor.
 

So, if I understand you correctly, I'd have to call mountBookmarkablePage() for 
all wicket URLs used in the application. Sounds somewhat tedious but should be 
doable.

No simpler way to achieve this?

Thanks





  


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



Re: Wicket and URLs

2008-10-28 Thread Jeremy Thomerson
You can also mount all pages in a package with one single call.   You will
find this in old emails on the list, blogs, etc..

Google search for wicket mount package:
http://www.google.com/search?hl=enrls=com.microsoft%3A*q=wicket+bookmarkable+urls

The third result:
http://www.javalobby.org/java/forums/t68753.html

And in that page:
mount(/main, PackageName.forClass(AlohaPage.class));

Hope this helps!

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


On Tue, Oct 28, 2008 at 7:43 PM, S D [EMAIL PROTECTED] wrote:

 --- On Wed, 10/29/08, Scott Swank [EMAIL PROTECTED] wrote:

  Those will be available to you in the
  YourPage(PageParameters
  parameters) constructor.
 

 So, if I understand you correctly, I'd have to call mountBookmarkablePage()
 for all wicket URLs used in the application. Sounds somewhat tedious but
 should be doable.

 No simpler way to achieve this?

 Thanks








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




Re: Wicket and URLs

2008-10-28 Thread Igor Vaynberg
all of these are for entry urls. urls that link to page instances or
after a form submit will still be
?wicket:interface=:4:foo.bar:ILinkListener

if you are that concerned with urls wicket might not be for you. you
give up control over urls for the convinience of not having to deal
with them.

-igor

On Tue, Oct 28, 2008 at 5:43 PM, S D [EMAIL PROTECTED] wrote:
 --- On Wed, 10/29/08, Scott Swank [EMAIL PROTECTED] wrote:

 Those will be available to you in the
 YourPage(PageParameters
 parameters) constructor.


 So, if I understand you correctly, I'd have to call mountBookmarkablePage() 
 for all wicket URLs used in the application. Sounds somewhat tedious but 
 should be doable.

 No simpler way to achieve this?

 Thanks








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



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



Re: Wicket and URLs

2008-10-28 Thread Pablo Abad
Yet another option is to alter the way the URL is coded, though an
IRequestCodingStrategy implementation.
Here are some real examples of how coded urls look:
http://localhost:8080/sga/app/?x=KSuTW5bYBW8iAGSiUeZAF1yzeKycRi5Ob74j2paSOEq3wdTRhBvya*bkbZWOzsXCnbeqR9KlO5rbiYq3d1qPOhlyjMglN8f089MFpg**7hMqGJzL6-GRXQ
http://localhost:8080/sga/app/?x=xwW6dJ7ZC-ZriWTqNWvu**XkWA4ZrVPgSP0joZB5Y8FHRPPfAB*liaDzGAJSEBpw1UX2TC68melk4n8Mzrb*5w



Scott Swank wrote:
 One option is to define urls in your application:

mountBookmarkablePage(/Tour, TourBrowsePage.class);

 On Tue, Oct 28, 2008 at 4:03 PM, S D [EMAIL PROTECTED] wrote:
   
 Hi,

 I was browsing through examples, it looks very impressive but there's a 
 thing that bothers me somewhat. The Basic Label example uses the following 
 URL:

 http://wicketstuff.org/wicket13/compref/;jsessionid=F8C6R0F2601C96D1Y3CAD8B69E8779D4?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.LabelPage

 The problem with that is that we'd like to have an appearance of a 
 technology neutral site (or at least not to be blatant about it) but 
 Jsessionid and especially 
 wicket:bookmarkablePage=:org.apache.wicket.examples.compref.LabelPage
 destroy that impression completely.

 I understand it's possible to remove Jsessionid from URL but what about 
 Wicket's contribution to the URL? We'd like to keep our URLs as clean and 
 readable as possible.

 Thanks

 


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



Re: Feedback Panel on Modal Window With Field Validation does not work

2008-10-28 Thread 张伟
try page not panel

2008/10/29 sureshram [EMAIL PROTECTED]


 Hello,

  I am trying to add auto validation in the modal window but I don't see any
 error messages. I added a feedback panel on a modal window which has a
 required text field.  When I try to submit, the modal window does not do
 any
 thing and I think what happens here is wicket does validation (which is
 failing) and does not submit the form. It does not show error messages in
 the feedbackpanel also.

 public class AddAccountModalWindow extends ModalWindow {

public AddAccountModalWindow(String id) throws Exception {
super(id);
setInitialHeight(450);
setInitialWidth(500);

setTitle(Add New Account);
AddAccountContentPanel newAccPanel = new
 AddAccountContentPanel(content)
 {
private static final long serialVersionUID = 1L;

void onCancel(AjaxRequestTarget target) {
close(target);
}

};
setContent(newAccPanel);

};

 }

 public abstract class AddAccountContentPanel extends Panel {

 public AddAccountContentPanel(String id) throws Exception {
Form accForm = new Form(accForm);
accForm.setOutputMarkupId(true);
setModel(new Model());
add(accForm);

feedbackPanel = new FeedbackPanel(feedback, new
 ContainerFeedbackMessageFilter(accForm));
accForm.add(feedbackPanel);

TextField  accName = new TextField(accName, new
 PropertyModel(clearingAccount, mnemonic));

   AjaxFallbackButton createAccount = new
 AjaxFallbackButton(createAccount, accForm){
 protected void onSubmit(AjaxRequestTarget target,
 Form form) {
//hidden code here.
 }
   }
  accForm.add(accName);
  accForm.add(createAccount);

 }

 }

 = AddAccountContentPanel.html

 html
 body style=background-color:#bbd1ef
 wicket:panel
 wicket:panel

 form wicket:id=accForm style=background-color:#bbd1ef
 div style= float:left; 
div style=margin: 20px 0 0 20px;float:left
 wicket:id=feedback/div
div style=clear:both/div
div style=margin: 20px 0 0 20px;float:left
 Account Name:
input style=font:16px Calibri; margin-left:10px;
 type=text
 wicket:id=accName/
/div
 div
input style=font: 16px Calibri; margin: 20px 0 0 120px;
 wicket:id=createAccount type=submit value=Add Account /

/div
 /div
 /form

 /wicket:panel

 = AddAccountModalWindow.html

 html

 body style=background-color:#bbd1ef
wicket:panel
div wicket:id=content style=background-color:#bbd1ef;
 width:100%;
 height: 100%/div
/wicket:panel
 /body
 /html



 /body
 /html

 I apprciate your help,

 Thanks
 Suresh


 --
 View this message in context:
 http://www.nabble.com/Feedback-Panel-on-Modal-Window-With-Field-Validation-does-not-work-tp20216419p20216419.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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




Re: problem with PropertyModel and setDefaultFormProcessing(false) for button

2008-10-28 Thread Pablo Abad
Seems a typo either in the code you pasted or in your actual code, but
shouldn't the first line be something like name = item.getName(); ?
(gameItem -- item)
 On Tue, Oct 28, 2008 at 11:41 AM, itayh [EMAIL PROTECTED] wrote:
 
 protected void onEditItem(Item item) {
name = gameitem.getName();
addItemsForm.setVisible(true);
 }
   

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



  1   2   >