Java Wicket outsourcing software development

2017-10-27 Thread Marc de GOUTTES
Our company, PITI, based in French Polynesia, is developing applications
using the following technologies :

Mandatory :
- Wicket
- Hibernate
- Spring
Optional :
- Portlet
- Liferay

We have been using Java/Wicket for a long time (more than 10 years).

We are looking for free-lance Java developers to outsource parts of our
works, several times in the year, and we are hoping to establish a long time
collaboration.

It should be better if you have basic knowledge in French, but it is not
mandatory.

Feel free to have a look at our web site : www.piti.pf.

Please, don't hesitate to PM me if you are interested. 

Marc.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Wicket Spring Boot Article

2017-04-02 Thread Marc
Hey

sorry Tobias, I've had some problems with the Spring intetration. I don't
remember exactly what the problem was but it was a little bit frustrating so
that I'm lost the sight of it (Spring AOP / AspectJ related - no direct
relation to your project) .

@Andrea I've subscribed the mailing list :). Thanks for the article! 

Btw I've just released version 2.0.1 which uses Wicket 8.0.0-M5.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-Boot-Article-tp4677570p4677575.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket Websocket - Exception is logged in WicketEndpoint if the user is closing the browser

2017-01-28 Thread Marc
It seems that this exception only occurs in Google Chrome...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Websocket-Exception-is-logged-in-WicketEndpoint-if-the-user-is-closing-the-browser-tp4676886p4676889.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Wicket Websocket - Exception is logged in WicketEndpoint if the user is closing the browser

2017-01-27 Thread Marc
Hi,

I've a page with a WebSocketBehavior. Everything is OK until the user is
closing the browser or tab. An exception is logged in
org.apache.wicket.protocol.ws.javax.WicketEndpoint. 

I don't know if this kind of exception should reach the onError method.
Everything is working fine but the error message is annoying. Is it really
an error which should be logged?

I've created a quickstart attached. websockets.zip
  

Thanks!

2017-01-27 20:55:44.672 ERROR 18092 --- [nio-8080-exec-2]
o.a.w.protocol.ws.javax.WicketEndpoint   : An error occurred in web socket
connection with id : 1

java.io.IOException: java.io.IOException: Eine bestehende Verbindung wurde
softwaregesteuert
durch den Hostcomputer abgebrochen (an existing connection was forcibly
closed by the remote host)
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:315)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:258)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:606)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:526)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:348)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:290)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:131)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:69)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
[tomcat-embed-core-8.5.6.jar:8.5.6]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[na:1.8.0_91]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[na:1.8.0_91]
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[tomcat-embed-core-8.5.6.jar:8.5.6]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
Caused by: java.io.IOException: Eine bestehende Verbindung wurde
softwaregesteuert
durch den Hostcomputer abgebrochen
at sun.nio.ch.SocketDispatcher.write0(Native Method) ~[na:1.8.0_91]
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
~[na:1.8.0_91]
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) 
~[na:1.8.0_91]
at sun.nio.ch.IOUtil.write(IOUtil.java:65) ~[na:1.8.0_91]
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
~[na:1.8.0_91]
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1221)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:451)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:441)
~[tomcat-embed-core-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:97)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:494)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
at
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:309)
~[tomcat-embed-websocket-8.5.6.jar:8.5.6]
... 17 common frames omitted

--
View this message in context

Re: Reload Wicket classes/markup without reloading Servlet Container

2016-09-06 Thread Marc
Spring Boot users can use Spring Boot developer tools:
http://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html

Not comparable to JRebel but does the job quite well.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Reload-Wicket-classes-markup-without-reloading-Servlet-Container-tp4675422p4675449.html
Sent from the Users forum mailing list archive at Nabble.com.

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



examples7x.wicket.apache.org not available

2016-06-08 Thread Marc Ende
Hi,

I've seen that the http://examples7x.wicket.apache.org/ is currently not
available. There is an proxy error.
It would be great if the examples would be available soon, they're a
great resource. ;)

Cheers
Marc

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



Wicket & Spring Boot

2015-11-12 Thread Marc
Hi all,
it's my first post, so I'm hopefully subscribed to the mailing list.

Is there currently any Spring Boot integration support? 

I've started with a Spring Boot Wicket integration:  wicket-spring-boot
  .

Besides the maven pom.xml you currently only need thisconfiguration class: 
WicketApplication.java

  
to get a full working wicket application. You only have to execute the main
method. You should get a default login page and a simple home page. Spring
security is automatically configured in a default configuration. Within a
property file you can switch between deployment or development configruation

wicket.configurationType=DEPLOYMENT
wicket.compressHTMLEnabled=true  HTMLCompressingConfig.java

  
wicket.statelessCheckerEnabled=true  StatelessCheckerConfig.java

  

My main goal was to learn a bit about Spring Boot but maybe its interessing
for somone in the Wicket community

GreetsMarc

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-Boot-tp4672591.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Persisting optional fields (null vs empty object)

2013-03-05 Thread Marc Nuri San Félix
Hi Pureza

If you are using an MVC architecture, this problem can be addressed in the
controller. You should check the address field on the save event and if its
values are empty, just set the address null.

On the other hand, if there is an option to set the address as a whole as a
null value, in the user interface you should give this option too. The
panel to edit the address fields should only be visible if the address
field is not null. And the user should have an option to toggle the panel.

Cheers
--
Marc Nuri
www.marcnuri.com


On Tue, Mar 5, 2013 at 3:46 PM, pureza  wrote:

> Hi Sven,
>
> Thanks for your reply. Your solution works, but unfortunately I have too
> many optional fields and the resulting code feels kind of unnatural.
>
> The way I applied your solution was by creating the TextFields without any
> model (or with an empty model, to be precise). Then, convertInput() gets
> the
> input from all the TextFields and creates the Address instance manually (or
> sets it to null if they're all empty).
>
> As I said, I believe this results in a lot of manual work and goes against
> the Wicket way of doing things.
>
> It would seem to me that this is a common problem, no? How do people deal
> with this usually?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Persisting-optional-fields-null-vs-empty-object-tp4656979p4656992.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
I bet we are getting to the source of the problem.

Non light-weight columns like yours, create the components just once when
the grid is first rendered. So the model instances you pass when you create
the Component will remain the same even if you update the grid.

I believe non-lightweight columns where designed as a means to create
editable rows and shouldn't be used otherwise.

I don't think you really need to use a component for what you are trying to
accomplish.
Maybe you should override "public IRenderable newCell(IModel
rowModel)" instead and write whatever markup you need directly to the
response.

Hope it helps
--
Marc Nuri
www.marcnuri.com


On Mon, Mar 4, 2013 at 7:13 PM, saty  wrote:

> Actually i have overridden
> public Component newCell(WebMarkupContainer parent, String componentId,
> IModel rowModel)
> {
> ...
> }
>
> to use a separate panel for cell content, due to other functions, will not
> make any difference?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/inmethod-grid-refresh-issue-tp4656910p4656952.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
You should start debugging your project instead of using "print" to see
what is really happening (call stack, variable values...).

PropertyColumn always calls the get method of your model object:

@Override
public IRenderable newCell(IModel rowModel)
{
return new IRenderable()
{
public void render(IModel rowModel, Response response)
{
CharSequence value = getValue(rowModel);
if (value != null)
{
response.write(value);
}
}
};
}

private CharSequence getValue(IModel rowModel)
{
I rowObject = getModelObject(rowModel);
P property = null;
if (rowObject != null)
{
try
{
property = getProperty(rowObject, getPropertyExpression());
}
catch (NullPointerException e)
{

}
}
CharSequence string = convertToString(property);
if (isEscapeMarkup() && string != null)
{
string = Strings.escapeMarkup(string.toString());
}
return string;
}





On Mon, Mar 4, 2013 at 6:11 PM, saty  wrote:

> Also i put a print on every getter but it only prints on first call on a
> set
> of rows, if you filter among those rows its never get called, i suspect the
> grid has rows cached and its assuming nothing changed so using those rows
> again as a subset of previously created rows.
>
> Thanks
>
>
>
>
>
>


Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
In your IDataSource code, you left out the implementation "public
IModel model(MyModel object);", I'm quite suspicious that your
models are the source of the problem.
I'm assuming that you are using PropertyColumns in your grid, with these
columns, your getter method should be getting called every time.
You also say "...that may return different value if the context changes..."
what does "context" stand for?
--
Marc Nuri
www.marcnuri.com


On Mon, Mar 4, 2013 at 5:39 PM, saty  wrote:

> Its a regular java bean with properties and setter and getter methods.
> Grid uses the expression to map a column to a particular property on row
> model (MyModel).
>
> Thanks
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/inmethod-grid-refresh-issue-tp4656910p4656945.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
What's the code for MyModel?
--
Marc Nuri
www.marcnuri.com


On Mon, Mar 4, 2013 at 5:14 PM, saty  wrote:

> public class DataSource implements IDataSource {
> private Filter myModelFilterChain;
> public DataSource(FilterChain myModelFilterChain)
> {
> this.myModelFilterChain= myModelFilterChain;
>
> }
>
> @Override
> public void detach() {//.
>
> }
>
> @Override
> public void query(com.inmethod.grid.IDataSource.IQuery query,
>
> com.inmethod.grid.IDataSource.IQueryResult result) {
>
>  //all rows are already cached..use myModelFilterChain
> above to filter
> List MyModels...
> result.setTotalCount(MyModels.size());
> int from = MyModels.size() > query.getFrom() ?
> query.getFrom() :
> MyModels.size();
> int to = MyModels.size() > from + query.getCount() ? from +
> query.getCount() : MyModels.size();
> List resultList = MyModels.subList((int)from,
> (int)to);
> result.setItems(resultList.iterator());
> stopWatch.stop();
> }
>
> }
>
>
> copied relevant potion above, i can see query method is called every time,
> no issues there.
>
> Thanks
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/inmethod-grid-refresh-issue-tp4656910p4656942.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
The problem must be in your row models.
What does your IDataSource implementation look like?
--
Marc Nuri
www.marcnuri.com


On Mon, Mar 4, 2013 at 4:55 PM, saty  wrote:

> grid.markAllItemsDirty();
> grid.update();
> This does not help, for some reason grid is smart not to regenerate a row
> for a model it already did.
> I can see my getXXX method is called by grid only first time and than its
> never get called again so the column shows what was calculated for the
> first
> call.
>
> To be more specific, if the grid shows 20 rows and than i filter to show 10
> out of those 20 rows, it does not call the getXXX methods on my model
> object.
>
> However If i change filter setting so it has to now show 30 rows (20
> previous and say 10 other rows) , it does call the getXXX methods again.
>
> Not really sure what controls this behaviors and how to override it.
> Thanks
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/inmethod-grid-refresh-issue-tp4656910p4656940.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
Ok, I see.
Either way if it is a DataGrid, calling markAllItemsDirty() and update()
from your ajax request should do the job.
--
Marc Nuri
www.marcnuri.com


On Mon, Mar 4, 2013 at 4:35 PM, saty  wrote:

> Thanks Marc, i will take a look at these methods if they can help, however
> my
> equals method can not help here as i said previously some columns are
> derived in the sense they dont return an attribute of the object but a
> value
> which is derived from the context (and object state) in which the method is
> called.
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/inmethod-grid-refresh-issue-tp4656910p4656938.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: inmethod-grid refresh issue

