hitrust / google-wave-resources

Automatically exported from code.google.com/p/google-wave-resources
1 stars 0 forks source link

Can't insertAfter() mixed FormElements and PlainText #765

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I would expect this code:
{{{
blip.first("XML").insertAfter(new FormElement(ElementType.RADIO_BUTTON,
                                              "text/css",
                                              MIME_TYPE_RADIO_BUTTON),
                                              new Plaintext("\CSS"));
}}}

to be a more readable version of this code:
{{{
blip.first("XML").insertAfter("CSS")
                 .insertAfter(new FormElement(ElementType.RADIO_BUTTON,
                                              "text/css",
                                              MIME_TYPE_RADIO_BUTTON));
}}}

Instead, the "CSS" doesn't get appended at all.

Original issue reported on code.google.com by rockwalrus@gmail.com on 18 May 2010 at 6:28

GoogleCodeExporter commented 9 years ago
I too had a similar issue :

BlipContentRefs ref = blip.first(ElementType.BUTTON, 
Restriction.of(FormElement.NAME, 
root.ID_BUTT_OPEN_PART + url)); 
ref.replace(new Gadget(root.GADGET_URL + "?" + root.GADGET_FEED_KEY + "=" + 
url));

Till this part, the code works fine; the button "root.ID_BUTT_OPEN_PART" gets 
replaces by the gadget. Now, I need to add one more button named "close" after 
the 
gadget. I used the following :

 ref.insertAfter(new FormElement(ElementType.BUTTON, root.ID_BUTT_CLOSE_PART + url, 
"close"));

The "close" button is not getting appended after the gadget view. Nor is it 
throwing 
any error.

Original comment by bhaskar....@gmail.com on 25 May 2010 at 10:32

GoogleCodeExporter commented 9 years ago
In trying to confirm this bug I found that the code you provided causes waves 
to go 
shiny, so I've logged that as a bug. I'll follow up here once that bug is fixed.

Original comment by joe.gregorio@gmail.com on 27 May 2010 at 9:20