Re: [Wicket-user] Audio in Wicket

2006-05-25 Thread Johan Compagner
If your Audio component implements IResourceListener and the audio componentholds the byte[]/audio from db Resource. Then just map the embed tag on the audiocomponentThe audio component has the onComponentTag implemented
Where it writes out the src attribute to itself (the IResourceListener)url = "">then:public void onResourceRequested(){  resource.onResourceRequested
();}johanOn 5/24/06, Michael Welter [EMAIL PROTECTED] wrote:
I have a requirement to provide a web site that allows the customer todrill down into database detail.At the lowest level, the web pagecontains the normal text presentation along with zero to many Play
buttons.Each button plays a different audio file of previouslyrecorded speech.The user may or may not choose to listen to the audio.Everything is working except the Play buttons.Hibernate/Postgres is
a joy, and Wicket is great!I've modeled the Audio and LocalizedAudioResource classes from Image andLocalizedImageResource.Audio implements IResourceListener.I have theaudio streams in memory as a result of the drill down, and, for now, I'm
just creating ByteArrayResource objects for each stream (after I get itworking, I'll create a Resource class that performs a database fetch).BTW, an audio stream is a java.sql.Blob.I create the Audio object using the ByteArratResource object.The HTML
tag is embed src="" width=50 height=50.The embed tag causesthe browser to play the track with MediaPlayer or QuickTime.In LocalizedAudioResource I create a ResourceStreamRequestTarget object
and pass that to component.urlFor( obj ).I'm to the point where I needto flesh-out the doEncode(RequestCycle,IRequestTarget) function withinWebRequestCodingStrategy in order to create the URL.So here are some questions:
Will the URL in the web page reference the ResourceStreamRequestTarget?What will that URL look like?Do I need to wrap the embed tag in a button or a link?Does anyone have any thoughts about the doEncode function?Sample code?
Am I on the right track, or there an easier way to do this?Thanks for your help.Thanks to compagner and chillenious.--Michael WelterIntrospect Telephony Corp.Denver, Colorado US
+1.303.674.2575[EMAIL PROTECTED]www.introspect.com---All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications inthe hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Use of Tree Component

2006-05-25 Thread Eelco Hillenius

I am using the Tree component. Very nice!


Thanks. It's a hard one to get right, but I hope it suffices.


Question: would it be possible for the devs to rename the css from
something general, prone to name clashing (i.e. the current css), to
something more specific and less prone to conflict, like
treeComponentCss or whatever?


Yeah. I could use a scheme like I do with the wizard component:
class=wicketExtensionsWizardOuterTable. Would that work?


Out of curiosity: I noticed that the Swing tree model is being used.
Interesting approach. Is this used a lot in Wicket?


Well, we're trying to stick with general datastructures, such as List
for ListView etc. I thought the TreeModel of Swing is quite complete,
and has the additional advantage that you can reuse the model in Swing
apps - ok, not very likely anyone will actually do that. Implementing
a custom treemodel would have been easier in some ways, but I like the
fact that TreeModel and friends comes with nice functionality e.g. to
insert and delete nodes etc.


Please help: I have a very large tree to render, so I only want to hold
in memory the parts of the tree that are expanded (limiting expansion at
any given level to one branch only). I also want to make sure that all
the non-expanded branches are purged from memory.


I would say, do this in the same fashion as you would do with Swing.
Like I said above, the tree works well with model updates, so you can
let your model hold the part of the tree you actually need. Which is I
think the current state + all possible direct childs. When such a
child is expanded, you expand the tree model with the childs of the
node you just expanded. Would that work? Johan and Jonathan are the
people with extensive Swing experience here; maybe they've got some
alternative ideas on this.

As a side note. I'm still waiting for someone to step in and make this
tree or a subclass a nice DHTML/ Ajax enabled tree. There have been
several unfinished initiatives of making DHTML tree (and a couple of
custom trees that I know of that are used in projects, but that
haven't been made publicly available). We have different opions about
where the direction the tree should be heading amongst developers,
where I seem to stand alone in my argument that Swing's model is the
way to go in favor of a simplified custom model. So, it's good to read
for a change people like the fact that the tree uses the Swing model
:)

Eelco


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid7521bid$8729dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] need to clarify: detached entities as parameters

2006-05-25 Thread Vincent Jenks

I know we've been over this before but I've got to dredge it up one
more time, just to be absolutely sure I'm doing this the best possible
way.