2013-03-04 Thread Marc Nuri San Félix
Hello Saty

You should check methods "markItemDirty(IModel model)",
"markAllItemsDirty()" and "update()". This are the methods you are supposed
to be calling when refreshing the grid's content.

You should also make sure that the equals() method of your model objects
return false when both objects aren't equal...

Cheers
--
Marc Nuri
www.marcnuri.com


On Mon, Mar 4, 2013 at 4:20 PM, saty  wrote:

> Any thoughts on this please?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/inmethod-grid-refresh-issue-tp4656910p4656936.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: motion jpeg and wicket

2013-01-14 Thread Marc Nuri San Félix
Ernesto I prefer to have all my URL mappings centralized, so I try to use
the Wicket way where available. Although it's interesting to know that you
can access wicket Session this way.

What I'd really do is try to proxy/tunnel the stream directly from the
webcam to the client using an appropriate format once I've checked the
request is from an identified client. This would be the most memory
efficient way.
I suppose that if the webcam offers some kind of streamable video format
 (instead of buffered images), you could forward the response output from
the webcam to the client. This way the client would make a single request
to your wicket server and cpu and memory usage would be minimized.

Regards
--
Marc Nuri
www.marcnuri.com


On Mon, Jan 14, 2013 at 10:30 AM, Decebal Suiu  wrote:

> Hi Marc
>
> Thanks for response. A custom Mapper with a RequestHandler that do my job
> was one of ideas but onRespond I must implement a while loop and I know if
> it's ok.
>
> For example:
> public void respond(IRequestCycle requestCycle) {
>// se content type to "multipart/x-mixed-replace;boundary=myboundry"
>// set no cache
>// send grab images
> while (!stop) {
> // send next images
> // sleep some milliseconds related to FPS (frames on second)
> }
> }
>
> A solution is to use an external servlet that handles request related to
> webcam or a wicket push technic.
> For me, wicket is a (nice) hammer on web development and the problem is
> that
> I intend to resolve all problems this hammer :)
>
> Best regards,
> Decebal
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/motion-jpeg-and-wicket-tp4655294p4655340.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: motion jpeg and wicket

2013-01-14 Thread Marc Nuri San Félix
Hello
The complex way of solving your problem would be by means of an
IRequestHandler and an IRequestMapper. I use this same system to generate
JSON responses in my projects without the need of using another servlet
thus sharing all of my wicket Session security information.

Your IRequestHandler should proxy the WebCam output to your response in a
way similar to this:

public void respond(IRequestCycle requestCycle) {
//Send bytes to the response you would need to gather your bytes first
requestCycle.getResponse().write(/* bytes*/);
//Get direct acces to outputStream so you can send bytes without holding
them in memory...
requestCycle.getResponse().getOutputStream();
//This may also be useful
if (requestCycle.getResponse() instanceof WebResponse) {
((WebResponse)
requestCycle.getResponse()).setContentType("YOUR/MIME/TYPE;
charset=YOUR-CONTENT-ENCODING");
}
}

Then you should program some kind of IRequestMapper that will handle your
Requests and return your custom IRequestHandler.

Regards
--
Marc Nuri
www.marcnuri.com


On Fri, Jan 11, 2013 at 11:19 PM, Martin Grigorov wrote:

> You may try to push the updates with Atmosphere/Native WebSockets.
>
> Also see https://github.com/videlalvaro/gifsockets. May be useful for you.
>
>
> On Sat, Jan 12, 2013 at 12:14 AM, Decebal Suiu 
> wrote:
>
> > Hi
> >
> > @Marc Implementation using AjaxSelfUpdatingTimerBehavior is better that
> > nothing, it's quick and dirty but it's not scalable. Think at some
> webcams
> > on the same page with a FPS (frame per second) around 5.
> >
> > @Ernesto Cabzola has a streamer based on "multipart/x-mixed-replace" mime
> > type but it uses a SocketServer to servers the clients and I want to use
> my
> > servlet container that host my wicket application. I can use
> mjpg-streamer
> > [1] or motion [2] to achieve the same functionality but I don't want to
> > install additional software on my machine.
> >
> > Also I can write a StreamerServlet that serves requests related  to
> motion
> > jpeg but my idea is to use the security, page parameters from my wicket
> > application. For example on
> http://webcamapp/webcam?fps=2&webcamId=1request
> > I want to have the freedom to response with a "multipart/x-mixed-replace"
> > mime type and writing my image bytes on response.getOutputStream(); I
> want
> > here to do what I must do in a StreamerServlet [3] . Is it possible to
> have
> > access completely to http response from wicket? Must I use a mapper or a
> > bookmarkable page? Does my idea make sense?
> >
> > Another idea of mine is to use websocket (I want to explore more on this
> > field :)) but I don't know if it's recommended for my scenario.
> >
> >
> > [1] http://sourceforge.net/projects/mjpg-streamer/
> > [2] http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome
> >
> > [3] out.writeBytes("Content-Type: multipart/x-mixed-replace;boundary=" +
> > BOUNDARY + "\r\n");
> >  out.writeBytes("\r\n");
> >  out.writeBytes("--" + BOUNDARY + "\n");
> >
> >  byte[] imageBytes = ... ;
> >  while (true) {
> >   out.writeBytes("Content-type: image/jpeg\n\n");
> >   out.write(imageBytes); // pseudo code
> >   out.writeBytes("--" + BOUNDARY + "\n");
> >   out.flush();
> >   Thread.sleep(500);
> >  }
> >
> >
> > Best regards,
> > Decebal
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/motion-jpeg-and-wicket-tp4655294p4655309.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>


Re: motion jpeg and wicket

2013-01-11 Thread Marc Nuri San Félix
Hello

This is not a motion jpeg, but it can be used to accomplish your needs
without major complications

You can create a Panel  with an image that replaces the image every time it
renders overriding the onBeforeRender method:

addOrReplace(new Image("image", new BufferedDynamicImageResource(image)))

and add AjaxSelfUpdatingTimerBehavior to the Panel with the specified
refresh rate.

I believe this is the easiest and most straightforward way of doing what
you need.

Cheers
--
Marc Nuri
www.marcnuri.com


On Fri, Jan 11, 2013 at 4:19 PM, Decebal Suiu  wrote:

> Hi
>
> Is it possible to implement a motion jpeg in wicket [1]. I want to
> implement
> a webcam viewer in wicket. I have a library that give me BufferedImage(s)
> from a webcam. Now I can display an BufferedImage in wicket but I want to
> move to the next level.
>
> I see two option:
> --- Implement M-JPEG over HTTP
> "HTTP streaming separates each image into individual HTTP replies on a
> specified marker. RTP streaming creates packets of a sequence of JPEG
> images
> that can be received by clients such as QuickTime or VLC.
> In response to a GET request for a MJPEG file or stream, the server streams
> the sequence of JPEG frames over HTTP. A special mime-type content type
> multipart/x-mixed-replace;boundary= informs the client to
> expect several parts (frames) as an answer delimited by .
> This boundary name is expressly disclosed within the MIME-type declaration
> itself. The TCP connection is not closed as long as the client wants to
> receive new frames and the server wants to provide new frames."
> --- I can use wicket 6.x websocket (atmosphere or native) to push the next
> image frame to wicket component.
>
> See you another approach? Any advice is welcome.
>
> [1] http://en.wikipedia.org/wiki/Motion_JPEG
>
> Best regards,
> Decebal
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/motion-jpeg-and-wicket-tp4655294.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Can't get AutocompleteBehavior to work

2012-12-14 Thread Marc Nuri San Félix
Hello
I finally managed to solve the problem.
My Page was loading another version of JQuery (1.8.3) along with Wicket's
own JQuery version (1.8.2), this didn't allow Wicket's custom event
"inputchange" to bind correctly to the TextField.
Simply changing my custom JQuery Behaviors to use Wicket's JQuery version
as a a dependency  solved the problem.
Cheers
--
Marc Nuri
www.marcnuri.com


On Thu, Dec 13, 2012 at 7:16 PM, Marc Nuri  wrote:

> I meant Wicket 6.3, not 6.0.3
>
>
>
> -
> --
> Marc Nuri
> www.marcnuri.com
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Can-t-get-AutocompleteBehavior-to-work-tp4654780p4654781.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Can't get AutocompleteBehavior to work

2012-12-13 Thread Marc Nuri
I meant Wicket 6.3, not 6.0.3



-
--
Marc Nuri
www.marcnuri.com 
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Can-t-get-AutocompleteBehavior-to-work-tp4654780p4654781.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Can't get AutocompleteBehavior to work

2012-12-13 Thread Marc Nuri San Félix
Hello

I'm migrating my applications to wicket 6.0.3 form the latest Wicket 1.5.

I've got some problems with wicket AutocompleteBehavior. There are no
javascript exceptions in the browser console, but some functionality is not
working.
The problems are regarding showing the list of choices when keys are
pressed in the TextField.  The list is only shown when TextField gains
focus or when 'KEYDOWN' is pressed.

The following function is never triggered from the browser when text is
input:
[code]
Wicket.Event.add(obj, 'inputchange', function (jqEvent) {
var kc = Wicket.Event.keyCode(jqEvent);
switch(kc) {
case KEY_TAB:
case KEY_ENTER:
return jqEvent.stopPropagation();
case KEY_UP:
case KEY_DOWN:
case KEY_ESC:
case KEY_RIGHT:
case KEY_LEFT:
case KEY_SHIFT:
case KEY_ALT:
case KEY_CTRL:
break;
default:
updateChoices();
}
if(typeof objonkeyup === "function") {
return objonkeyup.apply(this,[jqEvent]);
}
});
[/code]

Both "onkeydown"  and "onkeypress" are working, thus the list is only shown
when the down arrow key is pressed in the TextField.


Is anyone else having the same problem? Might be browser related
(Chrome 23.0.1271.95
m)? or is it a bug?

--
Marc Nuri
http://www.marcnuri.com


Re: adding swing Jframe inside Wicket webpage

2012-11-22 Thread Marc Nuri San Félix
Hi
I believe there are two solutions for your question:

   1. You could do this with an Applet, and place it in a Page.
   2. One other solution could be to set the content type of the JTextPane
   to "text/html", get the content with getText() and display it using a
   WebMarkupContainer or similar Component.

I think you should reconsider the libary you are using to compare the
documents, or see what the library is doing so that you can avoid the use
of the JTextPane.

Cheers
--
Marc Nuri
www.marcnuri.com


On Thu, Nov 22, 2012 at 10:53 AM, Andrea Del Bene wrote:

> No, there's no way to get what you are asking for.
>
>> Hi ,
>>
>> In my application, am using one open source tool to compare xml documents,
>> this tool returns JtextPanes as a result , right now am putting these text
>> panes in a Jframe and displaying Jframe. Now i want to show this Jframe
>> inside wicket response page. is there any way I can put swing compoent
>> inside any wicket container and set reponse page as this.
>>
>>
>> I would appreciate quick response.
>>
>>
>>
>> --
>> View this message in context: http://apache-wicket.1842946.**
>> n4.nabble.com/adding-swing-**Jframe-inside-Wicket-webpage-**
>> tp4654079.html<http://apache-wicket.1842946.n4.nabble.com/adding-swing-Jframe-inside-Wicket-webpage-tp4654079.html>
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> --**--**-
>> To unsubscribe, e-mail: 
>> users-unsubscribe@wicket.**apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Java Maps and non-SQL database

