Re: Convention for classes name

2010-06-06 Thread Sigmar Muuga
*Page, *Form and *Panel are the best choices out there! You are on the right
way, good luck!

Sigmar

On Sat, Jun 5, 2010 at 11:52 PM, James Carman ja...@carmanconsulting.comwrote:

 Are you Hungarian?

 On Sat, Jun 5, 2010 at 4:06 PM, Erdinc kocam...@yahoo.com wrote:
  I add PG prefix to page classes, e.g PGCustomerEditor, and RC to
 custom components, e.g RCDateTimeEditor.
 
 
 
  
  From: Gustavo Henrique gustavo...@gmail.com
  To: users@wicket.apache.org
  Sent: Sat, June 5, 2010 10:46:17 PM
  Subject: Convention for classes name
 
  Hi!
  Is there any name convention for classes using wicket?
  I'm using that model: CustomerPage, OrderPanel, ProductAddForm. What you
  think about?
 
  Thanks!
 
 
 
 

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




Re: Guice Wicket Guice Proxy

2010-06-06 Thread nino martinez wael
im still working on the quickstart.. So far I've been unable to
replicate.. I'll continue tomorrow

2010/6/5 nino martinez wael nino.martinez.w...@gmail.com:
 I was too quick to say it worked, as it appears it does not. I'll try
 to make a quickstart based on legup, where should I put it? Just on
 jira?

 -Nino

 2010/6/4 nino martinez wael nino.martinez.w...@gmail.com:
 yeah me too, what Igor said worked so must be true or a bug.. I don't
 think it's a bug..

 2010/6/3 James Carman ja...@carmanconsulting.com:
 I thought the filters were executed in the order of their
 filter-mappings, not their filter definitions.

 On Thu, Jun 3, 2010 at 5:23 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 Argh, how stupid.. Thanks a lot igor, how can I buy you a beer or Coke?

 I spend a tremendous time trying to figure out what was wrong. I even
 considered going back to spring..

 regards Nino

 2010/6/3 Igor Vaynberg igor.vaynb...@gmail.com:
 noep, the filters are processed in the order they are defined in
 web.xml, move the wicket filter decl below the warp persist stuff.

 -igor

 On Thu, Jun 3, 2010 at 1:05 PM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 yes, i think so:

 ?xml version=1.0 encoding=ISO-8859-1?
 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
        xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
        version=2.4

        display-nameIVR Web frontend/display-name

        filter
                filter-namewicket.WicketWarp/filter-name
                
 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
                init-param
                        param-nameapplicationClassName/param-name
                        
 param-valuecom.netdesign.codan.webadmin.WicketApplication/param-value
                /init-param

                init-param
                        param-nameconfiguration/param-name
                        param-valuedeployment/param-value
                /init-param
        /filter

        filter
                filter-namewarpPersistFilter/filter-name
                
 filter-classcom.wideplay.warp.persist.PersistenceFilter/filter-class
        /filter

        filter-mapping
                filter-namewarpPersistFilter/filter-name
                url-pattern/*/url-pattern
        /filter-mapping




        filter-mapping
                filter-namewicket.WicketWarp/filter-name
                url-pattern/*/url-pattern
        /filter-mapping


 /web-app


 2010/6/2 Igor Vaynberg igor.vaynb...@gmail.com:
 did you install warp's open entity manager in view filter *before*
 wicket's filter?

 -igor

 On Wed, Jun 2, 2010 at 5:46 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 Hi I somehow think theres something wrong with the Wicket Guice proxy
 (probably only if you are using guice 2  possibly warp persist)

 Anyhow I have had to change my LDM's to this code, notice the injector
 holder in the getter method really really bad. But if not I get an
 entity manager is closed:

 public class ClassWithDao {

        public ClassWithDao() {
                InjectorHolder.getInjector().inject(this);
        }

       �...@inject
        private transient PhoneDao phoneDao;

        /**
         * This method contains a fix, should ordinary be avoided! There
 should be no need for calling the extra InjectorHolder method!
         * @return
         */
      public PhoneDao getPhoneDao() {
              InjectorHolder.getInjector().inject(this);
              return phoneDao;
      }

        public void setPhoneDao(PhoneDao phoneDao) {
                this.phoneDao = phoneDao;
        }

 Am I doing anything wrong I wonder, however the first requests are
 always working it's after something has been trough the session store
 it goes wrong..

 -regards Nino

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



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



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



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



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



 -
 To unsubscribe, e-mail: 

jWicket Drag'n'Drop

2010-06-06 Thread Sebastian Gabriel
Hello,
I am trying to build a drag and drop component, which display three different 
list and the user should be able to move the listeitems between the different 
lists. 
I have the lists and I'm able to move the items to other lists where they also 
be displayed. My problem is when I drop a listitem into a list the item is 
'cloned' - after drop the item is in the list and also in the place where I 
have dropped it. So this is my first problem and the second is, that an item 
which was dropped onto a list, can't be moved at all, although all three lists 
are instances of the same class. Perhaps somebody has a clue what I'm doing 
wrong.

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



Re: Can I develop without recompiling/restarting after every change?

2010-06-06 Thread John Krasnay
On Sun, Jun 06, 2010 at 08:54:18AM +1200, b...@actrix.gen.nz wrote:
 If you study the effects of adding resource paths in Wicket then you
 will find that both methods will co-exist, not negate each other as
 you write.

Yes, I understand that. But you have to put the markup for each
component somewhere. If it's not on the classpath, then you will not be
able to package that component into a JAR for re-use.

 There are environments such as yours and other trivial environments
 where nothing needs to be done at all.

I'm curious as to why you think my environment is trivial. 

 That does not mean that doing
 nothing is best practice. Best practice is something else. A best
 approach in an individual case may be different from best practice,
 and that is why you disagree.

No, we disagree because I think that doing nothing, i.e. keeping your
component markup on the classpath, *is* the best practice, that is, the
majority opinion on what makes the most sense for most people.

If you feel that the default approach isn't the best practice, then you
are saying that the Wicket designers made a mistake by making this the
default. I disagree strongly with that sentiment.

 Deploy on save would take only milliseconds (with my proposed path
 structure applied) and the session would be preserved if you were
 using GlassFish 3.0 and NetBeans, leading to a performance gain. You
 may not need this functionality, but your setup seems to be slower
 than what is achievable.

I think perhaps we mean different things by deploy on save. When I say
deploy I mean it in the J2EE sense, where the container re-loads my
WAR package. In my case, this re-loads my Spring context and a few dozen
JPA entity beans, which takes up to 15 seconds on my relatively modern
laptop. There is no way rearranging my markup (or running it on a fully
certified J2EE server) would turn this into milliseconds.

 Yes I am moving markup around. And that (with an additional 3 lines of
 framwork code) leads to a re-definition of best practice for Wicket
 page development as I see it because of two gains:

Look, the only reason I took up this (now too long) thread is your use
of the words best practice, which implies a broadly held consensus.
Now that you've included as I see it I'm happy to let it drop.

jk

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



RE: jWicket Drag'n'Drop

2010-06-06 Thread Stefan Lindner
Hallo,

what exactly do you mean with cloned?

Stefan

-Ursprüngliche Nachricht-
Von: Sebastian Gabriel [mailto:sebastian.gabr...@hs-augsburg.de] 
Gesendet: Sonntag, 6. Juni 2010 13:49
An: users@wicket.apache.org
Betreff: jWicket Drag'n'Drop

Hello,
I am trying to build a drag and drop component, which display three different 
list and the user should be able to move the listeitems between the different 
lists. 
I have the lists and I'm able to move the items to other lists where they also 
be displayed. My problem is when I drop a listitem into a list the item is 
'cloned' - after drop the item is in the list and also in the place where I 
have dropped it. So this is my first problem and the second is, that an item 
which was dropped onto a list, can't be moved at all, although all three lists 
are instances of the same class. Perhaps somebody has a clue what I'm doing 
wrong.

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


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



Re: strange ClassCastException in wicketstuff-push

2010-06-06 Thread Ingo Adler
Solved.

It was a class loading problem - IntelliJ in combination with Jetty.

WebAppContext context = new WebAppContext();
...
context.setParentLoaderPriority(true); // - Solution

Ingo

On 04.06.2010 00:52, Ingo Adler wrote:
 Hi,
 
 I'm trying to use wicketstuff-push in my project. I'm always getting a
 ClassCastException in the wicketstuff-push sources, which I can't explain:
 
 java.lang.ClassCastException:
 org.mortbay.cometd.continuation.ContinuationBayeux cannot be cast to
 org.cometd.Bayeux
  at
 org.wicketstuff.push.cometd.CometdService.initBayeux(CometdService.java:172)
  at
 org.wicketstuff.push.cometd.CometdService.getBayeux(CometdService.java:161)
  at
 org.wicketstuff.push.cometd.CometdService.publish(CometdService.java:155)
  at org.xtoto.ui.comment.CommentPanel$3.onSubmit(CommentPanel.java:140)
 
 My code is very similar to the example:
 
 final ChannelEvent event = new ChannelEvent(chat);
 event.addData(message, comment.getMessage());
 getChannelService().publish(event); // - Line 140 in CommentPanel
 
 I'm using the trunk of wicketstuff. The org.wicketstuff.push code
 compiled perfectly.
 
 I tried different library versions - which didn't help.
 
 Currently I'm using
 
 cometd-api-1.1.1
 cometd-client-6.1.22
 cometd-server-6.1.22
 
 jetty-6.1.22
 
 wicket-1.4.7
 
 When I change the code in push a little bit, from
 
 _bayeux = (Bayeux) _application
   .getServletContext()
   .getAttribute(Bayeux.ATTRIBUTE); // - line 172 in CometdService
 
 to
 
 ContinuationBayeux b = (ContinuationBayeux)_application
   .getServletContext()
   .getAttribute(Bayeux.ATTRIBUTE);
 
 _bayeux = b;
 
 I get a IncompatibleClassChangeError later in line:
 
 serviceClient = _bayeux.newClient(BAYEUX_CLIENT_PREFIX);
 
 
 
 Very strange...
 
 Has anyone had this problem before? Any ideas?
 
 Regards
 Ingo
 
 
 -
 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



Parsing of resource locale

2010-06-06 Thread Jorge Rodrigez
Hi,

I observe that if my .css file is named like 'something_ab.css'
then org.apache.wicket.util.resource.locator.ResourceNameIterator confuses
that 'ab' is the locale of the resource.
As a result if I create a ResourceReference(MyPage.class,
something_ab.css, Locale.US, mystyle) then the produced URL is :
http://localhost:8080/resources/com.mycompany.HomePage/something_ab_mystyle_ab.css


Is this a bug or it is a known limitation in 1.4 ?

P.S. With 1.5 everything is OK:
http://localhost:8080/wicket/resource/com.mycompany.HomePage/something_ab.css?en_US-mystyle-variation


Re: jWicket Drag'n'Drop

2010-06-06 Thread Sebastian Gabriel
Well, 
in the onDrop() method of the listcontainer the droppedelement is added to the 
list. At this point I want the element which was dropped to disappear. Because 
if not the element is displayed twice.

Thanks


Am 06.06.2010 um 17:23 schrieb Stefan Lindner:

 Hallo,
 
 what exactly do you mean with cloned?
 
 Stefan
 
 -Ursprüngliche Nachricht-
 Von: Sebastian Gabriel [mailto:sebastian.gabr...@hs-augsburg.de] 
 Gesendet: Sonntag, 6. Juni 2010 13:49
 An: users@wicket.apache.org
 Betreff: jWicket Drag'n'Drop
 
 Hello,
 I am trying to build a drag and drop component, which display three different 
 list and the user should be able to move the listeitems between the different 
 lists. 
 I have the lists and I'm able to move the items to other lists where they 
 also be displayed. My problem is when I drop a listitem into a list the item 
 is 'cloned' - after drop the item is in the list and also in the place where 
 I have dropped it. So this is my first problem and the second is, that an 
 item which was dropped onto a list, can't be moved at all, although all three 
 lists are instances of the same class. Perhaps somebody has a clue what I'm 
 doing wrong.
 
 Thanks
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



AW: jWicket Drag'n'Drop

2010-06-06 Thread Stefan Lindner
See previous mails on this list or nabble: 
http://apache-wicket.1842946.n4.nabble.com/drag-and-drop-td1881857i20.html

-Ursprüngliche Nachricht-
Von: Sebastian Gabriel [mailto:sebastian.gabr...@hs-augsburg.de] 
Gesendet: Sonntag, 6. Juni 2010 19:20
An: users@wicket.apache.org
Betreff: Re: jWicket Drag'n'Drop

Well, 
in the onDrop() method of the listcontainer the droppedelement is added to the 
list. At this point I want the element which was dropped to disappear. Because 
if not the element is displayed twice.

Thanks


Am 06.06.2010 um 17:23 schrieb Stefan Lindner:

 Hallo,
 
 what exactly do you mean with cloned?
 
 Stefan
 
 -Ursprüngliche Nachricht-
 Von: Sebastian Gabriel [mailto:sebastian.gabr...@hs-augsburg.de] 
 Gesendet: Sonntag, 6. Juni 2010 13:49
 An: users@wicket.apache.org
 Betreff: jWicket Drag'n'Drop
 
 Hello,
 I am trying to build a drag and drop component, which display three different 
 list and the user should be able to move the listeitems between the different 
 lists. 
 I have the lists and I'm able to move the items to other lists where they 
 also be displayed. My problem is when I drop a listitem into a list the item 
 is 'cloned' - after drop the item is in the list and also in the place where 
 I have dropped it. So this is my first problem and the second is, that an 
 item which was dropped onto a list, can't be moved at all, although all three 
 lists are instances of the same class. Perhaps somebody has a clue what I'm 
 doing wrong.
 
 Thanks
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


-
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: Can I develop without recompiling/restarting after every change?

2010-06-06 Thread bht
Hi

Yes, I understand that. But you have to put the markup for each
component somewhere. If it's not on the classpath, then you will not be
able to package that component into a JAR for re-use.

As I wrote, both methods co-exist, and you can put markup on the
classpath and package it as jar while other markup is separate from
the classpath. How otherwise would I be able to use Wicket components
with my scheme? Please accept the good news that your but is not
justified.

No, we disagree because I think that doing nothing, i.e. keeping your
component markup on the classpath, *is* the best practice, that is, the
majority opinion on what makes the most sense for most people.

Quoting majority opinion and community consensus is a very weak
contribution to innovation, a sign that the speaker is running out of
genuine ideas. In such context I would typically say that my views
represent the other 100% of such perceived majority/consensus, just to
make it absolutely clear what kind of Orwellian bsht this is.

Page developers, especially those who work with markup, and that is
the majority that Wicket is targeting (not component developers) need
the markup in the context of their resolvable image, script and other
resource files which is in the web directory. Otherwise they cannot
view the markup in the browser. They don't care where these files are
at runtime as long as they are not broken at design time which they
currently are. You never seem to comment on this critical point.


If you feel that the default approach isn't the best practice, then you
are saying that the Wicket designers made a mistake by making this the
default. I disagree strongly with that sentiment.

You accept broken markup at design time and I don't accept it because
I have solved the problem.

I would not go as far as to say they made THAT mistake. As you know,
they gave us the option. But the non-default option is broken because
of the missing three lines of Java code, and whenever people try it,
they become part of your perceived community consensus due to
frustration. Like prisoners.

I think perhaps we mean different things by deploy on save. When I say
deploy I mean it in the J2EE sense, where the container re-loads my
WAR package. In my case, this re-loads my Spring context and a few dozen
JPA entity beans, which takes up to 15 seconds on my relatively modern
laptop. There is no way rearranging my markup (or running it on a fully
certified J2EE server) would turn this into milliseconds.

True. deploy on save is not invented here. It is a term used in
IDEs. The IDE decides what deployment method to use depending on file
location etc.. That is one of two reasons why I would recommend to not
store page markup in Java package directories.


Look, the only reason I took up this (now too long) thread is your use
of the words best practice, which implies a broadly held consensus.
Now that you've included as I see it I'm happy to let it drop.

Wrong.

Best practice does not imply broadly held consensus at all. I am not
using this as a buzzword as you are. If I invent a better mouse trap
today that is more effective at delivering the outcome than any other
technique, while the better mouse trap is not even available or known
to everyone, then using it becomes best practice overnight.

Regards

Bernard


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



RE: Can I develop without recompiling/restarting after every change?

2010-06-06 Thread Russell Simpkins


I have to thank Martijn for pointing out the Start.java file. I am trying hard 
not to beat myself up for not using this sooner. I have not gone through the 
works just yet to move my HTML files to another location. I've left them in 
with the class files. So, for eclipse love in this situation, I added the HTML 
files to the eclipse build so that anytime I save a file eclipse moves them to 
the target folder. I changed the build output location to be 
target/MY_APPLICATION/WEB-INF/classes and I added the same path to the runtime 
configuration classpath. So far, I love it! Just as Martijn pointed out 
earlier, run in debug mode and every time you edit/save a java file or html 
file the changes are immediately picked up. SO much better than hot deploy for 
laptop development. This will save me hours, and it has no impact on my current 
maven project. Its just what I needed. THANK YOU.
If you don't want to use the quickstart, here is the Start.java source I use.

import org.mortbay.jetty.Connector;import org.mortbay.jetty.Server;import 
org.mortbay.jetty.bio.SocketConnector;import 
org.mortbay.jetty.webapp.WebAppContext;import 
org.mortbay.jetty.webapp.WebInfConfiguration;import 
org.mortbay.jetty.webapp.WebXmlConfiguration;

public class Start {
public static void main(String[] args) throws Exception {   
Server server = new Server();   SocketConnector connector = new 
SocketConnector();  // Set some timeout options to 
make debugging easier.   connector.setMaxIdleTime(1000 * 60 * 60);  
 connector.setSoLingerTime(-1);  connector.setPort(8080);   
 server.setConnectors(new Connector[] { connector });
WebAppContext bb = new WebAppContext(); 
bb.setServer(server);   bb.setContextPath(/);// 
CHANGE ME - point to your project path
bb.setWar(target/YOUR_APP);   bb.setConfigurationClasses(new String[] 
{ WebInfConfiguration.class.getName(), WebXmlConfiguration.class.getName() });  
bb.setParentLoaderPriority(true);   // START JMX SERVER 
// MBeanServer mBeanServer = 
ManagementFactory.getPlatformMBeanServer();// MBeanContainer 
mBeanContainer = new MBeanContainer(mBeanServer); // 
server.getContainer().addEventListener(mBeanContainer);  // 
mBeanContainer.start();  server.addHandler(bb);
try {   System.out.println( STARTING 
EMBEDDED JETTY SERVER, PRESS [ENTER] TO STOP);
server.start(); System.in.read();   
System.out.println( STOPPING EMBEDDED JETTY SERVER);   
server.stop();  server.join();  } catch (Exception e) { 
e.printStackTrace();System.exit(100);   
}   }}
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

RE: Can I develop without recompiling/restarting after every change?

2010-06-06 Thread Russell Simpkins

hotmail just destroyed my last post. I apologize. I will try one more time to 
share my source
import org.mortbay.jetty.Connector;import org.mortbay.jetty.Server;import 
org.mortbay.jetty.bio.SocketConnector;import 
org.mortbay.jetty.webapp.WebAppContext;import 
org.mortbay.jetty.webapp.WebInfConfiguration;import 
org.mortbay.jetty.webapp.WebXmlConfiguration;
public class Start {
  public static void main(String[] args) throws Exception {    Server server = 
new Server();    SocketConnector connector = new SocketConnector();     // 
Set some timeout options to make debugging easier.    
connector.setMaxIdleTime(1000 * 60 * 60);    connector.setSoLingerTime(-1);    
connector.setPort(8080);    server.setConnectors(new Connector[] { connector 
});     WebAppContext bb = new WebAppContext();    bb.setServer(server);    
bb.setContextPath(/);    bb.setWar(target/MY_APPLICATION);    
bb.setConfigurationClasses(new String[] { WebInfConfiguration.class.getName(), 
WebXmlConfiguration.class.getName() });    bb.setParentLoaderPriority(true);    
     // START JMX SERVER    // MBeanServer mBeanServer = 
ManagementFactory.getPlatformMBeanServer();    // MBeanContainer mBeanContainer 
= new MBeanContainer(mBeanServer);    // 
server.getContainer().addEventListener(mBeanContainer);    // 
mBeanContainer.start();     server.addHandler(bb);
    try {      System.out.println( STARTING EMBEDDED JETTY SERVER, PRESS 
[ENTER] TO STOP);      server.start();      System.in.read();      
System.out.println( STOPPING EMBEDDED JETTY SERVER);       
server.stop();      server.join();    } catch (Exception e) {      
e.printStackTrace();      System.exit(100);    }  }}
  
_
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Can I develop without recompiling/restarting after every change?

2010-06-06 Thread Chris Colman
Our particular web application simply could not exist if wicket did not
allow us to load markup from outside the jar. I think it's fine that the
default is loading markup from the jar.

I our case we have a number of mechanisms by which more skilled end
users can adjust markup so to force an app reload each time an end user
does this would certainly place the policy of 'markup should be stored
in the jar' outside the realms of best practice.


-Original Message-
From: b...@actrix.gen.nz [mailto:b...@actrix.gen.nz]
Sent: Monday, 7 June 2010 9:05 AM
To: users@wicket.apache.org; John Krasnay
Subject: Re: Can I develop without recompiling/restarting after every
change?

Hi

Yes, I understand that. But you have to put the markup for each
component somewhere. If it's not on the classpath, then you will not
be
able to package that component into a JAR for re-use.

As I wrote, both methods co-exist, and you can put markup on the
classpath and package it as jar while other markup is separate from
the classpath. How otherwise would I be able to use Wicket components
with my scheme? Please accept the good news that your but is not
justified.

No, we disagree because I think that doing nothing, i.e. keeping
your
component markup on the classpath, *is* the best practice, that is,
the
majority opinion on what makes the most sense for most people.

Quoting majority opinion and community consensus is a very weak
contribution to innovation, a sign that the speaker is running out of
genuine ideas. In such context I would typically say that my views
represent the other 100% of such perceived majority/consensus, just to
make it absolutely clear what kind of Orwellian bsht this is.

Page developers, especially those who work with markup, and that is
the majority that Wicket is targeting (not component developers) need
the markup in the context of their resolvable image, script and other
resource files which is in the web directory. Otherwise they cannot
view the markup in the browser. They don't care where these files are
at runtime as long as they are not broken at design time which they
currently are. You never seem to comment on this critical point.


If you feel that the default approach isn't the best practice, then
you
are saying that the Wicket designers made a mistake by making this the
default. I disagree strongly with that sentiment.

You accept broken markup at design time and I don't accept it because
I have solved the problem.

I would not go as far as to say they made THAT mistake. As you know,
they gave us the option. But the non-default option is broken because
of the missing three lines of Java code, and whenever people try it,
they become part of your perceived community consensus due to
frustration. Like prisoners.

I think perhaps we mean different things by deploy on save. When I
say
deploy I mean it in the J2EE sense, where the container re-loads my
WAR package. In my case, this re-loads my Spring context and a few
dozen
JPA entity beans, which takes up to 15 seconds on my relatively modern
laptop. There is no way rearranging my markup (or running it on a
fully
certified J2EE server) would turn this into milliseconds.

True. deploy on save is not invented here. It is a term used in
IDEs. The IDE decides what deployment method to use depending on file
location etc.. That is one of two reasons why I would recommend to not
store page markup in Java package directories.


Look, the only reason I took up this (now too long) thread is your use
of the words best practice, which implies a broadly held consensus.
Now that you've included as I see it I'm happy to let it drop.

Wrong.

Best practice does not imply broadly held consensus at all. I am not
using this as a buzzword as you are. If I invent a better mouse trap
today that is more effective at delivering the outcome than any other
technique, while the better mouse trap is not even available or known
to everyone, then using it becomes best practice overnight.

Regards

Bernard


-
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



Central feedback-panel?

2010-06-06 Thread shox
Hi,

I have a Base-Layout and a changing content in a wicket:child-component.

Can I have a central Dialog, like a jQuery UI-Dialog  ( 
http://jqueryui.com/demos/dialog/ ) or better like the messages from 
stackoverflow (little bar  that gets the Feedback-Messages and pops up at the 
top of the page, stacking and cancel-able) that my child-page can call and 
that pops up then?


Following use-case:

Baseclass  Login-Form:
Login-Form processes user-input, seems correct, the AjaxBehavior is called.
But in the backend there is a error with the database.

So I now want to write there or in the Behavior error(i.e. Sorry, a DB error 
occurred) and either the bar pops up itself or I can make it appear without 
re-rendering the whole page? Best case would be if the function to call or the 
Element to use would be located in the Base-page.

Is that possible?
I am sorry if this is a simple task, but I couldn't figure it out.

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



Re: Central feedback-panel?

2010-06-06 Thread Jeremy Thomerson
On Sun, Jun 6, 2010 at 11:05 PM, shox vishapxtr...@googlemail.com wrote:

 Hi,

 I have a Base-Layout and a changing content in a wicket:child-component.

 Can I have a central Dialog, like a jQuery UI-Dialog  (
 http://jqueryui.com/demos/dialog/ ) or better like the messages from
 stackoverflow (little bar  that gets the Feedback-Messages and pops up at
 the top of the page, stacking and cancel-able) that my child-page can call
 and that pops up then?


 Following use-case:

 Baseclass  Login-Form:
 Login-Form processes user-input, seems correct, the AjaxBehavior is called.
 But in the backend there is a error with the database.

 So I now want to write there or in the Behavior error(i.e. Sorry, a DB
 error occurred) and either the bar pops up itself or I can make it appear
 without re-rendering the whole page? Best case would be if the function to
 call or the Element to use would be located in the Base-page.

 Is that possible?
 I am sorry if this is a simple task, but I couldn't figure it out.

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


Sure, use the built-in feedback mechanism, but write your own custom
renderer.  In other words, when there is a validation error, etc,
Component#error (or #info, #warn, etc.) are called.  Typically, you add a
FeedbackPanel to the page and this displays the messages as ullimessage
1/lilimessage 2/li/ul

Instead of using the built in FeedbackPanel, just write your own (look at
FeedbackPanel for help on how to get / clear the messages, etc).  It can
render them into a dialog, toaster, etc.


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