Luiz,

Are you using the @BXML annotation to refer to the 'descricao'
TextInput?  If so, it might be related to applet signing.
Here is a recent thread that discussed how to get access to objects in
unsigned applets.
http://apache-pivot-users.399431.n3.nabble.com/Examples-still-using-namespace-get-instead-of-BXML-td3030718.html#a3031859

And here is the result of a search of the nabble Pivot User mailing
list archives
http://apache-pivot-users.399431.n3.nabble.com/template/NamlServlet.jtp?macro=search_page&node=399431&query=applet+sign+jar&days=0

I don't run any of my apps as applets, so hopefully someone will
correct me soon if I have told you the wrong thing!

Chris

On 17 July 2011 20:31, Luiz Gustavo <[email protected]> wrote:
> Hi,
>
>  I'm facing problems trying to run in browser an application that runs fine
> in desktop.
>
> When I click on a menu item that calls an action that just open an Alert (I
> did it for testing pourpose) it works, but if the called action tries to
> open a frame, it doesn't work.
>
>
> Here's an example of an action that doesn't work:
>
>
>
> Action.getNamedActions().put("abrirCentrosCusto", new Action() {
>             @Override
>             public void perform(Component source) {
>                 try {
>                     BXMLSerializer bxmlSerializer = new BXMLSerializer();
>                     Resources resources = new Resources(CentroCustoFrm.class
>                             .getName(), locale);
>                     // só irá criar a tela uma única vez
>                     if (centroCusto == null) {
>                         centroCusto = (CentroCustoFrm) bxmlSerializer
>                                 .readObject(CentroCustoFrm.class
>                                         .getResource("centro_custo.bxml"),
>                                         resources);
>                     }
>
>                     if (centroCusto.isClosed()) {
>                         centroCusto.open(window);
>                     }
>                 } catch (IOException e) {
>                     // TODO Auto-generated catch block
>                     e.printStackTrace();
>                 } catch (SerializationException e) {
>                     // TODO Auto-generated catch block
>                     e.printStackTrace();
>                 } catch (Exception e) {
>                     // TODO Auto-generated catch block
>                     Alert.alert(e.getMessage(), window);
>                     e.printStackTrace();
>                 }
>             }
>         });
>
>
> I have put some Alert dialogs along this method, to identify where it was
> possible to reach and discovered that bxmlSerializer and resources instances
> are created, but centroCusto don't.
> Alert.alert(e.getMessage(), window) shows this message:
>
>
> descricao is not accessible
>
>
> descricao is an bxml:id in the centro_custo.bxml file:
>
>
>
> <TablePane.Row height="50">
>                 <Form>
>                     <Form.Section>
>
>                         <TextInput Form.label="%lblDescricao" textSize="40"
> bxml:id="descricao"/>
>
>                     </Form.Section>
>                 </Form>
>             </TablePane.Row>
>
>
> Any ideas of what can be done for this method to work fine?
>
>
> --
> Luiz Gustavo S. de Souza
>
> http://luizgustavoss.wordpress.com
>
>
>

Reply via email to