2012-04-21 Thread Marc Marc
Hello,

I want to develop an application-interpreter. The interpreter runs an 
application model consisting of entity-relationships and fairly easy business. 
My idea is to use Wicket using Java maps as underlying model and to use a 
non-SQL database to make the Java maps persistent. This way I try to omit to 
have to compile the application model towards Java POJO’s and towards SQL 
tables. So I would appreciate your insight on the following 2 questions:
1)Are there already existing implementations of the combination wicket – Java 
map – non-SQL database?
2) On wiki side, what is the best way to having Java maps as model (instead of 
POJOs). Should I develop my own subclasses of IModel (see also thread demand 
for maps)

Thanks for your insights,
Marc-Mail.be, WebMail and 
Virtual Officehttp://www.mail.be

Re: Unable to find error during hello World

2012-04-18 Thread Marc Marc
Martin,

thanks for your test. This allowed me to deduce that the cause is elsewhere:
I found it now:
I did not stopped the embedded Jetty server before trying my changes. 

Regards,
Marc

> 
> From: Marc Marc 
> Sent: Sun Apr 15 08:47:21 CEST 2012
> To: 
> Subject: Unable to find error during hello World
> 
> 
> Hello,
> 
> I am a new user. I succeeded the quickstart but can not run the "Hello World"
> example. I get the following error:
> Unable to find component with id 'message' in [Page class =
> com.modelandgo.HomePage, id = 0, render count = 1]Expected: '.message'.
> 
> I searched in the mailing list but did not found the solution.
> I add my simple code hereunder.
> 
> Thanks!
> Marc
> __
> 
> my application:
> public class WicketApplication extends WebApplication
> { 
>   @Override
>   public Class getHomePage()
>   {
>   return HomePage.class;
>   }
> 
> }
> 
> my page:
> public class HomePage extends WebPage {
>   private static final long serialVersionUID = 1L;
> 
> public HomePage(final PageParameters parameters) {
>   
> add(new Label("message", "I am a newbie"));
> 
> }
> }
> 
> my html:
> 
> http://wicket.apache.org";>
>   
>   Message goes here
>   
>   
> 
> 
> 
> -
> Mail.be, WebMail and Virtual Office
> http://www.mail.be
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-
Mail.be, WebMail and Virtual Office
http://www.mail.be

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



Unable to find error during hello World

2012-04-14 Thread Marc Marc
Hello,

I am a new user. I succeeded the quickstart but can not run the "Hello World"
example. I get the following error:
Unable to find component with id 'message' in [Page class =
com.modelandgo.HomePage, id = 0, render count = 1]  Expected: '.message'.

I searched in the mailing list but did not found the solution.
I add my simple code hereunder.

Thanks!
Marc
__

my application:
public class WicketApplication extends WebApplication
{   
@Override
public Class getHomePage()
{
return HomePage.class;
}

}

my page:
public class HomePage extends WebPage {
private static final long serialVersionUID = 1L;

public HomePage(final PageParameters parameters) {

add(new Label("message", "I am a newbie"));

}
}

my html:

http://wicket.apache.org";>

Message goes here





-
Mail.be, WebMail and Virtual Office
http://www.mail.be

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



Re: Application with name 'xxxx' already exists.

2011-07-02 Thread Marc Ende
Hmm... there is just one, no more. :(

Am 30.06.2011 10:23, schrieb Martin Grigorov:
> This can happen when you have two WicketFilter declarations in web.xml
> with the same name.
>
> On Thu, Jun 30, 2011 at 9:00 AM, me  wrote:
>> Hi,
>>
>> the last hours I wanted to give the 1.5-RC a try. But there is one
>> Exception which doesn't have
>> an effect but it's just irritating:
>> After deploying a Web-Application (The Hello-World-Example) on a GF 3.1.
>> I'll receive this error:
>>
>> SCHWERWIEGEND: WebModule[/X-web]PWC1270: Exception starting filter
>> xxx
>> java.lang.InstantiationException
>>at
>> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:124)
>>at
>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4625)
>>at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:5316)
>>at com.sun.enterprise.web.WebModule.start(WebModule.java:500)
>>at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
>>at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
>>at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:755)
>>at
>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1980)
>>at
>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1630)
>>at com.sun.enterprise.web.WebApplication.start(WebApplication.java:100)
>>at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
>>at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
>>at
>> org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:286)
>>at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
>>at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
>>at
>> org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
>>at
>> com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
>>at
>> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
>>at
>> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1067)
>>at
>> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
>>at
>> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1247)
>>at
>> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
>>at
>> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:465)
>>at
>> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:222)
>>at
>> com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
>>at
>> com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
>>at
>> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
>>at
>> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
>>at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
>>at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
>>at
>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
>>at
>> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
>>at
>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
>>at
>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
>>at
>> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
>>at
>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
>>at
>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
>>at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
>>at
>> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
>>at
>> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
>>at java.lang.Thread.run(Thread.java:662)
>> Caused by: java.lang.IllegalStateException: Application with name
>> 'X' already exists.'
>>at org.apache.wicket.Application.setName(Application.java:847)

Re: Inmethod Grid Select All or Reload Grid

