Re: Markup Rendering issues
On Wed, Mar 5, 2008 at 5:01 PM, Erik van Oosten [EMAIL PROTECTED] wrote: Hi Jörn, -- Ids This one of the exceptions in just taking existing HTML. Our designers also use jquery and solved the problem by using classes. Something like: class=idCommentForm. For jquery it doesn't matter much, and by including id in the class name the intend is still clear. While you are right that it is just as easy to jQuery to select classes, its not a real replacement. When performance matters, the difference between #id and .id can be quite huge. Richard's suggestion to use setMarkupId works for me, thanks Richard. -- Wicket tags This is all time high FAQ :) Do getMarkupSettings().setStripWicketTags(true) in the init() of your application class. (I still wonder why it is not the default.) That works perfect, thanks. I prefer a rendering that is the same in both development and deployment - if my clientside script relies on development-only markup, my deployed application would behave quite differently. -- Url handling There is a lot to say on this topic (and a lot has been said). Its best to search the lists and ask again with more specific questions. Mounting bookmarkable pages could indeed alleviate your problem. Mounting is typically done in the init() method of your application. Ok, I'll give mounting a try and see how far I can get. Thanks Jörn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Markup Rendering issues
Hi, I've got a few rendering issues with wicket: I'd like to use IDs to select elements via jQuery on the clientside, eg. a form with wicket:id=commentForm should also have id=commentForm. Wicket generates id=commentForm4 or id=commentForm5 - I've got no idea where that number comes from. Specifying an id-attribute doesn't help, it gets overwritten. So far I was unable to select elements via jQuery using the wicket:id attribute, most likely the namespace and colon kills the attribute selector. In other words: How can I instruct Wicket to render and static id-attribute? Another, similar issue: Wicket renders stuff like wicket:child and wicket:panel into the HTML markup. While the browser ignores it, I don't know why Wicket doesn't filter out those instructional markups instead. Is that configurable? All in all, I'd like to use Wicket without making it obvious to someone reading the markup that Wicket is used to generate it. So not tags and attributes with the wicket namespace should appear in the markup - I'm not using Wickets Ajax stuff anyway. For completeness, the action attribute of my form must be modified, too. Currently the contain something like ../?wicket:interface=:1:loginForm::IFormSubmitListener::. How can I replace that, eg. mount a static URL for that form? I guess most of this is easy to resolve and I just don't know enough about Wicket, yet. Pointers or solutions are both highly appreciated. Thanks Jörn Zaefferer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Markup Rendering issues
afaik you can set a static id using component.setMarkupId(some id); you can also get at the wicket markup id using component.getMarkupId() (so long as you set component.setOutputMarkupId(true) on your component), this is useful when you are writing your javascript in java as a string then outputting it. for removing the wicket tags you can look here http://cwiki.apache.org/confluence/display/WICKET/How+to+remove+wicket+markup+from+output Can't help with the form one, I dont know if that is possible. Richard Jörn Zaefferer-2 wrote: Hi, I've got a few rendering issues with wicket: I'd like to use IDs to select elements via jQuery on the clientside, eg. a form with wicket:id=commentForm should also have id=commentForm. Wicket generates id=commentForm4 or id=commentForm5 - I've got no idea where that number comes from. Specifying an id-attribute doesn't help, it gets overwritten. So far I was unable to select elements via jQuery using the wicket:id attribute, most likely the namespace and colon kills the attribute selector. In other words: How can I instruct Wicket to render and static id-attribute? Another, similar issue: Wicket renders stuff like wicket:child and wicket:panel into the HTML markup. While the browser ignores it, I don't know why Wicket doesn't filter out those instructional markups instead. Is that configurable? All in all, I'd like to use Wicket without making it obvious to someone reading the markup that Wicket is used to generate it. So not tags and attributes with the wicket namespace should appear in the markup - I'm not using Wickets Ajax stuff anyway. For completeness, the action attribute of my form must be modified, too. Currently the contain something like ../?wicket:interface=:1:loginForm::IFormSubmitListener::. How can I replace that, eg. mount a static URL for that form? I guess most of this is easy to resolve and I just don't know enough about Wicket, yet. Pointers or solutions are both highly appreciated. Thanks Jörn Zaefferer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Markup-Rendering-issues-tp15852773p15853077.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Markup Rendering issues
Hi Jörn, -- Ids This one of the exceptions in just taking existing HTML. Our designers also use jquery and solved the problem by using classes. Something like: class=idCommentForm. For jquery it doesn't matter much, and by including id in the class name the intend is still clear. -- Wicket tags This is all time high FAQ :) Do getMarkupSettings().setStripWicketTags(true) in the init() of your application class. (I still wonder why it is not the default.) -- Url handling There is a lot to say on this topic (and a lot has been said). Its best to search the lists and ask again with more specific questions. Mounting bookmarkable pages could indeed alleviate your problem. Mounting is typically done in the init() method of your application. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ Jörn Zaefferer wrote: Hi, I've got a few rendering issues with wicket: I'd like to use IDs to select elements via jQuery on the clientside, eg. a form with wicket:id=commentForm should also have id=commentForm. Wicket generates id=commentForm4 or id=commentForm5 - I've got no idea where that number comes from. Specifying an id-attribute doesn't help, it gets overwritten. So far I was unable to select elements via jQuery using the wicket:id attribute, most likely the namespace and colon kills the attribute selector. In other words: How can I instruct Wicket to render and static id-attribute? Another, similar issue: Wicket renders stuff like wicket:child and wicket:panel into the HTML markup. While the browser ignores it, I don't know why Wicket doesn't filter out those instructional markups instead. Is that configurable? All in all, I'd like to use Wicket without making it obvious to someone reading the markup that Wicket is used to generate it. So not tags and attributes with the wicket namespace should appear in the markup - I'm not using Wickets Ajax stuff anyway. For completeness, the action attribute of my form must be modified, too. Currently the contain something like ../?wicket:interface=:1:loginForm::IFormSubmitListener::. How can I replace that, eg. mount a static URL for that form? I guess most of this is easy to resolve and I just don't know enough about Wicket, yet. Pointers or solutions are both highly appreciated. Thanks Jörn Zaefferer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Markup Rendering issues
-- Wicket tags This is all time high FAQ :) Do getMarkupSettings().setStripWicketTags(true) in the init() of your application class. (I still wonder why it is not the default.) Don't explicitly turn off wicket tag, unless you have real good reason to. This setting is automatically determined by the development/deployment configuration. When run in 'deployment' mode, wicket tags are stripped. In development mode, they are not to help debugging. You control the development/deployment mode in web.xml: init-param param-nameconfiguration/param-name param-valuedevelopment or deployment/param-value init-param On Wed, Mar 5, 2008 at 8:01 AM, Erik van Oosten [EMAIL PROTECTED] wrote: Hi Jörn, -- Ids This one of the exceptions in just taking existing HTML. Our designers also use jquery and solved the problem by using classes. Something like: class=idCommentForm. For jquery it doesn't matter much, and by including id in the class name the intend is still clear. -- Wicket tags This is all time high FAQ :) Do getMarkupSettings().setStripWicketTags(true) in the init() of your application class. (I still wonder why it is not the default.) -- Url handling There is a lot to say on this topic (and a lot has been said). Its best to search the lists and ask again with more specific questions. Mounting bookmarkable pages could indeed alleviate your problem. Mounting is typically done in the init() method of your application. Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ Jörn Zaefferer wrote: Hi, I've got a few rendering issues with wicket: I'd like to use IDs to select elements via jQuery on the clientside, eg. a form with wicket:id=commentForm should also have id=commentForm. Wicket generates id=commentForm4 or id=commentForm5 - I've got no idea where that number comes from. Specifying an id-attribute doesn't help, it gets overwritten. So far I was unable to select elements via jQuery using the wicket:id attribute, most likely the namespace and colon kills the attribute selector. In other words: How can I instruct Wicket to render and static id-attribute? Another, similar issue: Wicket renders stuff like wicket:child and wicket:panel into the HTML markup. While the browser ignores it, I don't know why Wicket doesn't filter out those instructional markups instead. Is that configurable? All in all, I'd like to use Wicket without making it obvious to someone reading the markup that Wicket is used to generate it. So not tags and attributes with the wicket namespace should appear in the markup - I'm not using Wickets Ajax stuff anyway. For completeness, the action attribute of my form must be modified, too. Currently the contain something like ../?wicket:interface=:1:loginForm::IFormSubmitListener::. How can I replace that, eg. mount a static URL for that form? I guess most of this is easy to resolve and I just don't know enough about Wicket, yet. Pointers or solutions are both highly appreciated. Thanks Jörn Zaefferer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Markup Rendering issues
Hi Gin, I understand the reasoning. I have just never ever had any use for this debugging feature. Oh, well. It is only one line of code ;) Regards, Erik. -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ Gin Yeah wrote: -- Wicket tags This is all time high FAQ :) Do getMarkupSettings().setStripWicketTags(true) in the init() of your application class. (I still wonder why it is not the default.) Don't explicitly turn off wicket tag, unless you have real good reason to. This setting is automatically determined by the development/deployment configuration. When run in 'deployment' mode, wicket tags are stripped. In development mode, they are not to help debugging. You control the development/deployment mode in web.xml: init-param param-nameconfiguration/param-name param-valuedevelopment or deployment/param-value init-param - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]