Gluon Android POST request - javafx
hi please i have a login button that sends a post request to an api before switching views with javafx gluon.
this works well on desktop but does not work on the android packaged apk
package com.nphcda.views;
import com.gluonhq.attach.settings.SettingsService;
import com.gluonhq.attach.util.Services;
import com.gluonhq.charm.glisten.animation.BounceInRightTransition;
import com.gluonhq.charm.glisten.application.AppManager;
import com.gluonhq.charm.glisten.application.MobileApplication;
import com.gluonhq.charm.glisten.control.Alert;
import com.gluonhq.charm.glisten.control.AppBar;
import com.gluonhq.charm.glisten.mvc.View;
import com.gluonhq.charm.glisten.visual.MaterialDesignIcon;
import com.google.gson.Gson;
import com.nphcda.User;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Platform;
import javafx.fxml.FXML;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
public class SecondaryPresenter implements Serializable {
#FXML
private View secondary;
#FXML
private TextField usernametf;
#FXML
private TextField passwordtf;
#FXML
private Button login;
#FXML
private Button login2;
String token;
String BACKENDURL = "nphcdainternal.herokuapp.com";
boolean isValid = false;
public void initialize() {
secondary.setShowTransitionFactory(BounceInRightTransition::new);
secondary.showingProperty().addListener((obs, oldValue, newValue) -> {
if (newValue) {
}
});
AppManager.getInstance().switchView("Primary View");
}
#FXML
void sendData() {
Platform.runLater(() -> {
try {
boolean isValid = authenticate(usernametf.getText(), passwordtf.getText());
if (isValid) {
Services.get(SettingsService.class).ifPresent(settings -> {
settings.store("username", usernametf.getText());
settings.store("token", token);
});
AppManager.getInstance().switchView("Primary View");
} else {
Alert notifyme = new Alert(AlertType.ERROR, "INCORRECT USERNAME/PASSWORD");
notifyme.showAndWait();
}
} catch (Exception ex) {
System.out.println("cant load");
Logger.getLogger(SecondaryPresenter.class.getName()).log(Level.SEVERE, null, ex);
ex.printStackTrace();
}
});
}
#FXML
void sendData2() {
AppManager.getInstance().switchView("Primary View");
}
public boolean authenticate(String username, String password) {
// The token request URL
final String tokenUrl = "https://" + BACKENDURL + "/authenticate";
HttpClient client = HttpClientBuilder.create().build();
HttpPost post = new HttpPost(tokenUrl);
post.setHeader("Content-type", "application/json");
HttpResponse response = null;
System.out.println(new Gson().toJson(new AuthDTO(username, password)));
try {
post.setEntity(new StringEntity(new Gson().toJson(new AuthDTO(username, password))));
response = client.execute(post);
// System.out.println("bodyy" + EntityUtils.toString(response.getEntity()));
token = EntityUtils.toString(response.getEntity());
System.out.println("code" + response.getStatusLine().getStatusCode());
if (response.getStatusLine().getStatusCode() != 200) {
return false;
}
} catch (Exception ex) {
ex.printStackTrace();
Alert notifyme = new Alert(AlertType.ERROR, "NETWORK ERROR. contact administrator");
notifyme.showAndWait();
return false;
}
return true;
}
public void loadProperties() throws IOException {
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("app.properties");
Properties appProps = new Properties();
appProps.load(inputStream);
token = appProps.getProperty("token");
BACKENDURL = appProps.getProperty("backend");
}
public boolean getTokenForCode(String code) {
// The token request URL
final String tokenUrl = "https://" + BACKENDURL + "/hello";
// Using HttpClient to make the POST to exchange the auth code for the token
HttpClient client = HttpClientBuilder.create().build();
HttpPost post = new HttpPost(tokenUrl);
post.addHeader("Bearer ", code);
// Execute the request
HttpResponse response = null;
try {
response = client.execute(post);
} catch (IOException ex) {
Logger.getLogger(SecondaryPresenter.class.getName()).log(Level.SEVERE, null, ex);
}
// Print the status code
System.out.println("Response Code : " + response.getStatusLine().getStatusCode());
if (response.getStatusLine().getStatusCode() != 200) {
return false;
}
return true;
}
}
class AuthDTO {
String username;
String password;
public AuthDTO(String username, String password) {
this.username = username;
this.password = password;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
#Override
public String toString() {
return "{\"username\": " + username + "\" password\":" + password + '}';
}
}
the switching of views works cant seem to figure out why the button click is not working, also the alert does not pop up. tried both javafx alertand gluon alert.
update
it works after running gluon:runagent but currently getting an error on logcat
android not able to call the endpoint
5-31 08:30:35.728 D/GraalCompiled(29525): Exception in thread "JavaFX Application Thread" java.lang.NoClassDefFoundError: Could not initialize class java.net.Inet6Address
05-31 08:30:35.728 D/GraalCompiled(29525): at java.lang.Class.ensureInitialized(DynamicHub.java:518)
05-31 08:30:35.728 D/GraalCompiled(29525): at com.oracle.svm.jni.functions.JNIFunctions.FindClass(JNIFunctions.java:351)
05-31 08:30:35.728 D/GraalCompiled(29525): at java.net.Inet4AddressImpl.lookupAllHostAddr(Inet4AddressImpl.java)
05-31 08:30:35.728 D/GraalCompiled(29525): at java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)
05-31 08:30:35.728 D/GraalCompiled(29525): at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519)
05-31 08:30:35.729 D/GraalCompiled(29525): at java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)
05-31 08:30:35.729 D/GraalCompiled(29525): at java.net.InetAddress.getAllByName0(InetAddress.java:1509)
05-31 08:30:35.729 D/GraalCompiled(29525): at java.net.InetAddress.getAllByName(InetAddress.java:1368)
05-31 08:30:35.729 D/GraalCompiled(29525): at java.net.InetAddress.getAllByName(InetAddress.java:1302)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
05-31 08:30:35.729 D/GraalCompiled(29525): at com.nphcda.views.SecondaryPresenter.authenticate(SecondaryPresenter.java:118)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.nphcda.views.SecondaryPresenter.lambda$sendData$2(SecondaryPresenter.java:71)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
05-31 08:30:35.730 D/GraalCompiled(29525): at java.security.AccessController.executePrivileged(AccessController.java:169)
05-31 08:30:35.730 D/GraalCompiled(29525): at java.security.AccessController.doPrivileged(AccessController.java:91)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
05-31 08:30:35.730 D/GraalCompiled(29525): at java.lang.Thread.run(Thread.java:829)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:704)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202)
05-31 08:30:35.727 D/GraalCompiled(29525): traceEvent: Pushing TouchState[0] to TouchPipeline[SmallMove]
05-31 08:30:35.727 D/GraalCompiled(29525): traceEvent: Pushing TouchState[0] to TouchPipeline[SmallMove]
05-31 08:30:35.727 D/GraalCompiled(29525): traceEvent: Applying SmallMove to TouchState[0]
05-31 08:30:35.727 D/GraalCompiled(29525): traceEvent: Set TouchState[0]
05-31 08:30:35.727 D/GraalCompiled(29525): traceEvent: Set MouseState[x=77,y=367,wheel=0,buttonsPressed=IntSet[]]
05-31 08:30:35.728 D/GraalCompiled(29525): {"username":"leksyde","password":"1234"}
05-31 08:30:35.728 D/GraalCompiled(29525): Exception in thread "JavaFX Application Thread" java.lang.NoClassDefFoundError: Could not initialize class java.net.Inet6Address
05-31 08:30:35.728 D/GraalCompiled(29525): at java.lang.Class.ensureInitialized(DynamicHub.java:518)
05-31 08:30:35.728 D/GraalCompiled(29525): at com.oracle.svm.jni.functions.JNIFunctions.FindClass(JNIFunctions.java:351)
05-31 08:30:35.728 D/GraalCompiled(29525): at java.net.Inet4AddressImpl.lookupAllHostAddr(Inet4AddressImpl.java)
05-31 08:30:35.728 D/GraalCompiled(29525): at java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)
05-31 08:30:35.728 D/GraalCompiled(29525): at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519)
05-31 08:30:35.729 D/GraalCompiled(29525): at java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)
05-31 08:30:35.729 D/GraalCompiled(29525): at java.net.InetAddress.getAllByName0(InetAddress.java:1509)
05-31 08:30:35.729 D/GraalCompiled(29525): at java.net.InetAddress.getAllByName(InetAddress.java:1368)
05-31 08:30:35.729 D/GraalCompiled(29525): at java.net.InetAddress.getAllByName(InetAddress.java:1302)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
05-31 08:30:35.729 D/GraalCompiled(29525): at com.nphcda.views.SecondaryPresenter.authenticate(SecondaryPresenter.java:118)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.nphcda.views.SecondaryPresenter.lambda$sendData$2(SecondaryPresenter.java:71)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
05-31 08:30:35.730 D/GraalCompiled(29525): at java.security.AccessController.executePrivileged(AccessController.java:169)
05-31 08:30:35.730 D/GraalCompiled(29525): at java.security.AccessController.doPrivileged(AccessController.java:91)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
05-31 08:30:35.730 D/GraalCompiled(29525): at java.lang.Thread.run(Thread.java:829)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:704)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202)
05-31 08:30:35.727 D/GraalCompiled(29525): traceEvent: Applying SmallMove to TouchState[0]
05-31 08:30:35.727 D/GraalCompiled(29525): traceEvent: Set TouchState[0]
05-31 08:30:35.727 D/GraalCompiled(29525): traceEvent: Set MouseState[x=77,y=367,wheel=0,buttonsPressed=IntSet[]]
05-31 08:30:35.728 D/GraalCompiled(29525): {"username":"leksyde","password":"1234"}
05-31 08:30:35.728 D/GraalCompiled(29525): Exception in thread "JavaFX Application Thread" java.lang.NoClassDefFoundError: Could not initialize class java.net.Inet6Address
05-31 08:30:35.728 D/GraalCompiled(29525): at java.lang.Class.ensureInitialized(DynamicHub.java:518)
05-31 08:30:35.728 D/GraalCompiled(29525): at com.oracle.svm.jni.functions.JNIFunctions.FindClass(JNIFunctions.java:351)
05-31 08:30:35.728 D/GraalCompiled(29525): at java.net.Inet4AddressImpl.lookupAllHostAddr(Inet4AddressImpl.java)
05-31 08:30:35.728 D/GraalCompiled(29525): at java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)
05-31 08:30:35.728 D/GraalCompiled(29525): at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519)
05-31 08:30:35.729 D/GraalCompiled(29525): at java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)
05-31 08:30:35.729 D/GraalCompiled(29525): at java.net.InetAddress.getAllByName0(InetAddress.java:1509)
05-31 08:30:35.729 D/GraalCompiled(29525): at java.net.InetAddress.getAllByName(InetAddress.java:1368)
05-31 08:30:35.729 D/GraalCompiled(29525): at java.net.InetAddress.getAllByName(InetAddress.java:1302)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
05-31 08:30:35.729 D/GraalCompiled(29525): at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
05-31 08:30:35.729 D/GraalCompiled(29525): at com.nphcda.views.SecondaryPresenter.authenticate(SecondaryPresenter.java:118)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.nphcda.views.SecondaryPresenter.lambda$sendData$2(SecondaryPresenter.java:71)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
05-31 08:30:35.730 D/GraalCompiled(29525): at java.security.AccessController.executePrivileged(AccessController.java:169)
05-31 08:30:35.730 D/GraalCompiled(29525): at java.security.AccessController.doPrivileged(AccessController.java:91)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
05-31 08:30:35.730 D/GraalCompiled(29525): at java.lang.Thread.run(Thread.java:829)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:704)
05-31 08:30:35.730 D/GraalCompiled(29525): at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202)
06-01 08:55:53.507 D/GraalCompiled(29103): Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.net.SocksSocketImpl
06-01 08:55:53.507 D/GraalCompiled(29103): at java.net.Socket.setImpl(Socket.java:523)
06-01 08:55:53.507 D/GraalCompiled(29103): Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.net.SocksSocketImpl
06-01 08:55:53.507 D/GraalCompiled(29103): at java.net.Socket.setImpl(Socket.java:523)
06-01 08:55:53.507 D/GraalCompiled(29103): ... 56 more
06-01 08:55:53.507 D/GraalCompiled(29103): ... 56 more
06-01 08:55:53.507 D/GraalCompiled(29103): Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.net.SocksSocketImpl
06-01 08:55:53.507 D/GraalCompiled(29103): at java.net.Socket.setImpl(Socket.java:523)
06-01 08:55:53.507 D/GraalCompiled(29103): Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.net.SocksSocketImpl
Related
oneToMany JPA spring
I am trying to link two errors, but I am falling out Here's a error: mappedBy reference an unknown target entity property: com.proxy.ProxyBase.proxy_server in com.accounts.AllAccountsBase.proxies First model #Data #Entity #Table(name = "all_accounts") public class AllAccountsBase { #Id #Column(name = "login", nullable = false, unique = true) private String login; #Column(name = "password") private String password; #Column(name = "old_password") private String oldPassword; #Column(name = "phone") private String phone; #Column(name = "recovery_email") private String recoveryEmail; #Column(name = "recovery_pass") private String recoveryPass; #Column(name = "virt_machine") private String machineName; #OneToOne(cascade = CascadeType.ALL) #JoinColumn(name = "personal_data_id") private PersonalData personalData; #Column(name = "account_status") private Integer accountStatus; #Column(name = "time_update") private Timestamp timeUpdate; #Column(name = "server_group") private String serverGroup; #Column(name = "server", nullable = false, unique = true) private String server; #OneToMany( mappedBy = "proxy", cascade = CascadeType.ALL, fetch = FetchType.LAZY ) private Collection<ProxyBase> proxies = new ArrayList<>(); } In the model, I added a relationship one to many, and vice versa in the other Second model #Data #Entity #Table(name = "proxy") public class ProxyBase implements Serializable { #Id #Column(name = "server", nullable = false, unique = true) private String server; #Column(name = "proxy_data") private String proxyData; #ManyToOne(fetch = FetchType.LAZY) #JoinColumn(name = "all_accounts_server") private AllAccountsBase allAccountsBase; } Help please
I did it differently: #Data #Entity #Table(name = "proxy") public class ProxyBase implements Serializable { #Id #GeneratedValue(strategy = GenerationType.AUTO) #Column(name = "id") private Long id; #Column(name = "server", nullable = false) private String server; #Column(name = "proxy_data") private String proxyData; } and #Data #Entity #Table(name = "all_accounts") public class AllAccountsBase implements Serializable { #Id #Column(name = "login", nullable = false, unique = true) private String login; #Column(name = "password") private String password; #Column(name = "old_password") private String oldPassword; #Column(name = "phone") private String phone; #Column(name = "recovery_email") private String recoveryEmail; #Column(name = "recovery_pass") private String recoveryPass; #Column(name = "virt_machine") private String machineName; #OneToOne(cascade = CascadeType.ALL) #JoinColumn(name = "personal_data_id") private PersonalData personalData; #Column(name = "account_status") private Integer accountStatus; #Column(name = "time_update") private Timestamp timeUpdate; #Column(name = "server_group", nullable = false) private String serverGroup; #ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) #JoinTable( name = "proxy_key", joinColumns = #JoinColumn(name = "server_group", referencedColumnName = "server_group"), inverseJoinColumns = #JoinColumn(name = "proxy_server_group", referencedColumnName = "server")) private Collection<ProxyBase> proxies = new ArrayList<>(); }
Firebase authentication, IOS results in PlatformException
Trying to use firebase authentication. Works perfectly for Android, but for IOS I am getting PlatformException(ERROR_INTERNAL_ERROR, An internal error has occurred, print and inspect the error details for more information., null). Biggest issue is the error has no details. Flutter Doctor reports no issues. globals.user = (await FirebaseAuth.instance.createUserWithEmailAndPassword( email: email, password: pw, )) .user; Restarted application in 1,443ms. [VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: PlatformException(ERROR_INTERNAL_ERROR, An internal error has occurred, print and inspect the error details for more information., null) [38;5;244m#0 StandardMethodCodec.decodeEnvelope[39;49m [38;5;244m#1 MethodChannel.invokeMethod[39;49m <asynchronous suspension> [38;5;244m#2 MethodChannel.invokeMapMethod[39;49m <asynchronous suspension> [38;5;248m#3 FirebaseAuth.createUserWithEmailAndPassword[39;49m <asynchronous suspension> [38;5;248m#4 _HomePageState._retrieveAccountInfo[39;49m <asynchronous suspension> [38;5;248m#5 _HomePageState.initState[39;49m [38;5;244m#6 StatefulElement._firstBuild[39;49m [38;5;244m#7 ComponentElement.mount[39;49m [38;5;244m#8 Element.inflateWidget[39;49m [38;5;244m#9 Element.updateChild[39;49m [38;5;244m#10 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#11 Element.inflateWidget[39;49m [38;5;244m#12 Element.updateChild[39;49m [38;5;244m#13 ComponentElement.performRebuild[39;49m [38;5;244m#14 Element.rebuild[39;49m [38;5;244m#15 ComponentElement._firstBuild[39;49m [38;5;244m#16 ComponentElement.mount[39;49m [38;5;244m#17 Element.inflateWidget[39;49m [38;5;244m#18 Element.updateChild[39;49m [38;5;244m#19 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#20 Element.inflateWidget[39;49m [38;5;244m#21 Element.updateChild[39;49m [38;5;244m#22 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#23 Element.inflateWidget[39;49m [38;5;244m#24 MultiChildRenderObjectElement.mount[39;49m [38;5;244m#25 Element.inflateWidget[39;49m [38;5;244m#26 Element.updateChild[39;49m [38;5;244m#27 ComponentElement.performRebuild[39;49m [38;5;244m#28 Element.rebuild[39;49m [38;5;244m#29 ComponentElement._firstBuild[39;49m [38;5;244m#30 StatefulElement._firstBuild[39;49m [38;5;244m#31 ComponentElement.mount[39;49m [38;5;244m#32 Element.inflateWidget[39;49m [38;5;244m#33 Element.updateChild[39;49m [38;5;244m#34 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#35 Element.inflateWidget[39;49m [38;5;244m#36 Element.updateChild[39;49m [38;5;244m#37 ComponentElement.performRebuild[39;49m [38;5;244m#38 Element.rebuild[39;49m [38;5;244m#39 ComponentElement._firstBuild[39;49m [38;5;244m#40 StatefulElement._firstBuild[39;49m [38;5;244m#41 ComponentElement.mount[39;49m [38;5;244m#42 Element.inflateWidget[39;49m [38;5;244m#43 Element.updateChild[39;49m [38;5;244m#44 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#45 Element.inflateWidget[39;49m [38;5;244m#46 Element.updateChild[39;49m [38;5;244m#47 ComponentElement.performRebuild[39;49m [38;5;244m#48 Element.rebuild[39;49m [38;5;244m#49 ComponentElement._firstBuild[39;49m [38;5;244m#50 StatefulElement._firstBuild[39;49m [38;5;244m#51 ComponentElement.mount[39;49m [38;5;244m#52 Element.inflateWidget[39;49m [38;5;244m#53 Element.updateChild[39;49m [38;5;244m#54 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#55 Element.inflateWidget[39;49m [38;5;244m#56 Element.updateChild[39;49m [38;5;244m#57 ComponentElement.performRebuild[39;49m [38;5;244m#58 Element.rebuild[39;49m [38;5;244m#59 ComponentElement._firstBuild[39;49m [38;5;244m#60 StatefulElement._firstBuild[39;49m [38;5;244m#61 ComponentElement.mount[39;49m [38;5;244m#62 Element.inflateWidget[39;49m [38;5;244m#63 Element.updateChild[39;49m [38;5;244m#64 ComponentElement.performRebuild[39;49m [38;5;244m#65 Element.rebuild[39;49m [38;5;244m#66 ComponentElement._firstBuild[39;49m [38;5;244m#67 ComponentElement.mount[39;49m [38;5;244m#68 Element.inflateWidget[39;49m [38;5;244m#69 Element.updateChild[39;49m [38;5;244m#70 ComponentElement.performRebuild[39;49m [38;5;244m#71 Element.rebuild[39;49m [38;5;244m#72 ComponentElement._firstBuild[39;49m [38;5;244m#73 StatefulElement._firstBuild[39;49m [38;5;244m#74 ComponentElement.mount[39;49m [38;5;244m#75 Element.inflateWidget[39;49m [38;5;244m#76 Element.updateChild[39;49m [38;5;244m#77 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#78 Element.inflateWidget[39;49m [38;5;244m#79 Element.updateChild[39;49m [38;5;244m#80 ComponentElement.performRebuild[39;49m [38;5;244m#81 Element.rebuild[39;49m [38;5;244m#82 ComponentElement._firstBuild[39;49m [38;5;244m#83 ComponentElement.mount[39;49m [38;5;244m#84 Element.inflateWidget[39;49m [38;5;244m#85 Element.updateChild[39;49m [38;5;244m#86 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#87 Element.inflateWidget[39;49m [38;5;244m#88 Element.updateChild[39;49m [38;5;244m#89 ComponentElement.performRebuild[39;49m [38;5;244m#90 Element.rebuild[39;49m [38;5;244m#91 ComponentElement._firstBuild[39;49m [38;5;244m#92 StatefulElement._firstBuild[39;49m [38;5;244m#93 ComponentElement.mount[39;49m [38;5;244m#94 Element.inflateWidget[39;49m [38;5;244m#95 Element.updateChild[39;49m [38;5;244m#96 ComponentElement.performRebuild[39;49m [38;5;244m#97 Element.rebuild[39;49m [38;5;244m#98 ComponentElement._firstBuild[39;49m [38;5;244m#99 ComponentElement.mount[39;49m [38;5;244m#100 Element.inflateWidget[39;49m [38;5;244m#101 Element.updateChild[39;49m [38;5;244m#102 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#103 Element.inflateWidget[39;49m [38;5;244m#104 Element.updateChild[39;49m [38;5;244m#105 ComponentElement.performRebuild[39;49m [38;5;244m#106 Element.rebuild[39;49m [38;5;244m#107 ComponentElement._firstBuild[39;49m [38;5;244m#108 ComponentElement.mount[39;49m [38;5;244m#109 Element.inflateWidget[39;49m [38;5;244m#110 Element.updateChild[39;49m [38;5;244m#111 ComponentElement.performRebuild[39;49m [38;5;244m#112 Element.rebuild[39;49m [38;5;244m#113 ComponentElement._firstBuild[39;49m [38;5;244m#114 StatefulElement._firstBuild[39;49m [38;5;244m#115 ComponentElement.mount[39;49m [38;5;244m#116 Element.inflateWidget[39;49m [38;5;244m#117 Element.updateChild[39;49m [38;5;244m#118 ComponentElement.performRebuild[39;49m [38;5;244m#119 Element.rebuild[39;49m [38;5;244m#120 ComponentElement._firstBuild[39;49m [38;5;244m#121 StatefulElement._firstBuild[39;49m [38;5;244m#122 ComponentElement.mount[39;49m [38;5;244m#123 Element.inflateWidget[39;49m [38;5;244m#124 MultiChildRenderObjectElement.mount[39;49m [38;5;244m#125 Element.inflateWidget[39;49m [38;5;244m#126 Element.updateChild[39;49m [38;5;244m#127 _TheatreElement.mount[39;49m [38;5;244m#128 Element.inflateWidget[39;49m [38;5;244m#129 Element.updateChild[39;49m [38;5;244m#130 ComponentElement.performRebuild[39;49m [38;5;244m#131 Element.rebuild[39;49m [38;5;244m#132 ComponentElement._firstBuild[39;49m [38;5;244m#133 StatefulElement._firstBuild[39;49m [38;5;244m#134 ComponentElement.mount[39;49m [38;5;244m#135 Element.inflateWidget[39;49m [38;5;244m#136 Element.updateChild[39;49m [38;5;244m#137 ComponentElement.performRebuild[39;49m [38;5;244m#138 Element.rebuild[39;49m [38;5;244m#139 ComponentElement._firstBuild[39;49m [38;5;244m#140 ComponentElement.mount[39;49m [38;5;244m#141 Element.inflateWidget[39;49m [38;5;244m#142 Element.updateChild[39;49m [38;5;244m#143 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#144 Element.inflateWidget[39;49m [38;5;244m#145 Element.updateChild[39;49m [38;5;244m#146 ComponentElement.performRebuild[39;49m [38;5;244m#147 Element.rebuild[39;49m [38;5;244m#148 ComponentElement._firstBuild[39;49m [38;5;244m#149 StatefulElement._firstBuild[39;49m [38;5;244m#150 ComponentElement.mount[39;49m [38;5;244m#151 Element.inflateWidget[39;49m [38;5;244m#152 Element.updateChild[39;49m [38;5;244m#153 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#154 Element.inflateWidget[39;49m [38;5;244m#155 Element.updateChild[39;49m [38;5;244m#156 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#157 Element.inflateWidget[39;49m [38;5;244m#158 Element.updateChild[39;49m [38;5;244m#159 ComponentElement.performRebuild[39;49m [38;5;244m#160 Element.rebuild[39;49m [38;5;244m#161 ComponentElement._firstBuild[39;49m [38;5;244m#162 StatefulElement._firstBuild[39;49m [38;5;244m#163 ComponentElement.mount[39;49m [38;5;244m#164 Element.inflateWidget[39;49m [38;5;244m#165 Element.updateChild[39;49m [38;5;244m#166 ComponentElement.performRebuild[39;49m [38;5;244m#167 Element.rebuild[39;49m [38;5;244m#168 ComponentElement._firstBuild[39;49m [38;5;244m#169 ComponentElement.mount[39;49m [38;5;244m#170 Element.inflateWidget[39;49m [38;5;244m#171 Element.updateChild[39;49m [38;5;244m#172 ComponentElement.performRebuild[39;49m [38;5;244m#173 Element.rebuild[39;49m [38;5;244m#174 ComponentElement._firstBuild[39;49m [38;5;244m#175 ComponentElement.mount[39;49m [38;5;244m#176 Element.inflateWidget[39;49m [38;5;244m#177 Element.updateChild[39;49m [38;5;244m#178 ComponentElement.performRebuild[39;49m [38;5;244m#179 Element.rebuild[39;49m [38;5;244m#180 ComponentElement._firstBuild[39;49m [38;5;244m#181 ComponentElement.mount[39;49m [38;5;244m#182 Element.inflateWidget[39;49m [38;5;244m#183 Element.updateChild[39;49m [38;5;244m#184 ComponentElement.performRebuild[39;49m [38;5;244m#185 Element.rebuild[39;49m [38;5;244m#186 ComponentElement._firstBuild[39;49m [38;5;244m#187 ComponentElement.mount[39;49m [38;5;244m#188 Element.inflateWidget[39;49m [38;5;244m#189 Element.updateChild[39;49m [38;5;244m#190 ComponentElement.performRebuild[39;49m [38;5;244m#191 Element.rebuild[39;49m [38;5;244m#192 ComponentElement._firstBuild[39;49m [38;5;244m#193 ComponentElement.mount[39;49m [38;5;244m#194 Element.inflateWidget[39;49m [38;5;244m#195 Element.updateChild[39;49m [38;5;244m#196 ComponentElement.performRebuild[39;49m [38;5;244m#197 Element.rebuild[39;49m [38;5;244m#198 ComponentElement._firstBuild[39;49m [38;5;244m#199 ComponentElement.mount[39;49m [38;5;244m#200 Element.inflateWidget[39;49m [38;5;244m#201 Element.updateChild[39;49m [38;5;244m#202 ComponentElement.performRebuild[39;49m [38;5;244m#203 Element.rebuild[39;49m [38;5;244m#204 ComponentElement._firstBuild[39;49m [38;5;244m#205 StatefulElement._firstBuild[39;49m [38;5;244m#206 ComponentElement.mount[39;49m [38;5;244m#207 Element.inflateWidget[39;49m [38;5;244m#208 Element.updateChild[39;49m [38;5;244m#209 ComponentElement.performRebuild[39;49m [38;5;244m#210 Element.rebuild[39;49m [38;5;244m#211 ComponentElement._firstBuild[39;49m [38;5;244m#212 ComponentElement.mount[39;49m [38;5;244m#213 Element.inflateWidget[39;49m [38;5;244m#214 Element.updateChild[39;49m [38;5;244m#215 ComponentElement.performRebuild[39;49m [38;5;244m#216 Element.rebuild[39;49m [38;5;244m#217 ComponentElement._firstBuild[39;49m [38;5;244m#218 ComponentElement.mount[39;49m [38;5;244m#219 Element.inflateWidget[39;49m [38;5;244m#220 Element.updateChild[39;49m [38;5;244m#221 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#222 Element.inflateWidget[39;49m [38;5;244m#223 Element.updateChild[39;49m [38;5;244m#224 ComponentElement.performRebuild[39;49m [38;5;244m#225 Element.rebuild[39;49m [38;5;244m#226 ComponentElement._firstBuild[39;49m [38;5;244m#227 ComponentElement.mount[39;49m [38;5;244m#228 Element.inflateWidget[39;49m [38;5;244m#229 Element.updateChild[39;49m [38;5;244m#230 ComponentElement.performRebuild[39;49m [38;5;244m#231 Element.rebuild[39;49m [38;5;244m#232 ComponentElement._firstBuild[39;49m [38;5;244m#233 ComponentElement.mount[39;49m [38;5;244m#234 Element.inflateWidget[39;49m [38;5;244m#235 Element.updateChild[39;49m [38;5;244m#236 ComponentElement.performRebuild[39;49m [38;5;244m#237 Element.rebuild[39;49m [38;5;244m#238 ComponentElement._firstBuild[39;49m [38;5;244m#239 ComponentElement.mount[39;49m [38;5;244m#240 Element.inflateWidget[39;49m [38;5;244m#241 Element.updateChild[39;49m [38;5;244m#242 ComponentElement.performRebuild[39;49m [38;5;244m#243 Element.rebuild[39;49m [38;5;244m#244 ComponentElement._firstBuild[39;49m [38;5;244m#245 ComponentElement.mount[39;49m [38;5;244m#246 Element.inflateWidget[39;49m [38;5;244m#247 Element.updateChild[39;49m [38;5;244m#248 ComponentElement.performRebuild[39;49m [38;5;244m#249 Element.rebuild[39;49m [38;5;244m#250 ComponentElement._firstBuild[39;49m [38;5;244m#251 ComponentElement.mount[39;49m [38;5;244m#252 Element.inflateWidget[39;49m [38;5;244m#253 Element.updateChild[39;49m [38;5;244m#254 SingleChildRenderObjectElement.mount[39;49m [38;5;244m#255 Element.inflateWidget[39;49m [38;5;244m#256 Element.updateChild[39;49m [38;5;244m#257 ComponentElement.performRebuild[39;49m [38;5;244m#258 Element.rebuild[39;49m [38;5;244m#259 ComponentElement._firstBuild[39;49m [38;5;244m#260 StatefulElement._firstBuild[39;49m [38;5;244m#261 ComponentElement.mount[39;49m [38;5;244m#262 Element.inflateWidget[39;49m [38;5;244m#263 Element.updateChild[39;49m [38;5;244m#264 ComponentElement.performRebuild[39;49m [38;5;244m#265 Element.rebuild[39;49m [38;5;244m#266 ComponentElement._firstBuild[39;49m [38;5;244m#267 ComponentElement.mount[39;49m [38;5;244m#268 Element.inflateWidget[39;49m [38;5;244m#269 Element.updateChild[39;49m [38;5;244m#270 ComponentElement.performRebuild[39;49m [38;5;244m#271 Element.rebuild[39;49m [38;5;244m#272 ComponentElement._firstBuild[39;49m [38;5;244m#273 ComponentElement.mount[39;49m [38;5;244m#274 Element.inflateWidget[39;49m [38;5;244m#275 Element.updateChild[39;49m [38;5;244m#276 ComponentElement.performRebuild[39;49m [38;5;244m#277 Element.rebuild[39;49m [38;5;244m#278 ComponentElement._firstBuild[39;49m [38;5;244m#279 StatefulElement._firstBuild[39;49m [38;5;244m#280 ComponentElement.mount[39;49m [38;5;244m#281 Element.inflateWidget[39;49m [38;5;244m#282 Element.updateChild[39;49m [38;5;244m#283 ComponentElement.performRebuild[39;49m [38;5;244m#284 Element.rebuild[39;49m [38;5;244m#285 ComponentElement._firstBuild[39;49m [38;5;244m#286 ComponentElement.mount[39;49m [38;5;244m#287 Element.inflateWidget[39;49m [38;5;244m#288 Element.updateChild[39;49m [38;5;244m#289 ComponentElement.performRebuild[39;49m [38;5;244m#290 Element.rebuild[39;49m [38;5;244m#291 ComponentElement._firstBuild[39;49m [38;5;244m#292 StatefulElement._firstBuild[39;49m [38;5;244m#293 ComponentElement.mount[39;49m [38;5;244m#294 Element.inflateWidget[39;49m [38;5;244m#295 Element.updateChild[39;49m [38;5;244m#296 ComponentElement.performRebuild[39;49m [38;5;244m#297 Element.rebuild[39;49m [38;5;244m#298 ComponentElement._firstBuild[39;49m [38;5;244m#299 StatefulElement._firstBuild[39;49m [38;5;244m#300 ComponentElement.mount[39;49m [38;5;244m#301 Element.inflateWidget[39;49m [38;5;244m#302 Element.updateChild[39;49m [38;5;244m#303 RenderObjectToWidgetElement._rebuild[39;49m [38;5;244m#304 RenderObjectToWidgetElement.mount[39;49m [38;5;244m#305 RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure>[39;49m [38;5;244m#306 BuildOwner.buildScope[39;49m [38;5;244m#307 RenderObjectToWidgetAdapter.attachToRenderTree[39;49m [38;5;244m#308 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.attachRootWidget[39;49m [38;5;244m#309 runApp[39;49m [38;5;248m#310 main.<anonymous closure>[39;49m [38;5;244m#311 _rootRunUnary (dart:async/zone.dart:1132:38)[39;49m [38;5;244m#312 _CustomZone.runUnary (dart:async/zone.dart:1029:19)[39;49m [38;5;244m#313 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)[39;49m [38;5;244m#314 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)[39;49m [38;5;244m#315 Future._propagateToListeners (dart:async/future_impl.dart:668:32)[39;49m [38;5;244m#316 Future._complete (dart:async/future_impl.dart:473:7)[39;49m [38;5;244m#317 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)[39;49m [38;5;244m#318 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:28:18)[39;49m [38;5;244m#319 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)[39;49m #320 SystemChrome.setPreferredOrientations (package:flutter/src/services/system_chrome.dart) [38;5;244m#321 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)[39;49m [38;5;244m#322 _rootRunUnary (dart:async/zone.dart:1132:38)[39;49m [38;5;244m#323 _CustomZone.runUnary (dart:async/zone.dart:1029:19)[39;49m [38;5;244m#324 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)[39;49m [38;5;244m#325 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)[39;49m [38;5;244m#326 Future._propagateToListeners (dart:async/future_impl.dart:668:32)[39;49m [38;5;244m#327 Future._complete (dart:async/future_impl.dart:473:7)[39;49m [38;5;244m#328 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)[39;49m [38;5;244m#329 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:28:18)[39;49m [38;5;244m#330 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)[39;49m #331 OptionalMethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart) [38;5;244m#332 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)[39;49m [38;5;244m#333 _rootRunUnary (dart:async/zone.dart:1132:38)[39;49m [38;5;244m#334 _CustomZone.runUnary (dart:async/zone.dart:1029:19)[39;49m [38;5;244m#335 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)[39;49m [38;5;244m#336 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)[39;49m [38;5;244m#337 Future._propagateToListeners (dart:async/future_impl.dart:668:32)[39;49m [38;5;244m#338 Future._complete (dart:async/future_impl.dart:473:7)[39;49m [38;5;244m#339 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)[39;49m [38;5;244m#340 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:28:18)[39;49m [38;5;244m#341 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)[39;49m #342 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart) [38;5;244m#343 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)[39;49m [38;5;244m#344 _rootRunUnary (dart:async/zone.dart:1132:38)[39;49m [38;5;244m#345 _CustomZone.runUnary (dart:async/zone.dart:1029:19)[39;49m [38;5;244m#346 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)[39;49m [38;5;244m#347 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)[39;49m [38;5;244m#348 Future._propagateToListeners (dart:async/future_impl.dart:668:32)[39;49m [38;5;244m#349 Future._completeWithValue (dart:async/future_impl.dart:483:5)[39;49m [38;5;244m#350 Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:513:7)[39;49m [38;5;244m#351 _rootRun (dart:async/zone.dart:1124:13)[39;49m [38;5;244m#352 _CustomZone.run (dart:async/zone.dart:1021:19)[39;49m [38;5;244m#353 _CustomZone.runGuarded (dart:async/zone.dart:923:7)[39;49m [38;5;244m#354 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)[39;49m [38;5;244m#355 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)[39;49m [38;5;244m#356 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)[39;49m Update: Tried using the swift version of firebase auth and got the exact same results. error code 17999 which Indicates an internal error occurred.
Generalized Method of Moment (GMM) estimation on zoo series
I have this zoo series. > str(ALLXbm) ‘zoo’ series from 1998-01-01 to 2017-12-01 Data: num [1:240, 1:19] 0.00289 0.00992 -0.00424 0.07958 -0.035 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:19] "DE" "DB" "DM" "IE" ... Index: Date[1:240], format: "1998-01-01" "1998-02-01" "1998-03-01" "1998-04-01" "1998-05-01" "1998-06-01" "1998-07-01" ... The followings are the dput() results. The dependent variable is > dput(ALLX$DE) structure(c(" 0.0028923077", " 0.0099160000", "-0.0042440000", " 0.0795800000", "-0.0350041667", "-0.2480500000", " 0.0042880000", "-0.1620888889", " 0.0637518519", " 0.0928178571", "-0.0974379310", "-0.1012612903", "-0.0141133333", " 0.0373500000", " 0.0420323529", " 0.0406323529", "-0.0479314286", " 0.0393514286", " 0.0134594595", "-0.0042162162", " 0.0282142857", "-0.0467717949", " 0.0271487179", " 0.0484756757", " 0.0388105263", "-0.0232324324", "-0.1534487179", "-0.0553538462", "-0.0127976190", " 0.0248613636", "-0.0069093023", " 0.0016234043", "-0.0004617021", "-0.0747617021", " 0.0362914894", " 0.0773816327", "-0.0038936170", " 0.0876829787", "-0.0198040000", "-0.0078372549", " 0.0343978723", " 0.0350833333", "-0.0382480000", " 0.0824346939", "-0.0280615385", "-0.0312228070", "-0.1020928571", "-0.1011178571", " 0.0460186441", " 0.0407403509", "-0.0200607143", " 0.1692310345", " 0.1254927273", "-0.0012947368", " 0.0410393443", "-0.0060650000", " 0.1175457627", "-0.0219952381", " 0.0538709677", " 0.1302564516", " 0.0177306452", " 0.0465440678", "-0.0318777778", "-0.0027257576", "-0.0808714286", " 0.0753223881", " 0.0421338235", " 0.0192617647", " 0.0645835821", " 0.0178743243", " 0.0917106667", "-0.0504720000", "-0.0605917808", " 0.0670115942", " 0.0841644737", "-0.0862937500", " 0.0583458333", " 0.0341283951", " 0.0363376623", "-0.0072297619", " 0.0697188235", " 0.0708900000", " 0.0964263736", " 0.0265102273", "-0.0310302326", " 0.0419810000", "-0.0719272727", " 0.0243521739", "-0.0945943925", " 0.0339018868", " 0.0440350000", " 0.0503681818", " 0.0629381356", "-0.0510975000", " 0.0249760684", " 0.0827214876", " 0.0892224806", "-0.0168313043", " 0.0291585366", " 0.0273647541", "-0.0975674242", "-0.0746062016", " 0.0238595238", "-0.0278552000", "-0.0925223077", " 0.0659656934", " 0.0456731343", " 0.0466132450", "-0.0135568493", " 0.0414873016", " 0.0340628205", " 0.0267903846", "-0.0494906667", " 0.0180333333", " 0.0387062500", "-0.0283124183", " 0.0306898810", " 0.0886619048", "-0.0198162921", "-0.0154431818", "-0.0838285714", " 0.0658326531", "-0.0614076503", " 0.0424984211", "-0.0170115000", " 0.0205202970", " 0.0596765258", "-0.0538638298", "-0.0453000000", "-0.0493330317", " 0.0545885714", " 0.1193183168", "-0.0335423810", " 0.0599138393", " 0.0207066964", " 0.0554773756", " 0.0606587156", " 0.0448098039", "-0.0354082569", " 0.0057316038", " 0.0019272727", " 0.0214976303", "-0.0108309179", " 0.0166442211", " 0.0028019512", "-0.0548807910", " 0.0297556962", "-0.0161016854", " 0.0100739726", " 0.0538203704", " 0.0304168724", " 0.0246617647", " 0.0294436975", "-0.0192055300", "-0.0221397906", " 0.0429194215", "-0.1356025974", " 0.0155836364", " 0.0421339806", " 0.0193581152", "-0.0316510526", " 0.0171187192", " 0.0299633484", " 0.0136308017", "-0.0803899225", "-0.0462198413", "-0.0337478469", "-0.0044057018", " 0.0297085185", " 0.0273300000", "-0.0814074689", " 0.0194720183", "-0.0640064885", " 0.0194782979", " 0.0047418868", "-0.0393941634", " 0.0119372093", "-0.0092268116", "-0.0221629956", " 0.0803489130", "-0.0976939502", "-0.0391824701", "-0.0672646154", "-0.0124784247", "-0.1038085627", "-0.0105592476", "-0.0279538710", " 0.0196077181", " 0.0338205788", "-0.0189602996", "-0.0860247273", "-0.0478760714", "-0.0510344720", " 0.0275029586", " 0.0428622291", " 0.0166286232", "-0.0288036101", "-0.0180476923", " 0.0393909483", "-0.0641453901", "-0.0841982143", " 0.0047675900", "-0.0240106312", "-0.0700313793", " 0.0733418994", "-0.0533325905", "-0.0331509589", " 0.0489809399", "-0.0736352078", " 0.0240526646", "-0.0939243553", "-0.0042405995", "-0.0387828042", "-0.0470409756", "-0.0931115294", "-0.0910497738", " 0.0013111111", " 0.0348456633", " 0.0705459082", " 0.0758425000", "-0.1478202222", " 0.0717040179", " 0.0569382114", "-0.0945091623", " 0.1044561713", " 0.0293398396", "-0.1272769802", " 0.0325193750", " 0.0277184066", "-0.0341782369", "-0.0250598160", " 0.0189187500", "-0.0074535385", "-0.0359813953", " 0.0160150115", " 0.0476877551", "-0.1018837398", "-0.0427113689", " 0.0191961637", " 0.1059326403"), index = structure(c(883612800, 886291200, 888710400, 891388800, 893980800, 896659200, 899251200, 901929600, 904608000, 907200000, 909878400, 912470400, 915148800, 917827200, 920246400, 922924800, 925516800, 928195200, 930787200, 933465600, 936144000, 938736000, 941414400, 944006400, 946684800, 949363200, 951868800, 954547200, 957139200, 959817600, 962409600, 965088000, 967766400, 970358400, 973036800, 975628800, 978307200, 980985600, 983404800, 986083200, 988675200, 991353600, 993945600, 996624000, 999302400, 1001894400, 1004572800, 1007164800, 1009843200, 1012521600, 1014940800, 1017619200, 1020211200, 1022889600, 1025481600, 1028160000, 1030838400, 1033430400, 1036108800, 1038700800, 1041379200, 1044057600, 1046476800, 1049155200, 1051747200, 1054425600, 1057017600, 1059696000, 1062374400, 1064966400, 1067644800, 1070236800, 1072915200, 1075593600, 1078099200, 1080777600, 1083369600, 1086048000, 1088640000, 1091318400, 1093996800, 1096588800, 1099267200, 1101859200, 1104537600, 1107216000, 1109635200, 1112313600, 1114905600, 1117584000, 1120176000, 1122854400, 1125532800, 1128124800, 1130803200, 1133395200, 1136073600, 1138752000, 1141171200, 1143849600, 1146441600, 1149120000, 1151712000, 1154390400, 1157068800, 1159660800, 1162339200, 1164931200, 1167609600, 1170288000, 1172707200, 1175385600, 1177977600, 1180656000, 1183248000, 1185926400, 1188604800, 1191196800, 1193875200, 1196467200, 1199145600, 1201824000, 1204329600, 1207008000, 1209600000, 1212278400, 1214870400, 1217548800, 1220227200, 1222819200, 1225497600, 1228089600, 1230768000, 1233446400, 1235865600, 1238544000, 1241136000, 1243814400, 1246406400, 1249084800, 1251763200, 1254355200, 1257033600, 1259625600, 1262304000, 1264982400, 1267401600, 1270080000, 1272672000, 1275350400, 1277942400, 1280620800, 1283299200, 1285891200, 1288569600, 1291161600, 1293840000, 1296518400, 1298937600, 1301616000, 1304208000, 1306886400, 1309478400, 1312156800, 1314835200, 1317427200, 1320105600, 1322697600, 1325376000, 1328054400, 1330560000, 1333238400, 1335830400, 1338508800, 1341100800, 1343779200, 1346457600, 1349049600, 1351728000, 1354320000, 1356998400, 1359676800, 1362096000, 1364774400, 1367366400, 1370044800, 1372636800, 1375315200, 1377993600, 1380585600, 1383264000, 1385856000, 1388534400, 1391212800, 1393632000, 1396310400, 1398902400, 1401580800, 1404172800, 1406851200, 1409529600, 1412121600, 1414800000, 1417392000, 1420070400, 1422748800, 1425168000, 1427846400, 1430438400, 1433116800, 1435708800, 1438387200, 1441065600, 1443657600, 1446336000, 1448928000, 1451606400, 1454284800, 1456790400, 1459468800, 1462060800, 1464739200, 1467331200, 1470009600, 1472688000, 1475280000, 1477958400, 1480550400, 1483228800, 1485907200, 1488326400, 1491004800, 1493596800, 1496275200, 1498867200, 1501545600, 1504224000, 1506816000, 1509494400, 1512086400), tzone = "UTC", tclass = "Date"), class = c("xts", "zoo"), .indexCLASS = "Date", tclass = "Date", .indexTZ = "UTC", tzone = "UTC", .Dim = c(240L, 1L), .Dimnames = list(NULL, "DE")) and the independent variable dput() is > dput(ALLX$SMB_L) structure(c("-0.0465320170", "-0.0697526439", " 0.0273518415", "-0.0740531793", " 0.0316742119", " 0.0152537452", "-0.0264616225", " 0.0288440266", "-0.1158052743", "-0.1629207669", "-0.0321036909", "-0.0155047450", "-0.0826901559", "-0.0958867805", "-0.1071221681", "-0.0448685814", "-0.0246406184", "-0.1212194655", "-0.0753136163", " 0.0410887618", "-0.0472807197", "-0.0821359482", "-0.0538328997", "-0.1193170755", " 0.0451348940", "-0.0666430865", " 0.1030261973", "-0.0512679603", "-0.0858501881", "-0.1100767741", " 0.2831559983", " 0.0049661923", "-0.0466122487", "-0.0566777104", "-0.0268275721", "-0.0592022576", " 0.0095647556", "-0.0369526728", "-0.0246719322", " 0.0051186559", "-0.0462739541", "-0.1027257463", " 0.0041844398", "-0.0443327227", " 0.0513661492", "-0.0672995604", "-0.0509956017", "-0.0377391126", " 0.1208954628", " 0.0656631973", "-0.0109091553", "-0.0319298318", " 0.0762361370", " 0.0082987739", " 0.0744911252", " 0.0268991873", " 0.0106712270", "-0.0162705327", "-0.0030339799", " 0.0437060161", "-0.0484248103", "-0.0131028206", "-0.0551732558", "-0.0827144280", " 0.0412271313", "-0.0625801905", "-0.0531687861", "-0.0194387563", " 0.0651252536", " 0.0185203178", " 0.0212495415", "-0.0058409877", " 0.0005737324", " 0.0033661115", " 0.0166057656", " 0.0273215778", "-0.0160116096", "-0.0516442850", " 0.0622634418", " 0.0059385646", "-0.1501443652", " 0.0901923236", " 0.0033375512", "-0.0753535560", " 0.0112127728", " 0.0174845326", " 0.0523481171", "-0.0687008257", " 0.0364307873", " 0.0136230636", " 0.0058142113", " 0.0554519027", " 0.0519022715", "-0.0570389442", "-0.0170328466", " 0.0497557753", "-0.0022714909", " 0.0319902902", " 0.0567367912", "-0.0807706219", " 0.0858961234", " 0.0222949488", " 0.0242892126", " 0.0215915873", " 0.0537398523", "-0.0632469276", " 0.0111250970", " 0.0532290206", "-0.0146115567", "-0.0497947429", "-0.0261614454", "-0.0231347005", " 0.1003858901", " 0.0445487378", "-0.0150134676", "-0.0457789040", "-0.0034933110", "-0.0668239816", "-0.0159024243", "-0.0077140317", " 3.6823096028", "-0.0901045024", "-0.0143629036", "-0.0098836289", "-0.0311347099", "-0.0151321886", "-0.0233462522", "-0.0458991158", "-0.0282613742", "-0.0779876682", " 0.0117855889", "-0.0893392649", "-0.0328418515", "-0.0090601777", "-0.0322611560", "-0.0641631336", "-0.0595636188", " 0.0206379342", "-0.0891543562", " 0.0717742257", "-0.0461537130", "-0.0954444539", "-0.0543154861", "-0.0714790350", " 0.0474770475", "-0.0037168520", "-0.0077110744", "-0.0355079545", " 0.0354765095", "-0.0152485350", "-0.0037694163", " 0.0088693973", "-0.0013576659", "-0.0158975649", "-0.0569949742", "-0.0047187899", " 0.0359832832", " 0.0048156392", "-0.0213823507", "-0.0253481502", "-0.0305909946", "-0.0459944589", " 0.0697664274", "-0.0053565569", " 0.0119311291", "-0.0068067904", "-0.0046527312", "-0.0317481424", " 0.0322190631", " 0.0095508469", " 0.0009492415", " 0.0109837401", " 0.0129883296", "-0.0230918819", " 0.0291994624", " 0.0053826778", " 0.0116937939", " 0.7079728243", " 0.0103552944", " 0.0016701093", " 0.0283116307", " 0.0367686262", " 0.0352952954", " 0.0251452293", " 0.6522285618", " 0.0005676648", "-0.0355068478", " 0.0383934967", "-0.0054156326", "-0.0288061771", " 0.0076047198", "-0.0261335344", " 0.0587687305", " 0.0635220884", "-0.0035395762", " 0.0638110053", "-0.0043276134", "-0.0183498085", "-0.0306437649", "-0.0153833213", " 0.0165571651", "-0.0014514427", "-0.0111594992", " 0.0061678879", "-0.0898811021", "-0.0106517096", " 0.0582380903", " 0.0471135599", " 0.0946734825", " 0.0518059714", " 0.0075574758", " 0.0078389969", " 0.0998944849", "-0.0259425031", "-0.0031939886", "-0.0078991041", "-0.0583307843", "-0.0664592297", "-0.0428550515", "-0.0282970576", " 0.0085063220", " 0.0027516516", "-0.0413816309", "-0.0080472825", " 0.0001809490", "-0.0719654720", " 0.0250187336", " 0.0017591069", "-0.0352040828", " 0.0032731177", "-0.0182234806", "-0.0276918415", " 0.0246782744", " 0.0390556980", "-0.0240913343", "-0.0207629243", " 0.0289632858", "-0.0398579730", " 0.0048926744", "-0.0397687581"), index = structure(c(883612800, 886291200, 888710400, 891388800, 893980800, 896659200, 899251200, 901929600, 904608000, 907200000, 909878400, 912470400, 915148800, 917827200, 920246400, 922924800, 925516800, 928195200, 930787200, 933465600, 936144000, 938736000, 941414400, 944006400, 946684800, 949363200, 951868800, 954547200, 957139200, 959817600, 962409600, 965088000, 967766400, 970358400, 973036800, 975628800, 978307200, 980985600, 983404800, 986083200, 988675200, 991353600, 993945600, 996624000, 999302400, 1001894400, 1004572800, 1007164800, 1009843200, 1012521600, 1014940800, 1017619200, 1020211200, 1022889600, 1025481600, 1028160000, 1030838400, 1033430400, 1036108800, 1038700800, 1041379200, 1044057600, 1046476800, 1049155200, 1051747200, 1054425600, 1057017600, 1059696000, 1062374400, 1064966400, 1067644800, 1070236800, 1072915200, 1075593600, 1078099200, 1080777600, 1083369600, 1086048000, 1088640000, 1091318400, 1093996800, 1096588800, 1099267200, 1101859200, 1104537600, 1107216000, 1109635200, 1112313600, 1114905600, 1117584000, 1120176000, 1122854400, 1125532800, 1128124800, 1130803200, 1133395200, 1136073600, 1138752000, 1141171200, 1143849600, 1146441600, 1149120000, 1151712000, 1154390400, 1157068800, 1159660800, 1162339200, 1164931200, 1167609600, 1170288000, 1172707200, 1175385600, 1177977600, 1180656000, 1183248000, 1185926400, 1188604800, 1191196800, 1193875200, 1196467200, 1199145600, 1201824000, 1204329600, 1207008000, 1209600000, 1212278400, 1214870400, 1217548800, 1220227200, 1222819200, 1225497600, 1228089600, 1230768000, 1233446400, 1235865600, 1238544000, 1241136000, 1243814400, 1246406400, 1249084800, 1251763200, 1254355200, 1257033600, 1259625600, 1262304000, 1264982400, 1267401600, 1270080000, 1272672000, 1275350400, 1277942400, 1280620800, 1283299200, 1285891200, 1288569600, 1291161600, 1293840000, 1296518400, 1298937600, 1301616000, 1304208000, 1306886400, 1309478400, 1312156800, 1314835200, 1317427200, 1320105600, 1322697600, 1325376000, 1328054400, 1330560000, 1333238400, 1335830400, 1338508800, 1341100800, 1343779200, 1346457600, 1349049600, 1351728000, 1354320000, 1356998400, 1359676800, 1362096000, 1364774400, 1367366400, 1370044800, 1372636800, 1375315200, 1377993600, 1380585600, 1383264000, 1385856000, 1388534400, 1391212800, 1393632000, 1396310400, 1398902400, 1401580800, 1404172800, 1406851200, 1409529600, 1412121600, 1414800000, 1417392000, 1420070400, 1422748800, 1425168000, 1427846400, 1430438400, 1433116800, 1435708800, 1438387200, 1441065600, 1443657600, 1446336000, 1448928000, 1451606400, 1454284800, 1456790400, 1459468800, 1462060800, 1464739200, 1467331200, 1470009600, 1472688000, 1475280000, 1477958400, 1480550400, 1483228800, 1485907200, 1488326400, 1491004800, 1493596800, 1496275200, 1498867200, 1501545600, 1504224000, 1506816000, 1509494400, 1512086400), tzone = "UTC", tclass = "Date"), class = c("xts", "zoo"), .indexCLASS = "Date", tclass = "Date", .indexTZ = "UTC", tzone = "UTC", .Dim = c(240L, 1L), .Dimnames = list(NULL, "SMB_L")) I wanted a gmm rolling regression and i set up the code below. dogmm <- function(x) {gmm(ALLX$DE~ ALLX$SMB_L, x = ALLXbm)} kk=rollapply(dogmm, ALLXbm,width=24, by.column = FALSE) Error message is Error in zoo(rval, index(x)[i]) : “x” : attempt to define invalid zoo object I really can't figure out even if i spent much time. when i tried the gmm code alone, it does work gmm(ALLXbm$DE~ ALLXbm$SMB_L, x = ALLXbm). I'm thinking that, the problem is in the rollapply code. I'm sorry this's my first attempt to GMM. Please some help?
How Can I get Viewbag.Title data in ActionFilter?
I have created ActionFilter in MVC that converts view content to JSON and I want to get the ViewBag.Title parameter contained in the view in the OnResultExecuted method?.how can I get the parameter which I want ? public class ViewToJSON : ActionFilterAttribute { private HtmlTextWriter tw; private StringWriter sw; private StringBuilder sb; private HttpWriter output; public override void OnActionExecuting(ActionExecutingContext filterContext) { sb = new StringBuilder(); sw = new StringWriter(sb); tw = new HtmlTextWriter(sw); output = (HttpWriter)filterContext.RequestContext.HttpContext.Response.Output; filterContext.RequestContext.HttpContext.Response.Output = tw; filterContext.RequestContext.HttpContext.Response.ContentType = "application/json"; } public override void OnActionExecuted(ActionExecutedContext filterContext) { base.OnActionExecuted(filterContext); var result = filterContext.Result as ViewResult; if (result != null) { result.MasterName = "~/Views/Layouts/_Empty.cshtml"; } } public override void OnResultExecuted(ResultExecutedContext filterContext) { var settings = new HtmlMinificationSettings { WhitespaceMinificationMode = WhitespaceMinificationMode.Aggressive, RemoveRedundantAttributes = false, RemoveHttpProtocolFromAttributes = true, RemoveHttpsProtocolFromAttributes = true, AttributeQuotesRemovalMode = HtmlAttributeQuotesRemovalMode.KeepQuotes }; var htmlMinifier = new HtmlMinifier(settings); MarkupMinificationResult result = htmlMinifier.Minify(sb.ToString(), generateStatistics: true); string json_title = "JSON - "; string json_content = "{"; json_content = json_content + "\"title\":"; json_content = json_content + "\""+ json_title +"\","; json_content = json_content + "\"head\":"; json_content = json_content + "\"\","; json_content = json_content + "\"body\":{"; json_content = json_content + "\"json_content\":"; json_content = json_content + JsonConvert.SerializeObject(result.MinifiedContent.ToString()); json_content = json_content+"},"; json_content = json_content + "\"foot\":"; json_content = json_content + "\"\""; json_content = json_content + "}"; output.Write(json_content); base.OnResultExecuted(filterContext); } }
try this: filterContext.Controller.ViewBag.tilte= "Hello";
Plugin to add pagination in a Flex Datagrid?
Is there a library or plugin that could be added to a Flex project to add pagination to a Flex Datagrid?
The source code for this paginated datagrid can be found here. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="InitApp()" xmlns:MyComp="*"> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.events.ItemClickEvent; import mx.controls.Button; import mx.controls.Alert; [Bindable] public var myData:ArrayCollection = new ArrayCollection(); public var orgData:ArrayCollection = new ArrayCollection(); [Bindable] public var nav:ArrayCollection = new ArrayCollection(); public var pageSize:uint = 10; public var navSize:uint = 10; private var index:uint = 0; private var navPage:uint = 1; private function InitApp():void { for( var x:uint = 1; x <= 500; x++ ) { var obj:Object = new Object(); obj.Id = x.toString(); obj.Name = "Column " + x.toString(); obj.Street = "5555 Street"; obj.Title = "CEO"; obj.City = "El Paso"; orgData.addItem(obj); } refreshDataProvider(index); createNavBar(Math.ceil(orgData.length/pageSize)); } private function createNavBar(pages:uint = 1,set:uint = 0):void { nav.removeAll(); if( pages > 1 ) { if( set != 0 ) { nav.addItem({label:"<<",data:0}); if( (set - navSize ) >= 0 ) { nav.addItem({label:"<",data:set - navSize}); } else { nav.addItem({label:"<",data:0}); } } for( var x:uint = 0; x < navSize; x++) { var pg:uint = x + set; nav.addItem({label: pg + 1,data: pg}); } if( pg < pages - 1 ) { nav.addItem({label:">",data:pg + 1}); nav.addItem({label:">>",data:pages - pageSize}); } } } private function navigatePage(event:ItemClickEvent):void { refreshDataProvider(event.item.data); var lb:String = event.item.label.toString(); if( lb.indexOf("<") > -1 || lb.indexOf(">") > -1 ) { createNavBar(Math.ceil(orgData.length/pageSize),event.item.data); if( event.item.data == 0 ) { pageNav.selectedIndex = 0; } else { pageNav.selectedIndex = 2; } } } private function refreshDataProvider(start:uint):void { myData = new ArrayCollection( orgData.source.slice((start * pageSize),(start * pageSize) + pageSize) ); } ]]> </mx:Script> <mx:VBox verticalGap="0"> <mx:DataGrid id="dg" dataProvider="{myData}"></mx:DataGrid> <mx:ToggleButtonBar id="pageNav" itemClick="navigatePage(event)" dataProvider="{nav}" width="{dg.width}"></mx:ToggleButtonBar> </mx:VBox> </mx:Application>