Say I've got a master/detail setup between two pages.  Since I'm using
EJB3 which is essentially Hibernate, I need to decide whether or not
to detach detail data if the master data is already detached.

Page A: Pulls a list of Orders and wraps the collection in a
LoadableDetachableModel.  Each, when displayed in a ListView has a
link that points to a detail page for that Order, passing the Order as
a parameter for PageB to use like so:

add(new Link(new PageB(order));

Page B: Populates a series of Labels w/ the Order entity that was
passed into the constructor from Page A.

Here's where someone had told me before that I also need to make sure
this Order entity is also detached.  I'm not entirely clear on why I
would need to do that?  The EJB/Hibernate session from Page A should
have been closed by the time I reach Page B and the entity passed into
the constructor should now be Transient, i.e. detached already.

I'm able to confirm this fact because if I alter the entity param on
Page B and then try to persist it, I get an exception.  If I merge it
instead, it merges into a new session and persists to the database.

So, can I use the entity in Page B or must it also be detached and
treated as a model throughout the page?  I'd prefer not to wrap it in
another model since it's much easier to just access the elements of
the entity directly vs. working w/ a model.

Thanks!

-v


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid7521bid$8729dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] pagemap problem with late arriving ajax request

2006-05-25 Thread Igor Vaynberg
hmm, i guess really the only way to fix it would be to sync around my patchcan you try that and see if it fixes the problem?Index: D:/ws/wicket_1_2/src/java/wicket/request/compound/DefaultRequestTargetResolverStrategy.java
===--- D:/ws/wicket_1_2/src/java/wicket/request/compound/DefaultRequestTargetResolverStrategy.java (revision 5854)+++ D:/ws/wicket_1_2/src/java/wicket/request/compound/DefaultRequestTargetResolverStrategy.java (working copy)
@@ -92,6 +92,7 @@  final String path = requestParameters.getPath();  if (requestParameters.getComponentPath() != null)  {+   synchronized (requestCycle.getSession()) {
   // we need to check if this request has been flagged as   // process-only-if-path-is-active and if so make sure this condition   // is met@@ -138,6 +139,7 @@  }
 }}+  }   if (processRequest)@@ -149,6 +151,7 @@return EmptyRequestTarget.getInstance();   }
  }+  }  // see whether this request points to a bookmarkable page  else if (requestParameters.getBookmarkablePageClass() != null)  {
-IgorOn 5/24/06, Ari Suutari [EMAIL PROTECTED] wrote:
Hi,Sorry it took some time to respond - I sat down and wrote a somewhat simpletest program that I can redistribute if required.ok here is my first pass. i cannot reproduce the problem, so i am kinda
flying blind here - all i know for sure is that it compilesit seems to me that as soon as you change the page the browser dumps the old_javascript_, in my case looks like it also dumps any running ajax requests. i
tried both ie and ffox.i added a self upating counter that keeps updating every 1 sec and a link togo to another page, havent been able to catch the right timing i guessI did some more testing also. As I mentioned in my first e-mail, our setup
is *similar* to self updating timer. The difference to timer is that we have anapplet receiving events from server. The applet then executes _javascript_function to fire ajax update when needed.It looks like that the threads in applet continue to run for some time even
after link is clicked (ie. applet is not stopped immediately)and seem to be able to run _javascript_ on page also.At least using an applet here is the easiest way to reproduce the situation.(And I understand that we are bending wicket a lot here :) - but compared
to what we had earlier wicket+ajax is very elegant and simple)anyways, i am attaching the patch, let me know if it works for you and wecan take it from hereThe patch mostly works; however, there seems to be a small window where
two threads (one from click and other one from ajax) can be executing atDefaultRequestTargetResolverStrategy which still results in page expired.My test application is available at:
http://download.syncrontech.com/public/wicket-ajax-race.zipHow to test:- load ExpireTestPage1- click on page 2 link- click on to page 1. Without your Igor's patch, you'll get page expired almost always
With Igor's patch, it requires some rather mad and rapid clicking of links to getthe requests generated so that error still occurs. But it is still there.Ari S.- Original Message -
On 5/23/06, Igor Vaynberg [EMAIL PROTECTED] wrote: i got up extra early to take care of this, so by the end of the day -igor
 On 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote:   This is so great !   TIA,
   Ari S.   - Original Message -  From: Johan Compagner [EMAIL PROTECTED]  To:  