2011-04-20 Thread Marc Nuri San Félix
Hello.
Of course, objects updated in the database shouldn't be equal to those
previously displayed in the table (they aren't equal). If you don't comply
to this you'll have problems not only with inmehtod grid.
The equals method of my beans always include at least this:

if (this.id != other.id && (this.id == null || !this.id.equals(
other.id))) {
return false;
}
if (this.version!= other.version&& (this.version== null ||
!this.version.
equals(other.version))) {
return false;
}
+++
The above may also be the problem when dealing with the selection, because
an object previously selected that has been updated in the database, won't
be selected again (it won't equals the previous version). That is why you
should implement your own selection methods in the DataGrid if you're
dealing with objects from a database.
Regards
On Wed, Apr 20, 2011 at 15:42, Chris Colman wrote:

> I tried this exact thing today and had the same results.. no update
>
> grid.markAllItemsDirty();
> grid.update();
>
> I have a feeling that the equals method has to return false when objects
> are updated to force a redisplay. For this reason I'm guessing that the
> equality should not be solely based on the object's database id because that
> doesn't change when the object is updated.
>
> Perhaps we could include the object's version number in the equality test
> as well, which will change when the object is updated (version is
> automatically managed by our ORM but probably same across most ORMs).
>
> In our case we use JDO so I'm guessing if we add an extra comparison to the
> equals method we might get the update working as expected eg.,
>
>
> boolean
> equals(Object obj)
> {
>   
>
>   if ( !JDOHelper.getVersion(this).equals(JDOHelper.getVersion(obj) )
> return false;
>
>   
> }
>
>
> Hmmm, I'll try that first thing tomorrow morning when I hit the office.
>
>


Re: Inmethod Grid Select All or Reload Grid

2011-04-18 Thread Marc Nuri San Félix
For what you're saying, I believe you've got something messed up in your
Bean's hashCode and equals method.
Inmethod's Datagrid keeps a Set (HashSet) of IModel objects to keep track of
which items are selected. If you've implemented correctly the equals method
in your bean and believe that there's something wrong in the way the
Datagrid keeps track of selected items, you can implement your
own isItemSelected, resetSelectedItems, selectAllVisibleItems methods in a
custom implementation of Datagrid or Abstractdatagrid.
--
Marc Nuri

On Mon, Apr 18, 2011 at 14:19, GJT  wrote:

> After debugging, I found out the with the hashCode method, the columns
> don't
> load. If I take out the hashCode method, the columns loads the data again.
> But as I said, the selection doesn't work anymore.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Inmethod-Grid-Select-All-or-Reload-Grid-tp3456685p3457355.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Inmethod Grid Select All or Reload Grid

2011-04-18 Thread Marc Nuri San Félix
Have you debugged your project to see if the IDatasource is queried when you
perform the Ajax reload??
If you reload the page does the data update??
--
Marc Nuri

On Mon, Apr 18, 2011 at 13:19, GJT  wrote:

> I tried that before and I tried it again, but it doesn't work. I think the
> problem is somewhere with my LoadableDetachableModel which contains a
> constructor, equals(Object), hashCode() and load()
>
>
> Marc Nuri wrote:
> >
> > Try this:
> > +++
> > grid.markAllItemsDirty();
> > grid.update(); // <- This adds the grid to AjaxRequestTarget,
> > so target.addComponent(grid) is not necessary
> > +++
> > Regards
> > --
> > Marc Nuri
> >
> > On Mon, Apr 18, 2011 at 10:15, GJT <taulant.gju...@helvetic.com>
> > wrote:
> >
> >> I am using wicket 1.4.16 and inmethod-grid 1.4.17
> >>
> >> For example, I have a list of flights. I select every flight I want to
> >> change. So I press a button which opens a modal window. There I change
> >> the
> >> times of the selected flights. After saving, the table should load the
> >> new
> >> data (target.addComponent(grid)). That's what I mean with refresh.
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-wicket.1842946.n4.nabble.com/Inmethod-Grid-Select-All-or-Reload-Grid-tp3456685p3456877.html
> >> Sent from the Users forum mailing list archive at Nabble.com.
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Inmethod-Grid-Select-All-or-Reload-Grid-tp3456685p3457237.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Inmethod Grid Select All or Reload Grid

2011-04-18 Thread Marc Nuri San Félix
Try this:
+++
grid.markAllItemsDirty();
grid.update(); // <- This adds the grid to AjaxRequestTarget,
so target.addComponent(grid) is not necessary
+++
Regards
--
Marc Nuri

On Mon, Apr 18, 2011 at 10:15, GJT  wrote:

> I am using wicket 1.4.16 and inmethod-grid 1.4.17
>
> For example, I have a list of flights. I select every flight I want to
> change. So I press a button which opens a modal window. There I change the
> times of the selected flights. After saving, the table should load the new
> data (target.addComponent(grid)). That's what I mean with refresh.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Inmethod-Grid-Select-All-or-Reload-Grid-tp3456685p3456877.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Dealing with json in wicket

2011-01-19 Thread Marc Nuri (GMail)
Hi
I use a combination of an IRequestTarget implementation and an extended
UrlCodingStrategy.
Regards.
--
Marc Nuri
This is what I use, maybe it helps

public abstract class JSONRequestTarget implements IRequestTarget {
private final RequestParameters requestParameters;

public JSONRequestTarget(RequestParameters requestParameters) {
this.requestParameters = requestParameters;
}

protected abstract JSONArray getJSONData();

@Override
public void respond(RequestCycle requestCycle) {
//Change enconding to support tildes and special characters
requestCycle.getResponse().setContentType("text/html;
charset=utf-8");
requestCycle.getResponse().setCharacterEncoding("utf-8");
requestCycle.getResponse().write(getJSONData().toString());
}

@Override
public void detach(RequestCycle requestCycle) {
//Clean up stuff
requestParameters.setParameters(null);
}

public Map getParameters() {
return requestParameters.getParameters();
}
}

public abstract class JSONUrlCodingStrategy extends
AbstractRequestTargetUrlCodingStrategy {

public JSONUrlCodingStrategy(final String mountPath) {
super(mountPath);
}

protected abstract JSONRequestTarget
generateRequestTarget(RequestParameters requestParameters);

@Override
public CharSequence encode(IRequestTarget requestTarget) {
if (!(requestTarget instanceof JSONRequestTarget)) {
throw new IllegalArgumentException("This encoder can only be
used with "
+ "instances of " + JSONRequestTarget.class.getName());
}
final AppendingStringBuffer url = new AppendingStringBuffer(40);
url.append(getMountPath());
final JSONRequestTarget target = (JSONRequestTarget) requestTarget;
appendParameters(url, new PageParameters(target.getParameters()));
return url;
}

@Override
public IRequestTarget decode(RequestParameters requestParameters) {
return generateRequestTarget(requestParameters);
}

@Override
public boolean matches(IRequestTarget requestTarget) {
boolean ret = false;
if (requestTarget instanceof JSONRequestTarget) {
ret = true;
}
return ret;
}

}

>
>


Re: Dealing with json in wicket

2011-01-19 Thread Marc Nuri San Félix
Hi
I use a combination of an IRequestTarget implementation and an extended
UrlCodingStrategy.
Regards.
--
Marc Nuri
This is what I use, maybe it helps

public abstract class JSONRequestTarget implements IRequestTarget {
private final RequestParameters requestParameters;

public JSONRequestTarget(RequestParameters requestParameters) {
this.requestParameters = requestParameters;
}

protected abstract JSONArray getJSONData();

@Override
public void respond(RequestCycle requestCycle) {
//Change enconding to support tildes and special characters
requestCycle.getResponse().setContentType("text/html;
charset=utf-8");
requestCycle.getResponse().setCharacterEncoding("utf-8");
requestCycle.getResponse().write(getJSONData().toString());
}

@Override
public void detach(RequestCycle requestCycle) {
//Clean up stuff
requestParameters.setParameters(null);
}

public Map getParameters() {
return requestParameters.getParameters();
}
}

public abstract class JSONUrlCodingStrategy extends
AbstractRequestTargetUrlCodingStrategy {

public JSONUrlCodingStrategy(final String mountPath) {
super(mountPath);
}

protected abstract JSONRequestTarget
generateRequestTarget(RequestParameters requestParameters);

@Override
public CharSequence encode(IRequestTarget requestTarget) {
if (!(requestTarget instanceof JSONRequestTarget)) {
throw new IllegalArgumentException("This encoder can only be
used with "
+ "instances of " + JSONRequestTarget.class.getName());
}
final AppendingStringBuffer url = new AppendingStringBuffer(40);
url.append(getMountPath());
final JSONRequestTarget target = (JSONRequestTarget) requestTarget;
appendParameters(url, new PageParameters(target.getParameters()));
return url;
}

@Override
public IRequestTarget decode(RequestParameters requestParameters) {
return generateRequestTarget(requestParameters);
}

@Override
public boolean matches(IRequestTarget requestTarget) {
boolean ret = false;
if (requestTarget instanceof JSONRequestTarget) {
ret = true;
}
return ret;
}

}

>
>


Re: visural-wicket 0.6.5 released!

2010-11-26 Thread Marc Ende
May be you should mention the need for visural-common in the basic-usage.
When using the InputHintBehavior I got an ClassNotFound exception.

anyway: a visural-wicket is a great collection of components. ;)

marc

2010/11/25 Richard Nichols 

> What error are you getting?
>
> It may be related to my separating the visural-common dependency from the
> main visural-wicket JAR.
>
> On Fri, Nov 26, 2010 at 8:56 AM, Paul Szulc  wrote:
>
> > maven repo is not working
> >
> > On Thu, Nov 25, 2010 at 9:19 PM, Richard Nichols  wrote:
> >
> > > Thanks for all the positive comments :)
> > >
> > > If anyone has any suggestions / ideas for the next release (0.7) then
> let
> > > me
> > > know.
> > >
> > > Currently the only things on the RoadMap, are Wicket 1.5 support and
> some
> > > refactoring on the DropDown control (which has become a bit of a
> > > maintenance
> > > time-sink).
> > >
> > > cheers,
> > > RIch
> > >
> > > On Fri, Nov 26, 2010 at 6:19 AM, Mark Doyle <
> > markjohndo...@googlemail.com
> > > >wrote:
> > >
> > > > Great library.  I always expected more of these since component
> > creation
> > > > and
> > > > reuse is one of Wickets a key strengths.
> > > >
> > > > What I like about this lib is it's clean and finished.  There is no
> > > feeling
> > > > of immaturity or of a project that has died off.
> > > >
> > > >
> > > > On Thu, Nov 25, 2010 at 2:02 PM, alex shubert <
> alex.shub...@gmail.com
> > > > >wrote:
> > > >
> > > > > I must ask it: why did you make such fat header at your page? Did
> you
> > > > > every try to take a look at this in 1600*900 notebook screen?
> > > > > All you writings begins in bottom second part of the screen. It is
> > not
> > > > > my busenees of course, but why dont you kill that nice picture and
> > > > > resize header to just contain "pragmatic" without strong empty
> white
> > > > > line?
> > > > >
> > > > > Ah, forget it. At least you did not add banner on the top of all of
> > > that
> > > > >  :)
> > > > >
> > > > > --
> > > > > Best regards
> > > > > Alex
> > > > >
> > > > >
> -
> > > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > > > For additional commands, e-mail: users-h...@wicket.apache.org
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Richard Nichols
> > > http://www.richardnichols.net/ :: http://onmydoorstep.com.au/
> > >
> >
> >
> >
> > --
> > Best regards,
> > Paul Szulc
> >
> > http://www.paulszulc.com
> >
>
>
>
> --
> Richard Nichols
> http://www.richardnichols.net/ :: http://onmydoorstep.com.au/
>


Re: Free wicket from component hierarchy hell

2010-11-05 Thread Marc Nuri San Félix
Hi
In my opinion, when you use lots of inheritance in a page, its really
imposible to control if a component appears just once in the page.
Wicket is great for the ability to reuse components. Actually I've been able
to create a private framework where I'm able to build an entire page with
components binded to a JPA entity bean just with some annotations (amazing
productivity).
If the project gets complicated, I think there is no possible way to control
the uniqueness of the component in the page. The advantages of adding a
component wherever you cant along the hierarchy are true, I don't think that
your proposal gives the best of both worlds.
Regards
--
Marc Nuri


Re: wicketstuff-repo

2010-06-15 Thread Marc Ende
Ah, I've found it:
http://repo1.maven.org/maven2/org/wicketstuff/

Thanks

marc

2010/6/15 nino martinez wael 

> someone mentioned sonatype..Search the list for sonatype..
>
> 2010/6/15 Marc Ende 
>
> > Hi,
> >
> > is there another wicketstuff-repo (a mirror for example)? Wicketstuff is
> > now
> > down for some days and
> > I'll need some artifacts from the repo.
> >
> > marc
> >
>


wicketstuff-repo

2010-06-15 Thread Marc Ende
Hi,

is there another wicketstuff-repo (a mirror for example)? Wicketstuff is now
down for some days and
I'll need some artifacts from the repo.

marc


Re: Wicket And GAE

2010-04-14 Thread marc fawzi
<<
Per #1, the GAE people highly discourage pinging to keep the instance alive.
Also, I tried it for a bit anyways, and it didn't help.  I get instance
restarts in the MIDDLE of page loads (hint hint: I could use help on my
other post!).  The thing to realize with GAE is that you need to keep
everything out of your Application init().>>

It works perfectly for me. It's not so much "pinging" since you're not
"pinging" a port. It's actually getting the servlets to stay loaded and the
trick is to generate *enough cpu usage* not just *enough traffic* (my JVM
stays hot for about 2% of the cpu daily quota). For example, loading a very
simple page once every 10 seconds may not keep your JVM hot. Loading a more
complex page once every 10 seconds will keep it hot. Also, you need to give
the GAE some time to adjust to the new cpu load before it stops unloading
your servlets. I've got the graphs to prove it :)

Anyway, I don't really care what the GAE people say. They have a problem to
solve, especially for the heavier frameworks like Grails.



On Wed, Apr 14, 2010 at 6:07 AM, jbrookover  wrote:

>
> Per #1, the GAE people highly discourage pinging to keep the instance
> alive.
> Also, I tried it for a bit anyways, and it didn't help.  I get instance
> restarts in the MIDDLE of page loads (hint hint: I could use help on my
> other post!).  The thing to realize with GAE is that you need to keep
> everything out of your Application init().
>
> It takes some effort, but you can get pretty good Wicket apps running on
> GAE.  It's certainly a lot harder, though, than running it on your own.
>
> Jake
>
>
> marc fawzi wrote:
> >
> > Hey guys
> >
> > I'm new to Wicket
> >
> > I've made two discoveries with respect to GAE and Wicket:
> >
> > 1. I figured out how to keep my GAE app instance hot at all times (well,
> > at
> > least for 99.9% of the time.. the GAE still produces "transient errors"
> > every now and then) -- It's really simple: just have a script that
> > launches
> > a new task every 12 seconds and set the task url to a url that is routed
> > to/handled by the script itself then when the script runs again (in this
> > way) it will do two things: 1) urlfetch a url that is handled by the app
> > you
> > wish to keep hot (which is on another *.appspot.com url) and 2) starts
> > schedule another task in 12 seconds. Infinite task loop. Google does kill
> > the task loop eventually so then you need a cron job to run every 1 hour
> > to
> > restart the script :) and that's it.
> >
> > 2. Someone (srfarley) is working on a version of Wicket for GAE:
> >
> > "This project provides a template to help you get started with building a
> > Wicket <http://wicket.apache.org/> application for Google App
> > Engine<http://code.google.com/appengine/>.
> > It is a re-implementation of the Guestbook application described by the
> > App
> > Engine tutorial
> > <http://code.google.com/appengine/docs/java/gettingstarted/>.
> > Whereas the tutorial uses raw servlets and JSP to demonstrate a some of
> > the
> > basic features of App Engine, this project uses Wicket as the web
> > framework.
> >
> >
> > In addition, the project defines classes for handing persistence using
> > JDO<http://code.google.com/appengine/docs/java/datastore/>,
> > and uses Google Guice <http://code.google.com/p/google-guice/> to inject
> > instances of these classes into the Wicket pages for interacting with the
> > App Engine datastore.
> >
> > For unit testing, the project contains base classes that set up the App
> > Engine development environment so you can write tests against the full
> > stack, including those that interact directly with the Wicket pages. The
> > testing framework is TestNG <http://testng.org/doc/index.html>, but it
> is
> > possible to convert them to JUnit tests with some work."
> >
> > http://code.google.com/p/wicket-gae-template/
> >
> > Given that I've never used Wicket (I looked at a couple examples so far)
> > I'm
> > hoping that we can help each other as we attempt to get good outcome for
> > our
> > Wicket+GAE implementations  To make things more challenging, I'm
> using
> > Scala, which I've never run on GAE before and I'm also new to it :)
> >
> > Is there an IRC channel for Wicket users or is this the best place for
> > newbies like me to post questions and get help?
> >
> > Thanks,
> >
> > Marc
> >
> > On Tue, A

Re: Wicket And GAE

2010-04-13 Thread marc fawzi
Hey guys

I'm new to Wicket

I've made two discoveries with respect to GAE and Wicket:

