AlertBlock issue

255 views
Skip to first unread message

Deepak Kumar

unread,
Jun 28, 2012, 10:05:52 AM6/28/12
to gwt-bo...@googlegroups.com
when i used the ui code as specified in the demo <b:AlertBlock style="info" heading="Heading">AlertBlock</b:AlertBlock> Error was thrown as Cannot parse value: "info" as type Style. Any ideas?

Carlos Alexandro Becker

unread,
Jun 28, 2012, 3:38:48 PM6/28/12
to gwt-bo...@googlegroups.com
Hmm, I think that's a error in our showcase. Try to use
type

instead of
style

.

Deepak Kumar

unread,
Jun 29, 2012, 12:43:00 AM6/29/12
to gwt-bo...@googlegroups.com
Tried got the error Cannot parse value: "info" as type AlertType
Message has been deleted

Ohashi, Keisuke

unread,
Jun 29, 2012, 12:48:46 AM6/29/12
to gwt-bo...@googlegroups.com
Our showcase have bug about AlertBlock code.
I'll fix it.
Message has been deleted

soundTricker

unread,
Jun 30, 2012, 1:40:18 AM6/30/12
to gwt-bo...@googlegroups.com
I fixed it.

Dhamu

unread,
Aug 10, 2012, 2:11:32 AM8/10/12
to gwt-bo...@googlegroups.com
Hi,

I have issue in Alertblock. When I close the alertblock using the icon which is displayed in right-top, it disappeared but it wont show next time when i calling the same alertblock. Is it bug? or i want to change something in my own code?

Thanks,
Dhamu

On Saturday, June 30, 2012 11:10:18 AM UTC+5:30, soundTricker wrote:
I fixed it.

Ohashi, Keisuke

unread,
Aug 11, 2012, 1:25:17 AM8/11/12
to gwt-bo...@googlegroups.com
Hi Dhamu.
Could you show any code?

Dhamu

unread,
Aug 11, 2012, 6:32:03 AM8/11/12
to gwt-bo...@googlegroups.com
Hi,

Basically i am reusing the alertblock code for handling different messages.
Once i close the alertblock  which is in the right top, it disappears. Again i have need to show alert message for another procees, it wont show up.
I will show some example code.

Ui-binder Code:

<b:AlertBlock ui:field="alertMsg" visible="false" type="DEFAULT"></b:AlertBlock>

java code:

@UiField AlertBlock alertMsg;
alertMsg.addCloseHandler(new CloseHandler(){

@Override
public void onClose(CloseEvent closeEvent) {
alertMsg.setVisible(false);
}
});
alertMsg.setType("DEFAULT");
alertMsg.setVisible(true);
alertMsg.setText("Test");


Second time i am using the same alertblock.
just i am using below code,

alertMsg.setType("ERROR");
alertMsg.setVisible(true);
alertMsg.setText("Its error. pls double check it");


Thanks & Regards,
Dhamu

Ohashi, Keisuke

unread,
Aug 12, 2012, 5:29:07 AM8/12/12
to gwt-bo...@googlegroups.com

umm...
maybe you should create new instance of alertblock and replace it from original alertblock.

Alert plugin delete element.
In showcase, I do so.

Regards.

--
keisuke oohashi

Roni Fabio Banaszewski

unread,
Nov 25, 2012, 4:11:52 PM11/25/12
to gwt-bo...@googlegroups.com

Hi, I have a similar problem.

I have a HTMLPanel to save AlertBlocks created programmatically.

<g:HTMLPanel ui:field="passwordSuccessAlertPanel">                      

</g:HTMLPanel>


//method for create AlertBlock programatically
public AlertBlock createAlertBlock(HTMLPanel alertPanel, AlertType alertType, String text){
       
alertPanel.clear();
AlertBlock alert = new AlertBlock(alertType);
alert.setAnimation(true);
alert.setVisible(true);
alert.setClose(true);
alert.setText(text);

alertPanel.add(alert);
return alert;

}


So when the user clicks the X button AlertBlock and soon after a new AlertBlock is inserted in such HTMLPanel, the following exception occurs:

Uncaught exception escaped
com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) @com.google.gwt.dom.client.Node::removeChild(Lcom/google/gwt/dom/client/Node;)([JavaScript object(2545)]): this.removeChild is not a function
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
    at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
    at com.google.gwt.event.dom.client.DomEvent.fireNativeEvent(DomEvent.java:116)
    at com.google.gwt.user.client.ui.Widget.onBrowserEvent(Widget.java:177)
    at com.github.gwtbootstrap.client.ui.base.IconAnchor.onBrowserEvent(IconAnchor.java:222)
    at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1351)
    at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1307)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)

Any idea?
Reply all
Reply to author
Forward
0 new messages