Re: Need to turn off Markupparser : Problem with tag
Hi Martin/All In my page the HTML that is created is dynamic (has embedded widgets or gadgets) and we dont have control over the tags in the wicket page. or tags doesnt have a end tag in its html representation , so it is legitimate. So what i would like to know is if there is someway to disable/turn off the WidgetParser for certain pages so that they can be rendered. Thanks Haritha Martijn Dashorst wrote: > > use instead > > On 4/24/08, hjuturu <[EMAIL PROTECTED]> wrote: >> >> Hi All >> I have some tags in my page whose html representation doesnt have a >> end >> tag. >> When i try to invoke the page using wicket i get a parse exception >> >> java.text.ParseException: Tag '' (line 1, column 1822) has a mismatched >> close tag . >> Is there anyway i can turn off the parser in wicket or have it now set >> to >> XHTML representation. >> Thanks >> Haritha >> >> -- >> View this message in context: >> http://www.nabble.com/Need-to-turn-off-Markupparser-%3A-Problem-with-%3Cparam%3E-tag-tp16851318p16851318.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] >> >> > > > -- > Buy Wicket in Action: http://manning.com/dashorst > Apache Wicket 1.3.2 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.2 > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Need-to-turn-off-Markupparser-%3A-Problem-with-%3Cparam%3E-tag-tp16851318p16908006.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]
Need to turn off Markupparser : Problem with tag
Hi All I have some tags in my page whose html representation doesnt have a end tag. When i try to invoke the page using wicket i get a parse exception java.text.ParseException: Tag '' (line 1, column 1822) has a mismatched close tag . Is there anyway i can turn off the parser in wicket or have it now set to XHTML representation. Thanks Haritha -- View this message in context: http://www.nabble.com/Need-to-turn-off-Markupparser-%3A-Problem-with-%3Cparam%3E-tag-tp16851318p16851318.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: Validate HTML generated from getMarkupResourceStream()
I got a solution for this and would like to share it with those interested I replaced the catch block with this code' catch (Exception e) { getSession().error("Parse Exception Occured"); throw new RestartResponseException(ParseError.class); } Thanks Haritha hjuturu wrote: > > Hi Igor,All > I tried to use MarkupParser as u suggested > This is how my code looks > public IResourceStream getMarkupResourceStream(MarkupContainer container, > Class containerClass){ > IResourceStream rStream = new StringResourceStream(HTMLString); > MarkupResourceStream resource = new > MarkupResourceStream(rStream); > MarkupParser parser = new MarkupParser(resource); > try { > > parser.parse(); > } catch (Exception e) { > setRedirect(true); > setResponsePage(ParseError.class); > } > > return rStream; > } > > What is really weird is that though the the exception is caught in the > catch block, the program flow continues to "return rStream;" statement > and throws the error on the console again. It doesnt go to the response > page that i set in the catch block. > > I am not sure why this happens ? > Thanks > Haritha > > > igor.vaynberg wrote: >> >> you can probably user our markupparser... >> >> -igor >> >> >> On Tue, Apr 1, 2008 at 1:26 PM, hjuturu <[EMAIL PROTECTED]> wrote: >>> >>> Hi All >>> I use a class which implements IMarkupResourceStreamProvider, >>> IMarkupCacheKeyProvider to >>> generated HTML dynamically and sent it to wicket as a IResourceStream. >>> //code snippet >>> public IResourceStream getMarkupResourceStream(MarkupContainer >>> container, >>> Class containerClass){ return new >>> StringResourceStream(HTMLString); >>> } >>> >>> If the HTMLString is not properly formed , wicket throws >>> "java.text.ParseException" and >>> org.apache.wicket.markup.MarkupException. >>> after i set the responsepage. >>> >>> I would like to validate whether this string is correct before it goes >>> to >>> wicket code and a exception is thrown.Is there anyway to validate this >>> HTMLString and catch the exception. >>> >>> If not in wicket are there any third party packages available to >>> validate >>> dynamically generated HTML strings . >>> >>> Thanks All >>> Haritha >>> >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16423755p16423755.html >>> Sent from the Wicket - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- View this message in context: http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16423755p16469586.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: Validate HTML generated from getMarkupResourceStream()
Hi Igor,All I tried to use MarkupParser as u suggested This is how my code looks public IResourceStream getMarkupResourceStream(MarkupContainer container, Class containerClass){ IResourceStream rStream = new StringResourceStream(HTMLString); MarkupResourceStream resource = new MarkupResourceStream(rStream); MarkupParser parser = new MarkupParser(resource); try { parser.parse(); } catch (Exception e) { setRedirect(true); setResponsePage(ParseError.class); } return rStream; } What is really weird is that though the the exception is caught in the catch block, the program flow continues to "return rStream;" statement and throws the error on the console again. It doesnt go to the response page that i set in the catch block. I am not sure why this happens ? Thanks Haritha igor.vaynberg wrote: > > you can probably user our markupparser... > > -igor > > > On Tue, Apr 1, 2008 at 1:26 PM, hjuturu <[EMAIL PROTECTED]> wrote: >> >> Hi All >> I use a class which implements IMarkupResourceStreamProvider, >> IMarkupCacheKeyProvider to >> generated HTML dynamically and sent it to wicket as a IResourceStream. >> //code snippet >> public IResourceStream getMarkupResourceStream(MarkupContainer >> container, >> Class containerClass){ return new >> StringResourceStream(HTMLString); >> } >> >> If the HTMLString is not properly formed , wicket throws >> "java.text.ParseException" and org.apache.wicket.markup.MarkupException. >> after i set the responsepage. >> >> I would like to validate whether this string is correct before it goes >> to >> wicket code and a exception is thrown.Is there anyway to validate this >> HTMLString and catch the exception. >> >> If not in wicket are there any third party packages available to >> validate >> dynamically generated HTML strings . >> >> Thanks All >> Haritha >> >> >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16423755p16423755.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16423755p16468359.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]
Validate HTML generated from getMarkupResourceStream()
Hi All I use a class which implements IMarkupResourceStreamProvider, IMarkupCacheKeyProvider to generated HTML dynamically and sent it to wicket as a IResourceStream. //code snippet public IResourceStream getMarkupResourceStream(MarkupContainer container, Class containerClass){ return new StringResourceStream(HTMLString); } If the HTMLString is not properly formed , wicket throws "java.text.ParseException" and org.apache.wicket.markup.MarkupException. after i set the responsepage. I would like to validate whether this string is correct before it goes to wicket code and a exception is thrown.Is there anyway to validate this HTMLString and catch the exception. If not in wicket are there any third party packages available to validate dynamically generated HTML strings . Thanks All Haritha -- View this message in context: http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16427198p16427198.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]
Validate HTML generated from getMarkupResourceStream()
Hi All I use a class which implements IMarkupResourceStreamProvider, IMarkupCacheKeyProvider to generated HTML dynamically and sent it to wicket as a IResourceStream. //code snippet public IResourceStream getMarkupResourceStream(MarkupContainer container, Class containerClass){ return new StringResourceStream(HTMLString); } If the HTMLString is not properly formed , wicket throws "java.text.ParseException" and org.apache.wicket.markup.MarkupException. after i set the responsepage. I would like to validate whether this string is correct before it goes to wicket code and a exception is thrown.Is there anyway to validate this HTMLString and catch the exception. If not in wicket are there any third party packages available to validate dynamically generated HTML strings . Thanks All Haritha -- View this message in context: http://www.nabble.com/Validate-HTML-generated-from-getMarkupResourceStream%28%29-tp16423755p16423755.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: Add attributes to markup
Hi Igor I have two components AjaxEditableLabel and AjaxEditableMultiLineLabel. I am able to set the style of the AjaxEditableLabel element by using css span.inline-edit input Similarly i would like to add a class to the "TextArea" generated by AjaxEditableMultiLineLabel , so that i can change the text style when the editor opens. Do i use IMarkupFilter for this? Thanks Haritha igor.vaynberg wrote: > > you are talking about adding something to raw markup - eg markup that > is not attached to any component? you can use IMarkupFilter for that > > -igor > > > On Tue, Mar 18, 2008 at 2:42 PM, hjuturu <[EMAIL PROTECTED]> wrote: >> >> Hi All >> In wicket we can use AttributeModifier or AttributeAppender to make >> changes >> to already existing attributes . But is there anyway we can add a new >> attribute to markup using wicket API >> >> e.g : if i have jhsakjhas >> >> i would like to add a class attribute >> jhsakjhas >> >> This attribute has to be done dynamically and shouldnt exist upfront >> >> Thanks >> Haritha >> -- >> View this message in context: >> http://www.nabble.com/Add-attributes-to-markup-tp16131148p16131148.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Add-attributes-to-markup-tp16131148p16131939.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]
Add attributes to markup
Hi All In wicket we can use AttributeModifier or AttributeAppender to make changes to already existing attributes . But is there anyway we can add a new attribute to markup using wicket API e.g : if i have jhsakjhas i would like to add a class attribute jhsakjhas This attribute has to be done dynamically and shouldnt exist upfront Thanks Haritha -- View this message in context: http://www.nabble.com/Add-attributes-to-markup-tp16131148p16131148.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]
AjaxEditableMultiLineLabel in does not work in safari
Hi All, i am using a AjaxEditableLabel and AjaxEditableMultiLineLabel wicket components inside a tag. They both work fine on Firefox and IE7. But when i try it on safari, the AjaxEditableMultiLineLabel component doesnt expand when clicked on. The AjaxEditableLabel component works fine though. Is there any bug associated with AjaxEditableMultiLineLabel components in safari. Can someone please update me about this. Thanks Haritha -- View this message in context: http://www.nabble.com/AjaxEditableMultiLineLabel-in-%3Ctable%3E-does-not-work-in-safari-tp16033319p16033319.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: Hide "Wicket AJAX Debug" window
Thanks Ryan and Gerolf. I put the settings in the init() method and it works fine. hjuturu wrote: > > Hi All > i have a label on my webpage on which i do a in line edit using > AjaxEditableLabel. > I have included wicket-event.js and wicket-ajax.js javascripts in my page. > When i start editing the label the "wicket ajax debug" window appears on > the lower right corner. > how can i hide that window. > Thanks > Haritha > > -- View this message in context: http://www.nabble.com/Hide-%22Wicket-AJAX-Debug%22-window-tp16013820p16032285.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]
Hide "Wicket AJAX Debug" window
Hi All i have a label on my webpage on which i do a in line edit using AjaxEditableLabel. I have included wicket-event.js and wicket-ajax.js javascripts in my page. When i start editing the label the "wicket ajax debug" window appears on the lower right corner. how can i hide that window. Thanks Haritha -- View this message in context: http://www.nabble.com/Hide-%22Wicket-AJAX-Debug%22-window-tp16013820p16013820.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]
form submit using document.form.submit() in wicket
Hi All I have a form in my html page . I am trying to simulate form submit from tag using onclick="document.myForm.submit();". The onSubmit() method my wicket class doesnt get called when i do this. Do i have to use to achieve this. i am using tag so that i can style the buttons as required. Thanks Haritha === Here is the code i am using == To [Email]: document.myForm.submit();">Submit -- View this message in context: http://www.nabble.com/form-submit-using-document.form.submit%28%29-in-wicket-tp15889727p15889727.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]
java.lang.IllegalAccessError: tried to access method org.apache.wicket.Component.onModelChanging()V::: when using AjaxEditableLabel
Hi All, I have a "edit in place" label in my wicket page . When i try to edit it i get this exception. I am using wicket 1.3.1 and Tomcat 6.0.14. Can anyone tell me what is the problem. DEBUG - EditableSNLabel.onSubmit(41) | == in SUBMIT=== Mar 5, 2008 5:58:01 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet default threw exception java.lang.IllegalAccessError: tried to access method org.apache.wicket.Component.onModelChanging()V from class org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1 at org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel$1.onModelChanging(AjaxEditableLabel.java:294) at org.apache.wicket.Component.modelChanging(Component.java:2097) at org.apache.wicket.Component.setModelObject(Component.java:2863) -- View this message in context: http://www.nabble.com/java.lang.IllegalAccessError%3A-tried-to-access-method-org.apache.wicket.Component.onModelChanging%28%29V%3A%3A%3A-when-using-AjaxEditableLabel-tp15864917p15864917.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]
Adding wicket-ajax.js file to my wicket page
Hi All, I am trying to do an inline edit ajax label . This is the snippet of code i am using add(new EditableSNLabel("title"+snote.getId(),new Model(snote.getName(; in my wicket panel. EditableSNLabel extends AjaxEditableLabel class. When i click the label nothing happens. So i am wondering how the necessarily javascript i.e wicket-ajax.js gets included in the wicket page. Thanks Haritha -- View this message in context: http://www.nabble.com/Adding-wicket-ajax.js-file-to-my-wicket-page-tp15863695p15863695.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]