1. I figured out how to keep my GAE app instance hot at all times (well, at
least for 99.9% of the time.. the GAE still produces "transient errors"
every now and then) -- It's really simple: just have a script that launches
a new task every 12 seconds and set the task url to a url that is routed
to/handled by the script itself then when the script runs again (in this
way) it will do two things: 1) urlfetch a url that is handled by the app you
wish to keep hot (which is on another *.appspot.com url) and 2) starts
schedule another task in 12 seconds. Infinite task loop. Google does kill
the task loop eventually so then you need a cron job to run every 1 hour to
restart the script :) and that's it.

2. Someone (srfarley) is working on a version of Wicket for GAE:

"This project provides a template to help you get started with building a
Wicket <http://wicket.apache.org/> application for Google App
Engine<http://code.google.com/appengine/>.
It is a re-implementation of the Guestbook application described by the App
Engine tutorial <http://code.google.com/appengine/docs/java/gettingstarted/>.
Whereas the tutorial uses raw servlets and JSP to demonstrate a some of the
basic features of App Engine, this project uses Wicket as the web framework.


In addition, the project defines classes for handing persistence using
JDO<http://code.google.com/appengine/docs/java/datastore/>,
and uses Google Guice <http://code.google.com/p/google-guice/> to inject
instances of these classes into the Wicket pages for interacting with the
App Engine datastore.

For unit testing, the project contains base classes that set up the App
Engine development environment so you can write tests against the full
stack, including those that interact directly with the Wicket pages. The
testing framework is TestNG <http://testng.org/doc/index.html>, but it is
possible to convert them to JUnit tests with some work."

http://code.google.com/p/wicket-gae-template/

Given that I've never used Wicket (I looked at a couple examples so far) I'm
hoping that we can help each other as we attempt to get good outcome for our
Wicket+GAE implementations  To make things more challenging, I'm using
Scala, which I've never run on GAE before and I'm also new to it :)

Is there an IRC channel for Wicket users or is this the best place for
newbies like me to post questions and get help?

Thanks,

Marc

On Tue, Apr 13, 2010 at 6:20 AM, jbrookover  wrote:

>
> I'm pretty committed to a project using Wicket on GAE.  I haven't
> encountered
> any deserialization issues that people have been bringing up, which makes
> me
> worry a bit since I've encountered (and dealt with) a slew of other issues
> :)
>
> Regarding the HttpSessionStore, I discovered a bad coding practice of mine
> when every single session entry in the datastore was 500KB+.  Once I
> resolved that issue, using more transient fields and detachable models, I'm
> relatively happy with the results.  GAE, by default, uses the MemCache to
> implement this feature so it should be relatively speedy.  It's no
> different
> from any other application storing data in the
> javax.servlet.http.HttpSession.
>
> My only lingering problem (another thread here) is that GAE can trash your
> application instance at any point.  If you are relying on SharedResources,
> those can go away - even in the middle of an active page load, potentially
> breaking some links.  Currently looking for a way around that :)
>
> Jake
>
>
> Richard Nichols-3 wrote:
> >
> > Biggest problem, and IMO a show stopper, is the Serialization issues.
> >
> > Since Wicket serializes session data (pagemap etc) you have to enable
> > the GAE session-store to get wicket working correctly on GAE.
> >
> > GAE clusters sessions by writing them to the GAE data store to spread
> > the session across the cluster - and writes are *slow*.
> >
> > Worse though, if you create an incompatible change to a serialized
> > page/component/model, when that user returns to your application, GAE
> > will quietly fail and the user will get a blank page. Checking the GAE
> > error log reveals a deserialization error in the core GAE engine.
> >
> > This is because the session reserialization in GAE is handled at the
> > GAE/Jetty level and any error in reconsitution of the error currently
> > breaks GAE completely. Google has acknowledged this problem, but for
> > most frameworks it's not a big deal as you don't store large Objects
> > in the HttpSession.
> >
> > I had planned to deploy the site I'm currently working on
> > http://www.onmyd

Re: How to use DateTimeField with java.sql.Timestamp

2009-12-17 Thread Marc Nuri (GMail)
I use that continuously. Not only in Wicket but with swing too. It's a kind
of hack but it does its job.
The economic way is to use a converter because in the future you may use the
converter with other model classes. In the other hand if you use the same
model with different technologies (Swing, wicket, reporting...) then you can
always bind a field to known data type.
I use this too when I need to combine two fields in one. If you have a
Person class and name and surname fields, you can add a getter method to
read name+surname and bind that in a read only field or a report.
Cheers.
--
Marc Nuri


Re: How to use DateTimeField with java.sql.Timestamp

2009-12-17 Thread Marc Nuri (GMail)
You can create a custom converter.

A simpler quick solution is to create two methods to encapsulate the sql
date in a normal date:
The pojo object accepts a java.sql.Timestamp

Your original methods:
[CODE]
  @Column(name = "timein"  )
  public java.sql.Timestamp getTimein() {
 return timein;
  }

  public void setTimein(java.sql.Timestamp timein) {
 this.timein = timein;
  }