wicket-user@lists.sourceforge.net  Sent: Tuesday, May 23, 2006 11:37 AM  Subject: Re: [Wicket-user] pagemap problem with late arriving ajax
  requestWe will fix it in the 1.2 branch.   I am currently a bit full of work for at least 2 days. So i can only  look at  it by the end of this week.
   johanOn 5/23/06, Ari Suutari [EMAIL PROTECTED] wrote: Hi,
 best thing todo currently is to have that -1 check in the pagemap andmake   your own version of wicket 1.2  
   We already decided to put my modified version to production and   if there are no side effects from my change we can keep it for  some   time.  
   in trunk (2.0) this is already fixed in the default setting because  we   refactored the pagemap   and have now a different default pagemap and httpsessionstore.
 You mean that if I would use 2.0 from trunk the problem would go   away ? If so, would it be possible to back-port the new pagemap   to 1.2 branch ? Not as default, but something that I could turn on
from   application settings ? Another point: when 1.2 is released, someone else might also   hit this problem so it might be necessary to implement some kind
   of fix anyway (at least for us, some pages were almost unusable   because of this as other pages worked quite ok - it seems that  YMMV). Ari S.
 On 5/23/06, Ari Suutari [EMAIL PROTECTED]  wrote:   Hi,   
It is very important for us to get this fixed, preferably for 1.2.If any wicket committer is willing to help us, we will payfor the work (please contact me directly by 

[Wicket-user] Reverse Ajax

2006-05-25 Thread cowwoc

Article that may be of interest to the Wicket team:
http://www.theserverside.com/news/thread.tss?thread_id=40650

Gili



signature.asc
Description: OpenPGP digital signature


Re: [Wicket-user] Reverse Ajax

2006-05-25 Thread Igor Vaynberg
too latehttp://www.nabble.com/Wicket+1.2+released%21-t1673750.html#a4548599-IgorOn 5/25/06, 
cowwoc [EMAIL PROTECTED] wrote:
Article that may be of interest to the Wicket team:http://www.theserverside.com/news/thread.tss?thread_id=40650Gili



Re: [Wicket-user] Reverse Ajax

2006-05-25 Thread cowwoc

Darn it ;) This is like slashdot.org -- it's impossible to post first! 
:)

Gili

Igor Vaynberg wrote:
 too late
 
 http://www.nabble.com/Wicket+1.2+released%21-t1673750.html#a4548599
 
 -Igor
 
 
 On 5/25/06, *cowwoc* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
 
 
 Article that may be of interest to the Wicket team:
 http://www.theserverside.com/news/thread.tss?thread_id=40650
 
 Gili
 
 
 
 



signature.asc
Description: OpenPGP digital signature


[Wicket-user] 1.2rc4 -- 1.2 : Markup of type 'html' for component 'foo.bar' not found

2006-05-25 Thread smallufo

Hi , after I updated my wicket libraries from 1.2rc4 to 1.2 , my app
shows this error message :
Markup of type 'html' for component 'foo.bar' not found , Enable debug
messages for wicket.util.resource to get a list of all filenames
tried:
[Page class = foo.bar.MyPage, id = 0]

But when I added wicket=debug , stdout , in log4j.properties ,
everything works fine.
Why ???


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid7521bid$8729dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] need to clarify: detached entities as parameters

2006-05-25 Thread Igor Vaynberg
only models need to be detached and it looks like you are doing everything correctly.-IgorOn 5/25/06, Vincent Jenks 
[EMAIL PROTECTED] wrote:I know we've been over this before but I've got to dredge it up one
more time, just to be absolutely sure I'm doing this the best possibleway.Say I've got a master/detail setup between two pages.Since I'm usingEJB3 which is essentially Hibernate, I need to decide whether or not
to detach detail data if the master data is already detached.Page A: Pulls a list of Orders and wraps the collection in aLoadableDetachableModel.Each, when displayed in a ListView has alink that points to a detail page for that Order, passing the Order as
a parameter for PageB to use like so:add(new Link(new PageB(order));Page B: Populates a series of Labels w/ the Order entity that waspassed into the constructor from Page A.Here's where someone had told me before that I also need to make sure
this Order entity is also detached.I'm not entirely clear on why Iwould need to do that?The EJB/Hibernate session from Page A shouldhave been closed by the time I reach Page B and the entity passed into
the constructor should now be Transient, i.e. detached already.I'm able to confirm this fact because if I alter the entity param onPage B and then try to persist it, I get an exception.If I merge itinstead, it merges into a new session and persists to the database.
So, can I use the entity in Page B or must it also be detached andtreated as a model throughout the page?I'd prefer not to wrap it inanother model since it's much easier to just access the elements of
the entity directly vs. working w/ a model.Thanks!-v---All the advantages of Linux Managed Hosting--Without the Cost and Risk!Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn morehttp://sel.as-us.falkag.net/sel?cmdlnkkid7521bid$8729dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Reverse Ajax

2006-05-25 Thread Eelco Hillenius

Well, if you want to be cool, you could answer that Comet style is
'just an implementation' of reverse ajax. Wonder what the buzz word of
tomorrow will be.

Eelco

On 5/25/06, cowwoc [EMAIL PROTECTED] wrote:


Darn it ;) This is like slashdot.org -- it's impossible to post first! 
:)