//Add these too:
public java.util.Date getTimeinDate(){
return new java.utilDate(getTimein().getTime());
}
public void setTimeinDate(java.util.Date timeinDate){
setTimein(new java.sql.Timestamp(timeinDate.getTime());
}
[/CODE]

Now you can simply bind to "timeinDate" and you will get your Timestamp as a
Date.
Hope it helps
--
Marc Nuri


Release 1.4.3

2009-10-26 Thread Marc-Andre Houle
Hello wicket user list,

I would like to know when is suppose to happen the actual release of wicket
1.4.3.  When I looked into the branch, it is like if the release have been
done.  Also in Jira the 1.4.3 project looked closed.  So I am right to
expect the release of 1.4.3 anytime soon?

I am actually waiting for a bug fix on wicket-guice and would like to have
it in the near future.

Thanks in advance.

Marc-Andre


i18n and resource bundles (wicket wiki)

2009-10-24 Thread Marc Ende
Hi,

on the wicket-wiki
(http://cwiki.apache.org/WICKET/i18n-and-resource-bundles.html) I've
found a point that won't work.

Below the point "Load resources dynamically for a component" there is
the first alternative using ...PackageResource.get(MyComponent.class,
"Mycomponent.properties")...

I've tried that to load properties but it doesn't work. The reason is
that the PackageResource calls their accept method internally. This
loads a PackageResourceGuard from the Application. But this
PackageResourceGuard has a list
of blocked extensions: java, class and properties. If you make this
call above it'll result in a "PackageResourceBlockedException".

marc


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



Re: end tag not found in panel-div

2009-10-24 Thread Marc Ende
Hi Igor,

ah, you're completly right. I have forgotten to remove the
wicket:message-tags from the panels after
seperating them.

Thanks for the hint!

Have a nice saturday.

Marc

Igor Vaynberg schrieb:
> so headerLogo is a Panel?
>
> you cannot do that, you cannot have markup with wicket:ids inside a
> tag that you want to be replaced with a panel.
>
> -igor
>
> On Sat, Oct 24, 2009 at 12:16 AM, Marc Ende  wrote:
>   
>> Hi,
>>
>> I had worked on several projects with 1.3 and now I have changed to
>> 1.4.2 (and now to 1.4.3).
>> After that I have a strange error when I'm using panels:
>>
>> WicketMessage: close tag not found for tag: > wicket:id="headerLogo">. Component: [MarkupContainer [Component id =
>> headerLogo]]
>>
>> This happens within a panel which looks like this:
>>
>>  
>>
>>  
>>> key="services">services
>>http://xxx.yyy.zzz/";>> key="projectmanagement">projectmanagement
>>  
>>  
>>
>>  Home
>>  Item 1
>>  Item 1
>>  Item 2
>>  Contact
>>
>>  
>>
>>  
>>
>> If I comment the contents of the div's (which have wicket:id)
>> everything works fine.
>>
>>  
>>
>>  
>>
>>  
>>  
>>
>>  
>>
>>  
>>
>> I'm not sure but I thought that the content of the div's (with
>> wicket:id) will be replaced with the contents of the panel. So I would
>> expect that this should work. (And I thought that I had used it this
>> way on wicket 1.3).
>>
>> Does anybody have an idea?
>>
>> Marc
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>> 
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>   


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



end tag not found in panel-div

2009-10-24 Thread Marc Ende
Hi,

I had worked on several projects with 1.3 and now I have changed to
1.4.2 (and now to 1.4.3).
After that I have a strange error when I'm using panels:

WicketMessage: close tag not found for tag: . Component: [MarkupContainer [Component id =
headerLogo]]

This happens within a panel which looks like this:

  

  
services
http://xxx.yyy.zzz/";>projectmanagement
  
  

  Home
  Item 1
  Item 1
  Item 2
  Contact

  

  

If I comment the contents of the div's (which have wicket:id)
everything works fine.

  

  

  
  

  

  

I'm not sure but I thought that the content of the div's (with
wicket:id) will be replaced with the contents of the panel. So I would
expect that this should work. (And I thought that I had used it this
way on wicket 1.3).

Does anybody have an idea?

Marc


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



Class not found error when using OSGi classloader and wicket-guice integration

2009-10-17 Thread Marc-Andre Houle
Hello user group,
Just a little word to make sure this is check out.  I got a ClassNotFound
exception while working with my OSGi framework and integrating it with
Wicket-Guice.  The problem is that Wicket guice use the method Class.forName
to retrieve the class into which injection is suppose to take place.  Since
our wicket components can be in plugins and can be therefore in another
classloader, wicket-guice is not able to retrieve the class name.

I created a bug (WICKET-2530<https://issues.apache.org/jira/browse/WICKET-2530>
) for this and included a subversion patch where instead of using
Class.forName, Wicket-Guice is using Classes.resolveClass and the class
resolver that is given by the user application.

I hope I didn't think something for granted and that it is not a fix that
can broke something else.

Thanks to check this issue.

Marc-Andre


Re: NullPointer in SharedResources when ussing Resourcereference and OSGi

2009-10-13 Thread Marc-Andre Houle
Thanks a lot for the fast answer.  I have already gone by the trouble of
making sure the system bundle export all the classpath available so that
plugin can take access to it.  But I didn't find out those technic
previously. (I'm using felix for now because the licensing was much smoother
to us).

I'll take a look if the resolver option is easy to implement and if not,
I'll take a look to find out those osgi specific attribute are available.

Again thanks a lot for the fast answer.

Marc-Andre

On Tue, Oct 13, 2009 at 2:49 PM, Igor Vaynberg wrote:

> On Tue, Oct 13, 2009 at 11:30 AM, Marc-Andre Houle 
> wrote:
> > Hello user list,
> >
> > I just wanted to aska quick question and know if I am going in the right
> > direction.  I am developping a Wicket application (obviously) that can be
> > extended through module loaded in an OSGi framework.
> >
> > At the first attempt, I got this when using an Image with
> ResourceReference
> > in Wicket 1.4.1 :
> > java.lang.NullPointerException
> > at
> > org.apache.wicket.SharedResources.resourceKey(SharedResources.java:335)
> > at org.apache.wicket.SharedResources.get(SharedResources.java:219)
> > at
> org.apache.wicket.ResourceReference.bind(ResourceReference.java:137)
> > at
> >
> org.apache.wicket.markup.html.image.resource.LocalizedImageResource.bind(LocalizedImageResource.java:180)
> > at
> >
> org.apache.wicket.markup.html.image.resource.LocalizedImageResource.setResourceReference(LocalizedImageResource.java:246)
> > at
> >
> org.apache.wicket.markup.html.image.Image.setImageResourceReference(Image.java:178)
> > at org.apache.wicket.markup.html.image.Image.(Image.java:101)
> > at org.apache.wicket.markup.html.image.Image.(Image.java:77)
> >
> > From what I can see, this is because the scope passed in
> Resourcereference
> > is transferred to a class name string and then it is taken back into a
> Class
> > Object using the default ClassLoader.
> >
> > Because I am using an OSGi framework, the classloader is not quite
> natural
> > and it can't be used the eaxct same way.  I have found a post (
> > http://markmail.org/message/zrauqq43hmbwjfvm) that is talking about this
> > problem exactly in the Mailing list.
> >
> > However, I wanted to know how I can change the class resolver used by
> Wicket
> > as sugggested in the post.  I have seen tha tthe session object is using
> a
> > class resolver or it can also be changed using the ApplicationSettings
> > implementation.  What is the best approach as to give the possibility to
> get
> > ride of this problem?
>
> MyApplication#init() { ...
> getApplicationSettings().setClassResolver(myresolver); }
>
> > Also, I wanted to know if it would not be a good thing for the framework
> to
> > throw another type of exception then a NullPointer.  It is not quite
> obvious
> > what is going on in the framework when this is happening.
>
> actually IClassResolver already specifies that a
> ClassNotFoundException should be thrown, but looks like that got lost
> at some point and null was returned instead. i fixed it in 1.5.x, best
> not to change it in 1.4.x in case people depend on this in their
> resolvers :|
>
> > Does somebody got the same issue?  Is the Classresolver the only
> possibility
> > for me?
>
> a class resolver is not the only possibility. osgi containers provide
> implementation-specific ways of making a bundle into a "super bundle"
> that can see all classes in the container. some of these techniques
> are called "buddy class loading" and "dynamic imports". google can
> help you further.
>
> -igor
>
> >
> > Thanks in advance for the answer.
> >
> > Marc-Andre
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


NullPointer in SharedResources when ussing Resourcereference and OSGi

2009-10-13 Thread Marc-Andre Houle
Hello user list,

I just wanted to aska quick question and know if I am going in the right
direction.  I am developping a Wicket application (obviously) that can be
extended through module loaded in an OSGi framework.

At the first attempt, I got this when using an Image with ResourceReference
in Wicket 1.4.1 :
java.lang.NullPointerException
 at
org.apache.wicket.SharedResources.resourceKey(SharedResources.java:335)
 at org.apache.wicket.SharedResources.get(SharedResources.java:219)
 at org.apache.wicket.ResourceReference.bind(ResourceReference.java:137)
 at
org.apache.wicket.markup.html.image.resource.LocalizedImageResource.bind(LocalizedImageResource.java:180)
 at
org.apache.wicket.markup.html.image.resource.LocalizedImageResource.setResourceReference(LocalizedImageResource.java:246)
 at
org.apache.wicket.markup.html.image.Image.setImageResourceReference(Image.java:178)
 at org.apache.wicket.markup.html.image.Image.(Image.java:101)
 at org.apache.wicket.markup.html.image.Image.(Image.java:77)

>From what I can see, this is because the scope passed in Resourcereference
is transferred to a class name string and then it is taken back into a Class
Object using the default ClassLoader.

Because I am using an OSGi framework, the classloader is not quite natural
and it can't be used the eaxct same way.  I have found a post (
http://markmail.org/message/zrauqq43hmbwjfvm) that is talking about this
problem exactly in the Mailing list.

However, I wanted to know how I can change the class resolver used by Wicket
as sugggested in the post.  I have seen tha tthe session object is using a
class resolver or it can also be changed using the ApplicationSettings
implementation.  What is the best approach as to give the possibility to get
ride of this problem?

Also, I wanted to know if it would not be a good thing for the framework to
throw another type of exception then a NullPointer.  It is not quite obvious
what is going on in the framework when this is happening.

Does somebody got the same issue?  Is the Classresolver the only possibility
for me?

Thanks in advance for the answer.

Marc-Andre


Re: rpc question

2009-09-18 Thread Marc Ende
Hi Petr,

sorry, I've misunderstood your mail... :)

you've meant the other way round. May be you should try to
build a restful webservice. It's also possible with wicket if you
decide xml as a resultpage. 

For example:
http://java.dzone.com/news/wicket-creating-restful-urls

Am Fri, 18 Sep 2009 17:48:01 +0200
schrieb Marc Ende :

> Hi Petr,
> 
> I think you should use a LoadableDetachableModel. Within the method
> load() you can execute your call to the webservice or other
> remote-service. 
> 
> http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-DetachableModels
> 
> yours
> marc
> 
> Am Fri, 18 Sep 2009 14:20:27 +
> schrieb Petr Kobalíček :
> 
> > Hi list,
> > 
> > is there a simple tutorial about making RPC services in wicket? I
> > mean all integrated with wicket RequestCycle and Sessions, ideally
> > that I can expose web services through some Wicket page like class.
> > I'm porting one application and we have admin interface in qooxdoo
> > toolkit (it communicates through json requests).
> > 
> > I'd like to hear about "wicket" solution to this problem.
> > 
> > Thanks for possibilities
> > - Petr
> > 
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> > 



signature.asc
Description: PGP signature


Re: rpc question

2009-09-18 Thread Marc Ende
Hi Petr,

I think you should use a LoadableDetachableModel. Within the method
load() you can execute your call to the webservice or other
remote-service. 

http://cwiki.apache.org/WICKET/working-with-wicket-models.html#WorkingwithWicketmodels-DetachableModels

yours
marc

Am Fri, 18 Sep 2009 14:20:27 +
schrieb Petr Kobalíček :

> Hi list,
> 
> is there a simple tutorial about making RPC services in wicket? I mean
> all integrated with wicket RequestCycle and Sessions, ideally that I
> can expose web services through some Wicket page like class. I'm
> porting one application and we have admin interface in qooxdoo toolkit
> (it communicates through json requests).
> 
> I'd like to hear about "wicket" solution to this problem.
> 
> Thanks for possibilities
> - Petr
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


signature.asc
Description: PGP signature


Re: Dynamic Query????

2009-07-08 Thread Marc Nuri (GMail)
Have a look at inmethod grid and its datasource interfaces. I use it in one
of my projects to display JPA queries and it works great.Features include
sorting, and inline editing.
--
Marc Nuri


Re: Wicket behind proxy (AJP)

2009-07-03 Thread Marc Ende

Hello Sergey,

I had the same problems  but I solved them using the 
virtual-host-feature of tomcat.


After that the ProxyPass looks very easy:

...
ProxyPass / ajp://localhost/
...


yours

marc

Sergey Podatelev schrieb:

Hello,

I know this question had already been asked here, but I still couldn't
get it working on my side.
What I'm trying to achieve, is a configuration of Wicket running as
filter on Tomcat with an Apache host as a frontend. Particular problem
is with the context path.

Here's my configuration:
Tomcat's "server.xml":

...

...

Apache's "sites-enabled/mysite":

...

  ServerName "mysite"
  
ProxyRequests Off

  Order deny,allow
  Deny from all
  Allow from localhost


ProxyPass/ http://localhost:8084/Mysite/
ProxyPassReverse / http://localhost:8084/Mysite/

# this doesn't work
#ProxyPass/ ajp://localhost:8099/Mysite/
#ProxyPassReverse / ajp://localhost:8099/Mysite/

# this doesn't work either
#ProxyPass/ ajp://localhost:8099/Mysite/
#ProxyPassReverse / http://localhost:8084/Mysite/

ProxyPassReverseCookiePath /Mysite /
  

...

The only way I got it working with (almost) no issues is the first
one, where both ProxyPass and ProxyPassReverse directives use HTTP
protocol.
If I try AJP for both, or, as was stated somewhere in the mailing list
here, HTTP for ProxyPassReverse and AJP for ProxyPass.

The specific problem is when I access http://mysite/, some Wicket
requests work fine, some, however, are pointing to
http://mysite/Mysite/ (this, for instance, happens when I do
setResponsePage(Page.class, pageParameters). At first, this doesn't
seem to affect anything, but I have "Infinite Redirect Loop" error on
404 page, which is mounted the way it's described on Wicket's wiki.

I'm not sure, whose problem is this, Wicket's or AJP's.
I'm sure someone had similar issues and got them solved, I'd really
appreciate any comments.

  



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



FileUploadField updating model

2009-06-09 Thread Marc Ende
Hi there,

I'm planning to use a FileUploadField within a Form which I already use
for insert and edit operations. Now there should be a FileUploadField
within this form.
It might be a completely stupid question. What happens if I have a model
with a filled property which is the part which uses the FileUploadField
and I didn't provide a new file in this field. Will it set to null and
loose the existing information or is it kept because there is no new
content?

Thanks

marc



signature.asc
Description: OpenPGP digital signature


Re: How to avoid code duplication on forms?

2009-05-08 Thread Marc Nuri (GMail)
Hi.
How about using varargs or a similar approach in your TextField:


public class ValidatedTextField extends TextField{
public ValidatedTextField(String id, final IModel model, boolean
required, AbstractValidator... validators)
{
super(id, model);
setRequired(required);
for(AbstractValidator validator : validators){
add(validator);
}
}
}


And the use case:


TextField t = new ValidatedTextField("id", new Model("your Model"),
true,
EmailAddressValidator.getInstance(),
StringValidator.maximumLength(50));


Maybe you could then use it in a class factory as you suggested. At least it
will shorten a few lines of code.
Best regards.
--
Marc Nuri
http://blog.marcnuri.com
On Fri, May 8, 2009 at 11:14 AM, Christian Helmbold <
christian.helmb...@yahoo.de> wrote:

>
> I think the difference between sub classing and static factory methods is a
> matter of taste in this case.
>
> If I have many fields, I'd need many classes for them. So I'd group them in
> a sub package. In the case of factory methods I'd group the methods to
> create fields in a class instead of a package.
>
> Subclass:
>
> 1class UserEmailField extends TextField {
> 2  public UserEmailField(String id, IModel model) {
> 3super(id, model);
> 4setRequired(true);
> 5add(EmailAddressValidator.getInstance())
> 6add(UniqueValidator.unique(SystemUser.class, "email"));
> 7  }
> 8}
>
> Factory method:
>
> 1public static TextField emailTextField(String id){
> 2return (TextField) new TextField(id)
> 3.setRequired(true)
> 4.add(EmailAddressValidator.getInstance())
> 5.add(UniqueValidator.unique(SystemUser.class,
> "email"));
> 6}
>
> Your answer shows me, that there is no dramatically simpler way to do this.
> If you ignore the two lines for factory class declaration factory methods
> are even a bit shorter. Or is there an advantage of sub classing that I have
> missed?
>
> Regards,
> Christian
>
>
>
> - Ursprüngliche Mail 
> > Von: Igor Vaynberg 
> > An: users@wicket.apache.org
> > Gesendet: Freitag, den 8. Mai 2009, 09:08:34 Uhr
> > Betreff: Re: How to avoid code duplication on forms?
> >
> > much simpler
> >
> > class UserEmailField extends TextField {
> >   public UserEmailField(String id, IModel model) {
> > super(id, model);
> > add(EmailAddressValidator.getInstance())
> > add(UniqueValidator.unique(SystemUser.class, "email"));
> >}
> > }
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: wicketstuff-core:jquery accordion broken?

2009-05-06 Thread Marc Nuri San Félix
Hi.
Had same problem but found something at google:
http://www.nabble.com/select-next-n-%22somethings%22-td21550403s27240.html

Simply remove the '.r' from  the expression and it will work.
Best regards
--
Marc Nuri

> hi
>
> currently the accordion in jquery-examples does not work in FF nor IE.
>
> "jQuery.filter(e.rxpr, [i]) is undefined
>
http://localhost:8080/resources/org.wicketstuff.jquery.accordion.JQAccordion/jquery.accordion.pack.js
> Line: 1"
>
> is this known, or should i try diggin in?
>
> about jquery anyway: i recognized that the jquery project in wstuff-core
> does not use the jslib project to define its dependency to the jquery
> lib. is this intended, or could/should it be changed? using
> wstuff-core/jslib would make it possible to combine components built on
> top of jquery from different projects without suffering.
>
> cu uwe


Example for FormComponentPanel/best-practice for reusable form-components

2009-05-05 Thread Marc Hauptmann

Hello,

I want to use FormComponentPanels in forms to deal with more complex 
model-objects. I think it should be possible to chain the Model of every 
FormComponentPanel to the Model of the Form. So every FormComponent has 
automatically the right data in its Model when it changes. But somehow I 
am experiencing problems doing that.


Is there any example using the FormComponentPanel-class? Do you have any 
(other) best-practices creating reusable FormComponents?


Any help would be appreciated! :-)

Best regards,
Marc

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



Re: Wicket-Guice: Inject into Session

2009-04-28 Thread Marc Ende
Hmm... I'm not sure why it's done this way in the
AuthenticatedWebSession but
nevertheless it's the only task of a session object to keep informations
between
two requests. From this point of view a authenticate(String,String)
doesnt' really
make sense in the Class. May be there is someone here who can explain this
point. I wouldn't say that this is wrong, but unusual... :)

May be you can get the database connection from inside the method for
authentication purposes,
Then you haven't got any private or public members which should be
serialized and contains a database connection.

m.


Jan Torben Heuer schrieb:
> Marc Ende wrote:
>
>   
>> webapps do. In this case you've got to serialize the connection. I don't
>> think that's easy/possible to seralize a database connection.
>> I would go another approach which uses the session only as a
>> information-container and get those needed information from the
>> database in the page-lifecycle. That keeps the session-object small
>> (which is also an aspect).
>> 
>
> Hmm, following your argumentation, would you say that the 
> AuthenticatedWebSession is implemented wrong because it contains a 
> #authenticate method (which clearly needs a reference to some kind of 
> database)?
>
> Or would marking the field as "transient" be fine?
>
>
> Cheers,
>
> Jan
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>   


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



Re: Wicket-Guice: Inject into Session

2009-04-28 Thread Marc Ende

Hi Jan,

the Session (org.apache.wicket.Session) implements Serializable. So I 
think that wicket is also serializing the session object as other 
webapps do. In this case you've got to serialize the connection. I don't 
think that's easy/possible to seralize a database connection.
I would go another approach which uses the session only as a 
information-container and get those needed information from the
database in the page-lifecycle. That keeps the session-object small 
(which is also an aspect).


just my 5 cent... :)

Marc

Jan Torben Heuer schrieb:

Hi,

I'm a Wicket and Guice beginner. I successfully managed Guice to Inject my 
dependency into a WebPage. Can Guice also inject the dependency into an 
AuthenticatedWebSession? I'd need a reference to my database in the 
#authenticate(String, String) method.


Jan



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

  



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



Re: wicket, slf4j and logback

2009-04-09 Thread Marc Ende

Hi,

solution found: old libs and a wrong configuration...

Sorry for disturbing...

marc

Marc Ende schrieb:

Hi,

I've changed from logging using log4j to logback but there is a little
drawback I haven't figured out in this combination.

I've got this logback.xml:

  
${jboss.server.log.dir}/wz.log

  
  %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
%msg%n

  
  
  
  

  


Everything works great. After changing the Pattern the layout also
changes. But whenever I call a site I got the whole debug even if I've
changed the logger for "org" or "org.apache.wicket" to INFO.
These settings are okay as long as the thread is "ScannerThread" (might
be something of jboss). If it's a thread in the normal usage the
patterns are applied correctly but the loggers are ignored completely.

I've used logback in another web project where it's doing it's job.

Does anybody has also this combination?

Thanks for your help!!!

marc

  



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



wicket, slf4j and logback

2009-04-08 Thread Marc Ende
Hi,

I've changed from logging using log4j to logback but there is a little
drawback I haven't figured out in this combination.

I've got this logback.xml:

  
${jboss.server.log.dir}/wz.log

  
  %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
%msg%n

  
  
  
  

  


Everything works great. After changing the Pattern the layout also
changes. But whenever I call a site I got the whole debug even if I've
changed the logger for "org" or "org.apache.wicket" to INFO.
These settings are okay as long as the thread is "ScannerThread" (might
be something of jboss). If it's a thread in the normal usage the
patterns are applied correctly but the loggers are ignored completely.

I've used logback in another web project where it's doing it's job.

Does anybody has also this combination?

Thanks for your help!!!

marc



signature.asc
Description: OpenPGP digital signature


Re: Wicket-auth-roles + EJB 3 (Authentication and Authorization)

2009-03-22 Thread Marc Ende

Hi Barry,

I've running three webapps using wicket (1.3) wicket-security 
(SWARM/WASP) together with JAAS.

It's working great. Ok, the logout isn't very nice but it's doing it's job.
At first I had the same impression that's a hack and complicated but 
now, using it several times. It looks easy and it makes sense to me.


Thinks I had to do:
- Create a "CustomPrincipal"
   Just let it implement 
"org.apache.wicket.security.hive.authorization.Principal"
  
- Create a "CustomSubject"

   Extends "org.apache.wicket.security.hive.authentication.DefaultSubject"

- Create a "CustomLoginContext"
   Extends "org.apache.wicket.security.hive.authentication.LoginContext"
   implement the JAAS Login in the login() method of the CustomLoginContext
   and take care that the subject is filled with the username and the 
gorups (of jaas)

   are filled in as principals in the subject.

- Modify your WebApplication to extend Swam
   Extend "org.apache.wicket.security.swarm.SwarmWebApplication"
   implement setUpHive and getLoginPage

- create your hive-file.

You wanted to use w1.4, so I think that you'll have to patch swarm/wasp 
a little bit to work with 1.4


M.
  


Barry van Someren schrieb:

Hi all,

I've been busy on a project of mine that uses Wicket 1.4 RC 2 as a
frontend to a collection of EJB3 beans containing my business logic.
As users of this application will be able to use webservices as well
to use the application I'd also like to use authentication and more
importantly authorization on the side of the EJB's

I'm fairly familiar with EJB security but not very familiar with
Wicket security and I'm wondering what is the best course of action to
authenticate a user inside the Wicket application AND to put these
credentials inside the EJBContext?
I'm looking at 
http://cwiki.apache.org/WICKET/servlet-container-authentication.html
and seeing if I can somehow integrate the two, but it sounds a bit
like a hack.

Any other suggestions worth looking at?
Google is not returning much unfortunately.

Many thanks!

  



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



Handling 404 in wicket?

2009-02-06 Thread Marc Ende
Hi,

within a Project there is the need for a "customized" 404-Page.
Users with a misspelled url should get a standard 404-Page and
some "hints" which pages they possible wanted to show. The other
point is that I would like to reuse the templates, inheritance and so on
and not to create some "special" jsps for this.

I've some messages on this list in mind which are related to this
topic but I haven't found them anymore.
Ist there anything easy (like an "setErrorPage") to get all requests
which are directed to non existing Pages?


Thanks for your help

Marc



signature.asc
Description: OpenPGP digital signature


Re: UTF-8 bug in wicket? Or in Tomcat?

2009-01-29 Thread Marc Ende

Hi Philipp,

are your texts are stored in a database? Then you've got two more points 
where you can search:

The encoding of the table and the encoding of the connection.
Do you've got the same issues with the templates?

Marc

Philipp Daumke schrieb:

Hi Mathias,

'äöü' is actually already converted to 'äöü' when I add a 
breakpoint at the onSubmit method of my form (so right when I get the 
input of the text field from my model).


My whole eclipse is in UTF-8, Wicket writes UTF-8 to each HTML-Page, 
my firefox says UTF-8. What I think is that Wicket or Tomcat treats my 
UTF8-String äöü as an ISO-8859-1 String and converts it from iso to 
utf8, so into 'äöü'. When I copy 'äöü' into a tmp.txt file in 
unix-shell which is in UTF-8 and do an "iconv -futf8 -tlatin1 tmp.txt" 
on it, the output is 'äöü' again.


Any idea what to do?
All the best
Philipp
Do you save it to a database and then display the text? How do you 
present

it?
  






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



Re: Class aliases for shared resources

2009-01-16 Thread Marc S.

Nobody here with an answer?

Problem still open here.



Marc S. wrote:
> 
> I have the same problem now with Wicket 1.4-rc1.
> 
> Anyone knows if this is a bug or am I doing something wrong?
> 
> Thanks,
> Marc
> 
> 
> hbf wrote:
>> 
>> I have a shared resource that I add in my application's init() method  
>> via
>> 
>>  SharedResources sharedResources = getSharedResources();
>>  sharedResources.add("repo", new MyResouce());
>>  sharedResources.putClassAlias(Application.class, "app");
>>  sharedResources.putClassAlias(MyResouce.class, "tmp");
>> 
>> I can access my resource via e.g.
>> 
>>   
>> http://localhost:8080/app/resources/org.apache.wicket.Application/repo?nid=12
>> 
>> but both
>> 
>>http://localhost:8080/app/resources/app/repo?nid=12
>>http://localhost:8080/app/resources/tmp/repo?nid=12
>> 
>> do not work. Any ideas why?
>> 
>> Thanks!
>> Kaspar
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Class-aliases-for-shared-resources-tp15954706p21510200.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Class aliases for shared resources

2008-12-31 Thread Marc S.

I have the same problem now with Wicket 1.4-rc1.

Anyone knows if this is a bug or am I doing something wrong?

Thanks,
Marc


hbf wrote:
> 
> I have a shared resource that I add in my application's init() method  
> via
> 
>  SharedResources sharedResources = getSharedResources();
>  sharedResources.add("repo", new MyResouce());
>  sharedResources.putClassAlias(Application.class, "app");
>  sharedResources.putClassAlias(MyResouce.class, "tmp");
> 
> I can access my resource via e.g.
> 
>   
> http://localhost:8080/app/resources/org.apache.wicket.Application/repo?nid=12
> 
> but both
> 
>http://localhost:8080/app/resources/app/repo?nid=12
>http://localhost:8080/app/resources/tmp/repo?nid=12
> 
> do not work. Any ideas why?
> 
> Thanks!
> Kaspar
> 

-- 
View this message in context: 
http://www.nabble.com/Class-aliases-for-shared-resources-tp15954706p21228904.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Set the HTML id programmatically

2008-11-21 Thread Marc-Andre Houle
The attributeModifier behavior should do the trick.
description.add(new AttributeModifier("id", true, "myDescription"));