Gili

Igor Vaynberg wrote:
 too late

 http://www.nabble.com/Wicket+1.2+released%21-t1673750.html#a4548599

 -Igor


 On 5/25/06, *cowwoc* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:


 Article that may be of interest to the Wicket team:
 http://www.theserverside.com/news/thread.tss?thread_id=40650

 Gili











---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid7521bid$8729dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1.2rc4 -- 1.2 : Markup of type 'html' for component 'foo.bar' not found

2006-05-25 Thread Eelco Hillenius

That sounds pretty weird. Coul you turn it off again and give us a
stacktrace of your failure?

Eelco


On 5/25/06, smallufo [EMAIL PROTECTED] wrote:

Hi , after I updated my wicket libraries from 1.2rc4 to 1.2 , my app
shows this error message :
Markup of type 'html' for component 'foo.bar' not found , Enable debug
messages for wicket.util.resource to get a list of all filenames
tried:
[Page class = foo.bar.MyPage, id = 0]

But when I added wicket=debug , stdout , in log4j.properties ,
everything works fine.
Why ???


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmdlnkkid7521bid$8729dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid7521bid$8729dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Reverse Ajax

2006-05-25 Thread Igor Vaynberg
Wonder what the buzz word of
tomorrow will be.wicket-Igor


Re: [Wicket-user] 1.2rc4 -- 1.2 : Markup of type 'html' for component 'foo.bar' not found

2006-05-25 Thread smallufo

sorry , after turn off wicket=debug , it works OK now...
I don't know the reason... I am confused too.
If it shows this message again , I'll dump the output here...


2006/5/26, Eelco Hillenius [EMAIL PROTECTED]:

That sounds pretty weird. Coul you turn it off again and give us a
stacktrace of your failure?

Eelco


On 5/25/06, smallufo [EMAIL PROTECTED] wrote:
 Hi , after I updated my wicket libraries from 1.2rc4 to 1.2 , my app
 shows this error message :
 Markup of type 'html' for component 'foo.bar' not found , Enable debug
 messages for wicket.util.resource to get a list of all filenames
 tried:
 [Page class = foo.bar.MyPage, id = 0]

 But when I added wicket=debug , stdout , in log4j.properties ,
 everything works fine.
 Why ???





---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid7521bid$8729dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Use of Tree Component

2006-05-25 Thread David Leangen

 I could use a scheme like I do with the wizard component:
 class=wicketExtensionsWizardOuterTable. Would that work?

Yep, sure would!

 Well, we're trying to stick with general datastructures, such as
 List for ListView etc. I thought the TreeModel of Swing is quite
 complete, and has the additional advantage that you can reuse
 the model in Swing apps - ok, not very likely anyone will actually
 do that.

Well, I know that I would like to reuse some of my stuff eventually in a
native client app... that's why this approach caught my eye. ;-)


  Please help: I have a very large tree to render, so I only want
  to hold in memory the parts of the tree that are expanded (limiting
  expansion at any given level to one branch only). I also want to
  make sure that all the non-expanded branches are purged from
  memory.

 I would say, do this in the same fashion as you would do with Swing.
 Like I said above, the tree works well with model updates, so you can
 let your model hold the part of the tree you actually need. Which is I
 think the current state + all possible direct childs. When such a
 child is expanded, you expand the tree model with the childs of the
 node you just expanded. Would that work? Johan and Jonathan are the
 people with extensive Swing experience here; maybe they've got some
 alternative ideas on this.

Hmmm... well, since I have almost no Swing experience. :-(

IIUC, I would use the event listeners to listen for a click event, and at
that point, I would pull in the data for the child nodes in the DB?

I'll give that a try today. If I'm on the wrong track, it would be great if
somebody could let me know. :-)


Thanks again for all the nice work!
Dave



---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user