See here
<http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/AttributeModifier.html>for
mor details.

Marc-Andre
On Fri, Nov 21, 2008 at 3:19 PM, Bruno Cesar Borges <
[EMAIL PROTECTED]> wrote:

> AttributeModifier does not work?
>
> -Mensagem original-
> De: Martin Letendre [mailto:[EMAIL PROTECTED]
> Enviada em: sexta-feira, 21 de novembro de 2008 18:09
> Para: users@wicket.apache.org
> Assunto: Set the HTML id programmatically
>
>
>
> I am usign this version of Wicket: 1.3.5
>
> 1- I would like to override an id for a TextArea programmatically
>
> id="toOverride"
>name="description"
>rows="10"
>cols="50"   >
>
>
> 2- In my java code I tried this method
>
>TextArea description =  new TextArea("description");
>description.setMarkupId("myDescription");
>form.add(description);
>
>
> 3- But it's not setting anything... Here is the generated HTML
>
>  id="toOverride">
>
> :confused:
>
> Question: Is it possible to override the id programatically. Because it
> would be usefull in my integration between YUI and Wicket...
>
>
> --
> View this message in context:
> http://www.nabble.com/Set-the-HTML-id-programmatically-tp20628692p20628692.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]
>
>
> ***
> "Atenção: Esta mensagem foi enviada para uso exclusivo do(s)
> destinatários(s) acima identificado(s),
> podendo conter informações e/ou documentos confidencias/privilegiados e seu
> sigilo é protegido por
> lei. Caso você tenha recebido por engano, por favor, informe o remetente e
> apague-a de seu sistema.
> Notificamos que é proibido por lei a sua retenção, disseminação,
> distribuição, cópia ou uso sem
> expressa autorização do remetente. Opiniões pessoais do remetente não
> refletem, necessariamente,
> o ponto de vista da CETIP, o qual é divulgado somente por pessoas
> autorizadas."
>
>
> "Warning: This message was sent for exclusive use of the addressees above
> identified, possibly
> containing information and or privileged/confidential documents whose
> content is protected by law.
> In case you have mistakenly received it, please notify the sender and
> delete it from your system.
> Be noticed that the law forbids the retention, dissemination, distribution,
> copy or use without
> express authorization from the sender. Personal opinions of the sender do
> not necessarily reflect
> CETIP's point of view, which is only divulged by authorized personnel."
>
> ***
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


swarm & wicket 1.4

2008-11-17 Thread Marc Ende
Hi,

currently I'm using swarm securing some webpages build on wicket.
Now, that's wicket 1.4 is getting nearer, I would like to know if
there is something planned with swarm for wicket 1.4.

Do you know if it's compatible or is there a new release needed?

yours

Marc




signature.asc
Description: OpenPGP digital signature


Re: overLIB Integration...

2008-11-17 Thread Marc Ende
Hi,

imho this would be a nice feature.

What about the mentioned constructor is it still
OverlibBehavior(String) or do you plan also
a OverlibBehavior(IModel)? It would be nice to
have such a constructor when the contents should
be loaded from a model.

Marc

James Carman schrieb:
> Would anyone be interested in a Wicket/overLIB integration library?
> I've written one for work and wouldn't mind sharing it with folks.  It
> makes it very easy to add overLIB stuff to components, using
> behaviors...
> 
> component.add(new OverlibBehavior("This is my tooltip
> text").sticky().forceClose().delay(250));
> 
> This would create a tooltip with the specified text that is "sticky"
> and has to be closed.  It wouldn't show up for 250 milliseconds.  If
> anyone's interested, I can put it in wicketstuff.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 




signature.asc
Description: OpenPGP digital signature


Wicket Security

2008-10-06 Thread Marc Ende
Hi,

I'd like to integrate security in my wicket application. I've seen a
tutorial regarding jaas, ldap etc.
(http://blog.xebia.com/2008/05/08/wicket-jboss-jaas-ldap/) and I've
found swarm. In the repositories I had found wicket-security. While
reading the tutorial I've found that the wicket-security and the
tutorial relates to each other. After reading swarm I had the impression
that this will be another approach OR I had missed some things.

What I'd like to do is:

I have a webapp which has some parts in public areas which should only
be shown to authorized people. On the other hand there should be pages
which are completely only for these authorized peoples. As a backend I
have to use JAAS. The business-logic is encapsulated in ejb's which also
have declarative security (which annotations).

Now I have some questions:

- Are both projects (wicket-security and swarm) diffrent project or do
I have a completly wrong understanding of these both projects?
- I've found that the Tutorial is working great and I know how to
protect a whole page. But when I'd like to set parts invisible if there
is no authenticated people seeing the page. How can I get access to the
roles when I'm using a page where only parts should be set visible or
invisible regarding the authorization.
- Following this tutorial can I use the LoginContext from Jaas to
authenticate against the ejb's or is it lost after login?
- When the login context is available: Can I also use wicket-javaee with
this context?

Sorry for this stupid questions. I had used other frameworks before and
now I'm a complete beginner on wicket (and JAAS was used by me a long
time ago...)
Anyway: The few steps I had done with wicket and I really like it. It's
a great framework! You've done a really good job!!!

marc



signature.asc
Description: OpenPGP digital signature


Re: wicket 1.3.4/wicket-contrib-javaee compilation error

2008-10-01 Thread Marc Ende
Yes of course I tried to download the sources from repository. But the
connection (to the svn-repo) was so slow that my client timed out.
So no way to get it...

Anyway, It's good to know that's only a dependency missing.

By the way: I think that it would be a good idea to give a hint
regarding this dependency on the website when offering a jar-download.

m.



Igor Vaynberg schrieb:
> whether or not there is a repository has nothing to do with it
> 
> after you download and mvn install the project it will be in your local repo
> when you add it as a dependency to your project wicket-ioc will be
> brought in via transitive dependency because it is declared in
> javaee's pom.
> 
> -igor
> 
> On Wed, Oct 1, 2008 at 9:02 AM, Marc Ende <[EMAIL PROTECTED]> wrote:
>> a) Thanks for the help, I'll try that tomorrow.
>> b) I _have_ used maven but there is NO repository
>> which contains this wicket-contrib-javaee lib.
>> Can you point me to a repository containing this project?
>>
>> m.
>>
>> Igor Vaynberg schrieb:
>>> you are missing wicket-ioc jar, you should really use maven to manage
>>> your dependencies if you dont know how to do that yourself.
>>>
>>> -igor
>>>
>>> On Wed, Oct 1, 2008 at 3:00 AM, Marc Ende <[EMAIL PROTECTED]> wrote:
>>>> Hi,
>>>>
>>>> I wanted to use the wicket-contrib-javaee extension to use annotations for
>>>> my beans.
>>>> Following the steps in the doc I have added
>>>>   addComponentInstantiationListener(new JavaEEComponentInjector(this));
>>>> to my applications init() method.
>>>>
>>>> The application-class is an extended AuthenticatedWebApplication because I
>>>> need
>>>> jaas authentication in the application.
>>>>
>>>> When I tried to compile the application I received the following error:
>>>>
>>>> [INFO]
>>>> 
>>>> [ERROR] BUILD FAILURE
>>>> [INFO]
>>>> 
>>>> [INFO] Compilation failure
>>>> D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36]
>>>> cannot access org.apache.wicket.injection.ComponentInjector
>>>> class file for org.apache.wicket.injection.ComponentInjector not found
>>>>   addComponentInstantiationListener(new
>>>> JavaEEComponentInjector(this));
>>>>
>>>>
>>>>
>>>> D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36]
>>>> cannot access org.apache.wicket.injection.ComponentInjector
>>>> class file for org.apache.wicket.injection.ComponentInjector not found
>>>>   addComponentInstantiationListener(new
>>>> JavaEEComponentInjector(this));
>>>>
>>>> Does anybody have an Idea? I'm using Wicket 1.3.4, Wicket-Auth-Roles 1.3.4
>>>> and Wicket-contrib-javaee 1.1 (latest downloadable)
>>>>
>>>> Yours
>>>>
>>>> Marc
>>>>
>>>> -
>>>> 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]
> 




signature.asc
Description: OpenPGP digital signature


Re: wicket 1.3.4/wicket-contrib-javaee compilation error

2008-10-01 Thread Marc Ende
a) Thanks for the help, I'll try that tomorrow.
b) I _have_ used maven but there is NO repository
which contains this wicket-contrib-javaee lib.
Can you point me to a repository containing this project?

m.

Igor Vaynberg schrieb:
> you are missing wicket-ioc jar, you should really use maven to manage
> your dependencies if you dont know how to do that yourself.
> 
> -igor
> 
> On Wed, Oct 1, 2008 at 3:00 AM, Marc Ende <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> I wanted to use the wicket-contrib-javaee extension to use annotations for
>> my beans.
>> Following the steps in the doc I have added
>>   addComponentInstantiationListener(new JavaEEComponentInjector(this));
>> to my applications init() method.
>>
>> The application-class is an extended AuthenticatedWebApplication because I
>> need
>> jaas authentication in the application.
>>
>> When I tried to compile the application I received the following error:
>>
>> [INFO]
>> 
>> [ERROR] BUILD FAILURE
>> [INFO]
>> 
>> [INFO] Compilation failure
>> D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36]
>> cannot access org.apache.wicket.injection.ComponentInjector
>> class file for org.apache.wicket.injection.ComponentInjector not found
>>   addComponentInstantiationListener(new
>> JavaEEComponentInjector(this));
>>
>>
>>
>> D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36]
>> cannot access org.apache.wicket.injection.ComponentInjector
>> class file for org.apache.wicket.injection.ComponentInjector not found
>>   addComponentInstantiationListener(new
>> JavaEEComponentInjector(this));
>>
>> Does anybody have an Idea? I'm using Wicket 1.3.4, Wicket-Auth-Roles 1.3.4
>> and Wicket-contrib-javaee 1.1 (latest downloadable)
>>
>> Yours
>>
>> Marc
>>
>> -
>> 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]
> 




signature.asc
Description: OpenPGP digital signature


wicket 1.3.4/wicket-contrib-javaee compilation error

2008-10-01 Thread Marc Ende

Hi,

I wanted to use the wicket-contrib-javaee extension to use annotations 
for my beans.

Following the steps in the doc I have added
   addComponentInstantiationListener(new JavaEEComponentInjector(this));
to my applications init() method.

The application-class is an extended AuthenticatedWebApplication because 
I need

jaas authentication in the application.

When I tried to compile the application I received the following error:

[INFO] 


[ERROR] BUILD FAILURE
[INFO] 


[INFO] Compilation failure
D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36] 
cannot access org.apache.wicket.injection.ComponentInjector

class file for org.apache.wicket.injection.ComponentInjector not found
   addComponentInstantiationListener(new 
JavaEEComponentInjector(this));




D:\java\workspace\itf.as\itf.web\src\main\java\itf\web\ItfWebApplication.java:[36,36] 
cannot access org.apache.wicket.injection.ComponentInjector

class file for org.apache.wicket.injection.ComponentInjector not found
   addComponentInstantiationListener(new 
JavaEEComponentInjector(this));


Does anybody have an Idea? I'm using Wicket 1.3.4, Wicket-Auth-Roles 
1.3.4 and Wicket-contrib-javaee 1.1 (latest downloadable)


Yours

Marc

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